2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2
3         * threadpool.c: notify listener on async processing handles after
4         invoking the async callback. Thanks to Zoltan.
5
6 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
7
8         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
9         avoid code duplication.
10
11         * reflection.h (MonoDynamicImage): New type which is currently unused,
12         but will be used through the ref.emit code in place of 
13         MonoDynamicAssembly.
14
15         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
16         object layout.
17
18         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
19         a MonoDynamicImage instead of just a MonoImage.
20         
21         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
22         icalls to ModuleBuilder but keep their semantics, so they will work
23         with moduleb->assemblyb. This will change later.
24         
25 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
26
27         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
28         object layout.
29
30         * reflection.c (mono_image_build_metadata): Avoid creation of a default
31         main module, since it is now done by the managed code.
32
33 2003-11-03  Martin Baulig  <martin@ximian.com>
34
35         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
36         `ginst->klass' here.
37         (method_encode_methodspec): Don't use the `ginst->generic_method's
38         klass if it's a generic instance, use `ginst->klass' in this case.
39
40 2003-11-03  Martin Baulig  <martin@ximian.com>
41
42         * reflection.c (mono_image_get_generic_method_param_info):
43         Removed, use mono_image_get_generic_param_info() instead.
44         (mono_image_get_type_info): Write the GenericParam table before
45         the Method table.  This is neccessary because in the GenericParam
46         table, type parameters of the class (ie. '!0' etc.) must come
47         before the ones from its generic methods (ie. '!!0' etc).
48
49 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
50
51         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
52
53 2003-11-02  Martin Baulig  <martin@ximian.com>
54
55         * reflection.c (create_generic_typespec): Take a
56         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
57         the generic parameters from it.
58
59 2003-11-02  Martin Baulig  <martin@ximian.com>
60
61         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
62         instead of a `MonoClassField *' since we just need the type.
63         (create_generic_typespec): New static function.  Creates a
64         TypeSpec token for a generic type declaration.
65         (mono_image_get_generic_field_token): New static function.
66         (mono_image_create_token): If we're a FieldBuilder in a generic
67         type declaration, call mono_image_get_generic_field_token() to get
68         the token.
69
70 2003-11-02  Martin Baulig  <martin@ximian.com>
71
72         * reflection.h
73         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
74         `MonoReflectionGenericInst *declaring_type' and
75         `MonoReflectionGenericInst *reflected_type' fields.
76
77         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
78         `MonoReflectionGenericInst *declaring_type' and a
79         `MonoReflectionGenericInst *reflected_type' argument instead of a
80         single `MonoReflectionGenericInst *type' one.  Set
81         `res->declaring_type' and `res->reflected_type' from them.
82         (mono_reflection_inflate_field): Likewise.      
83
84 2003-11-02  Martin Baulig  <martin@ximian.com>
85
86         * class.c (mono_class_setup_vtable): Don't store generic methods
87         in the vtable.  
88
89 2003-11-02  Martin Baulig  <martin@ximian.com>
90
91         * reflection.h (MonoReflectionGenericInst): Added
92         `MonoReflectionType *declaring_type'.
93
94         * reflection.c (mono_reflection_bind_generic_parameters): Use
95         `if (tb->parent)' instead of `klass->parent'.
96
97 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
98
99         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
100         with an empty ASSEMBLY table.
101
102         * reflection.c (mono_image_build_metadata): Avoid using the same loop
103         variable in the inner and outer loops.
104
105 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
106
107         * metadata.h (mono_metadata_make_token): Put parentheses around macro
108         argument.
109
110         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
111         
112         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
113         icalls. Instead, do everything in managed code. This is needed since
114         it is hard to restore the original domain etc. in unmanaged code in the
115         presence of undeniable exceptions.
116
117         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
118         New icalls to push and pop appdomain refs.
119
120 2003-10-31  Martin Baulig  <martin@ximian.com>
121
122         * class.c (inflate_generic_type): Renamed to
123         mono_class_inflate_generic_type() and made it public.
124
125         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
126         New interncall.
127
128         * loader.c (mono_field_from_memberref): Also set the retklass for
129         typespecs.
130
131         * fielder.c (mono_image_get_inflated_field_token): New static
132         method; creates a metadata token for an inflated field.
133         (mono_image_create_token, fixup_method): Added support for
134         "MonoInflatedField".
135         (fieldbuilder_to_mono_class_field): New static function.
136         (mono_reflection_inflate_field): New public function.
137
138         * reflection.h
139         (MonoReflectionGenericInst): Added `MonoArray *fields'.
140         (MonoReflectionInflatedField): New typedef.     
141
142 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
143
144         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
145         for Solaris and other platforms without s6_addr16
146
147 2003-10-30  Martin Baulig  <martin@ximian.com>
148
149         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
150         argument instead of two.
151         (mono_class_inflate_generic_signature): Likewise.
152         (inflate_generic_header): Likewise.
153         (mono_class_inflate_generic_method): Likewise.  In addition, if
154         `ginst->klass' is set, it becomes the new `method->klass'.
155
156         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
157         field.
158
159         * reflection.c (encode_generic_method_sig): Write a 0xa as the
160         first byte. [FIXME]
161         (method_encode_methodspec): If we have generic parameters, create
162         a MethodSpec instead of a MethodRef.
163         (fixup_method): Added support for "MonoInflatedMethod" and
164         "MonoInflatedCtor".
165         (mono_image_create_token): Added support for "MonoInflatedMethod"
166         and "MonoInflatedCtor".
167         (inflated_method_get_object): New static function; returns a
168         managed "System.Reflection.MonoInflatedMethod" object.
169         (mono_reflection_bind_generic_method_parameters): Return a
170         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
171         (mono_reflection_inflate_method_or_ctor): Likewise.
172         (mono_image_get_generic_method_param_info): Initialize unused
173         fields to zero.
174         (mono_image_get_generic_param_info): Likewise.
175
176         * reflection.h (MonoReflectionInflatedMethod): New public
177         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
178         "S.R.MonoInflatedCtor" classes.
179
180         * loader.c (method_from_memberref): If we're a TypeSpec and it
181         resolves to a generic instance, inflate the method.
182
183 2003-10-28  Dick Porter  <dick@ximian.com>
184
185         * object.c (mono_runtime_run_main): Convert command-line arguments
186         into utf8, falling back to the user's locale encoding to do so.
187
188 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
189
190         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
191         at this time.
192
193         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
194
195         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
196         up icalls at method definition time. Partially fixes #33569.
197
198 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
199
200         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
201         marshalling of arrays. Fixes #50116.
202
203         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
204
205         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
206         points to a vtable in the dying appdomain.
207
208         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
209         listeners into unmanaged code inside the lock.
210
211         * object.c (mono_class_vtable): Turn off typed allocation in non-root
212         domains and add some comments.
213
214 2003-10-25  Martin Baulig  <martin@ximian.com>
215
216         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
217
218         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
219
220         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
221         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
222         currently parsing.  Create the generic class and store it in
223         `generic_inst->klass' before parsing the type arguments.  This is
224         required to support "recursive" definitions; see mcs/tests/gen-23.cs
225         for an example.
226         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
227         to support recursive typespec entries.
228
229         * class.c (mono_class_setup_parent): If our parent is a generic
230         instance, we may get called before it has its name set.
231         (mono_class_from_generic): Splitted into
232         mono_class_create_from_generic() and mono_class_initialize_generic().
233
234 2003-10-25  Martin Baulig  <martin@ximian.com>
235
236         * icall.c (ves_icall_Type_BindGenericParameters): Return a
237         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
238         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
239         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
240
241         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
242         (create_typespec): Likewise.
243         (mono_reflection_bind_generic_parameters): Return a
244         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
245         (mono_reflection_inflate_method_or_ctor): New public function.
246
247         * reflection.h (MonoReflectionGenericInst): New typedef.        
248
249 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
250
251         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
252         inside the domain lock. Fixes #49993.
253         
254         * object.c (mono_class_vtable): When typed allocation is used, 
255         allocate vtables in the GC heap instead of in the mempool, since the
256         vtables contain GC descriptors which are used by the collector even
257         after the domain owning the mempool is unloaded.
258
259         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
260
261         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
262         reflect what it does. Also invalidate mempools instead of freeing
263         them if a define is set.
264
265         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
266         of the appdomain.
267         
268         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
269         hold the finalizable objects in this domain.
270
271         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
272         appdomain.
273
274         * appdomain.c (mono_domain_set): New function to set the current
275         appdomain, but only if it is not being unloaded.
276
277         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
278         appdomain which is being unloaded.
279         
280         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
281         unloading of the root appdomain.
282
283         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
284         icall to execute a method in another appdomain. Intended as a 
285         replacement for InternalSetDomain, which can confuse the code 
286         generation in the JIT.
287
288         * appdomain.c (mono_domain_is_unloading): New function to determine
289         whenever an appdomain is unloading.
290
291         * appdomain.c (mono_domain_unload): New function to correctly unload
292         an appdomain.
293
294         * assembly.c (mono_assembly_load_references): Check that an assembly
295         does not references itself.
296
297         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
298         domain manually, it asks the finalizer thread to do it, then waits for
299         the result. Also added a timeout.
300
301         * icall.c: Register the new icalls.
302
303         * threads.h threads.c: Export the mono_gc_stop_world and 
304         mono_gc_start_world functions.
305         
306         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
307         function to fill out the mempool with 0x2a.
308
309 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
310
311         * reflection.h (MonoReflectionMethodAux): New structure to store
312         information which is rarely used, thus is not in the MonoMethod
313         structure.
314
315         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
316         store the aux info.
317
318         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
319         and marshalling info into the aux structure.
320
321         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
322         from the aux structure.
323
324         * loader.c (mono_method_get_param_names): Retrieve the param names from
325         the aux structure.
326         
327 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
328
329         * exception.h exception.c: Add AppDomainUnloadedException && fix 
330         warning.
331
332 2003-10-21  Dick Porter  <dick@ximian.com>
333
334         * socket-io.c
335         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
336         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
337
338 2003-10-21  Martin Baulig  <martin@ximian.com>
339
340         * reflection.c (mono_reflection_bind_generic_parameters):
341         `klass->parent' is NULL for interfaces.
342
343 2003-10-21  Martin Baulig  <martin@ximian.com>
344
345         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
346
347 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
348
349         * exception.c (mono_exception_from_name_msg): New helper function for
350         creating exceptions and initializing their message field.
351
352         * exception.c: Simplify functions using the new helper.
353
354         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
355         New function.
356
357         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
358         mono_raise_exception, since otherwise gcc doesn't generate the function
359         epilog for raise_exception, confusing the stack unwinding in the JIT.
360         Fixes #45043.
361
362         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
363         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
364         Fixes #49499.
365
366 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
367
368         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
369         utf8.
370
371 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
372
373         * icall.c: Removed GetUninitializedObject method because
374           AllocateUninitializedClassInstance does the same.
375
376 2003-10-18  Martin Baulig  <martin@ximian.com>
377
378         * class.c (inflate_generic_signature): Renamed to
379         mono_class_inflate_generic_signature() and made it public.
380         (my_mono_class_from_generic_parameter): New static function; if we
381         don't already have the generic parameter's MonoClass, create a
382         very simple one which is just used internally in the runtime and
383         not passed back to managed code.
384
385         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
386
387         * metadata.h (MonoMethodSignature): Moved the
388         `MonoGenericParam *gen_params' to the MonoMethodHeader.
389         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
390
391         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
392         ves_icall_MonoMethod_GetGenericArguments(); this is now an
393         interncall on the MonoMethod class, not on MethodInfo.
394         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
395         calling mono_reflection_bind_generic_method_parameters() directly.
396
397         * loader.c (mono_method_get_signature): If this is a MethodSpec;
398         return the already computed `method->signature'.
399         (method_from_methodspec): New static function to load a method
400         from a MethodSpec entry.
401         (mono_get_method_from_token): Call the new method_from_methodspec()
402         for MethodSpec tokens.  
403         (mono_get_method_from_token): If we're a generic method, load the
404         type parameters.
405
406         * reflection.c (mono_image_get_memberref_token): Allow
407         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
408         table.
409         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
410         (mono_image_create_token): First check whether it's a generic
411         method (so we'd need to create a MethodSpec), then do the other
412         two alternatives.
413         (mono_reflection_bind_generic_method_parameters): Return a
414         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
415         called directly from the interncall.
416
417 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
418
419         * reflection.c (load_public_key): Move loading of the public key
420         into managed code.
421
422         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
423
424         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
425         fields.
426
427         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
428         culture, hash_alg and public_key. Fixes #49555.
429
430 2003-10-17  Martin Baulig  <martin@ximian.com>
431
432         * class.h (MonoGenericInst): Moved this declaration here and added
433         `MonoMethod *generic_method'.
434
435         * icall.c
436         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
437         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
438
439         * metadata.c (mono_metadata_type_equal): Two types of
440         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
441         index; ie. don't compare the address of the `MonoGenericParam'
442         structure.
443         (mono_metadata_load_generic_params): Removed the `MonoMethod
444         *method' argument.
445
446         * metadata.h (MonoGenericInst): Moved declaration to class.h.
447         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
448
449         * reflection.c (method_encode_signature): Encode the number of
450         generic parameters.
451         (encode_generic_method_sig): New static function.
452         (method_encode_methodspec): New static function; creates an entry
453         in the MethodSpec table for a generic method.
454         (mono_image_get_methodspec_token): New static function.
455         (mono_image_create_token): Call mono_image_get_methodspec_token()
456         for generic methods.
457         (mono_reflection_bind_generic_method_parameters): New public
458         function.  Instantiates a generic method.
459
460 2003-10-16  Martin Baulig  <martin@ximian.com>
461
462         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
463         *gen_params' here from MonoMethodHeader.
464
465         * metadata.c (mono_metadata_parse_method_signature): If we have
466         generic parameters, initialize `method->gen_params' and then set
467         the correct `type->data.generic_param' in all the parameters.
468
469 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
470
471         * threads.c (mono_threads_get_default_stacksize): New function to 
472         return the default stacksize.
473
474         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
475         termination of the finalizer thread, since the previous method had
476         race conditions. Fixes #49628.
477
478         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
479         as for the other managed threads.
480
481 2003-10-16  Martin Baulig  <martin@ximian.com>
482
483         * class.c (inflate_generic_signature): Copy `generic_param_count'
484         and `gen_params'.
485
486         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
487         New interncall.
488
489         * metadata.c (mono_metadata_parse_method_signature): Actually set
490         the `method->generic_param_count' here.
491         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
492
493 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
494
495         * object.h: Add a new field to TypedRef to simplify the implementation
496         of the REFANY opcodes in the JIT.
497
498         * icall.c: Make use of the new field.
499
500         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
501         dynamically.
502
503 2003-10-15  Martin Baulig  <martin@ximian.com>
504
505         * class.c (mono_class_from_gen_param): Renamed to
506         mono_class_from_generic_parameter() and moved most of the
507         functionality from mono_reflection_define_generic_parameter()
508         here; ie. we create a "real" class here.
509         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
510         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
511         previously been called.
512
513         * class.h (MonoGenericParam): Moved the declaration of this struct
514         here from metadata.h and added `MonoMethod *method'.
515
516         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
517         interncall.
518
519         * loader.c (mono_get_method_from_token): If we have any generic
520         parameters, call mono_metadata_load_generic_params() to read them
521         from the MONO_TABLE_GENERICPAR.
522
523         * metadata.c (mono_metadata_load_generic_params): Added
524         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
525
526         * metadata.h (MonoMethodSignature): Replaced
527         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
528         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
529
530         * reflection.c (mono_reflection_define_generic_parameter): Moved
531         most of the functionality into the new
532         mono_class_from_generic_parameter(); set the `method' field if
533         we're a method parameter.       
534
535 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
536
537         * marshal.c (emit_struct_conv): if native size is 0
538         emit no code.
539
540 2003-10-14  Martin Baulig  <martin@ximian.com>
541
542         * icall.c: The generics API has changed in the spec since it was
543         added to System.Type; these modifications make it match the spec
544         again.
545         (ves_icall_Type_GetGenericParameters): Renamed to
546         `ves_icall_Type_GetGenericArguments'.
547         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
548         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
549         `ves_icall_MonoType_get_HasGenericArguments'.
550         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
551         `ves_icall_MonoType_get_IsGenericParameter'.
552         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
553         this is no interncall anymore.
554         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
555         `ves_icall_TypeBuilder_get_IsGenericParameter'.
556
557 2003-10-14  Martin Baulig  <martin@ximian.com>
558
559         * reflection.c (mono_reflection_bind_generic_parameters): Also
560         inflate generic methods if we're reading the class from IL.
561
562 2003-10-13  Martin Baulig  <martin@ximian.com>
563
564         * reflection.c (mono_reflection_define_generic_parameter): This
565         method isn't called directly from the icall anymore; take a
566         `MonoReflectionAssemblyBuilder *' so we can use this for type and
567         method generic parameters.
568         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
569         (method_builder_encode_signature): Encode generic parameters.
570         (mono_image_get_method_info): Write generic params to the
571         MONO_TABLE_GENERICPARAM table.
572
573         * reflection.h (MonoReflectionMethodBuilder): Added
574         `MonoArray *generic_params'.
575
576         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
577
578         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
579         wrapper for mono_reflection_define_generic_parameter().
580         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
581
582 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
583
584         * marshal.h: Add missing function to fix build.
585
586         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
587         the SetLastError pinvoke attribute.
588
589         * marshal.c (mono_marshal_set_last_error): New helper function called
590         by the generated code.
591         
592         * marshal.c (mono_mb_emit_branch): New helper function.
593
594         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
595
596         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
597         classes as parameters and return values of delegates. Fixes #29256. 
598
599 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
600
601         * locales.c: use gint32 in non HAVE_ICU case
602
603 2003-10-11  Martin Baulig  <martin@ximian.com>
604
605         * mono-debug.c (mono_debug_add_method): Added a workaround for
606         bug #48591.
607
608 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
609
610         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
611         delegates passed to native code must use the STDCALL calling 
612         convention. Fixes #35987.
613
614 2003-10-10  Martin Baulig  <martin@ximian.com>
615
616         * class.c (inflate_generic_type): If we're inflating for a generic
617         type instance (and not for a generic method), return
618         MONO_TYPE_MVAR unchanged.
619
620 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
621
622         * string-icalls.c: Join ignores null strings in the source array.
623         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
624         * threads.c: GetAvailableTheads is slightly more accurate.
625
626 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
627
628         * threads.h threads.c : add mono_threads_set_default_stacksize
629         and pass default to CreateThread calls.
630
631 2003-10-09  Dick Porter  <dick@ximian.com>
632
633         * icall.c:
634         * locales.h:
635         * locales.c: Internal calls for constructing CultureInfo and
636         related objects from libicu (if its available.)
637
638 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
639
640         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
641
642 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
643
644         * threadpool.c: added an argument to async_invoke_thread that is the
645         item to process, pass the MonoAsyncResult to the thread start function
646         when creating a new thread. This way we don't need to acquire any lock
647         when we're creating a new thread. Readded a semaphore for faster
648         response times (instead of that Sleep i added).
649
650 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
651
652         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
653         get daylight change dates better on Windows, fix handling
654         of platforms without tm_gmtoff.
655
656 2003-10-06  Martin Baulig  <martin@ximian.com>
657
658         * class.c (inflate_generic_method): Renamed to
659         mono_class_inflate_generic_method() and made public.
660         (mono_class_init): Don't inflate the generic methods here.
661         (mono_class_from_generic): Added `gboolean inflate_methods'
662         argument.  Inflate the methods here.
663
664         * loader.c (mono_method_get_param_names): Ignore instances of
665         generic types for the moment.
666
667         * reflection.c (fixup_method): Added support for inflated methods.
668         (mono_image_create_token): Use mono_image_get_methodref_token()
669         for inflated methods.
670         (mono_custom_attrs_from_param): Ignore instances of generic types
671         for the moment.
672         (mono_reflection_bind_generic_parameters): New public function.
673         Moved all the functionality from
674         ves_icall_Type_BindGenericParameters() here and added support for
675         dynamic types.
676         (mono_reflection_define_generic_parameter): Initialize
677         `klass->methods' here.
678
679         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
680         functionality into mono_reflection_define_generic_parameter().
681         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
682         TypeBuilder, return that TypeBuilder.
683
684 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
685
686         * appdomain.c: removed mono_delegate_semaphore.
687
688         * threadpool.c:
689         (mono_thread_pool_add): moved hash table creation inside and the thread 
690         creation outside of the critical region.
691         (mono_thread_pool_finish): removed obsolete code.
692         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
693         continue or exit the thread depending on the queue.
694
695 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
696
697         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
698         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
699         handle more bool marshalling options
700
701 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
702
703         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
704         arrays of structs. Also add a more descriptive error message when
705         a structure member is marshalled as LPArray.
706
707 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
708
709         * marshal.c (mono_marshal_get_native_wrapper): Add support for
710         marshalling arrays of complex types. Fixes #29098. Also remove an
711         usused and incomplete function.
712
713 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
714
715         * gc.c: report heap_size - free_bytes as total memory allocated
716         (bug#49362).
717
718 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
719
720         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
721         fix timezone handling problems on Windows.
722         
723         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
724         asserts when the year is outside the range handled by ms the functions.
725
726         * class.c (setup_interface_offsets): If the class is an interface,
727         fill out its interface_offsets slot.
728
729 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
730
731         * threadpool.c: mark threadpool threads as background.
732
733 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
734
735         * decimal.c - define DECINLINE to nothing if not using GCC
736
737 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
738
739         * assembly.c: More refcount fixes.
740
741 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
742
743         * string-icalls.c: if we're not trimming, return the same string.
744         When not splitting, don't create a new string.
745
746 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
747
748         * image.c:
749         (mono_image_open): increment the ref_count inside the critical section.
750
751 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
752
753         * image.c (mono_image_open): Fix reference counting bug.
754
755 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
756
757         * marshal.c (mono_marshal_type_size) struct alignment changed for 
758         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
759         64bits. Avoid leak in mono_marshal_get_native_wrapper when
760         mono_lookup_pinvoke_call throws.        
761
762 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
763
764         * reflection.c (mono_reflection_parse_type): Fix #49114.
765
766         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
767         temporary workaround for cygwin header problem.
768
769         * object.c (mono_object_isinst): Synchronize this with the code
770         generated by the JIT for casts.
771
772 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
773
774         * reflection.c (encode_type): Fix #38332.
775
776 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
777
778         * marshal.c (mono_marshal_method_from_wrapper): New function to return
779         the original method from the wrapper method.
780
781 2003-09-25  Martin Baulig  <martin@ximian.com>
782
783         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
784         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
785         (ves_icall_Type_get_IsGenericInstance): New interncall.
786
787 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
788
789         * object.c: fix cast warning in big endian code.
790
791 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
792
793         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
794         
795 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
796
797         * assembly.c: don't call check_env from mono_assembly_load. It's
798         already done once in mono_assemblies_init and may cause headaches when
799         multiple threads are loading assemblies.
800
801 2003-09-19  Martin Baulig  <martin@ximian.com>
802
803         * reflection.c (mono_reflection_define_generic_parameter): Don't
804         allocate `klass->methods', set `klass->flags' to
805         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
806
807 2003-09-18  Martin Baulig  <martin@ximian.com>
808
809         * class.c (mono_class_init): Don't create `class->methods' if it's
810         already initialized.
811
812         * metadata.c (mono_metadata_load_generic_params): Make this
813         actually work.
814
815         * reflection.c (mono_reflection_define_generic_parameter): Set
816         parent class and interfaces from the constraints.
817
818         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
819         to keep this struct in sync with the declaration in TypeBuilder.cs.
820
821 2003-09-17  Martin Baulig  <martin@ximian.com>
822
823         * metadata.h (MonoType): Replaced the data's `int type_param'
824         field with `MonoGenericParam *generic_param'.
825         (MonoGenericParam): Added `MonoClass *klass'.
826
827         * class.c (mono_class_from_gen_param): Removed the
828         `MonoImage *image' and `int type_num' arguments.
829
830         * metadata.c (mono_metadata_parse_generic_param): New static
831         method; creates a MonoGenericParam which just contains the index.
832         (do_mono_metadata_parse_type): Call
833         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
834         MONO_TYPE_MVAR.
835
836         * reflection.c (mono_image_typedef_or_ref): Generic type
837         parameters may be in the same assembly, but never use a typedef
838         for them.
839         (mono_reflection_define_generic_parameter): We're now creating a
840         "real" class for the type parameter; it's now safe to call
841         mono_class_from_mono_type() on the class'es type, it'll do the
842         right thing.
843
844 2003-09-16  Martin Baulig  <martin@ximian.com>
845
846         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
847         `symfile->range_entry_size' and `symfile->class_entry_size' here;
848         the `symfile' data structure must be fully initialized before it
849         gets added to the table.
850
851 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
852
853         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
854
855         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
856         class init trampolines.
857
858 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
859
860         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
861         to the built-in profiler to turn off time and allocation profiling
862         respectively.
863
864 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
865
866         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
867         g_direct_equal.
868
869         * debug-helpers.c (mono_method_full_name): Print the wrapper type
870         in human readable form.
871
872 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
873
874         * reflection.c icall.c: Fixed warnings.
875
876         * image.c (load_class_names): Use a temporary hash table to hold the
877         namespaces in order to avoid doing many string comparisons.
878
879         * image.h: Fix typo.
880
881         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
882         Pass NULL instead of g_direct_equal to the GHashTable constructor 
883         since the NULL case is short-circuited inside g_hash_table_lookup, 
884         leading to better performance.  
885
886         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
887         obtain the first custom attribute for a given index. Depends on the
888         CustomAttribute table being sorted by the parent field.
889
890         * reflection.c (mono_custom_attrs_from_index): Use the new function 
891         for better performance.
892
893 2003-09-07  Martin Baulig  <martin@ximian.com>
894
895         * class.c (mono_class_init): If we're a generic instance, inflate
896         all our methods instead of loading them from the image.
897         (mono_class_from_generic): Set `class->methods = gklass->methods'.
898
899 2003-09-07  Martin Baulig  <martin@ximian.com>
900
901         * mono-debug-debugger.c: Added support for constructors.
902
903 2003-09-06  Martin Baulig  <martin@ximian.com>
904
905         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
906         New interncall.
907
908         * reflection.c (mono_reflection_setup_generic_class): Call
909         ensure_runtime_vtable() to create the vtable.
910
911 2003-09-05  Martin Baulig  <martin@ximian.com>
912
913         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
914         MONO_TYPE_MVAR.
915
916 2003-09-04  Martin Baulig  <martin@ximian.com>
917
918         * reflection.c (mono_reflection_define_generic_parameter): Generic
919         parameters start with zero.
920
921 2003-09-04  Martin Baulig  <martin@ximian.com>
922
923         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
924
925         * reflection.h (MonoReflectionGenericParam): New typedef.
926         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
927         the generic parameters from the managed TypeBuilder.
928
929         * reflection.c (mono_reflection_define_generic_parameter): New function.
930         (mono_reflection_create_runtime_class): Encode generic parameters.
931         (mono_reflection_setup_generic_class): New function; this is
932         called after adding adding all generic params to the TypeBuilder.
933         (encode_type): Added MONO_TYPE_VAR.
934
935 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
936
937         * class.h class.c (mono_class_needs_cctor_run): Moved this method
938         here from the JIT.
939
940         * assembly.h assembly.c: Moved the AOT loading code into an assembly
941         load hook.
942
943 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
944
945         * reflection.h reflection.c class.h class.c: Delete duplicate 
946         definition of mono_type_get_name () from reflection.c and export the
947         one in class.c.
948
949         * class.c: Class loading fixes from Bernie Solomon 
950         (bernard@ugsolutions.com).
951
952         * reflection.c: Endianness fixes from Bernie Solomon 
953         (bernard@ugsolutions.com).
954         
955 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
956
957         * assembly.h assembly.c: Define a file format version for AOT
958         libraries.
959         
960         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
961
962         * appdomain.h (MonoJitInfo): New field to determine whenever the
963         code is domain neutral.
964         
965 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
966
967         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
968
969 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
970
971         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
972         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
973         Avoid caching the result since strings must be domain specific. Fixes
974         #48050.
975
976 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
977
978         * marshal.c (mono_marshal_init): Make this callable multiple times
979         since it is hard to find a correct place to call it.
980
981         * object.c (mono_runtime_class_init): Execute static constructors in
982         the correct appdomain.
983
984         * image.c (build_guid_table): Handle the case when multiple images have
985         the same GUID.
986
987 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
988
989         * icall.c: added a couple of icalls for System.Web.
990
991 2003-08-28  Martin Baulig  <martin@ximian.com>
992
993         * icall.c (ves_icall_Type_BindGenericParameters): Use
994         `klass->generic_inst' instead of `&klass->byval_arg' in the
995         mono_type_get_object() call.  The returned type must be
996         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
997
998 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
999
1000         * NOTES: New file.
1001
1002         * object.c (mono_class_proxy_vtable): Make it thread safe.
1003
1004         * pedump.c: Fix warning.
1005
1006         * object.c appdomain.h: Get rid of metadata_section. 
1007         It is no longer needed and it was causing deadlocks with domain->lock.
1008
1009         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
1010
1011 2003-08-26  Martin Baulig  <martin@ximian.com>
1012
1013         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
1014
1015 2003-08-26  Martin Baulig  <martin@ximian.com>
1016
1017         * pedump.c (main): Call mono_metadata_init(),
1018         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
1019         and mono_loader_init().
1020
1021 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
1022
1023         * loader.h: Add missing include to fix build.
1024
1025         * image.h: mono_image_load_references is no more.
1026
1027         * assembly.c: Reworked assembly loading to make it really thread safe.
1028         After these changes, the assembly returned by mono_assembly_open is
1029         fully initialized, i.e. all its references assemblies are loaded.
1030
1031         * assembly.c (mono_image_load_references): Renamed to 
1032         mono_assembly_load_references, and made private, since clients no
1033         longer need to call it.
1034
1035         * class.c: Removed calls to mono_assembly_load_references, since it was
1036         a source of deadlocks.
1037
1038         * loader.h loader.c class.h class.c: Protect data structures using a 
1039         new lock, the loader lock.
1040
1041         * class.c (mono_class_setup_vtable): Create temporary hash tables and
1042         GPtrArrays only when needed.
1043
1044         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
1045         into empty structures by mcs. Fixes pinvoke7.cs.
1046         
1047         * domain.c (mono_init): Call a new initialization function.
1048
1049         * appdomain.c (mono_runtime_init): Call the new initializer function
1050         of the marshal module.
1051
1052         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
1053         inserted into empty structures by mcs. Fixes pinvoke7.cs.
1054
1055         * marshal.h marshal.c: Added locks around the wrapper caches to make
1056         this module thread safe.
1057
1058         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
1059         this argument. Fixes pinvoke1.exe.
1060
1061 2003-08-25  Lluis Sanchez <lluis@ximian.com>
1062
1063         * object.h: Added call_type field to MonoMethodMessage and the corresponding
1064         enumeration of values. Removed fields to store remote call output values in
1065         MonoAsyncResult. Not needed any more.
1066         * object.c: Initialize call_type and async_result fields in mono_message_init.
1067         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
1068         dispatching the message.
1069         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
1070         async call to finish. To do it use a message with EndInvoke call type.
1071
1072 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
1073
1074         * loader.h loader.c (mono_method_hash_marhal_info): New function which
1075         determines whenever a method has marshalling info.
1076
1077 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1078
1079         * assembly.c: fix the build on windows.
1080
1081 2003-08-22 Lluis Sanchez <lluis@ximian.com>
1082
1083         * object.cs: Fixed bug #47785.
1084
1085 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
1086
1087         * string-icalls.c (StringReplace): If their are no occurances of
1088         the old string found return a reference to the supplied
1089         string. This saves some memory and matches MS behavoir.
1090         
1091 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1092
1093         * socket-io.c: fixed compilation for systems that define AF_INET6
1094         and don't define SOL_IP/SOL_IPV6.
1095
1096 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
1097
1098         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
1099         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
1100
1101         * rawbuffer.c rawbuffer.h: Make this module thread safe.
1102
1103         * domain.c: Make this module thread safe.
1104
1105         * domain.c (mono_init): Call new initialization function.
1106
1107         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
1108         reference types too. Fixes #38812.
1109
1110         * image.c (mono_image_init): Fixed warnings.
1111
1112         * class.c (mono_class_from_typeref): Handle assembly load failure
1113         correctly.
1114
1115         * appdomain.c (add_assemblies_to_domain): Handle the case when
1116         the references of an assembly are not yet loaded.
1117
1118         * metadata.c image.c assembly.c: Moved initialization of global
1119         variables to a separate function called at startup since lazy 
1120         initialization of these variables is not thread safe.
1121         
1122         * image.c assembly.c: Made this module thread safe by adding locks in 
1123         the appropriate places.
1124
1125         * domain.c (mono_init): Call the new initialization functions of the
1126         three modules.
1127
1128 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
1129
1130         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
1131           make a direct call. It is proxy's work to make the call asynchronous.
1132           mono_delegate_end_invoke(): If the targe is a proxy, just collect
1133           the return values.
1134         * object.cs: mono_method_call_message_new(): read AsyncResult and
1135           state object from parameters list, if this info is requested.
1136         * object.h: Added fields to store remote call output values in
1137           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
1138
1139 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
1140
1141         * object.h: add needed fields to MonoThread.
1142         * threads.c, threads.h: allow registering a function to cleanup data
1143         allocated per thread by the JIT.
1144
1145 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
1146
1147         * loader.h: portability fix by Bernie Solomon
1148         * <bernard@ugsolutions.com>.
1149
1150 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
1151
1152         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
1153         return a MonoArray. This simplifies the code and also ensures that
1154         the cache allways contains an object reference as a value.
1155
1156         * icall.c (ves_icall_get_parameter_info): Simplified using the new
1157         function.
1158
1159 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1160
1161         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
1162         fixes a problem with byte ordering when getting the address family for
1163         a socket.
1164
1165 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
1166
1167         * .cvsignore: Added monosn.
1168
1169         * reflection.h reflection.c loader.c: Added support for parameter
1170         marshalling to dynamically created types. Fixes #47295.
1171
1172 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
1173
1174         * rand.c: remove useless warnings.
1175
1176 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
1177
1178         * class.c: implemented ldtoken for methods and fieldrefs.
1179
1180 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1181
1182         * threadpool.c: when mono_async_invoke was called, no one took care of
1183         monitoring the queue. So if the method invoked took some time and we
1184         got new async invoke requests after 500 ms (the thread created waited
1185         that long in WaitForSingleObject), the new async invoke was not called
1186         until the previous one finished.
1187
1188         This is fixed now. Thanks to Totte for helping with it.
1189
1190 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1191
1192         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
1193
1194 2003-08-11  Martin Baulig  <martin@ximian.com>
1195
1196         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
1197
1198 2003-08-06  Martin Baulig  <martin@ximian.com>
1199
1200         * mono-debug-debugger.c: Added support for static fields,
1201         properties and methods.
1202
1203 2003-08-06  Martin Baulig  <martin@ximian.com>
1204
1205         * mono-debug-debugger.c: Don't store the MonoString's vtable to
1206         make this work for applications with multiple application domains.
1207
1208 2003-08-04  Martin Baulig  <martin@ximian.com>
1209
1210         * mono-debug-debugger.c: Completely reworked the type support; the
1211         most important thing is that we're now just using one single
1212         `MonoType' instance per type.
1213
1214 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
1215
1216         * mono-endian.h, mono-endian.c, icall.c: Added icall
1217         ves_icall_System_Double_AssertEndianity to assert double word endianity
1218         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
1219
1220 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
1221
1222         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
1223         support, icalls and fixes.
1224
1225 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
1226
1227         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
1228         classes that are a punctuation character in .NET is not the same a
1229         g_unichar_ispunct.
1230
1231 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
1232
1233         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
1234
1235 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
1236
1237         * icall.c: Add new MemCopy internalcall.
1238         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
1239         Simplified code; It is not necessary to handle all the cases here,
1240         as the C# code takes care of it.  Only handle the case of the name
1241         resource embedded into the assembly.
1242
1243         Changed signature to return the data pointer and the size of the
1244         data. 
1245
1246 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
1247
1248         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
1249         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
1250
1251 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
1252
1253         * socket-io.c: ignore EINTR error in select.
1254
1255 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
1256
1257         * class.h, class.c: removed unused subclasses field in MonoClass.
1258
1259 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
1260
1261         * icall.c: improve fix of get_base_definition(). If the parent class
1262           doesn't have the mehod, look at the parent of the parent.
1263         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
1264           to check if a parameter is an in or out parameter
1265           (PARAM_ATTRIBUTE_IN is not set by default).
1266           mono_method_return_message_restore(): Use mono_class_value_size to
1267           get the size of a value type. mono_type_stack_size (parameterType)
1268           does not return the correct value if parameterType is byRef.
1269           mono_load_remote_field(), mono_load_remote_field_new(),
1270           mono_store_remote_field(), mono_store_remote_field_new():
1271           raise exception if the remote call returns an exception.
1272
1273 2003-07-28  Martin Baulig  <martin@ximian.com>
1274
1275         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
1276         method.  This is a wrapper around mono_runtime_invoke() which
1277         boxes the instance object if neccessary.
1278
1279 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
1280
1281         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
1282         metadata.h, row-indexes.h, verify.c: first cut of generics support.
1283
1284 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
1285
1286         * icall.c: disable mcs bug workaround.
1287
1288 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
1289
1290         * object.c (mono_runtime_class_init): Take the metadata_section
1291         mutex before obtaining the domain mutex.
1292
1293         * appdomain.h: Added definition of metadata_section mutex here. 
1294
1295         * object.c: define metadata_mutex here.
1296
1297 2003-07-24  Ravi Pratap  <ravi@ximian.com>
1298
1299         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
1300         fixed.
1301
1302 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
1303
1304         * reflection.c: Fix bug #46669
1305
1306 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1307
1308         * exception.c:
1309         * exception.h:
1310         * icall.c:
1311         * object.h: fill in the type name for TypeLoadException.
1312
1313 2003-07-23  Ravi Pratap  <ravi@ximian.com>
1314
1315         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
1316         relationship between TypeBuilders while compiling corlib) and bug
1317         45993 (Array types returned from the runtime while compiling
1318         corlib were from the loaded corlib).
1319
1320 2003-07-22  Martin Baulig  <martin@ximian.com>
1321
1322         * mono-debug-debugger.c: Reworked the type support a bit more;
1323         distinguish between types and classes.
1324
1325 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
1326
1327         * icall.c: add IsArrayImpl icall.
1328
1329 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
1330
1331         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
1332         initializing real_size only once. Also fix bug #46602.
1333
1334 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
1335
1336         * object.c: Renamed mono_metadata_section to metadata_section.
1337
1338 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
1339
1340         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
1341           empty array if the type is an array. Fixed.
1342           ves_icall_MonoMethod_get_base_definition: if the base method
1343           is abstract, get the MethodInfo from the list of methods of
1344           the class.
1345         * reflection.c: ParameterInfo.PositionImpl should be zero-based
1346           and it was 1-based. Fixed in mono_param_get_objects.
1347
1348 2003-07-20  Martin Baulig  <martin@ximian.com>
1349
1350         * mono-debug.h: Set version number to 31.
1351         (mono_debug_init): Added `MonoDomain *' argument.
1352
1353         * mono-debug-debugger.c: Reworked the type support; explicitly
1354         tell the debugger about builtin types; pass the `klass' address to
1355         the debugger.
1356
1357 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
1358
1359         * image.c: Allow new metadata tables to be loaded without a
1360         warning. Also update the warning message to give the new constant value.
1361                 
1362 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
1363
1364         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
1365         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
1366         array type representation changes.
1367
1368 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
1369
1370         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
1371         on Environment.Exit () call.
1372
1373 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
1374
1375         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
1376         requires a matching corlib.
1377
1378 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
1379
1380         * Changelog: My editor decided to add a CR to each line. Sorry about that.
1381           Committed again without the CRs.
1382         
1383 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
1384
1385         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
1386           getting it from the "this" socket instance. Did not work
1387           if the socket is a subclass of Socket.
1388           Also fixed bug #35371.
1389
1390 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
1391
1392         * metadata.c: fixed size for TypedByRef.
1393         * loader.c: when searching for a method, consider the vararg amrker.
1394         * unicode.c, decimal.c: constify some arrays.
1395
1396 2003-07-15  Dick Porter  <dick@ximian.com>
1397
1398         * socket-io.c: Fixed compilation for gcc < 3.2.
1399
1400         Fixed compilation for machines that don't have AF_INET6 (thanks to
1401         Bernie Solomon <bernard@ugsolutions.com> for that part.)
1402
1403         Fixed compile warnings.
1404         
1405         Fixed formatting and line endings.
1406
1407 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
1408
1409         * socket-io.h:
1410         * socket-io.c: Added IPv6 support.
1411
1412 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
1413
1414         * class.c (mono_class_is_assignable_from): New function to implement
1415         the is_assignable_from logic. Used by mono_object_isinst, 
1416         Type::IsAssignableFrom () and the interpreter.
1417
1418         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
1419         Object, even interfaces.
1420         
1421         * object.c (mono_object_isinst): Implement in terms of 
1422         is_assignable_from.
1423
1424         * icall.c (ves_icall_type_is_assignable_from): New icall.
1425
1426 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
1427
1428         * domain.c (foreach_domain): fix compiler warning.
1429
1430 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
1431
1432         * image.c (load_metadata_ptrs): use g_strndup because strndup is
1433         not available on all plattforms
1434
1435 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
1436
1437         * image.h image.c: Store the metadata version string in MonoImage.
1438         * icall.c: New icall to retrieve the image version.
1439         * reflection.c (create_dynamic_image): Fill in the image version field
1440         * reflection.c (build_compressed_metadata): Use the image version
1441         from the image structure.
1442
1443 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1444
1445         * appdomain.c: modified comment.
1446         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
1447         That will be its last iteration when mono_gc_cleanup is called from
1448         mono_runtime_cleanup and before the domain is unloaded.
1449
1450         Fixes bug #45962.
1451
1452 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
1453
1454         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
1455         attributes.
1456
1457 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
1458
1459         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
1460         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
1461         Bernie Solomon <bernard@ugsolutions.com>.
1462
1463 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
1464
1465         * object.c, object.h: provide mono_object_new_fast() for faster
1466         allocation in some special cases.
1467
1468 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
1469
1470         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
1471         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
1472
1473 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
1474
1475         * threadpool.c: fix leaks.
1476
1477 2003-07-01  Dick Porter  <dick@ximian.com>
1478
1479         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
1480         using MonoGHashTables.  Fixes threadpool bug posted to list.
1481
1482 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
1483
1484         * image.h, image.c: added support to load an assembly from a byte array.
1485         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
1486         assembly bundle support.
1487
1488 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
1489
1490         * threadpool.c (mono_thread_pool_add): keep a reference to the
1491         AsyncResult to prevent GC
1492
1493 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
1494
1495         * class.c: leak fix.
1496
1497 2003-06-25  Dick Porter  <dick@ximian.com>
1498
1499         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
1500         for the async object, the WaitHandle object will close the handle.
1501         Fixes bug 45321.
1502
1503 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
1504
1505         * class.c: in mono_array_class_get (), lookup from the hash with the
1506         same type we insert: this works around a bug in
1507         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
1508         lluis. The real fix will have to wait for after the release.
1509
1510 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
1511
1512         * icall.c: fix memory leak when getting type members.
1513
1514 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
1515
1516         * reflection.c: added more pubtoken special cases.
1517
1518 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
1519
1520         * class.c: handle field offset correctly when class size
1521         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
1522
1523 2003-06-20  Martin Baulig  <martin@ximian.com>
1524
1525         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
1526         *image' field.
1527
1528 2003-06-20  Martin Baulig  <martin@ximian.com>
1529
1530         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
1531
1532 2003-06-20  Martin Baulig  <martin@ximian.com>
1533
1534         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
1535         just distinguish between variables in registers and variables at
1536         an offset relative to a register.
1537
1538 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1539
1540         * icall.c: #ifdef out latest changes until mcs is fixed.
1541
1542 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
1543
1544         * icall.c: return members in metadata order.
1545
1546 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
1547
1548         * icall.c: avoid infinite loop in GetTimeZoneData.
1549
1550 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
1551
1552         * icall.c: added Marshal.Prelink/All icalls.
1553
1554 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
1555
1556         * object.c, object.h: fix warnings and do some overflow checking
1557         when creating arrays.
1558
1559 2003-06-17  Dick Porter  <dick@ximian.com>
1560
1561         * file-io.h:
1562         * file-io.c: File attributes need to be tweaked slightly when
1563         passed from the managed to the w32 world.
1564
1565 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
1566         * profiler.h profiler-private.h profiler.c: Rework last patch
1567         based on suggestion by Paolo.
1568         
1569 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
1570
1571         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
1572         instruction level coverage data collection.
1573         * profiler.h profiler.c (: Added new callback function which can be
1574         used by the profiler to limit which functions should have coverage
1575         instrumentation.
1576         * profiler.c (mono_profiler_load): Call g_module_build_path to
1577         generate the file name of the profiler library.
1578
1579 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
1580
1581         * profiler.c, profiler.h, profiler-private.h: added basic block 
1582         coverage profiling API.
1583
1584 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
1585
1586         * reflection.c (mono_reflection_create_runtime_class): Add support
1587         for events in dynamically generated code.
1588
1589         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
1590         not allocated.
1591
1592 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
1593
1594         * icall.c: when getting timezone info, return reasonable values if we
1595         can't get the actual data.
1596
1597 2003-06-14  Dick Porter  <dick@ximian.com>
1598
1599         * threads.c (start_wrapper): Remove the reference to the thread
1600         object in the TLS data, so the thread object can be finalized.
1601         This won't be reached if the thread threw an uncaught exception,
1602         so those thread handles will stay referenced :-( (This is due to
1603         missing support for scanning thread-specific data in the Boehm GC
1604         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
1605
1606 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
1607
1608         * reflection.c: ensure streams and tables are first allocated with
1609         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
1610
1611 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
1612
1613         * icall.c: fixed GetElementType for byrefs (bug# 44792).
1614
1615 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
1616
1617         * reflection.c (mono_reflection_create_runtime_class): Add support for
1618         properties to dynamically created classes.
1619         * reflection.c: Fix a few places where non-MonoObjects were inserted
1620         into the tokens hashtable.
1621
1622 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
1623
1624         * object.c: some support to handle out of memory exceptions.
1625
1626 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
1627
1628         * marshal.c (mono_marshal_get_native_wrapper): support reference
1629         return types
1630
1631 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
1632
1633         * object.h, object.c: more portability stuff from Bernie Solomon.
1634         Unexport mono_object_allocate(). Added mono_object_unbox ().
1635         Set exitcode when an unhandled exception is thrown.
1636
1637 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
1638
1639         * marshal.c (mono_marshal_get_native_wrapper): use custom
1640         marshaler for return types.
1641
1642 2003-06-10  Dick Porter  <dick@ximian.com>
1643
1644         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
1645         ip_mreq is available
1646
1647 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
1648
1649         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
1650         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
1651         by Bernie Solomon <bernard@ugsolutions.com>.
1652
1653 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
1654
1655         * gc.c (mono_gc_init): Avoid error message on shutdown when
1656         GC_DONT_GC=1 is used.
1657
1658         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
1659         New icall to return the GUID of a module.
1660
1661 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
1662
1663         * class.c: ensure instance size always includes the parent's size
1664         even whem class size is set explicitly (fixes bug#44294).
1665
1666 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
1667
1668         * profiler.h, profiler.c: made the simple profiler thread-safe,
1669         get more accurate timing info. Allow the loading of an
1670         externally-developed profiler module.
1671
1672 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
1673
1674         * marshal.c (mono_marshal_get_native_wrapper): improved
1675         class/byref arguments.
1676         (mono_marshal_get_native_wrapper): better string marshaling support.
1677
1678 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
1679
1680         * class.c: ensure .pack and .size are handled correctly and
1681         simplified layout of static fields.
1682
1683 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
1684
1685         * appdomain.c
1686         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
1687
1688         * loader.c (mono_lookup_pinvoke_call): look for modules in the
1689         current directory (fix bug 44008)
1690
1691 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
1692
1693         * marshal.c (mono_marshal_get_native_wrapper): started support for
1694         custom marshalers.
1695         (mono_delegate_to_ftnptr): consider marshalling specifications
1696
1697 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
1698
1699         * reflection.c, reflection.h: emit custom marshal info.
1700
1701 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1702
1703         * object.c: free the GError.
1704         * icall.c: added CloseEvent_internal.
1705         * threads.[ch]:
1706         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
1707         call.
1708
1709 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
1710
1711         * loader.c (mono_method_get_signature): Add support for dynamic
1712         assemblies.
1713
1714 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
1715
1716         * reflection.c: fixed bug #43905.
1717
1718 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
1719
1720         * class.c, domain.c, icall.c, metadata.h, object.h: support for
1721         handling TypedReference and ArgIterator.
1722         * loader.c, loader.h: added function to get signature at call site.
1723
1724 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
1725
1726         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
1727         data readonly. Buglets and warning fixes. Some MethodSpec support.
1728
1729 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
1730
1731         * class.h, class.c, object.c: remove relative numbering support.
1732
1733 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
1734
1735         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
1736         free the string, until we get a chance to fix Gtk#
1737
1738 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1739
1740         * marshal.c: revert last patch.
1741
1742 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
1743
1744         * icall.c: updates for new mono_class_vtable() not calling
1745         the type constructor anymore.
1746
1747 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
1748
1749         * object.h, object.c: separate vtable creation from type
1750         initialization. Make running the .cctor thread safe.
1751
1752 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
1753
1754         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
1755
1756 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
1757
1758         * loader.c (mono_get_method): consider calling convention
1759
1760 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
1761
1762         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
1763         to return the invisible global type for a module.
1764
1765         * reflection.c (mono_image_build_metadata): Emit global fields too.
1766
1767 2003-05-20  Peter Williams  <peterw@ximian.com>
1768
1769         * loader.c (mono_lookup_internal_call): Add a few newlines.
1770
1771 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
1772
1773         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
1774         literal strings.
1775
1776         * appdomain.c (set_domain_search_path): Recalculate search path when
1777         AppDomainSetup.PrivateBinPath changes.
1778
1779         * object.c (mono_class_compute_gc_descriptor): It turns out some
1780         parts of the class libs (like System.Thread) holds pointers to
1781         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
1782         to treat native int a pointer type here.
1783         
1784 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
1785
1786         * appdomain.h, domain.c: add hashtable for jump target resolution.
1787
1788 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
1789
1790         * reflection.h reflection.c icall.c: Added new icalls 
1791         GetManifestResourceInfoInternal, GetModulesInternal and support
1792         infrastructure.
1793
1794 2003-05-16  Dick Porter  <dick@ximian.com>
1795
1796         * icall.c:
1797         * file-io.h:
1798         * file-io.c: Implement System.IO.MonoIO::GetTempPath
1799
1800 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
1801
1802         * object.c: mono_store_remote_field: little fix to previous patch.
1803
1804 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
1805
1806         * class.c: add constructors to array classes.
1807         * icall.c: special case array construction for InternalInvoke (),
1808
1809 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
1810
1811         * class.h class.c reflection.c object.c: Added support for field
1812         defaults in dynamically generated classes.
1813
1814 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
1815
1816         * reflection.c: properly encode charset for ddlimport.
1817
1818 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
1819
1820         * threads.c: allow compiling without GC.
1821
1822 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
1823
1824         * appdomain.h, object.c, object.h, threads.c, threads.h: added
1825         handling of thread static data.
1826
1827 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
1828
1829         * reflection.h, reflection.c: added mono_custom_attrs_free ().
1830
1831 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
1832
1833         * class.c (mono_array_class_get): always set the serializable flags
1834         (mono_array_class_get): always set the SEALED attribute for array types
1835
1836 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
1837
1838         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
1839         attributes (fix for bug 42021).
1840
1841 2003-05-12  Dick Porter  <dick@ximian.com>
1842
1843         * gc.c: Don't run finalizers when the finalizer thread is
1844         finishing up, because the default domain has already been
1845         destroyed.
1846
1847 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
1848
1849         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
1850         value is null, we should throw an exception.   This is slightly
1851         different than the other conventions used for the constructor.
1852
1853 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1854
1855         * socket-io.c: fixed windows build.
1856
1857 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1858
1859         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
1860
1861 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
1862
1863         * object.c (mono_string_new_wrapper): Compatibility fix for MS
1864         compilers.
1865
1866 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
1867
1868         * class.c (mono_class_layout_fields): Add experimental GC aware
1869         auto layout facility. Requires class library changes to work correctly.
1870
1871         (mono_class_setup_vtable): Avoid overriding explicit interface
1872         method implementations. Fixes iface3.exe test.
1873
1874         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
1875         object reference.
1876         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
1877         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
1878
1879         * metadata.h: Add new type classification macro which determines
1880         whenever the type holds an object reference.
1881
1882 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
1883
1884         * marshal.c (mono_marshal_get_native_wrapper): cleanups
1885
1886 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
1887
1888         * gc.c (finalizer_thread): Work around a GC bug.
1889
1890 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
1891
1892         * marshal.c (emit_struct_conv): allow unions
1893
1894         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
1895
1896 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
1897
1898         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
1899
1900 2003-05-06  Martin Baulig  <martin@ximian.com>
1901
1902         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
1903
1904 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1905
1906         * socket-io.c:
1907         (Select_internal): allow NULLs, don't create arrays if not needed.
1908         Coupled with Socket.cs changes.
1909
1910         * threadpool.c:
1911         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
1912         register a finalizer for it that will close the semaphore handle. This
1913         fixes the leak and make Lupus' test run with > 4080 loops.
1914
1915 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
1916
1917         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
1918         Jerome Laban (bug #42287)
1919
1920 2003-05-02  Martin Baulig  <martin@ximian.com>
1921
1922         * debug-mono-symfile.h
1923         (MonoSymbolFile): Moved declaration into mono-debug.h.
1924         (MonoDebugMethodJitInfo): Likewise.
1925         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
1926         argument.
1927         (_mono_debug_address_from_il_offset): Take a
1928         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
1929
1930         * mono-debug.h
1931         (MonoDebugDomainData): New struct.
1932         (mono_debug_get_domain_data): New function.
1933         (mono_debug_add_method): Take an additional `MonoDomain *'
1934         argument.
1935         (mono_debug_source_location_from_address): Likewise.
1936         (mono_debug_il_offset_from_address): Likewise.
1937         (mono_debug_address_from_il_offset): Likewise.
1938
1939 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
1940
1941         * reflection.c: one more check for null type in custom attrs.
1942
1943 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1944
1945         * reflection.c: avoid warning (comparison is always false due to limited
1946         range of data type).
1947
1948 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1949
1950         * icall.c: throw an exception in Type.GetField if the argument 'name'
1951         is NULL.
1952
1953 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
1954
1955         * reflection.c: fixed handling of enums in named arguments to custom
1956         attributes (bug #42123).
1957
1958 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
1959
1960         * reflection.c: use the right array element type and handle
1961         a null for a Type argument, too.
1962
1963 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
1964
1965         * reflection.c: handle arrays as arguments to custom attributes.
1966
1967 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
1968
1969         * reflection.c: handle a string value in a custom attr
1970         ctor that takes an object.
1971
1972 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
1973
1974         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
1975         (fix bug #42063)
1976
1977 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
1978
1979         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
1980
1981 2003-04-27  Martin Baulig  <martin@ximian.com>
1982
1983         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
1984         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
1985         MONO_DEBUGGER_EVENT_BREAKPOINT.
1986         (mono_breakpoint_trampoline_code): Removed.
1987         (mono_debugger_event_handler): The last argument is now a
1988         `guint32'.
1989         (mono_debugger_insert_breakpoint_full): Removed the
1990         `use_trampoline' argument.
1991         (mono_debugger_method_has_breakpoint): Likewise.
1992         (mono_debugger_trampoline_breakpoint_callback): Renamed to
1993         mono_debugger_breakpoint_callback(); take the method and
1994         breakpoint number as arguments.
1995
1996 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
1997
1998         * metadata.c: fix off by one when loading parameters attributes.
1999
2000 2003-04-24  Martin Baulig  <martin@ximian.com>
2001
2002         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
2003
2004 2003-04-24  Martin Baulig  <martin@ximian.com>
2005
2006         * mono-debug-debugger.c: Moved all code which interacts with the
2007         Mono Debugger here.
2008
2009         * debug-mono-symfile.c: This code now just deals with the symbol
2010         file itself, the debugger code is now in mono-debug-debugger.c.
2011
2012 2003-04-23  Martin Baulig  <martin@ximian.com>
2013
2014         * mono-debug.c (mono_debug_source_location_from_il_offset):
2015         New method; like mono_debug_source_location_from_address(), but
2016         takes an IL offset instead of a machine address.
2017
2018 2003-04-23  Martin Baulig  <martin@ximian.com>
2019
2020         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
2021         `line' field; this is now computed by the debugger.
2022
2023 2003-04-23  Martin Baulig  <martin@ximian.com>
2024
2025         * mono-debug.[ch]: New files.  This is the new debugging interface.
2026
2027         * mono-debug-debugger.[ch]: New files.  Moved all code which
2028         interacts with the Mono Debugger here.
2029
2030 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
2031
2032         * domain.c (mono_init): initialize mono_defaults.monitor_class
2033
2034 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
2035
2036         * reflection.c (method_encode_code): Add a spicy exception to help
2037         future compiler authors.
2038
2039 2003-04-21  Martin Baulig  <martin@ximian.com>
2040
2041         * icall.c
2042         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
2043         Make this work with relative pathnames; g_filename_to_uri() needs
2044         an absolute filename.
2045
2046 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
2047
2048         * icall.c: Track name changes in Object and ValueType.
2049
2050 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
2051
2052         * metadata.c (mono_type_stack_size): size should be a multiple of
2053         sizeof (gpointer)
2054
2055 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2056
2057         * gc.c:
2058         (internal_domain_finalize): moved into mono_domain_finalize. No need
2059         to create another thread because the finalizers will be run in the
2060         finalizer thread.
2061         
2062         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
2063         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
2064         to be run (MS does this too).
2065
2066 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
2067
2068         * object.c (mono_class_compute_gc_descriptor): Update comment.
2069
2070         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
2071
2072         * image.h: Add synchronized wrapper cache.
2073
2074         * image.c (do_mono_image_open): Initialize cache.
2075
2076         * reflection.c (create_dynamic_mono_image): Initialize cache.
2077
2078 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2079
2080         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
2081         ves_icall_System_Buffer_ByteLengthInternal.
2082
2083 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
2084
2085         * reflection.c: setup klass->nested_in earlier. Allow
2086         a dash in the assembly name.
2087
2088 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
2089
2090         * metadata.c (mono_type_to_unmanaged): dont access
2091         type->data.klass for MONO_TYPE_OBJECT
2092         (mono_type_to_unmanaged): consider System.Delegate class
2093
2094 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
2095
2096         * class.c: just setup supertypes in the proper place instead of
2097         initializing the full element class for arrays.
2098
2099 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
2100
2101         * class.c: ensure the element class of arrays is initialized.
2102         Setup the supertype info for array classes, too.
2103
2104 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
2105
2106         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
2107
2108 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2109
2110         * Makefile.am: re-added -m option when running cygpath. This way,
2111         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
2112         separator.
2113         * mono-config.c: same codepath for locating mono config file for WIN32
2114         and the rest.
2115         * assembly.c: if mono_assembly_setrootdir is called, don't override
2116         the value set.
2117
2118 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2119
2120         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
2121         MONO_ASSEMBLIES variable.
2122
2123 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
2124
2125         * icall.c: added Assembly::GetNamespaces() icall.
2126
2127 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2128
2129         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
2130
2131 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
2132
2133         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
2134         * object.c: fixed bug in the construction of vtable for proxies
2135
2136 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
2137
2138         * object.c (mono_array_new): Mark mono_array_new as an icall.
2139
2140 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2141
2142         * class.c: fixed test for public method when overriding interfaces.
2143         Closes bug #40970.
2144
2145 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
2146
2147         * appdomain.h, domain.c: added mono_domain_foreach() to
2148         be able to access the currently loaded appdomains.
2149         * object.c: make string interning work across sppdomains.
2150         Mark some functions for use as icalls.
2151
2152 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
2153
2154         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
2155
2156         * reflection.h reflection.c: Allocate long living data using 
2157         GC_MALLOC_ATOMIC so the collector does not need to scan it.
2158
2159         * reflection.c: Double the allocation size in streams instead of
2160         increasing it, to prevent unneccesary copying on large assemblies.
2161         
2162         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
2163         creation if the assembly does not have the Run flag set.
2164
2165 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
2166
2167         * class.h: avoid the C++ keywords in header files (Jerome Laban
2168         spotted and fixed this).
2169
2170 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2171
2172         * object.c:
2173         (mono_unhandled_exception): fill in the arguments for the
2174         UnhandledException event. Only trigger that event for the default
2175         domain (as MS does).
2176
2177 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
2178
2179         * object.c: Improve typed allocation stuff based on suggestions from
2180         Paolo. Also turn it on if the GC library supports it.
2181
2182 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
2183
2184         * object.c object.h class.h: Added experimental typed allocation
2185         facility using the interfaces in gc_gcj.h.
2186
2187         * os/gc_wrapper.h: Added new include files.
2188         
2189 2003-04-03  Martin Baulig  <martin@ximian.com>
2190
2191         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
2192         which is not yet enabled by default.
2193
2194         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
2195         functions.
2196         (mono_gc_lock, mono_gc_unlock): New static functions.
2197
2198         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
2199         functions; stop/start the world for the garbage collector.  This
2200         is using the windows API; we need to complete the SuspendThread()/
2201         ResumeThread() implementation in the io-layer to make this work on Unix.
2202         (mono_gc_push_all_stacks): New public function; tells the garbage
2203         collector about the stack pointers from all managed threads.
2204
2205 2003-04-03  Martin Baulig  <martin@ximian.com>
2206
2207         * object.h (MonoThread): Added `gpointer stack_ptr'.
2208
2209         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
2210
2211 2003-04-03  Martin Baulig  <martin@ximian.com>
2212
2213         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
2214
2215 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
2216
2217         * reflection.c (typebuilder_setup_fields): Initialize field.first and
2218         field.last.
2219
2220 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
2221
2222         * loader.c (mono_lookup_internal_call): Report the corlib that is
2223         out of sync.
2224
2225 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
2226
2227         * icall.c (ves_icall_type_GetTypeCode): fixed check for
2228         System.DBNull (it's class not valuetype).
2229
2230 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
2231
2232         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
2233         if the array method was already assigned a token (fixes bug#40646).
2234
2235 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
2236
2237         * reflection.c (mono_reflection_get_type): Attempt type resolve even
2238         if no assembly is given.
2239
2240 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
2241
2242         * metadata.h: Added the new tables.
2243
2244         * row-indexes.h: Added definitions for new tables.
2245
2246         * metadata.c: Add schemas for new tables, and add support for
2247         computing the sizes of them.
2248
2249         * class.c: Update for handling the new type cases.
2250
2251 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
2252
2253         * metadata.h (MONO_TYPE_IS_VOID): new macro
2254
2255 2003-03-31  Martin Baulig  <martin@ximian.com>
2256
2257         * threads.h (MonoThreadCallbacks): Added `thread_created'.
2258
2259         * threads.c (mono_thread_new_init): Call `thread_created' in the
2260         mono_thread_callbacks.
2261
2262 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
2263
2264         * loader.h: added marshalbyrefobject_class to mono_defaults
2265         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
2266         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
2267           generation of output parameters.
2268           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
2269         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
2270           contextbound and the target object belongs to the context of the caller.
2271         * object.h: added context and unwrapped_server variables in MonoRealProxy.
2272         * object.c: Implemented support for interfaces and abstract classes
2273           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
2274           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
2275
2276 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
2277
2278         * class.h class.c (mono_class_is_subclass_of): New function.
2279         
2280         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
2281         routines for most common case (calls from ArrayList::ToArray).
2282
2283         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
2284         routine so programs which call Environment::Exit() can be profiled.
2285
2286         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
2287         Added MONO_ARCH_SAVE_REGS.
2288
2289         * icall.c (ves_icall_type_is_subtype_of): Use new function.
2290
2291 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
2292
2293         * blob.h: Add a couple of new MonoType types definitions.
2294
2295         * tabledefs.h: Add a couple of new call convs.
2296
2297 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
2298
2299         * reflection.h (MonoReflectionDynamicAssembly): track changes in
2300         the layout of the class.
2301
2302         * reflection.c (alloc_table): double the size on overflow to avoid
2303         unnecessary copying.
2304
2305         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
2306         avoid filling out metadata tables and blobs. Also set mb->ilgen to
2307         null so it can be garbage collected.
2308         
2309 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
2310
2311         * reflection.c (mono_reflection_get_type): Return the resolved type
2312         only if it is in the assembly we searched.
2313
2314         * reflection.c (ensure_runtime_vtable): Initialize method slots.
2315
2316         * class.c (mono_class_setup_vtable): Set the slot of the overriding
2317         method.
2318
2319 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2320
2321         * appdomain.c:
2322         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
2323         the right one is 'file:///blah', but MS allows it.
2324         * assembly.c:
2325         (mono_assembly_open): allow 'file://blah'
2326
2327         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
2328
2329 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
2330
2331         * socket-io.c: fixes bug #40310.
2332
2333 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
2334
2335         * reflection.c (mono_reflection_parse_type): handle deeply nested
2336         types correctly.
2337
2338         * reflection.c (mono_image_create_token): Use unique token values
2339         since they will be put into a hash table.
2340
2341         * class.c (mono_class_setup_vtable): If a method occurs in more than
2342         one place in the vtable, and it gets overriden, then change the
2343         other occurances too.
2344
2345         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
2346         object as return type.
2347
2348 2003-03-22  Pedro Martínez Juliá  <yoros@wanadoo.es>
2349
2350         * icall.c: Deleted "ToString" implementation for double and float
2351         because they are full implemented in managed code.
2352
2353 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
2354
2355         * reflection.c, reflection.h: implemented and exported functions
2356         to retrieve info about custom attributes.
2357
2358 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2359
2360         * appdomain.c: moved Uri handling to assembly.c
2361         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
2362         work when using a file Uri in *nix and windows.
2363
2364         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
2365         GetReferencedAssemblies.
2366
2367 2003-03-18  Dick Porter  <dick@ximian.com>
2368
2369         * icall.c: Rename a couple of internal calls
2370
2371         * threads.c: Set the thread state to Stopped when a thread exits.
2372         Fixes bug 39377.
2373
2374 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
2375
2376         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
2377         New icall.
2378
2379         * object.c (mono_class_vtable): fix warning.
2380
2381 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
2382
2383         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
2384
2385         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
2386         memory.
2387         (method_encode_clauses): Create exception info structures in the right
2388         order.
2389         (mono_reflection_setup_internal_class): Initialize supertypes field.
2390
2391         * class.c object.c: Handle interfaces which implement other interfaces 
2392         correctly.
2393
2394         * class.h class.c: Move the supertypes array initialization code into 
2395         a separate function so it can be used for dynamic types too. Also call
2396         it earlier, in mono_class_init(), since it can be used before the
2397         type is initialized.
2398
2399 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2400
2401         * Makefile.am:
2402         * assembly.c:
2403         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
2404
2405         * appdomain.c:
2406         * appdomain.h:
2407         * marshal.c:
2408         * object.c: remove warnings.
2409
2410 2003-03-13  Martin Baulig  <martin@ximian.com>
2411
2412         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
2413         (MonoDebugLexicalBlockEntry): New types.
2414
2415         * debug-mono-symfile.c
2416         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
2417
2418 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2419
2420         * process.c: ret can be any non-zero value accroding to MS doc.
2421
2422 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
2423
2424         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
2425         fixing a warning for a miss-used prototype, would have cause
2426         random memory corruption.
2427
2428 2003-03-07  Martin Baulig  <martin@ximian.com>
2429
2430         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
2431         getting really annoying ....
2432
2433 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
2434
2435         * reflection.c (fixup_method): added support for array methods.
2436
2437 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
2438
2439         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
2440         (pointed out by Michael Adams).
2441
2442 2003-03-04  Dick Porter  <dick@ximian.com>
2443
2444         * icall.c: Temporarily reverted the Double and Single ToString()
2445         change, because it broke nunit.
2446
2447 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
2448
2449         * object.h, threads.h: make include files compatible with C++
2450         (patch by Jerome Laban <jlaban@wanadoo.fr>).
2451
2452 2003-03-04  Pedro Martínez Juliá  <yoros@wanadoo.es>
2453
2454         * icall.c: Erased ToString helper functions for Double and Single.
2455         Now, that implementations ar all in managed code (Double and Single
2456         Formatters).
2457
2458 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
2459
2460         * appdomain.c: Added method for initializing the default context of
2461         a domain. Added internal call for getting the default context.
2462         * appdomain.h: Added context variable in MonoDomain struct.
2463         * domain.c: mono_domain_set also sets the default context of the domain
2464         * icall.c: Mapped internal method InternalGetDefaultContext.
2465         * object.c: mono_object_get_virtual_method returns always a remoting
2466         wrapper if the object is a transparent proxy.
2467         mono_runtime_invoke_array: when creating an object by calling the
2468         constructor, if the created object is a proxy, then the constructor should
2469         be called using the a remoting wrapper.
2470
2471 2003-03-03  Dick Porter  <dick@ximian.com>
2472
2473         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
2474         variable so it compiles on solaris.  Problem spotted by
2475         Christopher Taylor <ct@cs.clemson.edu>
2476
2477 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2478
2479         * appdomain.c:
2480         (get_info_from_assembly_name): don't leak value.
2481
2482         * icall.c:
2483         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
2484         result.
2485
2486 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
2487
2488         * assembly.c: export mono_image_load_references ().
2489         * class.c: handle function pointers. mono_class_from_name() now
2490         supports nested type names directly.
2491
2492 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
2493
2494         * reflection.h reflection.c: Encode already created dynamic methods 
2495         and fields correctly as a DEF instead of a REF.
2496
2497         * reflection.c: Get rid of the force_ref argument to 
2498         mono_image_typedef_or_ref since it was wrong in the first place.
2499
2500         * string-icalls.c: add error checking to string constructors according
2501         to the MSDN docs.
2502
2503         * reflection.c: Emit types in the order their TypeBuilders were 
2504         created. Previously, a new table index was assigned to each type before
2505         the tables were emitted. This was wrong because the signature blob
2506         might already refer to a type by its original table index.
2507
2508 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
2509
2510         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
2511         change.
2512         
2513 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2514
2515         * Makefile.am: make assemblies dir have \ instead of / on windows.
2516
2517 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
2518
2519         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
2520         iterate over the NESTEDCLASS table using a linear search since the
2521         table is not guaranteed to be sorted by the secondary key.
2522
2523         * class.c (mono_class_create_from_typedef): fixed up call to
2524         mono_metadata_nesting_typedef.
2525         
2526 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
2527
2528         * marshal.c (mono_string_to_byvalstr): clear the memory as
2529         suggested by Jerome Laban <jlaban@wanadoo.fr>
2530
2531 2003-02-26  Dick Porter  <dick@ximian.com>
2532
2533         * process.c: Cope with padding in .rsrc blocks
2534
2535 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
2536
2537         * metadata.h: reverted the filter_len change, it breaks reflection
2538         
2539 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
2540
2541         * metadata.h: added a new field to store the filter_len
2542         
2543
2544 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
2545
2546         * reflection.c: handle custom attributes for types and members
2547         created with Reflection.Emit (bug#38422).
2548
2549 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
2550
2551         * reflection.c: define RTSpecialName automatically for constructors for
2552         compatibility with MS.NET.
2553
2554         * reflection.c (mono_reflection_create_runtime_class): initialize
2555         nested_in field of dynamically created classes.
2556
2557 2003-02-22  Martin Baulig  <martin@ximian.com>
2558
2559         * debug-mono-symfile.h: Incremented version number.
2560
2561 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
2562
2563         * object.h icall.c process.c: fix warnings.
2564
2565 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
2566
2567         * appdomain.h appdomain.c:
2568         (mono_domain_try_type_resolve): split the 
2569         name_or_tb argument into a name and a tb argument.
2570         (mono_domain_has_type_resolve): new function to check whenever the
2571         application has registered a TypeResolve event handler.
2572         
2573         * icall.c reflection.h reflection.c: move the type resolve logic into
2574         mono_reflection_get_type () so it will be invoked when 
2575         Assembly::GetType () is called.
2576
2577         * reflection.c:
2578         (mono_reflection_get_type): renamed to get_type_internal.
2579         (mono_reflection_get_type): fixed type name generation so it works 
2580         for nested types too.
2581         (mono_reflection_get_type): call has_type_resolve () to avoid the 
2582         costly type name generation if there is no resolve event handler.
2583
2584 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
2585
2586         * class.c, image.c: load exported types from file references.
2587
2588 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
2589
2590         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
2591           used to cache the managed methods used to create proxies and make 
2592           remote invocation of methods.
2593         * class.h: Added in MonoVTable a flag to indicate that a class needs 
2594           to be remotely created.
2595         * object.c: Modified the method mono_class_vtable(). It now initializes 
2596           the remote flag of the vtable. Modified mono_object_new_specific(), 
2597           so now it checks the remote flag.
2598         * icall.c: Added a couple of internal methods, one for enabling instance 
2599           creation interception for a type, and one for creating objects bypassing
2600           the remote check.
2601
2602 2003-02-18  Martin Baulig  <martin@ximian.com>
2603
2604         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
2605         New interncall to get a method's metadata token.
2606
2607         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
2608         New interncall for the debugger.
2609
2610 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
2611
2612         * class.c (mono_class_setup_vtable): allocate supertype array
2613
2614 2003-02-18  Martin Baulig  <martin@ximian.com>
2615
2616         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
2617
2618 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2619
2620         * reflection.c:
2621         (assembly_name_to_aname): jump over unknown properties (i've found
2622         something like: 'type, assembly, version=xxx, custom=null, public...',
2623         so now will ignore custom=null and still get the rest of the values).
2624
2625 2003-02-17  Dick Porter  <dick@ximian.com>
2626
2627         * threads.c: Have Thread.Start() wait for a semaphore to signal
2628         that the thread has set up all its local data.  This fixes bug
2629         34323, where Abort() raced the new thread's TLS data.
2630
2631         Also removes the handle_store() call from start_wrapper, because
2632         threads are now always created suspended and there is no longer a
2633         race between the parent and child threads to store the info.
2634
2635 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
2636
2637         * image.c: explain the #- heap issue in a message, hopefully
2638         avoiding FAQs on mono-list.
2639
2640 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2641
2642         * icall.c:
2643         (GetEntryAssembly): if the domain has not invoked
2644         AppDomain.ExecuteAssembly yet, return the assembly of the default
2645         AppDomain.
2646
2647 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
2648
2649         * class.c (mono_ldtoken): make it work in dynamic assemblies.
2650
2651 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
2652
2653         * metadata.c, reflection.c: simple speedup to type hash
2654         and equals code.
2655
2656 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
2657
2658         * image.c, image.h, class.c, assembly.c: move module loading
2659         to MonoImage. When loading metadata, consider alignemnet from
2660         the start of metadata, not from the metadata address in memory.
2661
2662 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
2663
2664         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
2665         AssemblyBuilder objects. Factored out custom attribute creation into
2666         a separate function.
2667         (create_custom_attr): new function to create custom attributes.
2668
2669 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
2670
2671         * Makefile.am: Got tired of typing the full pathname to pedump.
2672         Until there is another option, am installing this.
2673
2674 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
2675
2676         * class.c (class_compute_field_layout): always set field->parent 
2677         (mono_ldtoken): use mono_defaults.fieldhandle_class;
2678
2679 2003-02-11  Dick Porter  <dick@ximian.com>
2680
2681         * threads-types.h:
2682         * monitor.c: Rewrote Monitor, making lock much faster and
2683         Pulse/Wait work as specified.  Also uses much fewer handles, and only
2684         creates them as needed.
2685
2686         * exception.c: Added SynchronizationLockException
2687
2688         * threads.c: Deleted old Monitor implementation.  The new one is
2689         in a new file.
2690
2691 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
2692
2693         * class.c: handled TypedReference type code. Set the correct size for
2694         class data. Setup interface_offsets for interface classes, too.
2695
2696 2003-02-09  Martin Baulig  <martin@ximian.com>
2697
2698         * debug-mono-symfile.h: Reflect latest symbol writer changes.
2699
2700 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
2701
2702         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
2703         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
2704         * object.c: fixed mono_object_get_virtual_method () for interfaces.
2705         * verify.c: check for code that runs after the end of the method.
2706
2707 2003-02-08  Pedro Martínez Juliá  <yoros@wanadoo.es>
2708
2709         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
2710         "System.Math::Round2".
2711         * sysmath.h: Added Floor, Round and Round2 definitions.
2712         * sysmath.c: Modified certain functions that were not 100% compliant
2713         with MS.NET (math precision) and added the implementation of Floor,
2714         Round and Round2.
2715
2716 2003-02-07  Martin Baulig  <martin@ximian.com>
2717
2718         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
2719
2720 2003-02-07  Martin Baulig  <martin@ximian.com>
2721
2722         * debug-mono-symfile.c: Reflected latest symwriter changes.
2723         (mono_debug_create_mono_symbol_file): Removed.
2724         (mono_debug_open_mono_symbol_file): Take an argument which
2725         specifies whether to create a dynamic symbol file.
2726
2727 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
2728
2729         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
2730
2731 2003-02-05  Martin Baulig  <martin@ximian.com>
2732
2733         * reflection.c (mono_image_build_metadata): Make this public,
2734         protect it against being called multiple times, don't create
2735         resources and don't build the compressed metadata here.
2736         (mono_image_create_pefile): Do this here.
2737
2738         * icall.c
2739         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
2740
2741 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2742
2743         * socket-io.c: fixed bug #36322.
2744
2745 2003-02-06  Piers Haken <piersh@friskit.com>
2746
2747         * appdomain.[ch]:
2748         * class.h:
2749         * debug-mono-symfile.c:
2750         * icall.c:
2751         * loader.c:
2752         * mono-config.c:
2753         * monosn.c:
2754         * reflection.c:
2755         * socket-io.c: warning cleanups
2756
2757 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
2758
2759         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
2760         function. works like remoting invoke, but does a check for the Proxy first.
2761
2762 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
2763
2764         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
2765
2766 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
2767
2768         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
2769         array of pointers.
2770         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
2771         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
2772
2773         * object.c (mono_store_remote_field_new): used by the new jit
2774         instead of mono_store_remote_field
2775         (mono_load_remote_field_new): used by the new jit
2776         instead of mono_load_remote_field
2777
2778 2003-02-05  Patrik Torstensson
2779
2780         * appdomain.c: changed unload to take the domain id instead
2781         of domain
2782         
2783         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
2784
2785
2786 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2787
2788         * appdomain.c: don't look for assemblies in ApplicationBase if
2789         PrivateBinPathProbe is set.
2790
2791 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2792
2793         * object.c: make the first argument in main_args contain the absolute
2794         path to the assembly. Fixes bug #37511.
2795
2796 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2797
2798         * icall.c: get correct UTC offset for countries not using daylight
2799         time saving. Fixes bug #30030.
2800
2801 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2802
2803         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
2804         and 1 are the family).
2805
2806 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
2807
2808         * icall.c (ves_icall_InternalExecute): removed wrong assertion
2809
2810         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
2811
2812 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
2813
2814         * reflection.c: added support for SignatureHelper tokens, which is
2815         needed by the Calli opcode.
2816
2817         * reflection.h: track changes to SignatureHelper class.
2818
2819         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
2820
2821 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2822
2823         * appdomain.c: fixed loading assemblies from PrivateBinPath.
2824
2825 2003-02-03  Patrik Torstensson
2826         * appdomain.[c|h], domain.c : 
2827          - Added support for getting a domain via domain id
2828          - Support for setting and getting domain from System.AppDomain 
2829            (used in cross appdomain channel)
2830          - Added support for get/set for a MonoAppContext on a thread 
2831            (Context class in System.Runtime.Remoting.Contexts),
2832          - Removed hack in Get/SetData and ExecuteAssembly.
2833         
2834         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
2835         the managed world to get control when a proxy is created.
2836
2837         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
2838         
2839 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
2840
2841         * icall.c
2842         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
2843         Populate the codebase field as well.
2844
2845 2003-02-02  Martin Baulig  <martin@ximian.com>
2846
2847         * debug-mono-symfile.c
2848         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
2849         (mono_debug_symfile_add_method): Allow interncalls.
2850
2851 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2852
2853         * icall.c: throw parse exception if strtod fails or the string is empty.
2854
2855 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
2856
2857         * marshal.c: handle object type separately from defined
2858         class types.
2859
2860 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
2861
2862         * marshal.c: handle NATIVE_LPSTR for strings when it's
2863         explicitly specified.
2864
2865 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
2866
2867         * reflection.c, reflection.h, icall.c: setup the reflection
2868         handle cache for ModuleBuilders and AssemblyBuilders.
2869
2870 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
2871
2872         * reflection.c (reflection_methodbuilder_to_mono_method): set
2873         pinvoke flag
2874
2875 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2876
2877         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
2878
2879 2003-01-29  Dick Porter  <dick@ximian.com>
2880
2881         * threads.c: No need for the fake_thread kludge now that Thread
2882         doesn't run a class constructor
2883         
2884 2003-01-29  Dick Porter  <dick@ximian.com>
2885
2886         * threads.c: Use g_direct_hash instead of the rather bogus
2887         g_int_hash
2888
2889 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
2890
2891         * marshal.c (mono_marshal_get_native_wrapper): add check for null
2892         (fix pinvoke12.exe)
2893         (mono_marshal_get_struct_to_ptr): generate valid IL code
2894         (mono_marshal_get_ptr_to_struct): generate valid IL code
2895         (*): correctly set sig->pinvoke, we need to memdup the signature
2896         to do that
2897
2898 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
2899
2900         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
2901         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
2902
2903 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
2904
2905         * profiler.c: provide more callers information.
2906
2907 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
2908
2909         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
2910
2911         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
2912
2913         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
2914
2915 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
2916
2917         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
2918         exception instead of going into an infinite loop on dates which it 
2919         can't yet handle.
2920
2921         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
2922         out-of-range exception if needed.
2923
2924         * class.c (mono_class_setup_vtable): allow a virtual method to provide
2925         an implementation for an interface method and to override an inherited
2926         method at the same time. 
2927         Imagine a scenario when a virtual method is used to override a
2928         virtual abstract method in a parent class, and this same method 
2929         provides an implementation for an method inherited from an interface. 
2930         In this case, the interface resolution code will set im->slot, which 
2931         means that the virtual method override pass will skip this method 
2932         which means a pointer to the abstract method inherited from the parent
2933         will remain in the vtable of this non-abstract class.
2934
2935         * class.c: (mono_class_setup_vtable): continue search for a real 
2936         method if only an abstract method is found.     
2937
2938 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
2939
2940         * reflection.c: add size to encoding for ByValStr and ByValArray
2941         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
2942
2943 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
2944
2945         * class.c (mono_class_setup_vtable): pass the override info as an
2946         argument.
2947
2948         * class.c (mono_class_setup_vtable): set the slot of overriding methods
2949         correctly.
2950         
2951         * reflection.c (ensure_runtime_vtable); add support for method 
2952         overrides.
2953         
2954 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
2955
2956         * reflection.c (resolution_scope_from_image): Hack to work to work with
2957         dynamic assemblies.
2958
2959         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
2960         added a 'force_ref' argument to force this function to allways return 
2961         a TypeRef. This is needed by mono_image_get_memberref_token ().
2962         
2963 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
2964
2965         * reflection.c (mono_image_get_type_info): interfaces really don't have
2966         a parent.
2967
2968         * reflection.c (mono_image_basic_init): fill out missing fields of
2969         image structure.
2970
2971         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
2972         dynamic assemblies. This is required so dynamic assemblies show up in
2973         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
2974         Type::GetType() etc. This is consistent with MS behaviour.
2975
2976         * image.c image.h reflection.c: add newly created classes to the name 
2977         cache so mono_class_get () will find them.      
2978
2979 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
2980
2981         First part of changes to get IKVM.NET running under mono.
2982         
2983         * appdomain.h, appdomain.c: added new function 
2984         mono_domain_try_type_resolve() which will emit TypeResolve events. 
2985         This function will call AppDomain::DoTypeResolve to do the actual work.
2986
2987         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
2988         moved existing code dealing with dynamic tokens to a new function 
2989         called mono_reflection_lookup_dynamic_token (). This function will 
2990         raise TypeResolve events when appropriate. Since reflection.c is not 
2991         part of libmetadata, a new hook function called 
2992         mono_lookup_dynamic_token() is added to class.c which will call this.
2993
2994         * assembly.h assembly.c: make the invoke_load_hook function public,
2995         so it can be called for dynamic assemblies.
2996
2997         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
2998
2999         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
3000         type isn't found.
3001
3002         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
3003         MonoGHashTable, since it contains pointers to objects which the GC 
3004         needs to track.
3005
3006         * assembly.c (search_loaded): remove unused variable.
3007         
3008 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
3009
3010         * object.c: fixed issue exposed by gcc-generated IL programs
3011         that use RVA data for pointers.
3012
3013 2003-01-25  Martin Baulig  <martin@ximian.com>
3014
3015         * threads.c (start_wrapper): Moved the initialization of
3016         `start_func' above the mono_new_thread_init() call to which we
3017         pass it as argument.
3018
3019 2003-01-24  Martin Baulig  <martin@ximian.com>
3020
3021         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
3022         the MonoThread pointer.
3023
3024 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
3025
3026         * icall.c: Rename `PowImpl' to Pow.
3027
3028 2003-01-23  Dick Porter  <dick@ximian.com>
3029
3030         * threads.c (start_wrapper): Create a Thread object if needed, so
3031         the Main() thread can do the class initialisation in a subthread
3032         that has been set up to allow managed code execution.
3033
3034         Pass the thread ID instead of the MonoThread pointer to the thread
3035         start and attach callbacks.  This change is required, because the
3036         jit thread start callback must be called _before_ the Thread
3037         object can be created.
3038         
3039         (mono_thread_init): Removed much object creation code that is no
3040         longer needed.  No managed code is called from here now.
3041
3042         * object.c (mono_runtime_exec_managed_code): Create a subthread
3043         for Main, and call back to the runtime to use it.
3044         Set the exit code when Main exits.
3045
3046         * gc.c: Make sure domain finalisation happens in a subthread.
3047         Re-enable threaded GC, fixing bug 31333 (again).
3048
3049         * environment.c: System.Environment internall calls (so far just
3050         ExitCode is here, the others are still in icall.c)
3051
3052         * appdomain.c (mono_runtime_cleanup): All threads running managed
3053         code should have finished before mono_runtime_cleanup() is
3054         reached, so no need to clean up threads.
3055
3056 2003-01-22  Martin Baulig  <martin@ximian.com>
3057
3058         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
3059         `gpointer func' arguments.      
3060         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
3061         but added `MonoThread *thread' argument.
3062         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
3063
3064         * threads.c (mono_new_thread_init): Added `gpointer func' argument
3065         and pass it to the mono_thread_start_cb callback.
3066         (mono_install_thread_callbacks): New public function to install a
3067         set of callbacks which are set by the debugger.
3068         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
3069
3070 2003-01-22  Martin Baulig  <martin@ximian.com>
3071
3072         * Makefile.am: Install debug-mono-symfile.h.
3073
3074 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
3075
3076         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
3077
3078 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
3079
3080         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
3081         * class.c (mono_ptr_class_get): correctly set access levels of pointers
3082         (mono_array_class_get): correctly set access levels of arrays
3083
3084 2003-01-20      Patrik Torstensson
3085         * image.h (MonoAssemblyName): changed major, minor, build, revision
3086         from signed to unsigned.
3087
3088 2003-01-20  sean kasun <skasun@azstarnet.com>
3089
3090         * reflection.c (load_cattr_value): Now this handles
3091         MONO_TYPE_SZARRAY.  Fixes bug #35629
3092
3093 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
3094
3095         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
3096         integer value
3097
3098 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3099
3100         * decimal.c: fixed bug #26056.
3101
3102 2003-01-17  Martin Baulig  <martin@ximian.com>
3103
3104         * gc.c: Raise an ExecutionEngineException instead of using g_error().
3105
3106 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3107
3108         * exception.[ch]:
3109         (mono_get_exception_type_initialization): new function.
3110
3111         * object.c: throw a TypeInitializationException when an exception is
3112         thrown invoking the class constructor.
3113
3114 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3115
3116         * reflection.c: fixed attribute reading.
3117
3118 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3119
3120         * icall.c:
3121         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
3122         provided, look for the type in the calling assembly and then in
3123         mscorlib; if the assembly name is provided, only try that one.
3124
3125 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
3126
3127         * object.c: register the vtable before there is a chance it's
3128         queried again recursively.
3129
3130 2003-01-13  Duncan Mak  <duncan@ximian.com>
3131
3132         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
3133         gc-internal.h. 
3134         
3135 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
3136
3137         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
3138
3139 2003-01-11  Martin Baulig  <martin@ximian.com>
3140
3141         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
3142         this to 20 for the release.
3143
3144 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
3145
3146         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
3147
3148         * loader.c (mono_method_get_marshal_info): bug fix
3149
3150         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
3151         structures with explicit layout
3152
3153 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
3154
3155         * profiler.c: made the output more readable (and sorted). 
3156         Added caller information for the allocation profiler.
3157
3158 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
3159
3160         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
3161
3162 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3163
3164         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
3165         to get value types.
3166         
3167 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
3168
3169         * object.c, profiler.h, profiler.c, profiler-private.h:
3170         Added object allocation profiler.
3171
3172 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
3173
3174         * reflection.h, reflection.c: handle global methods.
3175         Compress blob entries.
3176
3177 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
3178
3179         * marshal.c: fix compilation.
3180
3181 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
3182
3183         * loader.c (mono_method_get_marshal_info): impl.
3184
3185         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
3186
3187 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3188
3189         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
3190         for reference types.
3191
3192 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
3193
3194         * loader.c: fixed off by one error in loaded parameter names.
3195
3196 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
3197
3198         * marshal.c (mono_marshal_get_icall_wrapper): like
3199         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
3200         instead of a MonoMethod.
3201
3202 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3203
3204         * decimal.c: fixed bug #36537.
3205
3206 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
3207
3208         * marshal.c: throw a missing method exception if a
3209         P/Invoke method is not found.
3210
3211 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
3212
3213         * icall.c: allow a null this for constructors.
3214
3215 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
3216
3217         * icall.c: raise the proper exceptions if the arguments to the
3218         internal Invoke are incorrect.
3219
3220 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
3221
3222         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
3223
3224 2003-01-03  Martin Baulig  <martin@ximian.com>
3225
3226         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
3227
3228 2002-12-31  Martin Baulig  <martin@ximian.com>
3229
3230         * debug-mono-symfile.c: Completely rewrote the type section.
3231         Instead of using individual malloc()ed fields, we use one big
3232         continuous memory area and offsets into this area.
3233         See the comments in the source code for details.
3234
3235 2002-12-30  Martin Baulig  <martin@ximian.com>
3236
3237         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
3238
3239 2002-12-30  Martin Baulig  <martin@ximian.com>
3240
3241         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
3242         line number table in this data blob instead of using an external
3243         pointer.
3244
3245 2002-12-28  Martin Baulig  <martin@ximian.com>
3246
3247         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
3248
3249 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
3250
3251         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
3252         as a boxed return type.
3253
3254 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
3255
3256         * appdomain.c
3257         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
3258         g_build_filename to properly get separators on the filename created.
3259
3260         * object.h: Small change, introduce MonoMarshalByRefObject to
3261         track the layout of that structure in the C# universe as we make
3262         changes there.
3263
3264 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
3265
3266         * object.c: removed assert to allow static fields on interfaces.
3267         * loader.c: a TypeSpec may be used for any type, not just arrays.
3268
3269 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
3270
3271         * class.c, class.h: added mono_class_array_element_size ().
3272         Ignore static methods in interfaces.
3273
3274 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3275
3276         * threads.c: fixed the build under cygwin.
3277
3278 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
3279
3280         * reflection.c: handle nullref constants. Allocate keys for
3281         reflection handles with the GC.
3282
3283 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
3284
3285         * threads.c, threads.h: added mono_thread_get_abort_signal()
3286         to get a suitable signal for thread abort.
3287
3288 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
3289
3290         * metadata.c: fix handling of ExportedType table.
3291
3292 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3293
3294         * icall.c: added WriteWindowsDebugString internal call.
3295
3296 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3297
3298         * reflection.h: added fields to match C# implementation.
3299
3300 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3301
3302         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
3303
3304 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
3305
3306         * gc.h, gc-internal.h: Rename header for GC internal calls to
3307         gc-internal.h from gc.h as to not clash with Boehm GC having its
3308         header installed as <gc.h> in outside include paths.
3309         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
3310         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
3311
3312 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3313
3314         * icall.c: assign minor, build and revision in FillName.
3315
3316 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
3317
3318         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
3319         Added support for running code generated by Reflection.Emit.
3320
3321 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3322
3323         * appdomain.c: check for NULL argument in LoadFrom.
3324
3325 2002-12-10  Dick Porter  <dick@ximian.com>
3326
3327         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
3328
3329 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3330
3331         * appdomain.c: fix buglet when building exe file name.  Handle full
3332         assembly name (needed after latest changes to AssemblyName).
3333         * image.c:
3334         (mono_image_close): free some hashtables.
3335
3336 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
3337
3338         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
3339         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
3340         on some systems (redhat 7.3) 
3341
3342 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
3343
3344         * threads.c: delete the critical section of a sync block,
3345         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
3346
3347 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
3348
3349         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
3350
3351 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3352
3353         * appdomain.[ch]: handle the assembly preload event to try loading the
3354         assemblies using the paths we have in the current domain.
3355
3356         * assembly.[ch]: created an assembly preload hook that is called to try
3357         loading the assembly by other means that the ones provided here.
3358
3359         * domain.c: initialize the domain search path.
3360
3361         From now on, assemblies (TODO: except corlib and System) are loaded
3362         according to these rules when using mono_assembly_load ():
3363
3364                 1. It tries to load the assembly from the ApplicationBase
3365                 of the current domain appending .dll and .exe (TODO: have to
3366                 try loading from name/name.dll and name/name.exe).
3367
3368                 2. It tries the search path specified in PrivateBinPath for the
3369                 current domain (if any).
3370
3371                 3. Previous behavior.
3372
3373 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
3374
3375         * icall.c: implemented GetInterfaceMap() related icall.
3376         * domain.c, loader.h: load MethodInfo in mono_defaults.
3377
3378 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
3379
3380         * gc.c: disable the finalizer thread for now, untill all the issues
3381         with it are resolved.
3382
3383 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
3384
3385         * string-icalls.c: handle embedded nulls in string ctor when the
3386         length is specified.
3387
3388 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
3389
3390         * class.c: look for explicit interface implementation in parent
3391         classes, too.
3392
3393 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
3394
3395         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
3396
3397 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
3398
3399         * gc.c: protect handles with a critical section.
3400
3401 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3402
3403         * icall.c:
3404         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
3405         parameters. If no assembly specified, try getting the type from all
3406         the assemblies in the current domain, else, load the assembly and get
3407         the type from it.
3408
3409 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3410
3411         * marshal.c: applied patch from Aleksey Demakov that fixes
3412         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
3413
3414 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3415
3416         * icall.c: fixed get_location.
3417
3418 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
3419
3420         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
3421         declarations to make it work with older gcc. 
3422
3423         * loader.c (mono_get_method): set signature->pinvoke for native calls
3424
3425 2002-11-20  Dick Porter  <dick@ximian.com>
3426
3427         * threads.c (mono_thread_init): Set the main thread's handle
3428
3429 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
3430
3431         * gc.c: allow compilation without GC support. Changed to match the
3432         mono coding style.
3433
3434 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
3435
3436         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
3437
3438 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
3439
3440         * reflection.c: set a public key token on the core assemblies.
3441
3442 2002-11-18  Dick Porter  <dick@ximian.com>
3443
3444         * threads.c: Split out some thread initialisation so that other
3445         files can set the start callback function.
3446
3447         * gc.c: Run finalisers in a separate thread, to avoid stack
3448         overflow.  Fixes bug 31333.
3449
3450         * appdomain.c: Set up GC finalisation thread.
3451
3452         * reflection.c: 
3453         * object.c: 
3454         * domain.c: Use gc.h macros for GC_malloc
3455         
3456 2002-11-15  Dick Porter  <dick@ximian.com>
3457
3458         * threadpool.c: 
3459         * threads.c:
3460         * appdomain.c: Removed mono_runtime_init_with_attach(),
3461         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
3462         merging the extra parameter with the existing function.  Removed
3463         unneeded code in mono_thread_attach().
3464
3465 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
3466
3467         * image.c (mono_image_loaded_by_guid): a method to get loaded
3468         images by guid. 
3469         (load_metadata_ptrs): we store the guid as string.
3470
3471 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
3472
3473         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
3474
3475         * metadata.c (mono_guid_to_string): imported method form Zoltan
3476         Varga (slightly modified)
3477
3478         * assembly.c (mono_assembly_open): load precompiled code
3479
3480         * loader.h (MonoMethod): we store the method token for use in the
3481         aot compiler. 
3482
3483 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3484
3485         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
3486         the hook function called when an assembly is loaded.
3487         
3488         * domain.c: Modified file.
3489         (mono_domain_assembly_load): removed hash table insertion of assemblies.
3490
3491         Fixes bug #33196.
3492
3493 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
3494
3495         * reflection.c: Map PEFileKind to the value expected by the WinNT
3496         image loader. 
3497
3498 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3499
3500         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
3501         Read until the buffer is filled completely.
3502
3503 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3504
3505         * icall.c: implemented MonoType.InternalGetEvent ().
3506
3507 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3508
3509         * appdomain.c: implemented InitAppDomainSetup. Delayed
3510         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
3511         the entry_assembly.
3512
3513         * assembly.c: base_dir is now an absolute path ending with
3514         G_DIR_SEPARATOR.
3515
3516         * icall.c: modified get_location according to the above changes.
3517
3518         * object.c: init AppDomain.SetupInformation for the default domain after
3519         we have the entry assembly.
3520
3521         * domain.c: when unloading a domain, setup = NULL.
3522
3523 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
3524
3525         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
3526
3527 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
3528
3529         * object.h, object.c: introduced mono_object_get_virtual_method ()
3530         to lookup the method invoked on an object when a callvirt is done on
3531         a method.
3532         * icall.c: make MethodInfo::Invoke() always do a virtual call.
3533
3534 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3535
3536         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
3537         current domain when loaded an assembly and failed to load it.
3538
3539         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
3540
3541 2002-10-31  Dick Porter  <dick@ximian.com>
3542
3543         * icall.c: 
3544         * file-io.h: 
3545         * file-io.c: Return the error status in a parameter, as the
3546         GetLastError() value has long since been blown away if we try and
3547         look it up in a subsequent internal call invocation.  Delete the
3548         GetLastError() internal call, because it's useless.
3549
3550 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
3551
3552         * class.[ch]: added cast_class to fix bug 29517
3553
3554 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
3555
3556         * marshal.c: create valid IL code in the filter clause:
3557         the new JIT is less forgiving:-)
3558
3559 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3560
3561         * icall.c: removed get_property internal call.
3562
3563 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
3564
3565         * appdomain.h domain.c: Added an ID to appdomains.
3566         
3567         * threads.c threads.h icall.c: Implement icall
3568         Thread:GetDomainID(), and remove unused icall 
3569         CurrentThreadDomain_internal.
3570
3571 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3572
3573         * icall.c: Don't recurse through the base types in GetConstructor.
3574         Fixes bug #32063. 
3575
3576 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
3577
3578         * mempool.h, mempool.c: added mono_mempool_empty() and
3579         mono_mempool_stats().
3580
3581 2002-10-23  Dick Porter  <dick@ximian.com>
3582
3583         * file-io.c: 
3584         * file-io.h: 
3585         * icall.c: Added MonoIO.GetFileType internal call
3586
3587 2002-10-17  Dick Porter  <dick@ximian.com>
3588
3589         * appdomain.c (mono_runtime_cleanup): Don't signal the async
3590         delegate semaphore before waiting for all threads to finish,
3591         because new threads can also call async delegates.  Fixes bug
3592         32004.
3593
3594         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
3595         of 3 seconds, in case another async job is queued.  (This part is
3596         needed because the bug fix reintroduced the 3s exit lag.)  This
3597         makes the mono_runtime_shutdown flag superfluous.
3598
3599 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
3600
3601         * reflection.c: include ehader size in method section headers.
3602         Really check for suplicated modules entries.
3603
3604 2002-10-17  Martin Baulig  <martin@gnome.org>
3605
3606         * debug-mono-symfile.c: Added back support for locals.
3607
3608 2002-10-14  Martin Baulig  <martin@gnome.org>
3609
3610         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
3611         MONO_TYPE_VOID.
3612
3613 2002-10-14  Martin Baulig  <martin@gnome.org>
3614
3615         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
3616         mono_class_get() instead of looking in the class cache. 
3617
3618 2002-10-13  Martin Baulig  <martin@gnome.org>
3619
3620         * debug-mono-symfile.c: Set version number to 28, include the
3621         signature in method names.
3622
3623 2002-10-13  Martin Baulig  <martin@gnome.org>
3624
3625         * debug-mono-symfile.h: Set version number to 27.
3626
3627 2002-10-11  Martin Baulig  <martin@gnome.org>
3628
3629         * gc.c: Don't register/unregister NULL pointers as disappearing links.
3630
3631 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
3632
3633         * metadata.c, metadata.h: added helper function to allocate signatures.
3634
3635 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3636
3637         * icall.c: added internal call to get the location of machine.config.
3638
3639 2002-10-08  Martin Baulig  <martin@gnome.org>
3640
3641         * debug-mono-symfile.c: Ignore classes with a pending init for the
3642         moment.
3643
3644 2002-10-03  Dick Porter  <dick@ximian.com>
3645
3646         * threads.c: Freebsd pthread_t is a pointer
3647
3648 2002-10-03  Dick Porter  <dick@ximian.com>
3649
3650         * socket-io.c: Implemented GetHostName_internal
3651
3652 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3653
3654         * mono-config.c:
3655         (mono_config_parse_file): don't leak the text.
3656
3657 2002-10-02  Martin Baulig  <martin@gnome.org>
3658
3659         * debug-mono-symfile.c: Added support for methods.
3660
3661 2002-10-01  Martin Baulig  <martin@gnome.org>
3662
3663         * debug-mono-symfile.c: Don't emit methods and line numbers for
3664         the dynamic symbol file, just write the type table.  We can easily
3665         have an external helper program which creates a symbol file for an
3666         IL file.        
3667
3668 2002-10-01  Dick Porter  <dick@ximian.com>
3669
3670         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
3671         Only add the handle to the cleanup array when we're about to
3672         launch the thread.  Bug 31425 deadlocked when the test was run on
3673         mono under w32.
3674
3675 2002-10-01  Martin Baulig  <martin@gnome.org>
3676
3677         * debug-mono-symfile.c: Added support for properties.
3678
3679 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
3680
3681         * reflection.c: unaligned store fix from Mark Crichton
3682         <crichton@gimp.org>.
3683
3684 2002-09-27  Martin Baulig  <martin@gnome.org>
3685
3686         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
3687         New interncall.
3688
3689 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
3690
3691         * assembly.h, assembly.c: use a sane API to hook into the assembly
3692         loading process instead of a useless special-purpouse hack
3693         (ngen needs a hook, too, for example).
3694
3695 2002-09-27  Dick Porter  <dick@ximian.com>
3696
3697         * threads.c (mono_thread_init): Call GetCurrentProcess() so
3698         io-layer can set up some process handle info.  Not needed on w32,
3699         but doesn't hurt either.
3700
3701         * process.c: Pass the program name in the second parameter to
3702         CreateProcess, so the path is searched.  Include the working
3703         directory. Implemented process name, process enumeration, and some
3704         process detail internal calls.
3705         
3706         * icall.c: Added internal calls for process lookup, and some
3707         process details
3708
3709 2002-09-26  Martin Baulig  <martin@gnome.org>
3710
3711         * assembly.c (mono_install_open_assembly_hook): New global
3712         function to install a function to be invoked each time a new
3713         assembly is loaded.
3714         (mono_assembly_open): Run this callback function if set.
3715
3716         * debug-mono-symfile.c: Put back line numbers for the dynamic
3717         symbol file and also record the .il file as source file.  This
3718         allows us to install the temporary symbol file as `file.dbg' just
3719         like a compiler-generated one.
3720
3721 2002-09-26  Nick Zigarovich <nick@chemlab.org>
3722
3723         * Corrected typo in gc.c (BOHEM vs BOEHM).
3724
3725 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3726
3727         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
3728         GetProperties. Also avoid calling g_slist_length in GetProperties and
3729         GetMethods.
3730
3731 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
3732
3733         * reflection.c: avoid unaligned stores (bug spotted by
3734         Mark Crichton  <crichton@gimp.org>).
3735
3736 2002-09-25  Martin Baulig  <martin@gnome.org>
3737
3738         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
3739         instead of guint64 for addresses and added prologue/epilogue info.
3740
3741 2002-09-25  Martin Baulig  <martin@gnome.org>
3742
3743         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
3744         store line number info.  For the dynamic symbol file, we only need
3745         to provide the JIT generated dynamic line number info for the dynamic
3746         symbol file.
3747
3748 2002-09-25  Martin Baulig  <martin@gnome.org>
3749
3750         * debug-mono-symfile.h: Incremented version number.
3751
3752 2002-09-24  Martin Baulig  <martin@gnome.org>
3753
3754         * class.c (mono_debugger_class_init_func): New global function
3755         pointer variable.
3756         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
3757         call it.
3758
3759         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
3760         function.  This is called via the mono_debugger_class_init_func
3761         hook to add all types to the dynamic type table.
3762         (ves_icall_MonoDebugger_GetType): New interncall to get a class
3763         from its metadata token.
3764
3765         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
3766         New interncall for the debugger.
3767
3768 2002-09-24  Nick Drochak <ndrochak@gol.com>
3769
3770         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
3771         before using it in case it is null.
3772         
3773 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
3774
3775         * metadata.c: allow custom modifiers in local var signatures
3776         (bug spotted by Zoltan Varga).
3777
3778 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
3779
3780         * class.c: deal with the <Module> class that may have a NULL vtable.
3781         Eliminate warnings.
3782
3783 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
3784
3785         * image.c, image.h: more strong name helpers.
3786         * monosn.c: more work: convert pem keys to cryptoapi format.
3787
3788 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
3789
3790         * string-icalls.c: speedup IndexOf.
3791
3792 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
3793
3794         * icall.c: updates from Zoltan.2.Varga@nokia.com.
3795
3796 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
3797
3798         * icall.c: cleanup: use mono_object_domain ().
3799
3800 2002-09-23  Martin Baulig  <martin@gnome.org>
3801
3802         * debug-mono-symfile.c: Improved type support.
3803
3804 2002-09-22  Martin Baulig  <martin@gnome.org>
3805
3806         * debug-mono-symfile.c: Added support for reference types and strings.
3807
3808 2002-09-22  Martin Baulig  <martin@gnome.org>
3809
3810         * debug-mono-symfile.c: Started to work on the type table.
3811
3812 2002-09-21  Martin Baulig  <martin@gnome.org>
3813
3814         * debug-mono-symfile.c: Largely reworked the symbol table format.
3815         The symbol table is now incrementally updated each time a new
3816         method is added.  We're now also using our own magic and version
3817         so that you don't need to recompile all your classes if the
3818         dynamic table changes.
3819         (mono_debug_update_mono_symbol_file): Removed.
3820         (mono_debug_symfile_add_method): New function to add a method.
3821
3822 2002-09-21  Martin Baulig  <martin@gnome.org>
3823
3824         * icall.c
3825         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
3826         New interncall.
3827
3828         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
3829         New interncall to get a method from its metadata token.
3830
3831 2002-09-21  Martin Baulig  <martin@gnome.org>
3832
3833         * debug-mono-symfile.c: Create type table.
3834
3835 2002-09-20  Martin Baulig  <martin@gnome.org>
3836
3837         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
3838
3839 2002-09-20  Martin Baulig  <martin@gnome.org>
3840
3841         * debug-mono-symfile.c: Provide information about params and locals.
3842
3843 2002-09-20  Martin Baulig  <martin@gnome.org>
3844
3845         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
3846         New interncall.
3847
3848         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
3849         interncall to get a method from its metadata token.
3850
3851 2002-09-20  Martin Baulig  <martin@gnome.org>
3852
3853         * debug-mono-symfile.c: Added a few checks for method->header
3854         being non-NULL.  This should never happen, but for the moment
3855         let's use a g_warning() rather than a g_assert().
3856
3857 2002-09-19  Mark Crichton  <crichton@gimp.org>
3858
3859         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
3860         even if support for it isn't present.  Added an #ifdef to fix this.
3861
3862         * socket-io.c: Added checks back for Solaris support.
3863
3864 2002-09-19  Martin Baulig  <martin@gnome.org>
3865
3866         * debug-mono-symfile.c (read_string, write_string): Reflect latest
3867         changes in the symbol file format.
3868
3869 2002-09-18  Martin Baulig  <martin@gnome.org>
3870
3871         * debug-mono-symfile.c: Set version number to 21.
3872
3873 2002-09-18  Dick Porter  <dick@ximian.com>
3874
3875         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
3876         on netbsd.  Fixes bug 30051.
3877
3878 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
3879
3880         * reflection.c:
3881         (set_version_from_string): little fix.
3882
3883 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
3884
3885         * monosn.c, Makefile.am: added strong name utility.
3886         * reflection.h, reflection.c: implemented delayed signing,
3887         locale, version and hash id assembly attributes.
3888
3889 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
3890
3891         * loader.c, metadata.c: load param attributes in signatures.
3892
3893 2002-09-16  Martin Baulig  <martin@gnome.org>
3894
3895         * debug-mono-symfile.c: Added string table with all method names.
3896
3897 2002-09-14  Martin Baulig  <martin@gnome.org>
3898
3899         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
3900         fast method lookup.
3901
3902 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
3903
3904         * reflection.c: record the public key token of referenced assemblies.
3905
3906 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
3907
3908         * image.c, image.h: added functions to get the strong name and the
3909         public key of an assembly.
3910         * pedump.c: use them.
3911
3912 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
3913
3914         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
3915
3916 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
3917
3918         * marshal.c (mono_marshal_get_managed_wrapper): Added
3919         MONO_TYPE_BOOLEAN 
3920
3921 2002-09-11  Martin Baulig  <martin@gnome.org>
3922
3923         * gc.c: Call GC_unregister_disappearing_link() on all links when
3924         finalizing them, this is necessary to aviod a crash in boehm's
3925         finalize handler.
3926
3927 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
3928
3929         * gc.c: handle GetTarget for finalized objects spotted and fixed by
3930         nick@chemlab.org.
3931
3932 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
3933
3934         * icall.c: implemented MonoType::Module.
3935         * reflection.c, reflection.h: mono_module_get_object () from
3936         Tomi Pakarinen <tomi.pakarinen@welho.com>.
3937
3938 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
3939
3940         * icall.c: ignore overridden methods in GetMethods ().
3941         Fix for FieldInfo::SetValue().
3942         * object.c: handle float/double in runtime invoke.
3943
3944 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
3945
3946         * object.c: allow a constructor to be called again on an object.
3947
3948 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
3949
3950         * class.h, class.c: move field layout code to it's own function and
3951         export it. Get an interface id earlier. Move fields in MonoClass
3952         so they are more cache friendly and align the bitfields.
3953         * loader.c: temporary handle get_param_names() for a runtime method.
3954         * reflection.c, reflection.h: more code to handle runtime creation of
3955         types.
3956
3957 2002-09-09  Martin Baulig  <martin@gnome.org>
3958
3959         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
3960         signature with the pinvoke field being set for the actual call.
3961
3962 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
3963
3964         * icall.c: removed some unused icalls. Start of map of glib charsets
3965         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
3966
3967 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
3968
3969         * debug-helpers.c: break infinite loop (found and fixed by
3970         Holger Arnold <harnold@gmx.de>).
3971
3972 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
3973
3974         * icall.c: target may be null in create_delegate.
3975
3976 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
3977
3978         * marshal.c: handle a boolean return type.
3979
3980 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
3981
3982         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
3983
3984 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
3985
3986         * gc.c: fix weakreferences.
3987
3988 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
3989
3990         * icall.c: added icall to get default codepage.
3991
3992 2002-09-03  Dick Porter  <dick@ximian.com>
3993
3994         * threads.h: 
3995         * threads.c: Use MonoThread instead of MonoObject where
3996         apropriate.
3997
3998         Store running thread objects in a hash table, so that we have all
3999         the info to hand when waiting for them to finish
4000         (means we don't need OpenThread() any more, so mingw builds should
4001         be fully functional again.)
4002
4003         * verify.c:
4004         * object.h: Added thread ID to MonoThread
4005
4006 2002-09-03  Martin Baulig  <martin@gnome.org>
4007
4008         * icall.c (System.Reflection.Assembly::get_location): New interncall.
4009
4010 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4011
4012         * icall.c: fixed leak in get_temp_path. Thanks lupus.
4013
4014 2002-09-03  Martin Baulig  <martin@gnome.org>
4015
4016         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
4017         argument to store the end address of the disassembled instruction.
4018
4019         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
4020         here from debug-symfile.h.
4021         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
4022         JIT into this struct.
4023         (MonoSymbolFile): Added `char *image_file' field.
4024         (MonoDebugGetMethodFunc): Removed.
4025         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
4026         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
4027         (mono_debug_find_method): New method.
4028
4029         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
4030         create a full symbol file.
4031         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
4032         and static symbol files.
4033         (mono_debug_find_method): The symbol file keeps an internal method hash,
4034         call this to get a MonoDebugMethodInfo from a MonoMethod.
4035
4036         * debug-symfile.[ch]: Removed.
4037
4038 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
4039
4040         * image.c (do_mono_image_open): Remove linker version check.
4041
4042 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
4043
4044         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
4045         wrappers for instance methods.
4046         
4047 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4048
4049         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
4050
4051 2002-08-28  Dick Porter  <dick@ximian.com>
4052
4053         * Makefile.am: Export HOST_CC for w32 builds
4054
4055 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
4056
4057         * file-io.c process.c: MonoString are null terminated, no
4058         need for mono_string_to_utf16() anymore.
4059
4060 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
4061
4062         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
4063
4064 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
4065
4066         * icall.c, reflection.h: speedup System.MonoType.
4067
4068 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
4069
4070         * reflection.c: allow null as the value of a string argument in
4071         custom attributes constructors.
4072
4073 2002-08-27  Martin Baulig  <martin@gnome.org>
4074
4075         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
4076         `trampoline_address' field.
4077
4078 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
4079
4080         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
4081         check (fixes bug #29486) 
4082
4083 2002-08-27  Martin Baulig  <martin@gnome.org>
4084
4085         * debug-mono-symfile.c: Changed the file format in a way that allows us
4086         open it read-only and to use a specially malloced area for all the
4087         dynamic data.  We can now also generate a symbol file on-the-fly if we're
4088         debugging IL code and there is no MCS generated symbol file for it.
4089
4090 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
4091
4092         * object.c: added a define for a good string and array
4093         creation speedup (not enabled by default because we need to deal with
4094         the synch stuff).
4095
4096 2002-08-26  Martin Baulig  <martin@gnome.org>
4097
4098         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
4099         function to create a dynamic symbol file.  This is used by the
4100         debugger to create a symbol file for IL code on-the-fly.
4101
4102 2002-08-26  Martin Baulig  <martin@gnome.org>
4103
4104         * loader.c (mono_lookup_pinvoke_call): Include the error message
4105         from g_module_error() in the error message.
4106
4107 2002-08-24  Martin Baulig  <martin@gnome.org>
4108
4109         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
4110         function to update the symbol file.  The symbol file is mmap()ed
4111         writable, but private.  This allows us to install the symbol file
4112         together with the assembly.
4113
4114 2002-08-24  Martin Baulig  <martin@gnome.org>
4115
4116         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
4117         but they can read the new symbol file format which mcs is now creating.
4118
4119         * debug-symfile.c (mono_debug_find_source_location): Moved to
4120         debug-mono-symfile.c; this is now operating on the new symbol file.
4121
4122 2002-08-23  Martin Baulig  <martin@gnome.org>
4123
4124         * debug-helpers.c (mono_method_desc_from_method): New function to get
4125         a MonoMethodDesc from a MonoMethod.
4126
4127 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
4128
4129         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
4130         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
4131
4132 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
4133
4134         * string-icalls.[ch]: make helper methods static.
4135
4136 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4137
4138         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
4139         types to it and to SetValueInternal.
4140
4141         * object.c: Moved handle_enum label to its proper place. This was the
4142         f... bug! ;-)
4143
4144         This time i compiled mcs and gtk-sharp and they both work.
4145
4146 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4147
4148         * icall.c: reverted partially my previous patch until 
4149         object.c:set_value handles enums correcly.
4150
4151 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4152
4153         * icall.c:
4154         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
4155         (ves_icall_System_Environment_get_MachineName): removed warning when
4156         compiling under cygwin.
4157
4158 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
4159
4160         * object.c: fixed field_get_value() for reference types.
4161
4162 2002-08-22  Dick Porter  <dick@ximian.com>
4163
4164         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
4165         Don't free a buffer while it's still needed.  Patch from Jonathan
4166         Liger <Jonathan.liger@wanadoo.fr>
4167
4168 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
4169
4170         * icall.c (ves_icall_System_Environment_get_Platform): Add new
4171         internal call.
4172
4173 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
4174
4175         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
4176         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
4177
4178         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
4179         we call unmanaged code which throws exceptions.
4180
4181 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
4182
4183         * appdomain.h: added per-domain entry_assembly.
4184         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
4185         arguments.
4186         * icall.c: Assembly::GetEntryAssembly icall.
4187         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
4188         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
4189
4190 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
4191
4192         * appdomain.h, gc.c: added mono_domain_finalize ().
4193
4194 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4195
4196         * object.c:
4197         (mono_print_unhandled_exception): changed g_warning by g_printerr
4198         because g_log has a 1024 characters limit (yeah, i got a big stack
4199         trace). Don't print exception name, that should be in ToString 
4200         returned string.
4201
4202 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4203
4204         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
4205         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
4206
4207 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4208
4209         * object.c:
4210         (mono_print_unhandled_exception): after previous commit, i realized
4211         that MS calls ToString on the exception. I changed this function to
4212         do that. This way we get stack_trace for free.
4213
4214 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4215
4216         * object.c:
4217         (mono_print_unhandled_exception): invoke Message property instead of
4218         getting 'message' field from Exception. Don't allocate memory for
4219         'trace' and 'message' if not needed.
4220
4221 2002-08-18  Dick Porter  <dick@ximian.com>
4222
4223         * unicode.c: Fix asserts to match Encoder.cs checks
4224
4225 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
4226
4227         * marshal.c: fix unaligned store issue and a few wrong
4228         opcode argument types.
4229
4230 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4231
4232         * icall.c: added GetUninitializedObjectInternal internal call.
4233
4234 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
4235
4236         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
4237         to the right domain.
4238
4239 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
4240
4241         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
4242
4243         * class.c (class_compute_field_layout): set blittable to false for Strings
4244
4245         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
4246
4247 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
4248
4249         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
4250         first chunk of code to create types at runtime. Code to
4251         handle ReflectedType/DeclaringType. Make reflection handles
4252         domain specific.
4253
4254 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
4255
4256         * class.c: set correct name in arrays.
4257
4258 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
4259
4260         * appdomain.c (mono_domain_transfer_object): make it work with
4261         valuetypes. bug fixes.
4262
4263 2002-08-12  Dick Porter  <dick@ximian.com>
4264
4265         * object.h: Rename some parameters to avoid c++ keywords (Patch
4266         from Joseph Wenninger <kde@jowenn.at>)
4267
4268 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
4269
4270         * icall.c: added icall to implement Assembly.GetFile*.
4271
4272 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
4273
4274         * reflection.h, reflection.c: code to embed managed resources.
4275
4276 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
4277
4278         * class.c: move all the type size stuff into
4279         class_compute_field_layout().
4280
4281 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
4282
4283         * class.c: ensure enums have always the correct instance size.
4284         * unicode.c: remove wrong assert.
4285
4286 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
4287
4288         * assembly.c: fix mem corruption issue.
4289         * image.h, image.c: added mono_image_get_resource () to access
4290         managed resources.
4291         * icall.c: implemented Assembly.EntryPoint property and some
4292         Managed Resources related internalcalls.
4293
4294
4295 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
4296
4297         * image.c, image.h: impemented mono_image_get_entry_point ().
4298         * appdomain.c: use mono_image_get_entry_point.
4299
4300 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
4301
4302         * reflection.c: support the object type argument when loading
4303         custom attributes.
4304
4305 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
4306
4307         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
4308         String as return type.
4309
4310 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
4311
4312         * reflection.c: fix encoding of named args for custom attrs to match
4313         the ms implementation. Read them back when instantiating custom
4314         attributes.
4315
4316 2002-08-02  Radek Doulik  <rodo@ximian.com>
4317
4318         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
4319         by Dietmar as quick fix
4320         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
4321         16 as stack size, used on more places as quick fix before Dietmar
4322         will fix it properly
4323
4324 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
4325
4326         * object.h, object.c: added accessors for fields and properties.
4327
4328 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
4329
4330         * class.c, class.h: made mono_class_get_field_from_name ()
4331         loop on parent types.
4332         Added mono_class_get_property_from_name ().
4333
4334 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
4335
4336         * class.c, class.h: move the code to setup the type vtable in its own
4337         function so that it can be reused also for types created at runtime.
4338         Eliminate the "class" identifier from the header file.
4339         * reflection.c: setup the vtable for enums so that we can create
4340         objects for use in SetConstant ().
4341
4342 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
4343
4344         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
4345         instead of the delegate itself as this pointer (bug #28383)
4346
4347 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
4348
4349         * marshal.c (mono_marshal_get_managed_wrapper): added return type
4350         conversions.
4351
4352 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
4353
4354         * loader.c: don't set the pinvoke bit on icalls.
4355
4356 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
4357
4358         * debug-helpers.c (mono_method_full_name): only print a number to
4359         indicate wrapper type (so that the output is more readable in traces).
4360
4361 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
4362
4363         * class.c (mono_class_init): include method override patch from Paolo
4364
4365 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
4366
4367         * icall.c: fixed GetTypeCode().
4368
4369 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
4370
4371         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
4372         use real delegate invoke function to make it work with multicast
4373         delegates (fix bug# 28291).
4374
4375 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
4376
4377         * object.c: load constant strings.
4378
4379 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
4380
4381         * reflection.c: no magic numbers.
4382         * tabledefs.h: security action enum.
4383
4384 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
4385
4386         * assembly.c: fix possible memory corruption.
4387
4388 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
4389
4390         * reflection.h, reflection.c: added support for linking resources.
4391         * verify.c: check we have an updated corlib.
4392
4393 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
4394
4395         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
4396         string arrays.
4397         (mono_marshal_string_array): null terminate unmanaged string arrays.
4398         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
4399
4400 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
4401
4402         * icall.c: Type.GetType () can now return also types from the
4403         calling assembly.
4404
4405 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
4406
4407         * loader.h, loader.c: stack walking support.
4408         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
4409         GetCallingAssembly.
4410
4411 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
4412
4413         * marshal.c: added optimisations for blittable types 
4414
4415         * class.c (mono_array_class_get): do not set blittable attribute on arrays
4416         (mono_class_setup_mono_type): set blittable attribute for single
4417         and double.
4418
4419         * marshal.c (mono_string_utf8_to_builder): impl.
4420         (mono_string_builder_to_utf8): impl.
4421         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
4422
4423 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
4424
4425         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
4426         (mono_marshal_get_managed_wrapper): impl. byref types
4427
4428 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4429
4430         * icall.c:
4431         (search_method): don't display debug message. 
4432
4433 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
4434
4435         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
4436
4437 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
4438
4439         * appdomain.c: set the missing filename when throwing exception.
4440
4441 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
4442
4443         * metadata.c (mono_type_size): code cleanup
4444         (mono_type_stack_size): removed some test code
4445
4446 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
4447
4448         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
4449         mono_get_exception_file_not_found now.
4450
4451         * exception.c (mono_exception_from_name_two_strings): New version
4452         that will call a constructor with two string arguments. 
4453         (mono_get_exception_file_not_found): New helper routine, used to
4454         report file-not-found errors.
4455
4456 2002-07-20  Dick Porter  <dick@ximian.com>
4457
4458         * process.h:
4459         * process.c: Pass file handles to CreateProcess
4460         
4461         * icall.c:
4462         * file-io.h:
4463         * file-io.c: Implemented CreatePipe
4464
4465 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
4466
4467         * metadata.c (mono_get_param_info): set alignment for value types
4468
4469 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
4470
4471         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
4472         Constify mono_domain_assembly_open().
4473         * loader.c: handle null namespace in icalls.
4474
4475 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
4476
4477         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
4478         (emit_str_to_ptr_conv): marshal object as structs
4479
4480         * metadata.c (mono_type_to_unmanaged): marshal object as structs
4481
4482         * marshal.c (mono_marshal_get_runtime_invoke): support value types
4483
4484 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
4485
4486         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
4487         (mono_marshal_get_native_wrapper): we an now return value types
4488
4489 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
4490
4491         * verify.c: more checks implemented.
4492
4493 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
4494
4495         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
4496         (fix bug #27695)
4497         (mono_marshal_get_native_wrapper): allow byref arguments
4498         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
4499         impl. PtrToStringXXX methods
4500         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
4501         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
4502         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
4503         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
4504         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
4505
4506 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
4507
4508         * reflection.c: fix buglet in parsing an assembly name.
4509
4510 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
4511
4512         * marshal.c (emit_ptr_to_str_conv): first impl.
4513
4514 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
4515
4516         * object.c, class.h: cache the vtable in the class as suggested by
4517         vargaz@freemail.hu (Zoltan Varga).
4518
4519 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
4520
4521         * class.h, loader.c: added mono_field_from_token().
4522         * verify.c: first cut of type checking code.
4523
4524 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
4525
4526         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
4527
4528 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
4529
4530         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
4531         (fix bug #27782)
4532         (mono_marshal_get_remoting_invoke): impl.
4533         (mono_delegate_begin_invoke): impl.
4534         (mono_mb_emit_save_args): impl.
4535         (mono_delegate_end_invoke): impl.
4536         (mono_marshal_get_delegate_begin_invoke):
4537         (mono_marshal_get_delegate_end_invoke):
4538         (mono_marshal_get_delegate_invoke): generate a special name for
4539         those methods (including the signature) and associate them whith
4540         the delegate class. 
4541
4542 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
4543
4544         * reflection.[ch]: 
4545         (mono_reflection_type_from_name): now it has a MonoImage parameter
4546         which is used as the default image to search the type in. If the image
4547         is NULL or getting the type from it fails, it defaults to corlib.
4548
4549         * icall.c: changed 1 call to mono_reflection_type_from_name to match
4550         new parameter.
4551
4552 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
4553
4554         * reflection.c: update the parameter table index.
4555
4556 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
4557
4558         * domain.c: don't include the mark byte in the string hash.
4559
4560 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
4561
4562         * icall.cs: icall for Type.GetTypeCode ().
4563         * verify: a couple of fixes and disabled local initialization checks.
4564
4565 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
4566
4567         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
4568
4569         * debug-helpers.c (mono_method_full_name): print the type of the
4570         runtime wrapper
4571
4572         * metadata.c (mono_signature_hash): a hash function for signatures
4573         (mono_signature_hash): better hash algorithm
4574
4575         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
4576
4577         * debug-helpers.c (mono_method_full_name): this can now generate
4578         method names with signatures
4579
4580         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
4581         method dont have this pointers.
4582
4583 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
4584
4585         * reflection.c: fixup typebuilder tokens.
4586         * image.c: fix buglet.
4587         * marshal.h: remove whitespace.
4588         * metadata.h, metadata.c: reinstate code that was removed.
4589         * verify.c: handle catch directives and fix another couple of bugs.
4590
4591 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
4592
4593         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
4594         (mono_marshal_get_native_wrapper): make it comp. with the old code
4595         (mono_marshal_get_native_wrapper): support boolean
4596         (mono_marshal_get_managed_wrapper): support more types
4597
4598 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
4599
4600         * class.c (class_compute_field_layout): compute class->blittable attribute.
4601
4602 2002-07-09  Dick Porter  <dick@ximian.com>
4603
4604         * threads.c: Make the thread cleaning up cope with threads that
4605         call ExitThread()
4606
4607 2002-07-08  Radek Doulik  <rodo@ximian.com>
4608
4609         * reflection.c (method_encode_code): use non-translated values to
4610         compute finally_start, this fixes exception handling on ppc, yay!
4611
4612         * decimal.h (struct signscale): fix endianess
4613
4614 2002-07-07  Radek Doulik  <rodo@ximian.com>
4615
4616         * reflection.c: swap box_val and not val
4617
4618 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
4619
4620         * reflection.c, reflection.h: handle full assembly info in type name.
4621         Handle Type arguments when loading custom attributes.
4622         * icall.c: updated to use new mono_reflection_type_from_name () method.
4623
4624 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4625
4626         * loader.c:
4627         (method_from_memberref): also print assembly name when method not found.
4628
4629 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4630
4631         * icall.c:
4632         (ves_icall_TypeGetProperties): fixed bug #27473. 
4633
4634 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4635
4636         * reflection.c: display image name and token when cannot find the
4637         .ctor for an attribute.
4638
4639 2002-07-05  Martin Baulig  <martin@gnome.org>
4640
4641         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
4642
4643 2002-07-04  Dick Porter  <dick@ximian.com>
4644
4645         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
4646         compile on mingw.  This will cause mingw builds to not wait for
4647         subthreads to terminate after the main thread does.  I've lodged a
4648         bug with the mingw developers for them to wrap OpenThread().
4649
4650 2002-07-03  Dick Porter  <dick@ximian.com>
4651
4652         * threads.c: Store thread IDs instead of handles, because
4653         GetCurrentThread() returns a pseudohandle and therefore stores
4654         useless values.  mono_thread_cleanup() continues checking the
4655         array of threads until it is empty, to cope with subthreads
4656         spawning new threads after the main thread has finished.
4657
4658         * profiler.h:
4659         * profiler.c:
4660         * profiler-private.h: Pass the thread ID to thread profiler
4661         functions, instead of a handle
4662
4663 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
4664
4665         * verify.c: fixes to make it more usable.
4666         * pedump.c: added --verify code to verify IL code in an assembly.
4667
4668 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4669
4670         * reflection.c: turn errors into warnings to allow compiling corlib.
4671
4672 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
4673
4674         * reflection.c: add special cases to compile corlib.
4675
4676 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
4677
4678         * reflection.c: handle properties with only a set method.
4679
4680 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
4681
4682         * opcodes.h: add enum with opcodes in opval order.
4683
4684 2002-07-01  Dick Porter  <dick@ximian.com>
4685         
4686         * object.h:
4687         * object.c (mono_runtime_run_main): Removed unneeded argument
4688
4689 2002-06-28  Martin Baulig  <martin@gnome.org>
4690
4691         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
4692
4693 2002-06-27  Dick Porter  <dick@ximian.com>
4694
4695         * threads.c: Store the handle in both the parent thread and in the
4696         subthread, to minimise the time between starting a new thread and
4697         storing its ID.
4698
4699 2002-06-26  Dick Porter  <dick@ximian.com>
4700
4701         * appdomain.c (mono_runtime_cleanup): Close the socket library
4702         after all the threads have finished, not before
4703
4704 2002-06-26  Martin Baulig  <martin@gnome.org>
4705
4706         * debug-symfile.c (mono_debug_find_source_location): Added
4707         `guint32 *line_number' argument.  If it's not NULL, store the line number
4708         there and return the file name without the line number.
4709
4710 2002-06-25  Dick Porter  <dick@ximian.com>
4711
4712         * icall.c:
4713         * process.h:
4714         * process.c: Process forking and other support functions
4715
4716 2002-06-25  Dick Porter  <dick@ximian.com>
4717
4718         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
4719         things dont happen when the image is closed.
4720         (mono_image_lookup_resource): Walk the resource section looking
4721         for a particular entry
4722
4723         * cil-coff.h: PE resource section decoding
4724
4725 2002-06-25  Dick Porter  <dick@ximian.com>
4726         
4727         * assembly.h:
4728         * assembly.c: 
4729         (mono_assembly_foreach): Accessor functions to walk the list of
4730         loaded assemblies
4731         (mono_assembly_set_main):
4732         (mono_assembly_get_main): Process methods need to know which
4733         assembly is the "main" one
4734
4735         * object.c (mono_runtime_run_main): Record the main assembly
4736
4737         * debug-helpers.c: Fix typo
4738
4739 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
4740
4741         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
4742         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
4743
4744 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
4745
4746         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
4747
4748 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
4749
4750         * image.c (do_mono_image_open): Initialize reference count,
4751         otherwise we leak the MonoImage.
4752
4753 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
4754
4755         * reflection.c: small tweak to handle self-hosting.
4756
4757 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
4758
4759         * reflection.c: fix type name parse code.
4760
4761 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
4762
4763         * reflection.c: break out of the loop.
4764         * image.c: special case corlib.
4765
4766 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
4767
4768         * reflection.c: add all the custom attrs at the end to ensure the
4769         ctors have been properly initialized when the attributes are defined
4770         in the current assembly.
4771
4772 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
4773
4774         * reflection.c: handle correctly multiple-nested types.
4775
4776 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
4777
4778         * row-indexes.h: fix typos.
4779         * reflection.c: adjust for typos and fix method_def_or_ref
4780         encoding in MethodImpl table.
4781
4782 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
4783
4784         * reflection.c: fix entry point patching (thanks Serge!).
4785
4786 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
4787
4788         * verify.c: add check for System.Exception
4789
4790 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
4791
4792         * image.c, class.c: minifix for code just c&p'ed.
4793         * reflection.c: warning fix.
4794         * object.h, loader.h, domain.c: load also StringBuilder.
4795
4796 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
4797
4798         * marshal.h, marshal.c: some support code to handle complex marshaling.
4799
4800 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4801
4802         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
4803         Better signatures with vtable error dump.
4804
4805 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
4806
4807         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
4808
4809 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
4810
4811         * icall.c (ves_icall_Type_GetField): impl.
4812
4813 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4814
4815         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
4816         to retrieve a marshal description blob for a field or param.
4817
4818 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
4819
4820         * reflection.h, reflection.c: change order of nested type emission
4821         to avoid table corruption. The NestedTypes table is sorted.
4822         * icall.c: change order of GetConstructor results to workaround mcs bug.
4823
4824 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
4825
4826         * reflection.h, reflection.c: handle field and param marshal
4827         information.
4828
4829 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
4830
4831         * icall.c, marshal.c marshal.h: more Marshal class implementation.
4832
4833 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
4834
4835         * reflection.c: fix call convention.
4836
4837 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
4838
4839         * reflection.h, reflection.c: mono_image_get_memberref_token()
4840         takes a type instead of a class, now. Added
4841         mono_image_get_array_token() to create tokens for the special
4842         multi-dim array methods.
4843
4844 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
4845
4846         * assembly.c: handle modules (no assembly table). Split
4847         loading references in its own function.
4848         * class.c: handle moduleref resolution scope.
4849         * image.c, image.h: cache module name in image.
4850
4851 2002-06-07  Martin Baulig  <martin@gnome.org>
4852
4853         * reflection.c (mono_image_get_type_info): Only add a class layout entry
4854         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
4855
4856 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
4857
4858         * icall.c: more signature fixes that used uint instead of int.
4859
4860 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4861
4862         * reflection.c: fixed signature of field refs.
4863
4864 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
4865
4866         * class.c, reflection.c: handle typerefs of nested types
4867         (both on read and when writing files).
4868
4869 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
4870
4871         * icall.c: fix method signatures that tried to workaround the previous
4872         typo, d'oh!
4873
4874 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
4875
4876         * debug-helpers.c: fix typo.
4877
4878 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
4879
4880         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
4881         rewrote the PE/COFF writing code (our programs are understood by the
4882         ms runtime, now).
4883
4884 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
4885
4886         * gc.c, gc.h, icall.c: weakreference support.
4887
4888 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
4889
4890         * Makefile.am, mono-config.c: use $(sysconfdir).
4891
4892 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
4893
4894         * icall.c: changed default precision of Double.ToString() to 15.
4895         Fixed memory leak. Unified with Single.ToString.
4896
4897 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
4898
4899         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
4900
4901 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
4902
4903         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
4904         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
4905         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
4906         and myself.
4907
4908 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
4909
4910         * debug-symfile.c, sysmath.c: yet more compilation fixes.
4911
4912 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
4913
4914         * reflection.c, socket-io.c: more compilation fixes.
4915
4916 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
4917
4918         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
4919         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
4920         unicode.c: warning and compiler compatibility fixes.
4921
4922 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
4923
4924         * class.h, metadata.c: fixed warnings/compilation errors.
4925
4926 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
4927
4928         * Makefile.am, mono-config.c, mono-config.h: configuration file
4929         support routines.
4930         * loader.c, loader.h: make Dll mapping configurable at runtime in the
4931         config file. Export methods to insert and lookup mappings.
4932
4933 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
4934
4935         * reflection.c: handle types and boxed objects in custom attr
4936         constructors.
4937
4938 2002-05-30  Martin Baulig  <martin@gnome.org>
4939
4940         * debug-symfile.c
4941         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
4942
4943 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
4944
4945         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
4946         to lookup the implmap row for a P/Invoke method.
4947         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
4948         P/Invoke method from the runtime on an as needed basis.
4949
4950 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
4951
4952         * metadata.c (mono_metadata_parse_signature): impl.
4953
4954 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
4955
4956         * class.c: handle .pack directive.
4957
4958 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
4959
4960         * object.c: initialize static fields with RVA data.
4961
4962 2002-05-25  Martin Baulig  <martin@gnome.org>
4963
4964         * debug-symfile.c
4965         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
4966
4967 2002-05-24  Martin Baulig  <martin@gnome.org>
4968
4969         * debug-symfile.c
4970         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
4971         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
4972         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
4973
4974 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
4975
4976         * object.c: special case string ctros in invoke.
4977         * gc.c: silly whitespace changes.
4978
4979 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
4980
4981         * threadpool.[ch]: impl. a threadpool that can
4982         be used by mint and mono.
4983
4984 2002-05-22  Martin Baulig  <martin@gnome.org>
4985
4986         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
4987         The first argument is now a `MonoReflectionModuleBuilder *', the return
4988         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
4989         `methods' field to get the method builder.  The `token' argument is the
4990         unfixed token.
4991
4992         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
4993         invalid characters instead of g_assert_not_reached()ing.  This seems
4994         to be the behaviour of mscorlib.
4995
4996 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
4997
4998         * object.c (mono_runtime_invoke_array): applied patch from Rachel
4999         Hestilow to fix bug #25104
5000
5001 2002-05-21  Martin Baulig  <martin@gnome.org>
5002
5003         * debug-symfile.c (mono_debug_find_source_location): New function.
5004         Looks up an IL offset in the line number table and returns the source
5005         location as a string.
5006
5007 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5008
5009         * icall.c:
5010         (mono_double_ToStringImpl): changed %f by %g until we have something
5011         better.
5012
5013 2002-05-21  Nick Drochak  <ndrochak@gol.com>
5014
5015         * icall.c : Use different name for Math.Pow's icall.  Needed to check
5016         parameters first in C#.
5017
5018 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
5019
5020         * icall.c, reflection.h: added icall to get info about an event.
5021
5022 2002-05-20  Radek Doulik  <rodo@ximian.com>
5023
5024         * object.c (mono_value_box): don't use memcpy for boxing on BIG
5025         endian
5026         (mono_value_box): don't use memcpy for small sizes on
5027         architectures with unaligned access
5028
5029 2002-05-20  Martin Baulig  <martin@gnome.org>
5030
5031         * reflection.c (mono_reflection_setup_internal_class): Don't crash
5032         if `tb->parent == NULL'.
5033         (mono_reflection_create_internal_class): New function.  This is
5034         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
5035         for enum types.
5036
5037         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
5038         New interncall.
5039
5040 2002-05-19  Martin Baulig  <martin@gnome.org>
5041
5042         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
5043         argument to get the length, don't default to the array length.
5044
5045 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
5046
5047         * assembly.c (mono_assembly_setrootdir): New function used to
5048         override the MONO_ASSEMBLIES directory.
5049
5050 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
5051
5052         * icall.c: ValueType_GetHashCode() initialize local var.
5053
5054 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
5055
5056         * reflection.c: sort custom attributes table.
5057
5058 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
5059
5060         * reflection.c: support named args in custom attributes (write support).
5061
5062 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
5063
5064         * reflection.c: fix finally position calculation.
5065
5066 2002-05-15  Radek Doulik  <rodo@ximian.com>
5067
5068         * reflection.c: fixed endianess at many places
5069
5070         * icall.c (ves_icall_InitializeArray): comment out debug msg
5071
5072 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
5073
5074         * object.c (mono_unhandled_exception): new function to handle
5075         unhandled exceptions.
5076         (mono_unhandled_exception): call the UnhandledException event.
5077         (mono_runtime_delegate_invoke): impl.
5078
5079 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
5080
5081         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
5082         returns the RVA, not the direct pointer to the data. Handle the case
5083         when the class size is fixed.
5084
5085 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
5086
5087         * reflection.c: fix some endianess issues.
5088
5089 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
5090
5091         * object.c (mono_runtime_invoke): is now able to catch exceptions.
5092
5093         * threads.c (mono_thread_init): added a callback which is invoked
5094         at thread start.
5095
5096 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
5097         
5098         * icall.c: make GetHashCode return non-negative values.
5099
5100 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
5101
5102         * object.c, icall.c, gc.c: revert to address-based hashcode.
5103
5104 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
5105
5106         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
5107
5108 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
5109
5110         * icall.c, class.c: special case <Module>.
5111
5112 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
5113
5114         * icall.c: fix bug in GetNow().
5115
5116 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
5117
5118         * object.c (mono_runtime_class_init): make sure that we call all
5119         static class constructors.
5120
5121 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
5122
5123         * reflection.c: sort methodsemantics table.
5124
5125 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
5126
5127         * reflection.h, reflection.c: honour init locals setting.
5128
5129 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
5130
5131         * icall.c: copied Double ToStringImpl for Single ToStringImpl
5132
5133 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
5134
5135         * reflection.c: support ContructorBuilders in attribute blob creation.
5136
5137 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
5138
5139         * reflection.c: some changes to build a binary that can be run
5140         directly in windows.
5141
5142 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
5143
5144         * loader.c: print a big message when an icall can't be found.
5145
5146 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5147
5148         * string-icalls.c: fix bug 24248.
5149
5150 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
5151
5152         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
5153         icall.c, reflection.h: separate assembly loading by pathname and by
5154         assembly name. Use the MONO_PATH env var to search for assemblies.
5155
5156 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
5157
5158         * assembly.c, image.h: add some support for assemblies
5159         with multiple modules.
5160         * class.c, class.h: export mono_class_from_typeref().
5161         * loader.c: remove duplicated code and use mono_class_from_typeref(),
5162         instead.
5163
5164 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
5165
5166         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
5167         documentation says (the ECMA one is correct).
5168
5169 2002-05-02  Dick Porter  <dick@ximian.com>
5170
5171         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
5172         Don't name the synchronisation mutex.
5173
5174 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
5175
5176         * rand.c
5177         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
5178         Make the prototypes match.
5179         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
5180         Same.
5181
5182         * icall.c
5183         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
5184         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
5185         all systems have tm.tm_zone, so use strftime() with %Z to print
5186         the timezone abreviation into a temp string.
5187
5188         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
5189         rather than mono_array_addr() on a MonoString on Big Endian
5190         machines.
5191
5192 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
5193
5194         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
5195         fix bug 24041
5196
5197 2002-04-30  Dick Porter  <dick@ximian.com>
5198
5199         * socket-io.c: Cope with SOCKET being an integer rather than a
5200         pointer now.
5201
5202         * threads.c: Added Thread_free_internal, to deal with thread
5203         handle cleanup.  Moved calls to handle_store() and handle_remove()
5204         to start_wrapper(), so each can only be called once.  Allocate
5205         synchronisation blocks with GC_malloc(), and use GC finalisation
5206         to close the handles.
5207
5208         * icall.c: added System.Threading.Thread::Thread_free_internal
5209
5210 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
5211
5212         * icall.c: support Environment.Exit, CommandLineArgs().
5213
5214 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
5215
5216         * object.c, object.h: added mono_runtime_run_main () and
5217         mono_runtime_get_main_args () for use in System.Environment.
5218
5219 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
5220
5221         * gc.c: fix thinko, enable actual finalization since the jit is now
5222         fixed.
5223
5224 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
5225
5226         * gc.c, object.c: take into account that an object may be offset wrt the address
5227         returned by GC_malloc().
5228
5229 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
5230
5231         * image.c: handle files without entries in the assembly table (modules).
5232
5233 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
5234
5235         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
5236         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
5237         allowed to be null when it's System.Object class setup.
5238
5239 2002-04-27  Martin Baulig  <martin@gnome.org>
5240
5241         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
5242         if `tb->parent == NULL' rather than crashing.
5243
5244 2002-04-28  Nick Drochak  <ndrochak@gol.com>
5245
5246         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
5247         calling acos() where asin() should have been called.
5248
5249 2002-04-26  Martin Baulig  <martin@gnome.org>
5250
5251         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
5252         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
5253         there's a subdirectory called `System', but we don't want to read that
5254         subdirectory as an assembly.
5255
5256 2002-04-25  Martin Baulig  <martin@gnome.org>
5257
5258         * debug-symfile.c: Reflect latest MonoString changes.
5259
5260 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
5261
5262         * rand.c, rand.h: instance method icalls need to have an explicit
5263         this pointer as first argument in the C implementation.
5264
5265 2002-04-25  Nick Drochak <ndrochak@gol.com>
5266
5267         * icall.c: Fix typo in map for GetNonZeroBytes
5268
5269 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
5270
5271         * string-icalls.c : String does now passes unit tests without any 
5272         errors, the following changes has been made:
5273         
5274         Implemented replace methods.
5275         Renaming of methods to (try) follow the standard.
5276         Fixed compare ordinal
5277         Made all memory allocated directly to function instead of via icall function.
5278         Small performance fix in is_in_array function
5279                         
5280  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
5281
5282         c (mono_string_Internal_ctor_charp_int_int):
5283         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
5284         sindex < 0, throw ArgumentOutOfRangeException instead of
5285         ArgumentNullException.
5286
5287         Added new check for length == 0, however
5288         I need to make it return String.Empty from the C code.
5289         
5290         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
5291         that calculate the length for us here.
5292         
5293         (mono_string_Internal_ctor_sbytep_int_int): Replaced
5294         mono_string_new_utf16 with mono_string_new, since value is utf8.
5295
5296 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
5297
5298         * object.c: register the object for finalization if needed.
5299         Allocate one more char in the string for the terminating 0 char.
5300
5301 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
5302
5303         * class.c, class.h, image.c: check if a type implemenst a destructor.
5304         Use the proper key for array class lookups.
5305         * icall.c: register the icalls in the System.GC class.
5306         * gc.c, gc.h: GC-related functions and icalls.
5307
5308 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5309
5310         * icall.c:
5311         * socket-io.c:
5312         * unicode.c: free some strings gotten from mono_string_to_utf8 and
5313         changed a couple of free () by g_free ().
5314
5315         * decimal.c: one-liner in the comments for decimal2string ().
5316
5317 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
5318
5319         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
5320
5321 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
5322
5323         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
5324         * object.c (mono_runtime_invoke_array) : handle null in params
5325
5326 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
5327
5328         * string-icalls.c: fixed bug in split (one off bug)
5329
5330 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
5331
5332         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
5333         * icalls.c: added String::Equals as internal method
5334
5335 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
5336
5337         * threads.c: fixed bug in the double interlocked functions
5338
5339 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
5340
5341         * threads.c: implemented all of the new interlocked icalls.
5342         * string-icalls.c: fix a bug in insert.
5343         * icalls.c: added the icalls for interlocked, removed old string functions.
5344         
5345 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
5346
5347         * loader.c: fix off-by-one error when reading argument names.
5348
5349 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
5350
5351         * profiler.c: win32 counter implementation (untested).
5352         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
5353         (the latter needs testing and more complete impl. from win32 folks).
5354
5355 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
5356
5357         * object.c: mono_array_new_full workaround mono_array_class_get
5358         problem.
5359
5360 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
5361
5362         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
5363         * object.h (mono_string_chars): Changed casting type.
5364
5365 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
5366
5367         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
5368                            method signatures to use gunichar2 instead of gint16.
5369
5370 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
5371
5372         * object.h, object.c: domain-specific versions of mono_object_new and
5373         mono_array_new.
5374
5375 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
5376
5377         * object.c: changed String layout
5378
5379         * string-icalls.c (mono_string_Internal_ctor_chara): added
5380         internal string constructors.
5381
5382 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
5383
5384         * threads.c: pass 'this' to the thread start routine.
5385
5386 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5387
5388         * string-icalls.c: fix IndexOf and LastIndexOf. Now
5389         InternalCompareStr don't call twice mono_string_cmp_char for the last
5390         character. Improved performance in mono_string_cmp_char.
5391
5392 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
5393
5394         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
5395         code into its own library: libmonoruntime.
5396
5397 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
5398
5399         * object.h, object.c: changed array format so that szarrays do not
5400         require a bounds structure.
5401         * icall.c, appdomain.c: support for new szarray format.
5402
5403 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
5404
5405         * metadata.c: compare also the retuns type when comparing signatures:
5406         we didn't do this as an optimization since really overloaded methods
5407         must differ also in the arguments, but this doesn't work with
5408         low-level IL code (or when using explicit conversion operators: see
5409         bug#23498 for an example).
5410
5411 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
5412
5413         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
5414
5415 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
5416
5417         * icall.c: make MonoType::GetElementType its own icall.
5418
5419 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
5420
5421         * icall.c: remove MonoMethod_get_Name().
5422         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
5423         object.
5424
5425 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
5426
5427         * string-icalls.c: optimized a few methods.
5428
5429 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
5430
5431         * icall.c: added all new string internal calls
5432         * string-icalls.c: added, new string internal call implementation.
5433         * object.c: added mono_string_new_size for allocating a string a size
5434
5435 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
5436
5437         * object.c (mono_object_isinst): use the same code as in the
5438         optimized x86 version.
5439
5440 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
5441
5442         * profiler.c: TSC-based timer code (faster and more accurate).
5443         Not hooked up in configure, yet (set USE_X86TSC to 1).
5444
5445 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
5446
5447         * profiler.c, profiler.h: track time spent compiling methods.
5448         * threads.c: track thread creation/destruction.
5449
5450 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
5451
5452         * profiler.c, profiler.h, profiler-private.h: profiling interface
5453         and sample implementation. Moved here so that it can be used also by
5454         the jit.
5455
5456 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
5457
5458         * reflection.c, reflection.h: keep types and other handles separate in
5459         the hash tables for referred tokens. Add guid for modules.
5460
5461 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
5462
5463         * assembly.c: fix bugs found with valgrind.
5464         * metadata.h, metadata.c: added mono_metadata_guid_heap().
5465
5466 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
5467
5468         * threads: added icall support for getting current domain for
5469                    the thread.
5470  
5471 2002-04-13  Martin Baulig  <martin@gnome.org>
5472
5473         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
5474         (MonoDebugVarInfo): Added `index' field for register based addresses.
5475         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
5476         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
5477         `MonoDebugVarInfo *params' and `guint32 this_offset' with
5478         `MonoDebugVarInfo *this_var'.
5479
5480         * debug-symfile.c (relocate_variable): New static function to write
5481         a location description for a local variable or method parameter.
5482
5483 2002-04-12  Martin Baulig  <martin@gnome.org>
5484
5485         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
5486         stack offset and begin/end scope address of a local variable.
5487         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
5488         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
5489         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
5490
5491         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
5492         Added new relocation types for start/end scope of a local variable.
5493
5494 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
5495
5496         * object.h: add mono_object_domain() macro.
5497         * reflection.c: handle typespecs.
5498         * icall.c: MonoMethod::get_Name() implementation.
5499
5500 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
5501
5502         * icall.c: String::GetHashCode() icall implementation.
5503
5504 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
5505
5506         * icall.c: String::IndexOfAny icall.
5507         * object.c, object.h: make array->max_length more useful.
5508         Intrduced mono_object_class() and mono_string_length() macros.
5509
5510 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5511
5512         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
5513         instead of g_unichar_isdigit.
5514
5515 2002-04-11  Nick Drochak  <ndrochak@gol.com>
5516
5517         * icall.c: Implement a simple Double.ToString().
5518
5519 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
5520
5521         * appdomain.h: only io-layer.h is supposed to be included.
5522         * icall.c: explicitly import environ. Fix warning.
5523
5524 2002-04-10  Nick Drochak  <ndrochak@gol.com>
5525
5526         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
5527                 return true even if it's not Daylight Savings time.
5528                 Only return false for the case where the function isn't
5529                 implemented for a plaform (read Windows).
5530
5531 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
5532
5533         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
5534         data with a mutex.
5535
5536 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
5537
5538         * mempool.c (mono_mempool_alloc): only use g_malloc when
5539         absolutely necessary.
5540
5541 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
5542
5543         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
5544
5545         * class.c (mono_class_vtable): use domain mempool to allocate vtable
5546         (mono_class_proxy_vtable): use domain mempool
5547
5548 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
5549
5550         * appdomain.h, appdomain.c: split initialization that requires the
5551         execution engine support into mono_runtime_init().
5552
5553 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
5554
5555         * class.c (mono_class_init): don't include vtable inside MonoClass
5556         to save some memory, gather some statistics.
5557         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
5558
5559 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
5560
5561         * icall.c: internalcall implementation for ValueType.Equals().
5562
5563 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
5564
5565         * object.c (mono_message_init): moved 
5566         (mono_runtime_exec_main): new arch. independent impl.
5567         (mono_runtime_invoke_array): new method - like
5568         mono_runtime_invoke, but you can pass an array of objects.
5569         (mono_remoting_invoke): new arch. independent impl.
5570         (mono_message_invoke): new arch. independent impl.
5571         (mono_runtime_class_init): new arch. independent impl.
5572         (mono_runtime_object_init): new arch. independent impl.
5573
5574 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
5575
5576         * metadata.c, object.c, reflection.c: documented the exported
5577         functions.
5578
5579 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
5580
5581         * icall.c: simpler code to pass the assembly builder data to corlib.
5582         Implement GetNestedTypes() internalcall.
5583
5584 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
5585
5586         * class.c: warn if a type can't be loaded.
5587
5588 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
5589
5590         * image.h: typedef MonoImageOpenStatus
5591         * types.h: removed unused file
5592         
5593 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
5594
5595         * icall.c: Enum_ToObject accepts enum value arguments.
5596
5597 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
5598
5599         * class.c: move initialization of properties, events and nested
5600         classes, so that they happen for interfaces, too.
5601
5602 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
5603
5604         * icall.c: cleanup some ugly casts in Array_SetValue*.
5605
5606 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
5607
5608         * icall.c: the values array fro enums is of the correct type, now.
5609         Implement (correctly) getFullName instead of assQualifiedName for
5610         MonoType.
5611         * reflection.h, reflection.c: added mono_type_get_name ().
5612
5613 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
5614
5615         * assembly.c, image.h: for each MonoImage, record from wich assembly
5616         it was loaded.
5617         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
5618         Make Type.Assembly work.
5619
5620 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
5621
5622         * debug-symfile.h: use char* instead of gpointer to avoid
5623         unnecessary casts.
5624
5625         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
5626
5627         * icall.c (ves_icall_InternalExecute): impl. FielSetter
5628         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
5629
5630 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
5631
5632         * icall.c (mono_message_init): impl. (code cleanup)
5633         (ves_icall_InternalExecute): impl. FieldGetter
5634
5635         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
5636         defined we call all (non-static)methods through the vtable. 
5637
5638 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
5639
5640         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
5641         finalizer even though the memory is still referenced (and the chunk of
5642         memory is not freed).
5643
5644 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
5645
5646         * assembly.c: fix brokeness.
5647
5648 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
5649
5650         * class.c: kill some warnings. Check explicit interface method
5651         implementation also without considering the namespace.
5652         Load also literal strings in static class data.
5653
5654 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
5655
5656         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
5657         (default_assembly_name_resolver): Make the resolver take the
5658         "base" directory where the assembly was originally defined, so we
5659         can load DLLs that are in the same directory as the assembly that
5660         is being referenced.
5661
5662 2002-03-28  Dick Porter  <dick@ximian.com>
5663
5664         * file-io.h: 
5665         * file-io.c:
5666         * socket-io.c: 
5667         * unicode.h: 
5668         * unicode.c: Warning cleanups
5669
5670 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
5671
5672         * object.h, reflection.h: use the correct type instead of MonoObject.
5673
5674 2002-03-28  Martin Baulig  <martin@gnome.org>
5675
5676         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
5677         (mono_debug_update_symbol_file): Initialize classes if necessary.
5678
5679 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
5680
5681         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
5682         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
5683
5684 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
5685
5686         * assembly.h: fix function prototype.
5687         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
5688         * mono-endian.h: use const cast.
5689
5690 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
5691
5692         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
5693
5694 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
5695
5696         * loader.c: don't assert when a typeref can't be loaded, give
5697         a chance to the runtime to trow an exception instead.
5698         * loader.h: fix warning.
5699
5700 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
5701
5702         * class.c (mono_class_proxy_vtable): added proxy support
5703
5704 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
5705
5706         * icall.c: removed last of PAL calls, added System.Environment
5707         * file-io.h, file-io.c: MonoIO implementation
5708         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
5709
5710 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
5711
5712         * appdomain.c: do not use the byte marker in ldstr table lookup.
5713         * debug-helpers.c: allow two ':' to separate class and method name.
5714         * object.c: allocate arrays bounds with the GC, too.
5715         * verify: add a few more checks.
5716
5717 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
5718
5719         * reflection.c: output also literal strings. Allocate parameter data
5720         with GC_malloc() (thanks, Martin, for catching this!).
5721
5722 2002-03-26  Martin Baulig  <martin@gnome.org>
5723
5724         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
5725         include the `this' offset in the `param_offsets'.
5726
5727 2002-03-25  Martin Baulig  <martin@gnome.org>
5728
5729         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
5730         mono_debug_get_class() function to get the classes. Added new
5731         relocation types for arrays and strings.
5732         (mono_debug_get_class): New static function to search in all
5733         referenced assemblies for a metadata token.
5734
5735         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
5736
5737 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
5738
5739         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
5740         hold gc-allocated objects. Make the string heap a stream like the
5741         others. Removed duplicated code when writing stream info.
5742         Added asserts to catch possible buffer overflows. Set the sorted map
5743         for tables that need sorting. Added some documentation.
5744
5745 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
5746
5747         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
5748         for interned strings and vtables.
5749
5750 2002-03-24  Martin Baulig  <martin@gnome.org>
5751
5752         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
5753         it in the array since it was created with g_slist_prepend().
5754
5755 2002-03-24  Martin Baulig  <martin@gnome.org>
5756
5757         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
5758         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
5759         (mono_debug_method_from_token): Renamed to
5760         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
5761         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
5762
5763         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
5764         relocation types.
5765
5766         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
5767
5768 2002-03-24  Martin Baulig  <martin@gnome.org>
5769
5770         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
5771         (mono_debug_method_from_token): New func.
5772
5773         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
5774         New interncall, calls mono_debug_local_type_from_signature().
5775         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
5776         calls mono_debug_method_from_token().
5777
5778 2002-03-23  Martin Baulig  <martin@gnome.org>
5779
5780         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
5781         specifies the number of bytes to be converted, not the array size.
5782         Return the number of chars, not the number of bytes.
5783         (ves_icall_iconv_get_chars): The `byteCount' argument
5784         specifies the number of bytes to be converted, not the array size.
5785
5786 2002-03-23  Martin Baulig  <martin@gnome.org>
5787
5788         * reflection.h (MonoReflectionSigHelper): New type.
5789
5790         * reflection.c (mono_reflection_sighelper_get_signature_local),
5791         (mono_reflection_sighelper_get_signature_local): New functions.
5792
5793         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
5794         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
5795         interncalls.
5796
5797 2002-03-23  Martin Baulig  <martin@gnome.org>
5798
5799         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
5800         is_writeable is set.
5801         (mono_raw_buffer_update): New function to write the modified map
5802         back to disk.
5803
5804         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
5805
5806         * debug-symfile.c (mono_debug_update_symbol_file): Call
5807         mono_raw_buffer_update() when done writing.
5808
5809 2002-03-23  Martin Baulig  <martin@gnome.org>
5810
5811         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
5812
5813         * debug-symfile.c: Added support for arguments and local variables.
5814
5815 2002-03-23  Dick Porter  <dick@ximian.com>
5816
5817         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
5818         protected by ifdefs, hence breaking the w32 build.
5819
5820 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5821
5822         * object.c: implement is_interned() the right way.
5823
5824 2002-03-21  Martin Baulig  <martin@gnome.org>
5825
5826         * debug-symfile.[ch]: New files to handle debugging information
5827         files. There's also support to dynamically update these symbol
5828         files to include machine dependent information.
5829
5830 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
5831
5832         * threads.c (mono_thread_create): new function to create thread
5833         from C
5834
5835 2002-03-20  Martin Baulig  <martin@gnome.org>
5836
5837         * icall.c (ves_icall_InternalInvoke): Create a new object if the
5838         method is a constructor.
5839         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
5840         points to ves_icall_InternalInvoke().
5841
5842 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
5843
5844         * file-io.c: Flush shouldn't throw exceptions.
5845
5846 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
5847
5848         * file-io.c: FileStream flush support; FileSetLength now
5849         restores file pointer.
5850
5851 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
5852
5853         * class.c: set image for pointer classes.
5854
5855 2002/03/19  Nick Drochak <ndrochak@gol.com>
5856
5857         * sysmath.c: Forgot one.
5858
5859 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
5860
5861         * sysmath.c: Avoid redefining existing names.
5862
5863 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
5864
5865         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
5866         handled by runtime as icall rather than dllimport from libm.so
5867         * file-io.c, file-io.h: fixed handle argument type.
5868
5869 2002-03-18  Dick Porter  <dick@ximian.com>
5870
5871         * reflection.c (mono_image_get_type_info): rename interface to
5872         iface, because of "#define interface struct" on windows.
5873
5874 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
5875
5876         * class.c, class.h: rename and export mono_ptr_class_get().
5877         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
5878         * reflection.c, reflection.h, icall.c: better/saner type name
5879         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
5880         method signatures.
5881
5882 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
5883
5884         * class.c (mono_class_init): removed hardcoded GHC_SLOT
5885
5886         * icall.c (ves_icall_InternalInvoke): impl.
5887
5888 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
5889
5890         * reflection.c: output the interface map table, too.
5891
5892 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
5893
5894         * class.c (class_compute_field_layout): separate computation of 
5895         static field layout
5896
5897 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
5898
5899         * icall.c: added System.Buffer support.
5900         * file-io.c: moved file icalls from PAL to FileStream.
5901
5902 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
5903
5904         * icall.c (ves_icall_System_Object_GetHashCode): impl.
5905
5906 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
5907
5908         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
5909
5910 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
5911
5912         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
5913
5914 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
5915
5916         * debug-helpers.{c,h}: moved here from monograph some useful functions
5917         to locate a method by name/signature in a class or image. Included
5918         also a small and flexible IL disassembler.
5919
5920 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
5921
5922         * reflection.c: fixup tokens in methods with small header size, too.
5923
5924 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
5925
5926         * object.c (mono_string_to_utf8): remove assert(!error), instead
5927         print a warning. 
5928
5929 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
5930
5931         * icall.c: update to the new mono_Array_class_get interface.
5932
5933 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
5934
5935         * appdomain.c, object.c: Boehm-GC enable.
5936         * icall.c: make get_data_chunk() support split data requests.
5937         Ensure a class is initialized in more cases. Return only the first
5938         property found in GetProperties() or the compiler gets confused. 
5939         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
5940         * reflection.h, reflection.c: add fixup mechanism for field and method
5941         tokens. Initialize assembly->typeref in a single place. Output
5942         properties after events. Support custom attributes for events, too.
5943         Typo fix for paramter custom attrs.
5944
5945 2002-03-07  Martin Baulig  <martin@gnome.org>
5946
5947         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
5948
5949 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
5950
5951         * class.c (mono_array_class_get): fix. for multi. dim. arrays
5952
5953 2002-03-06  Martin Baulig  <martin@gnome.org>
5954
5955         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
5956         non-zero lower bounds. See testcases #F10-#F13.
5957
5958 2002-03-05  Martin Baulig  <martin@gnome.org>
5959
5960         * exception.c (mono_get_exception_argument_out_of_range): New exception.
5961
5962         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
5963         ves_icall_System_Array_GetValue(), only calculate the absolute array position
5964         here.
5965         (ves_icall_System_Array_SetValue): Likewise.
5966         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
5967         as argument and does the actual work. This function is used when copying a
5968         multi-dimensional array.
5969         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
5970         now do all the widening conversions of value types.
5971         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
5972
5973 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5974
5975         * class.c: remove some magic numbers and use the smbolic names,
5976         instead. Added init_events() to load event info at class init time.
5977         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
5978         and mono_metadata_methods_from_event().
5979         * reflection.h, reflection.c: added support for writing out the evnets
5980         related information.
5981
5982 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
5983
5984         * reflection.h, icall.c: use a different method (GetInterfaces)
5985         to gather interface info and add isbyref, isprimitive and
5986         ispointer to the ves_icall_get_type_info() return value.
5987
5988 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
5989
5990         * class.h: stared adding support for events.
5991         * icall.c: split find_members implementation. Added debug icall to get
5992         the address of an object.
5993         * reflection.c: handle TypeBuilders in mono_type_get_object().
5994
5995 2002-03-01  Martin Baulig  <martin@gnome.org>
5996
5997         * icall.c (ves_icall_System_Array_GetLength): This must throw an
5998         ArgumentOutOfRangeException(), not an ArgumentException().
5999         (ves_icall_System_Array_GetLowerBound): Likewise.
6000         (ves_icall_System_Array_GetValue): Improved argument checking.
6001         (ves_icall_System_Array_SetValue): Improved argument checking.
6002
6003 2002-03-01  Martin Baulig  <martin@gnome.org>
6004
6005         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
6006         called with invalid arguments rather than just dying with g_assert().
6007         (ves_icall_System_Array_SetValue): Likewise.
6008         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
6009         raise a NotImplementedException instead.
6010         (ves_icall_System_Array_GetLength): Added argument checking.
6011         (ves_icall_System_Array_GetLowerBound): Added argument checking.
6012
6013 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
6014
6015         * object.h (mono_assert): new macros mono_assert and
6016         mono_assert_not_reached
6017
6018 2002-02-28  Martin Baulig  <martin@gnome.org>
6019
6020         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
6021         and "System::String::IsInterned" to "System::String::_IsInterned".
6022
6023 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
6024
6025         * icall.c: remove hacks for typebuilder. Added icall to create a
6026         modified type from a tybebuilder.
6027         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
6028         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
6029         to create a backing MonoClass for a TypeBuilder.
6030
6031 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
6032
6033         * class.c, class.h: more refactoring of class init.
6034         Export mono_class_setup_mono_type() and mono_class_setup_parent().
6035
6036 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
6037
6038         * marshal.c, marshal.h: start of marshaling interface.
6039
6040 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
6041
6042         * icall.c: fix order in assembly qualified name icall.
6043
6044 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
6045
6046         * class.c: do not free str, since we store it in the hash table.
6047         * reflection.h: add label field to MonoILExceptionInfo.
6048         * reflection.c: handle references to more than one assembly. Handle
6049         case when there isn't a module created in the assembly.
6050
6051 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
6052
6053         * class.c: Fix typo. Start refactoring of class init code.
6054
6055 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
6056
6057         * appdomain.c: exit with 1 on error.
6058         * class.c: we already have the name in MonoClassField.
6059         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
6060         MonoStreamHeader instead of an offset of image->raw_metadata.
6061
6062 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
6063
6064         * appdomain.c (mono_init): Be even more descriptive about the error.
6065
6066 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
6067
6068         * appdomain.c: give the user an informative message when corlib can't
6069         be loaded.
6070
6071 2002-02-26  Martin Baulig  <martin@gnome.org>
6072
6073         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
6074         New icall to get the time zone data.
6075
6076 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
6077
6078         * reflection.c: set virtual and raw size of section correctly.
6079         * threads.c: transfer domain information to newly created threads.
6080
6081 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
6082
6083         * class.c: when instancing a class in a domain, load the default
6084         vaules for static fields from the constant table. Fix System.Enum to
6085         not be an enum.
6086         * icall.c: implement Object::GetType() internalcall. Implemented
6087         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
6088         Fixed checking of binding flags in find_members().
6089         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
6090         * reflection.c: handle enumerations when writing to the constant
6091         table. Use a different object cache for types.
6092
6093
6094 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
6095
6096         * object.c (mono_object_isinst): fix for arrays
6097
6098         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
6099
6100 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
6101
6102         * object.c: don't use mprotect ()  and fix intern pool hash table
6103         lookup for big endian systems.
6104
6105 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
6106
6107         * icall.c: change type_is_subtype_of () signature.
6108
6109 2002-02-21  Mark Crichton  <crichton@gimp.org>
6110
6111         * rand.c, rand.h: Added random number generator for
6112         System.Security.Cryptography classes.
6113
6114         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
6115
6116         * icall.c: Added System.Security.Cryptography calls.
6117
6118 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
6119
6120         * class.c, icall.c, metadata.c: better support for pointer types.
6121         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
6122         * reflection.c: Add support for getting custom attrs for properties
6123         and simplify some code.
6124
6125 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
6126
6127         * icall.c: change getToken () and add custom attribute GetBlob()helper
6128         method.
6129         * reflection.h: add custom attrs array to the reflection builder structures.
6130         * reflection.c: encode and emit custom attributes for all the relevant
6131         reflection objects. Cache fieldref and methodref tokens. Change
6132         mono_image_create_token() interface to take a MonoDynamicAssembly.
6133         More complete custom attributes decoder. Load custom attributes for
6134         Assembly, Field, Method and Constructor objects, too. Make the
6135         returned array an Attribute[] one, not object[]. Added
6136         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
6137         custom attribute constructor.
6138
6139 2002-02-20  Dick Porter  <dick@ximian.com>
6140
6141         * icall.c:
6142         * rawbuffer.c:
6143         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
6144         problem code out for now).
6145
6146 2002-02-19  Radek Doulik  <rodo@ximian.com>
6147
6148         * object.c (mono_ldstr): use hash table to avoid multiple swapping
6149
6150 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
6151
6152         * icall.c: register the GetCustomAttributes method.
6153         * object.c, object.h: add mono_string_new_len ().
6154         * reflection.h, reflection.c: added mono_runtime_invoke(),
6155         mono_install_runtime_invoke(). Added
6156         mono_reflection_get_custom_attrs () to load custom attributes and
6157         create the attribute objects.
6158
6159 2002-02-19  Dick Porter  <dick@ximian.com>
6160         * threads-dummy-types.c:
6161         * threads-dummy-types.h:
6162         * threads-dummy.c:
6163         * threads-dummy.h:
6164         * threads-pthread-types.c:
6165         * threads-pthread-types.h:
6166         * threads-pthread.c:
6167         * threads-pthread.h:  Deleted obsolete files
6168
6169 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
6170
6171         * class.c (mono_class_vtable): runtime init the class when we
6172         allocate static class data.
6173
6174         * icall.c (ves_icall_System_Array_SetValue): check for null values.
6175
6176         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
6177         and String - but we will need generic marshalling support in the
6178         future. 
6179         (mono_init): set the domain name in a ms compatible way
6180
6181         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
6182         String[].
6183
6184 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
6185
6186         * object.c (mono_array_clone): use alloca() instead of g_malloc  
6187         for sizes
6188
6189         * appdomain.c (mono_domain_unload): impl.
6190
6191 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
6192
6193         * appdomain.c, object.c: fix intern pool implementation.
6194         * class.c: fix alignment code.
6195
6196 2002-02-16  Radek Doulik  <rodo@ximian.com>
6197
6198         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
6199         and s2 > s1, just copy lower bytes to be compatible with little
6200         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
6201         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
6202
6203         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
6204         force big_endian to be 1 for big endian machines 
6205         (ves_icall_iconv_new_decoder): ditto
6206
6207 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
6208
6209         * socket-io.c (convert_sockopt_level_and_name): If the system
6210         doesn't define SOL_IP or SOL_TCP, get them by hand using
6211         getprotobyname() and caching the values (because this could be a
6212         slow operation).
6213         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
6214         Use the appropriate struct when the system does support it. Ie,
6215         not all systems have struct ip_mreqn so use struct ip_mreq when
6216         appropriate.
6217
6218 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
6219
6220         * reflection.c: handle finally clauses.
6221
6222 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
6223
6224         * socket-io.c: use g_snprintf() instead of snprintf.
6225
6226 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
6227
6228         * reflection.c (mono_param_get_objects): Cast second argument to
6229         mono_method_get_param_names to a const char** to silence the
6230         compiler warning.
6231
6232         * appdomain.c (mono_domain_assembly_open): Put parens around the
6233         truth statement in the for-loop.
6234
6235         * unicode.c (iconv_convert): Got rid of a compiler warning about
6236         int i being unused when the system has a new iconv.
6237         (iconv_get_length): Same.
6238
6239         * image.c (load_class_names): Cast the second argument to
6240         g_hash_table_insert() to char* to hush compiler warnings about the
6241         arg being a const.
6242         (mono_image_open): Same here.
6243
6244         * socket-io.c: Don't conditionally include sys/filio.h or
6245         sys/sockio.h here anymore since we now get them from
6246         io-layer/io-layer.h
6247         (inet_pton): If the system doesn't support inet_aton, implement
6248         using inet_addr and also #define INADDR_NONE if it isn't defined
6249         by the system.
6250
6251 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
6252
6253         * metadata.c, metadata.h: added function to get packing and size info
6254         of a typedef.
6255         * reflection.h, reflection.c: handle field RVA data. Save info about
6256         the table layout if needed. Assign typedef indexes to all the types
6257         before dumping the info about them to avoid forward reference problems.
6258
6259 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
6260
6261         * socket-io.c (convert_sockopt_level_and_name): ifdef
6262         SO_ACCEPTCONN because it is not defined on my system (old debian)
6263
6264 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
6265
6266         * opcode.c: use stddef.h to get NULL.
6267
6268 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
6269
6270         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
6271         for FIONBIO, FIONREAD and SIOCATMARK.
6272         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
6273         define INADDR_NONE and besides, inet_addr() is deprecated and
6274         should not be used. Use inet_pton() instead - it also has the
6275         added bonus that it can easily handle IPv6 addresses as well.
6276         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
6277
6278 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
6279
6280         * decimal.c: remove _MSC_VER conditional.
6281
6282 2002-02-13  Dick Porter  <dick@ximian.com>
6283
6284         * socket-io.c: 
6285         * icall.c: Internal calls for Blocking, Select, Shutdown,
6286         GetSocketOption and SetSocketOption
6287
6288 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
6289
6290         * assembly.cs: better resolver: use it instead of some kludgy
6291         code.
6292
6293 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
6294
6295         * reflection.c: the best way to speed-up the compiler is to avoid
6296         infinite loops.
6297
6298 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
6299
6300         * class.c (mono_class_vtable): changed the object layout
6301         (obj->vtable->class). 
6302         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
6303
6304 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
6305
6306         * assembly.c: look for assemblies in the assembly dir, too.
6307
6308 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
6309
6310         * class.c: fix thinko in mono_class_from_type().
6311
6312 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
6313
6314         * exception.h, exception.c: added TypeLoadException.
6315         * object.h, object.c: added mono_array_clone ().
6316         * icall.c: handle throwOnError in AssemblyGetType().
6317         Added Array.Clone().
6318         * opcode.h, opcode.c: use a single value for the opcode val.
6319         Compile fix for non-gcc compilers.
6320
6321 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
6322
6323         * opcodes.c, opcodes.h: export interesting info about opcodes.
6324
6325 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
6326
6327         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
6328         icalls. 
6329
6330         * class.c (class_compute_field_layout): set element_class for enums
6331         (mono_class_create_from_typedef): set element_class for normal classes
6332
6333         * icall.c (ves_icall_System_Enum_get_value): impl.
6334
6335         * class.c (mono_class_create_from_typedef): do not set valuetype
6336         flag for System.ValueType and System.Enum
6337
6338 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
6339
6340         * unicode.c (iconv_convert): fix big endian problem.
6341
6342 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
6343
6344         * class.c: add asserts if we are ever going to scribble over memory.
6345         * socket-io.c: not all systems have AF_IRDA defined.
6346
6347 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
6348
6349         * class.c (class_compute_field_layout): do not consider static
6350         fields to compute alignment
6351
6352 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
6353
6354         * appdomain.c (mono_appdomain_get): impl.
6355         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
6356
6357 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
6358
6359         * icall.c: ignore "file://" prefix when loading an assembly.
6360
6361 2002-01-23  Dick Porter  <dick@ximian.com>
6362
6363         * socket-io.c:
6364         * icall.c:
6365         * Makefile.am: Added socket support
6366
6367 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
6368
6369         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
6370         code back.  This should return the assemblies that are loaded by
6371         the runtime on behalf of an application domain. 
6372
6373         The current implementation is still broken, it just returns every
6374         assembly loaded, but until we get real applications domain this
6375         will do.
6376
6377 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
6378
6379         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
6380         AppDomain object.
6381
6382 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
6383
6384         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
6385         the mono_class_from_name lookup.
6386         (ves_icall_get_parameter_info): ditto.
6387         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
6388         method.
6389         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
6390
6391 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
6392
6393         * class.c: load also nested classes on class init.
6394         System.ValueType instance methods gets passed boxed
6395         values, unless methods in derived classed that get a pointer to the
6396         data.
6397         * icall.c: use better name parsing code in GetType().
6398         * image.c, image.h: add mono_image_loaded ().
6399         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
6400         * reflection.c, reflection.h: added mono_reflection_parse_type().
6401
6402 2002-01-22  Veronica De Santis <veron78@interfree.it>
6403
6404         * icall.c : Added mapping of internal calls for Manual and Auto reset events
6405         * threads.c : Added the implementation of internal calls for events
6406         * threads.h : Added prototypes of internal calls for events
6407         
6408 2002-01-21  Radek Doulik  <rodo@ximian.com>
6409
6410         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
6411
6412 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
6413
6414         * class.c (mono_class_init): set min_align to 1 (instead of 0)
6415         (mono_class_value_size): use min_align
6416
6417 2002-01-20  Dick Porter  <dick@ximian.com>
6418
6419         * threads.h:
6420         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
6421         so it compiles on w32.
6422
6423 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
6424
6425         * metadata.c (mono_type_stack_size): impl.
6426
6427         * class.c (mono_class_get_field): impl. memberref token
6428
6429 2002-01-16 Veronica De Santis <veron78@@interfree.it>
6430
6431         * icall.h : Added the internal calls mapping for CreateMutex_internal
6432                     and ReleaseMutex_internal.
6433         * threads.h : Added the prototype of mutexes internal calls.
6434         * threads.c : Added the implementations of mutexes internal calls.
6435
6436 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
6437
6438         * metaparse.h: removed unused file.
6439         * reflection.c, reflection.h: added stream_data_align () function 
6440         to align data in streams and keep stream aligned. Add support for
6441         exception support in method headers.
6442
6443 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
6444
6445         * unicode.c: make iconv_convert () return the number of bytess written
6446         in the output buffer.
6447
6448 2002-01-15  Dick Porter  <dick@ximian.com>
6449         * threads.c: Make the runtime's idea of infinite timeouts coincide
6450         with the class library's
6451
6452         Fix a particularly egregious bug in mono_thread_cleanup(). That
6453         code was so utterly bogus it must have been written on a Monday.
6454
6455 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
6456
6457         * reflection.h: add subtypes field to TypeBuilder.
6458         * reflection.c: encode constants for literal fields.
6459         Handle subtypes. Fix user string token (and add a zero byte)
6460         at the end.
6461         
6462 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
6463
6464         * class.c (mono_class_init): bug fix: assign slot numbers for
6465         abstract methods.
6466
6467 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
6468
6469         * reflection.c: don't try to output a code RVA for abstract methods.
6470         Small fixes for method header format. Output parameter info to the
6471         ParamDef table. Save method overriding info to MethodImpl table.
6472         Fix property support. Allow typedef.extends to be a type in the
6473         building assembly.
6474         * verify.c: fix off-by-one error.
6475
6476 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
6477
6478         * class.c: fix mono_class_from_mono_type () for szarray types.
6479         Remove unused cache check in mono_class_from_type_spec().
6480         * icall.c: *type_from_name () functions handle simple arrays and byref.
6481         * reflection.c: handle byref and szarray types. Handle methods without
6482         body (gets P/Invoke compilation working). Handle types and fields in
6483         get_token ().
6484         * reflection.h: add rank to MonoTypeInfo.
6485
6486 2002-01-10  Dick Porter  <dick@ximian.com>
6487
6488         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
6489         internal calls
6490
6491 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
6492
6493         * icall.c: initialize class in type_from_handle ().
6494         Loop also in parent classes for get_method ().
6495         * reflection.c: properly encode class and valuetype types.
6496         Start on encoding TypeBuilder types. Handle fieldrefs.
6497         Use correct length when registering a user string.
6498         Handle ConstructorBuilder and MonoMethod in get_token ().
6499         Make mono_type_get_object () aware of cached types.
6500         * object.c: back out change to mono_string_new ().
6501
6502 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
6503         * object.c: mono_string_new should return a NULL when the string 
6504         passed in is NULL -- not try to deference it.
6505         
6506 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
6507
6508         * icall.c: hack to make IsSubType work for TypeBuilders.
6509         * reflection.c: emit constructors before methods.
6510         Retrieve param names in mono_param_get_objects().
6511
6512 2002/01/05  Nick Drochak  <ndrochak@gol.com>
6513
6514         * Makefile.am: fix list of headers and sources so automake 1.5
6515         doesn't complain. Removed \# at end of list.
6516
6517 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
6518
6519         * reflection.c: get token for a method ref. Set return type of
6520         constructor to void.
6521         * loader.c: debug message.
6522         * class.c: typo fix.
6523
6524 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
6525
6526         * icall.c: fix array init with rank > 1. FindMembers
6527         loops in parent class as well.
6528         * image.c: do not insert nested types in name cache.
6529         * reflection.c: warning fix.
6530         * reflection.h: add override method (for interface impl).
6531
6532 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
6533
6534         * metadata.c: fix customattr decoding.
6535
6536 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
6537
6538         * rawbuffer.cs: Added native Win32 implementation, avoids using
6539         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
6540
6541 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
6542
6543         * class.c: make the low-level routines handle the cache.
6544
6545 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
6546
6547         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
6548
6549 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
6550
6551         * class.c: fix mono_array_element_size() for objects.
6552         * class.h, class.c: add properties to MonoClass and load them
6553         at init time.
6554         * icall.c: check with isinst() when assigning a value to an array
6555         instead of requiring the classes to match exactly.
6556         Implemented icall for System.Type::GetType().
6557         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
6558         enums. Handle bindingflags when looking for methods and fields.
6559         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
6560         and mono_metadata_methods_from_property().
6561         * reflection.h, reflection.c: added structures for propreties,
6562         parameters and enums. Implemented mono_property_get_object() and
6563         mono_param_get_objects().
6564
6565 2001-12-18  Dick Porter  <dick@ximian.com>
6566
6567         * file-io.c: Use mono_string_to_utf16() instead of
6568         mono_string_chars()
6569
6570         * object.c: Added mono_string_to_utf16(), which copies the non
6571         NULL-terminated MonoString into a new double-null-terminated
6572         buffer.
6573
6574 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
6575
6576         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
6577
6578 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
6579
6580         * file-io.c: raise exceptions if handle is invalid.
6581
6582 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
6583
6584         * assembly.c: yet another check for mscorlib.
6585         * class.c, class.h: load nesting info for classes.
6586         * icall.c: many new functions to support the Reflection classes.
6587         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
6588         * reflection.h, reflection.c: mono_image_create_token(),
6589         mono_assembly_get_object(), mono_type_get_object(),
6590         mono_method_get_object(), mono_field_get_object(): methods to return
6591         objects that parallel the C representation of assemblies, types,
6592         methods, fields.
6593
6594 2001-12-11  Dick Porter  <dick@ximian.com>
6595
6596         * icall.c:
6597         * file-io.c: Internal calls for file IO.
6598
6599 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
6600
6601         * tabledefs.h: missing FileAttributes.
6602         * verify.h, verify.c: use is_valid_string () to simplify and check for
6603         valid strings more correctly. Fix warnings and speeling.
6604         Check more tables: Filed, File, ModuleRef, StandAloneSig.
6605         Check code: branches, maxstack, method calls.
6606
6607 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
6608
6609         * object.c (mono_object_allocate): removed static, so that the jit
6610         can allocate value types.
6611
6612         * icall.c (ves_icall_System_DateTime_GetNow): impl.
6613
6614 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
6615
6616         * class.c: init enum types right away and register the
6617         token->MonoClass map in mono_class_create_from_typedef ().
6618         * verify.h, verify.c: first cut of the verifier.
6619         * pedump.c: add --verify switch to verify metadata tables.
6620         * tabledefs.h: add some missing enums.
6621
6622 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
6623
6624         * class.c (mono_install_runtime_class_init): impl.
6625         (mono_class_init): renamed mono_class_metadata_init to
6626         mono_class_init, also removed the metadata_inited flag
6627
6628         * object.c (mono_object_isinst): use faster algorithm
6629
6630 2001-11-30  Radek Doulik  <rodo@ximian.com>
6631
6632         * mono-endian.h: reverted last change
6633         added function prototypes
6634
6635         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
6636         add mono-endian.c back
6637
6638         * mono-endian.c: returned back, as Paolo pointed out, it's needed
6639         for unaligned access, I've mistaked it with endianess. I am
6640         sorry.
6641         (mono_read16): fix reverted endianess
6642         (mono_read64): ditto
6643         (mono_read32): ditto
6644
6645 2001-11-30  Dick Porter  <dick@ximian.com>
6646
6647         * exception.c: Implement mono_exception_from_name()
6648
6649 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
6650
6651         * metadata.h, metadata.c: remove params_size and locals_size and their
6652         calculation from the metadata code: they are only usefult to the
6653         interp.
6654
6655 2001-11-29  Radek Doulik  <rodo@ximian.com>
6656
6657         * object.c (mono_ldstr): swap bytes here, it's probably not the
6658         best place, but works for me now, I'll redo it once I know mono
6659         better, also note that I add PROT_WRITE and don't reset back, also
6660         note that it's only affects big endians, so x86 should be OK
6661
6662         * mono-endian.h (read16): use just glib macros for both endians
6663
6664         * mono-endian.c: removed as glib macros are used in in
6665         mono-endian.h so we don't need to care about endianess for read
6666         macros as glib does that for us already
6667
6668 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
6669
6670         * class.h, class.h: take minimum alignment into consideration so
6671         that the fields of a class remain aligned also when in an array.
6672
6673 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
6674
6675         * loader.h, loader.c: add mono_method_get_param_names().
6676         * class.c: 0-init class fields.
6677
6678 2001-11-26  Dick Porter  <dick@ximian.com>
6679
6680         * icall.c:
6681         * threads-types.h:
6682         * threads.c: New file that handles System.Threading on all platforms
6683
6684         * object.c: 
6685         * object.h: Remove the synchronisation struct from MonoObject,
6686         replace it with a pointer that gets initialised on demand
6687
6688         * Makefile.am: Replace all the system-specific threading code with
6689         a single file that uses the new wrapper library
6690
6691 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
6692
6693         * class.c, class.h: add mono_install_trampoline() so that the runtime
6694         can register a function to create a trampoline: removes the ugly
6695         requirement that a runtime needed to export arch_create_jit_trampoline.
6696         * object.h, object.c: added mono_install_handler() so that the runtime
6697         can install an handler for exceptions generated in C code (with
6698         mono_raise_exception()). Added C struct for System.Delegate.
6699         * pedump.c: removed arch_create_jit_trampoline.
6700         * reflection.c: some cleanups to allow registering user strings and
6701         later getting a token for methodrefs and fieldrefs before the assembly
6702         is built.
6703         * row-indexes.h: updates and fixes from the new ECMA specs.
6704
6705 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
6706
6707         * class.h, class.c: add enum_basetype field to MonoClass.
6708         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
6709         to get index in the constant table reated to a field, param or
6710         property.
6711         * reflection.h, reflection.c: handle constructors. Set public-key and
6712         version number of the built assembly to 0.
6713         * row-indexes.h: update from new ECMA spec.
6714
6715 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
6716
6717         * class.h, class.c: add a max_interface_id to MonoClass.
6718         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
6719         since it's used to do that. Added mono_type_type_from_obj().
6720         Make GetType() return NULL instead of segfaulting if the type was not
6721         found. Handle simple arrays in assQualifiedName.
6722         * object.h: add a struct to represent an Exception.
6723         * reflection.c: output call convention in method signature.
6724         Add code to support P/Invoke methods and fixed offsets for fields.
6725
6726 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
6727
6728         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
6729         the value.
6730         * icall.c: use mono_array_addr instead of array->vector: fixes the
6731         reflection image writing.
6732         * reflection.c: init call convention byte to 0 in method signature.
6733         Encode the property signature. Don't output property-related methods
6734         twice. Really process the properties for a type (don't cast a field to
6735         a property, my mom always told me that).
6736         Fix 64 bit issues in pointer alignment in a different and more
6737         readable way.
6738
6739 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
6740
6741         * loader.h: Removed type class from MonoDefaults, added monotype
6742
6743         * loader.c: Loaded MonoType, removed loading of Type
6744
6745         * icall.c (my_mono_new_object): Now returns a System.MonoType,
6746         and fills in System.Type._impl with a RuntimeTypeHandle rather
6747         than the actual MonoClass *
6748
6749         (ves_icall_type_from_handle): change from type_class to
6750         monotype_class
6751
6752         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
6753         implemented
6754
6755         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
6756         implemented
6757
6758         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
6759
6760         (ves_icall_System_Reflection_Assembly_GetType): implemented
6761
6762         (ves_icall_System_MonoType_assQualifiedName): implemented
6763
6764         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
6765
6766 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
6767
6768         * assembly.c (mono_assembly_open): Implement a cache for the
6769         assemblies. 
6770
6771         (mono_assembly_close): only destroy the assembly when the last
6772         reference is gone.
6773         
6774 2001-11-09  Dick Porter  <dick@ximian.com>
6775
6776         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
6777
6778 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
6779
6780         * class.c (mono_class_metadata_init): bug fix: compute the right slot
6781
6782 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
6783
6784         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
6785         from Martin Weindel.
6786         * object.h: add mono_string_chars ().
6787
6788 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
6789
6790         * reflection.c (build_compressed_metadata): Eliminates warnings
6791         and uses 64-bit clean code.
6792
6793         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
6794         (mono_type_equal): Change signature to eliminate warnings.
6795
6796 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
6797
6798         * icall.c, loader.c: remove the internalcall array constructors.
6799         Changes to match the new MonoArray structure.
6800         * object.h, object.c: an array object doesn't allocate an extra
6801         vector. Add mono_array_new_full () to create jagged arrays easily.
6802
6803 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
6804
6805         * metadata.h, metadata.c: add mono_metadata_field_info () to
6806         retreive all the info about a field from vairous tables.
6807         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
6808         * class.h, class.c: augment MonoClassField with more info.
6809         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
6810         policy and load a field's RVA if needed.
6811
6812 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
6813
6814         * class.c (mono_class_metadata_init): create a trampoline for all
6815         virtual functions instead of actually compiling them.
6816
6817 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
6818
6819         * class.h, class.c: include name in MonoClassField.
6820         * class.c: fix fundamental type of System.Object and System.String.
6821         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
6822         tokens in ldtoken.
6823         * icall.c: remove internalcalls for the Reflection stuff that is now
6824         done in C# code.
6825         * loader.c: mono_field_from_memberref () implementation.
6826         * mono-endian.c: thinko (s/struct/union/g).
6827         * object.c, object.h: make the mono_string_* prototypes actually use
6828         MonoString instead of MonoObject.
6829         * reflection.c, reflection.h: updates for changes in the reflection
6830         code in corlib: we use C structures that map to the actual C# classes.
6831         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
6832         fat method header if needed and use the info from the ILGenerator for
6833         methods. Handle fields in types. Misc fixes.
6834
6835 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
6836
6837         * class.c (mono_class_metadata_init): bug fix: always allocate
6838         space for static class data
6839
6840 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
6841
6842         * class.c (mono_compute_relative_numbering): use relative
6843         numbering to support fast runtime type checks.
6844
6845 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
6846
6847         * class.c (mono_class_create_from_typeref): added debugging output
6848         to print class name when MonoDummy is returned instead of real class
6849
6850 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
6851
6852         * class.c (mono_class_metadata_init): interface offset table now
6853         contains pointers into the vtable - this is more efficient for the jit
6854
6855 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
6856
6857         * class.c (mono_class_metadata_init): use a temporary vtable (the
6858         old algorithm only worked for the interpreter, but not for the jit)
6859
6860 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
6861
6862         * loader.c (method_from_memberref): use mono_class_get to get the
6863         class of an array instead of using System.Array directly.
6864         (mono_get_method): also add MEMBERREF methods to the method cache
6865         which usefull for arrays.
6866
6867 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
6868
6869         * pedump.c (arch_compile_method): added to compute vtable entry
6870
6871         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
6872         number of interfaces.
6873         
6874         * class.h: merged MonoArrayClass into MonoClass
6875
6876         * class.c (mono_class_create_from_typedef): compute the vtable size and
6877         allocate space to include the vtable inside MonoClass
6878         (mono_class_metadata_init): initialize the vtable
6879
6880 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
6881
6882         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
6883         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
6884         * image.c: endian fixes by Laurent Rioux.
6885         * object.h, object.c: rename MonoStringObject to MonoString and
6886         MonoArrayObject to MonoArray. Change some function names to conform to
6887         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
6888         guint16* as first argument, so don't use char*.
6889         Provide macros to do the interesting things on arrays in a portable way.
6890         * threads-pthread.c: updates for the API changes and #include <sched.h>
6891         (required for sched_yield()).
6892         * icall.c: updates for the API changes above.
6893         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
6894         platforms that need them.
6895
6896 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
6897
6898         * class.c: set the correct type for all the fundamental
6899         type when loading the class.
6900
6901 2001-10-05  Dick Porter  <dick@ximian.com>
6902
6903         * threads-pthread.c (pthread_mutex_timedlock): Simple
6904         compatibility version for C libraries that lack this call.
6905
6906 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
6907
6908         * class.c: MonoTypes stored in MonoClass are stored as
6909         fundamental MonoTypes when the class represents a
6910         fundamental type (System.Int32, ...).
6911         The TypeHandle return by ldtoken is a MonoType*.
6912         * icall.c: ves_icall_get_data_chunk () write out all the
6913         PE/COFF stuff. Implement ves_icall_define_method (),
6914         ves_icall_set_method_body (), ves_icall_type_from_handle ().
6915         * image.c: properly skip unknown streams.
6916         * loader.h, loader.c: add type_class to mono_defaults.
6917         * metadata.c, metadata.h: export compute_size () as
6918         mono_metadata_compute_size () with a better interface.
6919         Typo and C&P fixes.
6920         * pedump.c: don't try to print the entry point RVA if there is no entry point.
6921         * reflection.c, reflection.h: many cleanups, fixes, output method
6922         signatures and headers, typedef and typeref info, compress the metadata
6923         tables, output all the heap streams, cli header etc.
6924         * row-indexes.h: typo fixes.
6925
6926 2001-10-04  Dick Porter  <dick@ximian.com>
6927
6928         * object.h: Add a synchronisation mutex struct to MonoObject
6929
6930         * object.c (mono_new_object): Initialise the object
6931         synchronisation mutexes
6932
6933         * icall.c: System.Threading.Monitor internal calls
6934         
6935         * threads-pthread.h:
6936         * threads-pthread.c: System.Threading.Monitor internal calls
6937
6938         * threads-types.h: New file, includes the system-specific thread
6939         structures
6940         
6941         * threads-pthread-types.h:
6942         * threads-pthread-types.c: New files, handle pthread-specific
6943         synchronisation types
6944
6945         * threads-dummy-types.h: 
6946         * threads-dummy-types.c: New files of dummy support for
6947         thread-specific types
6948
6949         * metadata.c:
6950         * image.c:
6951         * pedump.c: include mono-endian.h not endian.h
6952         
6953         * Makefile.am: More threads files.
6954         Name mono-endian.h not endian.h
6955
6956 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
6957
6958         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
6959         stuff and implement a few more bits.
6960         * icall.c: a field needs to be dereferenced twice. Do not use the same
6961         name for two variables in the same scope.
6962         * image.c, image.h: cleanups.
6963
6964 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
6965
6966         * class.c (mono_class_metadata_init): bug fix: compute the right size
6967
6968 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
6969
6970         * icall.c: implemented some of the Reflection internalcalls.
6971         * image.c, image.h: start writing out the PE/COFF image.
6972         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
6973         that does the reverse than decode_blob_size ().
6974         * object.c: use mono_metadata_encode_value (). Move here
6975         temporary implementation of mono_string_to_utf8 ().
6976         * rawbuffer.c: make malloc_map static.
6977
6978 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
6979
6980         * metadata.c: fix type comparison for arrays.
6981         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
6982         Added a couple of new classes to monodefaults.
6983         * icall.c: added a couple of Reflection-related internalcalls.
6984         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
6985         Added a byval_arg MonoType to MonoClass.
6986
6987 2001-09-28  Dick Porter  <dick@ximian.com>
6988
6989         * icall.c:
6990         * threads-pthread.h: 
6991         * threads-pthread.c: Implemented internal calls for
6992         LocalDataStoreSlot operations.  Applied mutexes around all shared
6993         data.  Reworked the thread creation and Start() operations to
6994         avoid a race condition.
6995         
6996         * threads-dummy.h:
6997         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
6998
6999 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
7000
7001         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
7002
7003 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
7004
7005         * class.c, loader.c: warn and return NULL instead of erroring out.
7006         * icall.c: added System.AppDomain::getCurDomain().
7007         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
7008
7009 2001-09-25  Dick Porter  <dick@ximian.com>
7010
7011         * threads-pthread.h:
7012         * threads-pthread.c: Implemented timed thread joining and added
7013         System.Threading.Thread::Join_internal internal call
7014
7015         * icall.c: Added System.Threading.Thread::Join_internal internal call
7016
7017         * threads-dummy.h:
7018         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
7019
7020 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
7021
7022         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
7023         mono_string_intern () to implement the semantics of the ldstr opcode
7024         and the interning of System.Strings.
7025         * icall.c: provide hooks to make String::IsIntern and String::Intern
7026         internalcalls.
7027
7028 2001-09-23  Dick Porter  <dick@ximian.com>
7029
7030         * threads-dummy.c: 
7031         * threads-dummy.h: New files of dummy threading routines
7032
7033         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
7034         support code based on system specifics
7035
7036         Rename PTHREAD_LIBS to THREAD_LIBS
7037         
7038 2001-09-23  Dick Porter  <dick@ximian.com>
7039
7040         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
7041         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
7042         internal calls.
7043         (mono_thread_init): Set up a Thread object instance to return when
7044         the main thread calls Thread.CurrentThread
7045         (mono_thread_cleanup): Wait for all subthreads to exit
7046
7047         * icall.c: New internal calls for System.Threading.Thread::Sleep
7048         (including Schedule) and CurrentThread
7049
7050         * threads.h: New file, to insulate thread-specific stuff from the
7051         rest of the code
7052
7053 2001-09-21  Dick Porter  <dick@ximian.com>
7054
7055         * threads-pthread.h: 
7056         * threads-pthread.c: New file, for handling pthreads-style
7057         threading support.  Start() now starts a new thread and executes
7058         the ThreadStart delegate instance.
7059
7060         * icall.c: Added the internalcall for
7061         System.Threading.Thread::Start_internal
7062
7063         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
7064
7065 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
7066
7067         * loader.c: work around the different signatures for delegates
7068         constructors csc generates in compiled code vs the ones compiled in mscorlib.
7069
7070 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
7071
7072         * class.h, class.c: add mono_class_get_field_from_name ().
7073         * *: Fix C comments and other ANSI C issues.
7074
7075 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
7076
7077         * endian.h, assembly.c: fix some endianness issues.
7078
7079 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
7080
7081         * loader.h, load.c: add delegate_class to mono_defaults.
7082         Handle runtime provided methods in mono_get_method ().
7083
7084 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
7085
7086         * loader.c (mono_get_method): use pinvoke for internal call
7087
7088         * icall.c: use pinvoke for internal call
7089
7090         * loader.c (method_from_memberref): set the method name
7091
7092 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
7093
7094         * metadata.c: help the compiler generate better code for
7095         mono_class_from_mono_type ().
7096
7097 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
7098
7099         * class.c (mono_class_metadata_init): delayed computing of the
7100         class size to mono_class_metadata_init ()
7101
7102 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
7103
7104         * class.c, class.h: add an interfaces member to MonoClass.
7105         * image.c, image.h: add assembly_name field to MonoImage
7106         from the assembly table.
7107         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
7108
7109 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
7110
7111         * class.c: Handle Array in mono_class_from_mono_type ().
7112         * metadata.c, pedump.c: some endian fixes.
7113
7114 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
7115
7116         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
7117         * metadata.c: fix small problem introduced with the latest commit.
7118
7119 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
7120
7121         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
7122         We don't need a MonoMetadata pointer anymore to compare signatures in
7123         mono_metadata_signature_equal (), update callers.
7124         Reduced memory usage an number of allocations for MonoMethodHeader and
7125         MonoMethodSignature.
7126
7127 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
7128
7129         * metadata.c: added compare for szarray.
7130
7131 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
7132
7133         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
7134         and add a couple more types to it and mono_defaults. Give an hint on
7135         classes that need implementing in our corlib and are referenced
7136         in mscorlib.
7137
7138 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
7139
7140         * class.h, class.c: keep track if a class is also an Enum.
7141         * loader.c: Implement a couple more types for use in libffi
7142         marshalling. Gives better diagnostics when failing to dlopen
7143         a library. Set method->klass for P/Invoke methods, too.
7144
7145 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
7146
7147         * class.c, class.h: add a MonoType this_arg to MonoClass that
7148         represents a pointer to an object of the class' type that
7149         can be used by the interpreter and later the type cache.
7150         Add best guess alignment info for valuetype objects.
7151
7152 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
7153
7154         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
7155         into MonoType: one less level of indirection and allocation and
7156         simplifies quite a bit of code. Added cache for MonoTypes that are
7157         used frequently, so that we don't need to allocate them all the time.
7158
7159 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
7160
7161         * class.c (mono_class_create_from_typedef): System.Enum is also a
7162         value type, although it does not derive from System.ValueType
7163         (maybe a bug in the ms compiler?)
7164
7165         * metadata.c (mono_type_size): return the right size for value types
7166
7167         * loader.c (mono_get_method): only initialize method header if not abstract
7168
7169         * class.c (mono_class_from_mono_type): use mono_default values. 
7170
7171 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
7172
7173         * *: use MonoClass pointers instead of <type_tokens>
7174         
7175         * class.h: new flag: metadata_inited.
7176
7177         * class.c (mono_class_metadata_init): impl.
7178         (mono_class_instance_size): impl.
7179         (mono_class_data_size): impl.
7180
7181 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
7182
7183         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
7184         MonoClass now has the name and name_space fields. 
7185         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
7186         mono_get_method () takes and optional MonoClass as argument.
7187         Removed mono_typedef_from_name() and added mono_class_token_from_name()
7188         instead that takes advantage of a map from class names to typedef
7189         tokens in MonoImage.
7190
7191 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
7192
7193         * metadata.c: zero is not a valid alignment boundary.
7194         Merge MONO_TYPE_VOID in default decoding code.
7195
7196 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
7197
7198         * image.h: merged MonoMetadata into MonoImage
7199
7200         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
7201         identify the type of elements.
7202
7203 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
7204
7205         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
7206         * cil-coff.h: split MonoMSDOSHeader and add size info.
7207         * image.c: add some consistency checks.
7208         * metadata.c: fix row size computation: one programmer
7209         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
7210         add explanation for the locator routine.
7211         Fix decoding of size in method header.
7212         
7213 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
7214
7215         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
7216         (g_concat_dir_and_file): Bring g_concat_dir_and_file
7217         function from gnome-libs.  This uses the right path separator
7218         based on the OS, and also works around a bug in some systems where
7219         a double slash is not allowed. 
7220         (default_assembly_name_resolver): Use g_concat_dir_and_file
7221         (mono_assembly_open): ditto.
7222
7223 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
7224
7225         * metadata.c (mono_metadata_signature_equal): impl.
7226
7227         * *: void is now a realy MonoType (instead of using NULL)
7228         
7229         * metadata.c (do_mono_metadata_parse_type): use
7230         mono_metadata_parse_type to parse void value.
7231
7232 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
7233
7234         * metadata.c, metadata.h: in the signature and method header store
7235         only the space required for holding the loca vars and incoming arguments.
7236
7237 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
7238
7239         * metadata.c (do_mono_metadata_parse_type): treat void like any
7240         other type (instead of assigning NULL);
7241
7242 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
7243
7244         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
7245
7246 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
7247
7248         * image.c (do_mono_image_open): added a cache for arrays.
7249
7250 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
7251
7252         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
7253         decode a single column from a row in a metadata table and changes
7254         to take advantage of it in the typedef locator (gives a nice speed up).
7255         Store offset info for function params.
7256
7257 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
7258
7259         * image.h (MONO_IMAGE_IS_CORLIB): removed 
7260
7261 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
7262
7263         * assembly.c: how could mono_assembly_close () had ever worked?
7264         * metadata.c, metadata.h: provide offset info for local vars.
7265         Implement mono_type_size () to take care of alignment as well
7266         as size (it was mono_field_type_size in cli/class.c before).
7267
7268 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
7269
7270         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
7271
7272         * assembly.h (CORLIB_NAME): set to corlib.dll
7273
7274         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
7275
7276 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
7277
7278         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
7279         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
7280         tokentype.h: massive namespace cleanup.
7281
7282 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
7283
7284         * metadata.h, metadata.c: decode exception clauses when parsing method header.
7285
7286 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
7287
7288         * metadata.c (mono_metadata_free_type): added check for type !=
7289         NULL (void) before calling mono_metadata_free_type()
7290
7291 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
7292
7293         * metadata.h, row_indexes.h: added header with enumerations to use
7294         to index in the columns from tables in metadata and to decode coded
7295         tokens: we should start using this instead of embedding magic numbers
7296         all over the code.
7297
7298 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
7299
7300         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
7301         Move metadata_t info from cli_image_info_t to MonoImage, where
7302         it's easily accessible. Changed all the uses accordingly.
7303         Added the method and class caches to MonoImage.
7304         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
7305         and mono_metadata_decode_value () signature to be more consistent
7306         with the other parse functions (and simplify code). Taken advantage
7307         of zero-length array allocation with GCC. Removed reduntant (and
7308         wrong) MonoFieldType struct and use MonoParam instead. Changed
7309         mono_metadata_parse_field_type () to use common code for parsing.
7310         Added mono_metadata_typedef_from_field () and
7311         mono_metadata_typedef_from_method () to lookup a typedef index from a
7312         field or method token.
7313         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
7314
7315 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
7316
7317         * metadata.c (mono_metadata_parse_field_type): Implement. 
7318         (do_mono_metadata_parse_type): Split engine from
7319         mono_metadata_parse_type, so that we can create smaller structures
7320         for things that just have one pointer to the MonoType (look at
7321         the MonoFieldType)
7322
7323 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
7324
7325         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
7326         as Jan Gray found out, it is incorrect. 
7327
7328 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
7329
7330         * assembly.c: Implement asssembly loading.  This loads an image
7331         and loads all the referenced assemblies.  Come to think of it, we
7332         could always do lazy loading of the assemblies. 
7333
7334         * image.c (mono_image_open): Keep loaded images in a hashtable.
7335
7336         * image.h (MonoImage): Add reference count.
7337
7338 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
7339
7340         * assembly.c (mono_assembly_open): Keep track of the file name in
7341         case the assembly has no ASSEMBLY table.
7342
7343         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
7344         from get.c here.
7345
7346 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
7347
7348         * metadata.c, metadata.h: decode local vars in method header
7349         parse function. Change callers accordingly.
7350
7351 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
7352
7353         * metadata.h, cil-coff.h: protect against multiple inclusion.
7354         Added some new structures to hold information decoded from metadata:
7355         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
7356         and relevant decoding/free functions.
7357         * metadata.c: implement decoding functions. Add warning for out of bounds
7358         index in mono_metadata_locate(). Implement mono_get_method () to retreive
7359         all the info about a method signature and invocation. Remove check on
7360         uninitialized local var in parse_mh() and fix memory leak.
7361
7362 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
7363
7364         * metadata.h: More macros.
7365
7366         * tokentype.h: New file.
7367
7368 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
7369
7370         * assembly.c: added a consistency check and initialize
7371         some structures with g_new0().
7372         * metadata.c: fixed a couple more bugs in table size computation
7373         and add other checks for out-of bound access to metadata.
7374
7375 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
7376
7377         * metatada.c: fix bugs computing table sizes. Spew a
7378         warning when index in string heap is out of bounds.
7379
7380 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
7381
7382         * metadata.h: Add a couple of macros to manipulate tokens. 
7383
7384 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
7385
7386         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
7387         cli_section_tables).
7388
7389 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
7390
7391         * metadata.c (mono_metadata_user_string): New function, provides
7392         access to the UserString heap. 
7393
7394 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
7395
7396         * metadata.c: Add inline documentation.
7397
7398 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
7399
7400         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
7401         files. 
7402
7403 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
7404
7405         * typeattr.h: New file, TypeAttribute flags. 
7406
7407 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
7408
7409         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
7410         mono_assembly_ensure_section): Section loading code.
7411         (load_section_tables): Load the sections.
7412
7413         * mono/metadata/metadata.c (mono_metadata_locate_token,
7414         mono_metadata_locate): Functions to locate the information
7415         definition given a token or a table and an index.
7416         (mono_metadata_compute_table_bases): New.
7417         (compute_size): New function to compute the sizes of the various
7418         tables.
7419
7420         * mono/metadata/metadata.h: Finish listing the different index
7421         types. 
7422
7423         * mono/metadata/pedump.c: Improve to dump new information.
7424
7425 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
7426
7427         * mono/metadata/metadata.c: Entered all the tables matching
7428         Beta2. 
7429
7430         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
7431
7432
7433
7434
7435
7436
7437