1 2004-03-13 Martin Baulig <martin@ximian.com>
3 * class.h (MonoGenericInst): Added `int count_ifaces'.
5 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
6 `ginst->count_ifaces' instead `klass->interface_count' since we
7 may get called before the vtable is created.
9 * loader.c (mono_method_get_param_names): If we're a generic
10 instance, return and don't initialize the class.
12 * reflection.c (mono_reflection_setup_generic_class): Don't call
13 ensure_runtime_vtable().
14 (mono_reflection_bind_generic_parameters): Set
15 `ginst->count_ifaces'.
17 2004-03-11 Jackson Harper <jackson@ximian.com>
21 * unicode.h: Remove unused System.Char icalls.
23 2004-03-11 Miguel de Icaza <miguel@ximian.com>
25 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
26 code when we P/Invoke the first library in Windows.Forms, instead
27 of when we first open the assembly.
29 * assembly.c: Drop the lookup from here.
31 2004-03-10 Martin Baulig <martin@ximian.com>
33 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
34 class for properties, fields and events. Finally fixes #54945.
36 2004-03-10 Martin Baulig <martin@ximian.com>
38 * metadata.c (mono_metadata_class_equal): New static function;
39 checks whether two generic instances or two generic parameters are
41 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
44 2004-03-10 Martin Baulig <martin@ximian.com>
46 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
48 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
49 argument and write it into the `reflection_info' field.
52 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
53 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
55 2004-03-09 Jackson Harper <jackson@ximian.com>
57 * char-conversions.h: use 8 bits for numeric data its all we need
58 * icall.c: numeric data is only 8 bits now.
60 2004-03-09 Martin Baulig <martin@ximian.com>
62 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
64 * class.c (init_properties, init_events): Initialize the new
67 * reflection.c (typebuilder_setup_properties): Likewise.
68 (typebuilder_setup_events): Likewise.
70 * reflection.h (MonoEventInfo): Replaced `parent with
71 `declaring_type' and `reflected_type'.
73 * icall.c (ves_icall_get_property_info): Distinguish between
74 declaring and reflected type.
75 (ves_icall_get_event_info): Likewise.
77 2004-03-09 Martin Baulig <martin@ximian.com>
79 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
80 (ves_icall_Type_GetField): Correctly set field->klass.
82 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
84 * loader.h: Fix warning.
86 2004-03-08 Miguel de Icaza <miguel@ximian.com>
88 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
89 library routine if present. Notice that it will still continue
90 executing even if its missing, for those working on the Gtk#
91 edition of Windows.Forms.
93 * assembly.c (do_mono_assembly_open): If loading the
94 System.Windows.Forms call mono_loader_wini_init.
96 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
98 * class.h: Added MonoRemoteClass struct.
99 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
100 function for MonoStrings.
101 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
102 Added internal call for getting the proxy type.
103 * marshal.c: Get the type of transparent proxies from its remote_class.
104 Added methods that generate the IL for type checks and casts:
105 mono_marshal_get_isinst, mono_marshal_get_castclass,
106 mono_marshal_get_proxy_cancast.
107 * marshal.h: Declaration of the previous new methods.
108 * object.c: Added new moethods for creating and updating MonoRemoteClass
109 instances: mono_remote_class, mono_upgrade_remote_class,
110 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
111 * verify.c: FIx transparent_proxy_fields layout.
112 * appdomain.c: Bump corlib version.
114 2004-03-04 Jackson Harper <jackson@ximian.com>
116 * icall.c: Add icall to access char conversion tables.
117 * char-conversions.h: Character conversion tables.
118 * Makefile.am: Add char-conversions.h private header file.
120 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
122 * appdomain.c (unload_thread_main): Increase unloading timeout to
123 10 sec as a temporary workaround for Nant problems.
125 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
127 * gc.c: Add checks for GC_enable and GC_disable.
129 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
130 (jaak@zd.com.pl). Fix memory corruption in String.Replace
133 2004-02-27 Martin Baulig <martin@ximian.com>
135 * reflection.c (mono_reflection_bind_generic_parameters): Take a
136 `MonoReflectionType *' instead of a `MonoType *'.
138 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
140 * gc.c (run_finalize): Avoid finalizing the object representing the
142 (finalizer_thread): Fix warning.
144 2004-02-25 Martin Baulig <martin@ximian.com>
146 * class.c (_mono_class_get_instantiation_name): Added `int offset'
147 argument for nested types.
148 (mono_class_create_generic): Added support for nested generictypes.
150 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
153 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
155 * reflection.c (method_encode_signature): Increase the minimum
156 value of `size' from 10 to 11.
157 (mono_reflection_bind_generic_parameters): Take `int type_argc'
158 and `MonoType **types' arguments instead of the `MonoArray
159 *types'; added `MonoType *nested_in'. Recursively instantiate
162 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
164 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
165 stack_overflow_ex members which are used by exception handling.
167 * appdomain.c (mono_runtime_init): Initialize the new members.
169 * gc.c (mono_gc_enable): New helper function.
170 * gc.c (mono_gc_disable): New helper function.
172 2004-02-23 Martin Baulig <martin@ximian.com>
174 * icall.c: I must have been really stupid - make it actually work
177 2004-02-23 Martin Baulig <martin@ximian.com>
179 * loader.c (method_from_memberref): Only inflate the method if
180 it's in another klass.
182 2004-02-23 Martin Baulig <martin@ximian.com>
184 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
185 (mono_class_init): If we're a generic instance and an interface,
186 compute `class->interface_id'; also create `class->interfaces'
187 here and inflate them.
189 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
191 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
193 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
195 2004-02-15 Miguel de Icaza <miguel@ximian.com>
197 * reflection.c (method_encode_code): Improved the error message
198 generated by the exception.
200 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
202 * icall.c: Martin did not do what he said in the ChangeLog for
203 2004-02-18, but put back the changes for properties and events.
204 Commenting those changes out again and adding comment to bug #54518.
206 * process.c: removed warning.
208 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
210 * marshal.c (emit_struct_conv): Print an error message instead of
211 asserting when a type does not have the StructLayout attribute.
213 2004-02-20 Martin Baulig <martin@ximian.com>
215 * reflection.c (mono_type_get_object): Also use the cache for
217 (mono_reflection_bind_generic_parameters): Always compute
220 2004-02-20 Martin Baulig <martin@ximian.com>
222 * class.h (MonoGenericMethod): Removed `klass'.
224 * class.c (mono_class_inflate_generic_method): Added `MonoClass
227 2004-02-20 Martin Baulig <martin@ximian.com>
229 * reflection.c (method_encode_methodspec): Actually use the
230 uninflated signature for the memberref.
232 2004-02-20 Martin Baulig <martin@ximian.com>
234 * class.h (MonoGenericMethod): Removed `declaring'.
236 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
237 is NULL, compute it here.
239 2004-02-20 Martin Baulig <martin@ximian.com>
241 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
243 * metadata.c (mono_metadata_generic_inst_hash): New method.
244 (mono_metadata_generic_inst_equal): New method.
246 * reflection.c (mono_reflection_bind_generic_parameters): Use the
247 `klass->image->generic_inst_cache' cache to avoid creating
248 duplicate MonoGenericInst's.
250 * class.c (mono_class_inflate_generic_type): Use the cache.
252 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
254 * object.c: fixed gc descriptor calculation for embedded valuetypes.
256 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
258 * icall.c: added Socket.WSAIoctl icall.
260 * socket-io.[ch]: implemented
261 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
263 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
265 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
267 2004-02-18 Urs C Muff <umuff@quark.com>
269 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
270 this work on PPC and other big-endian architectures.
272 * debug-mono-symfile.h: Prepended the names of all the `guint32'
273 fields with an underscore to make sure they're only accessed by
276 2004-02-18 Martin Baulig <martin@ximian.com>
278 * icall.c: Put the klass->refclass changes back for methods and
279 fields, but not for properties and events. We're currently not
280 distinguishing between DeclaringType and ReflectedType for
281 properties and events, that's what caused the regressions.
283 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
286 (mono_async_result_new): the handle can be NULL.
288 * threadpool.c: Use an event instead of a semaphore, don't initialize
289 it until needed. This saves quite a few semaphores from being created
290 when using the threadpool.
292 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
294 * object.c (mono_string_is_interned_lookup): Fix interning of long
295 strings. Fixes #54473.
297 * domain.c (ldstr_equal): Optimize if the two strings are equal.
299 * icall.c: Revert the klass->refclass changes since they introduce
300 regressions (bug #54518).
302 2004-02-18 Martin Baulig <martin@ximian.com>
304 * class.c (mono_class_init): If we're a generic instance and don't
305 come from a TypeBuilder, inflate our members here.
306 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
307 (mono_class_create_generic): New public method.
308 (mono_class_initialize_generic): Removed.
309 (get_instantiation_name): Renamed to
310 _mono_class_get_instantiation_name() and made it public.
312 2004-02-18 Martin Baulig <martin@ximian.com>
314 * class.c (mono_class_inflate_generic_type): Clear the new
315 instance's `nginst->klass' when inflating a generic instance.
316 (mono_class_is_subclass_of): Added (basic) support for generic
319 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
321 * appdomain.h, domain.c: use a MonoCodeManager instead of a
322 MonoMempool to hold compiled native code.
324 2004-02-17 Martin Baulig <martin@ximian.com>
326 * class.h (MonoDynamicGenericInst): Added `count_properties' and
329 * reflection.c (mono_reflection_generic_inst_initialize): Added
330 `MonoArray *properties' argument.
332 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
334 2004-02-17 Martin Baulig <martin@ximian.com>
336 * icall.c (ves_icall_Type_GetFields): Renamed to
337 ves_icall_Type_GetFields_internal() and added a
338 `MonoReflectionType *rtype' argument; pass it to
339 mono_field_get_object() to set the field's "reflected" type.
340 (ves_icall_Type_GetConstructors): Likewise.
341 (ves_icall_Type_GetEvents): Likewise.
342 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
343 argument; pass it to mono_method_get_object() to set the method's
346 2004-02-17 Martin Baulig <martin@ximian.com>
348 * class.h (MonoDynamicGenericInst): New type.
349 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
351 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
352 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
353 (ves_icall_MonoGenericInst_GetFields): New interncall.
355 * class.c (mono_class_from_generic): Don't call
356 mono_class_initialize_generic() if this is a dynamic instance;
357 ie. it's being created from a TypeBuilder.
358 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
359 `class->byval_arg.type'.
361 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
362 to `inflate_method' and made static.
363 (mono_reflection_inflate_field): Removed.
364 (mono_reflection_generic_inst_initialize): New public method.
366 * reflection.h (MonoReflectionGenericInst): Removed `methods',
367 `ctors' and `fields'; added `initialized'.
369 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
371 * debug-helpers.c (mono_method_full_name): Fix output for empty
374 2004-02-12 Martin Baulig <martin@ximian.com>
376 * class.h (MonoClassField): Added `MonoType *generic_type'.
378 * reflection.c (mono_image_get_fieldref_token): Added support for
379 instantiated generic types.
380 (field_encode_inflated_field): Removed.
381 (mono_image_get_inflated_field_token): Removed.
382 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
384 * reflection.h (MonoReflectionInflatedField): Removed.
386 2004-02-12 Martin Baulig <martin@ximian.com>
388 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
389 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
391 * reflection.c (mono_image_get_methodspec_token): Take a
392 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
393 (mono_image_create_token): Check whether we have a
394 `method->signature->gen_method' and call
395 mono_image_get_methodspec_token() if appropriate.
396 (inflated_method_get_object): Removed.
397 (mono_reflection_bind_generic_method_parameters): Return a
398 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
399 (mono_reflection_inflate_method_or_ctor): Likewise.
401 * reflection.h (MonoReflectionInflatedMethod): Removed.
403 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
405 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
406 for custom valuetype marshalling.
408 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
410 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
412 * icall.c: fixed WSAGetLastError_internal name.
414 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
416 * threads.c (mono_thread_attach): Allow this to be called multiple
419 * threads.c (build_wait_tids): Do not wait for ourselves.
421 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
422 appdomain list is empty.
424 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
425 memory returned by mono_string_builder_to_utf16, since it points into
426 managed memory. Thanks to Bernie Solomon for noticing this.
428 * icall.c: Add AppDomainSetup icalls.
430 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
432 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
435 * reflection.c (reflection_methodbuilder_to_mono_method): Save
436 custom attributes to the method_aux struct. Also fix array indexes etc.
438 * loader.c (mono_method_get_param_names): Make dynamic case work again.
440 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
442 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
443 (both static and runtime) and reduce startup time.
445 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
447 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
448 AsAny marshalling conversion instead of crashing.
450 * marshal.c: Fix warnings.
452 2004-02-09 Martin Baulig <martin@ximian.com>
454 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
456 * reflection.h (MonoReflectionInflatedMethod): Removed the
457 `declaring' field, it's now in the unmanaged MonoGenericMethod.
459 * reflection.c (method_encode_methodspec): Removed the `method'
460 argument; we get it from `gmethod->declaring'.
461 (inflated_method_get_object): Removed the `declaring' argument.
463 2004-02-09 Martin Baulig <martin@ximian.com>
465 * class.h (MonoGenericMethod): New type.
466 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
469 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
470 a `MonoGenericMethod *gen_method' one.
472 * class.c (mono_class_inflate_generic_type): Take an additional
473 `MonoGenericMethod * argument. This is only non-NULL if we're
474 inflating types for a generic method.
475 (mono_class_inflate_generic_signature): Renamed to
476 inflate_generic_signature() and made static; take a
477 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
478 (inflate_generic_header): Take a `MonoGenericMethod *' argument
479 instead of a `MonoGenericInst *' one.
480 (mono_class_inflate_generic_method): Likewise.
482 * reflection.c (encode_generic_method_sig): Take a
483 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
484 (method_encode_methodspec): Likewise.
485 (inflated_method_get_object): Likewise.
487 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
488 field with a `MonoGenericMethod *gmethod' one.
490 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
492 * class.h (mono_class_has_parent): add parens to expansion
495 2004-02-08 Martin Baulig <martin@ximian.com>
497 * image.h (MonoImage): Removed `generics_cache'.
499 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
500 instead of a `MonoType *' argument; removed the `inflate_methods'
501 argument. Don't inflate methods here.
503 * loader.c (find_method): If it's a generic instance, call
504 mono_class_init() on the `sclass->generic_inst->generic_type'.
506 * metadata.c (mono_type_size): Make this work on uninitialized
507 generic instances; call it on the `ginst->generic_type's class.
509 * reflection.c (mono_reflection_bind_generic_parameters): Call
510 mono_class_from_generic() to create the `ginst->klass'.
512 2004-02-08 Martin Baulig <martin@ximian.com>
514 * class.h (MonoClass): Changed type of `generic_inst' from
515 `MonoType *' to `MonoGenericInst *'.
517 2004-02-08 Martin Baulig <martin@ximian.com>
519 * icall.c (ves_icall_Type_BindGenericParameters): Just call
520 mono_type_get_object(), this is now creating a `MonoGenericInst'
521 for MONO_TYPE_GENERICINST.
522 (ves_icall_MonoGenericInst_GetParentType): Likewise.
523 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
525 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
526 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
527 (inflated_method_get_object): Added `MonoClass *refclass' argument.
528 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
531 * reflection.h (MonoReflectionInflatedMethod): Removed
532 `declaring_type' and `reflected_type'.
534 2004-02-08 Martin Baulig <martin@ximian.com>
536 * class.h (MonoGenericInst): Added `MonoType *parent' and
539 * reflection.h (MonoReflectionGenericInst): Removed `klass',
540 `parent' and `interfaces'.
542 * reflection.c (mono_reflection_bind_generic_parameters): Take a
543 `MonoType *' argument and return a `MonoType *'.
546 (ves_icall_MonoGenericInst_GetParentType): New interncall.
547 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
549 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
551 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
552 valuetype marshalling.
554 2004-02-06 Martin Baulig <martin@ximian.com>
557 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
558 (my_mono_class_from_generic_parameter): Likewise.
560 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
562 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
563 contents of the symbol files lazily.
565 * object.h (MonoThread): Add 'name' and 'name_len' fields.
567 * threads.h threads.c icall.c: New icalls for getting and setting the
570 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
572 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
573 Raise an exception when the domain is not found.
575 2004-02-03 Martin Baulig <martin@ximian.com>
577 * reflection.c (mono_image_get_methodspec_token): Use the
578 uninflated signature; fixes gen-33.
580 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
582 * gc.c threads.c: Make the finalizer thread a normal managed thread so
583 the finalizer code can use thread functionality.
585 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
586 the finalizer thread.
588 * threads.c: Make some functions more robust.
590 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
592 * metadata.h: Add new marshalling conventions.
594 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
595 stringbuilder marshalling. Fixes #53700.
597 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
599 * reflection.c (mono_image_get_type_info): Save declarative security
602 * reflection.c (mono_image_get_field_info): Handle uninitialized
603 unmanaged fields as well.
605 * appdomain.c: Bump corlib version.
607 2004-02-01 Martin Baulig <martin@ximian.com>
609 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
610 method type arguments.
612 2004-01-30 Duncan Mak <duncan@ximian.com>
614 * marshal.h: Add prototype for
615 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
617 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
620 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
622 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
623 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
625 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
627 * marshal.c (mono_marshal_get_native_wrapper): Add support for
628 custom marshalling of valuetypes.
630 * marshal.c: Fix some warnings.
632 2004-01-29 Martin Baulig <martin@ximian.com>
634 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
635 for generic method parameters.
637 * reflection.c (method_encode_methodspec): Write the uninflated
638 signature into the methodspec table.
639 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
640 is always the uninflated method.
641 (reflection_methodbuilder_to_mono_method): Copy the generic
642 parameters from the MethodBuilder into `header->gen_params'.
644 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
646 * class.c (mono_class_from_generic_parameter): Fix warning.
648 2004-01-27 Martin Baulig <martin@ximian.com>
650 * class.c (mono_class_from_generic_parameter): Don't create
651 `klass->methods' here.
653 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
655 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
656 extension since it does not work with libraries named lib<FOO>.dll.so.
658 2004-01-25 Martin Baulig <martin@ximian.com>
660 * class.c (mono_class_inflate_generic_type): Added support for
661 MONO_TYPE_GENERICINST.
663 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
664 inflate methods on open constructed types.
666 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
668 * object.c: fire ProcessExit event in the root AppDomain after running
669 Main. Fixes bug #53299.
671 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
673 * socket-io.c: include the new socket-wrappers.h header.
674 Use the wrappers instead of the unix socket functions to make the code
677 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
679 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
681 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
684 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
686 * reflection.c (mono_image_create_pefile): Handle the case when the
687 entry point is not a MethodBuilder.
689 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
690 field to ReflectionMethod since it is not allways a builder.
692 * reflection.c (type_get_fully_qualified_name): New helper function to
693 return the fully qualified name of a type.
695 * reflection.c (encode_marshal_blob): Always emit the fully qualified
696 type name for custom marshallers.
698 * reflection.c (mono_marshal_spec_from_builder): Ditto.
700 * class.c (mono_class_setup_vtable): If a parent class already
701 implements an interface, use the implementing methods from that class.
704 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
706 * threadpool.c: just return instead of ExitThread to allow for thread
709 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
711 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
712 when closing resource modules.
714 * reflection.c (mono_image_create_pefile): Handle the case when the
715 entry point is not a MethodBuilder.
717 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
718 field to ReflectionMethod since it is not allways a builder.
720 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
722 * marshal.c (mono_marshal_get_managed_wrapper):
723 mono_marshal_alloc takes native int so CONV_I
726 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
728 * reflection.c (fixup_cattrs): New function to fixup the methoddef
729 tokens in the cattr table. Fixes #53108.
731 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
733 * loader.c: don't trim ".dll" before looking up in the config file.
734 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
736 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
738 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
739 Return the module which contains the resource as well.
740 (ves_icall_System_Reflection_Module_Close): New icall.
742 * appdomain.c: Bump corlib version number.
744 * image.c (mono_image_addref): New public function.
746 * assembly.c: Call mono_image_addref.
748 * reflection.c (mono_module_get_object): Increase reference count of
751 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
754 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
755 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
756 proper exceptions on DllImport problems.
758 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
760 * class.c, metadata.c: eliminate CSIZE macro.
762 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
764 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
765 * object.h: Added async_callback field in MonoAsyncResult.
766 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
767 * verify.c: Added async_callback in MonoAsyncResult layout.
769 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
771 * reflection.c (mono_reflection_get_custom_attrs): Add support
774 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
776 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
778 (mono_marshal_method_from_wrapper): Add null pointer check.
780 2004-01-16 Martin Baulig <martin@ximian.com>
782 * debug-mono-symfile.h: Set version number to 36 and reflect
783 latest symbol writer changes.
785 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
787 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
788 multi-dimensional arrays.
789 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
790 (mono_class_from_mono_type): Use bounded_array_class_get.
792 * class.c (mono_bounded_array_class_get): New function which takes
793 a 'bounded' bool argument to distinguish vectors from one dimensional
796 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
797 bounded_array_class_get if the array has bounds.
799 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
800 Search modules loaded using AssemblyBuilder:AddModule as well.
802 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
804 * appdomain.c: increased corlib version.
805 * filewatcher.c: removed g_print.
807 (get_property_info): only allocate what is actually requested.
808 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
810 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
812 * Makefile.am: added filewatcher.[ch]
813 * filewatcher.[ch]: FileSystemWatcher runtime support.
814 * icall.c: added new FSW icalls.
816 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
818 * string-icalls.c: fix stringbuilder regression as suggested by
819 Iain McCoy <iain@mccoy.id.au>.
821 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
823 * process.c (process_read_stringtable_block): Recognize '007f' as
824 a language neutral stringtable block.
826 2004-01-12 Patrik Torstensson
828 * object.h (MonoStringBuilder) : Changed layout to support our
829 new stringbuilder class.
830 * marshal.c: Change marshalling to support the new layout of
832 * appdomain.c: increased version number because new layout of
835 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
837 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
838 assembly name as an string instead of an AssemblyName, since it is
839 easier to extract info from it.
841 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
842 the culture subdirectories too. Fixes #52231.
844 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
846 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
847 It takes 2 new parameters with an optional name for the method to look
848 for and case ignoring info.
850 * threadpool.c: removed unused variable.
852 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
854 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
855 It takes 2 new parameters with an optional name for the property to look
856 for and case ignoring info.
859 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
861 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
864 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
867 * assembly.c: escape the uri before passing it to g_filename_from_uri.
870 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
872 * reflection.c: Add support for more than one unmanaged resource.
874 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
875 in field->def_value, as done in all other cases.
877 * reflection.c (mono_reflection_get_custom_attrs): Add support for
880 * reflection.c (mono_reflection_create_runtime_class): Remove
881 errorneous assignment to klass->element_class, since it is already
882 done in mono_reflection_setup_internal_class.
884 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
886 * gc.c: added missing LeaveCriticalSection.
887 * icall.c: indented a couple of lines.
888 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
889 if we call EndInvoke inside a callback. Fixes bug #52601.
891 2004-01-07 Martin Baulig <martin@ximian.com>
893 * mono-debug-debugger.h
894 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
896 2004-01-06 Miguel de Icaza <miguel@ximian.com>
898 * appdomain.c: Use messages in NotImplementedException.
900 * exception.c (mono_get_exception_not_implemented): Now this takes
903 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
904 exception instead of g_asserting an aborting when something is not
907 Add some inline docs.
909 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
911 * reflection.h: Update after changes to object layout.
913 * reflection.c: Implement saving of unmanaged aka win32 resources.
915 * appdomain.c: Bump version number.
917 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
918 Handle missing domains gracefully.
920 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
922 * file-io.c : On Windows, there are much more invalid_path_chars.
924 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
926 * class.h, object.c: prepare for GetType () speedup.
928 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
930 * profiler.c: workaround for --profile null reference exception on
931 cygwin. Patch by Patrik Torstensson.
933 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
935 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
936 make work for unaligned access.
938 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
940 * class.c: small cleanup (class->fields [i] -> field).
941 * image.c: check address of metadata is valid.
943 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
945 * assembly.h assembly.c (mono_assembly_loaded): New public function to
946 search the list of loaded assemblies.
948 * reflection.c (mono_reflection_type_from_name): Use
949 mono_assembly_loaded instead of mono_image_loaded.
951 * reflection.c: Fix warnings.
953 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
955 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
956 is dynamic. This is needed since an assembly can contain both dynamic and
959 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
962 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
964 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
965 to store modules loaded using AddModule.
967 * reflection.c (mono_image_fill_file_table): Generalize this so it works
970 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
972 * reflection.c (mono_image_fill_export_table_from_module): New function to
973 fill out the EXPORTEDTYPES table from a module.
975 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
976 into a separate function. Also handle loaded non-dynamic modules.
978 * reflection.c (mono_image_basic_init): Fix memory allocation.
980 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
982 * assembly.c (mono_assembly_load_references): Make this public.
984 2003-12-19 Martin Baulig <martin@ximian.com>
986 * class.c (mono_class_initialize_generic): Made this static, take
987 a `MonoGenericInst *' instead of a `MonoClass *'.
988 (mono_class_from_generic): Call mono_class_initialize_generic()
989 unless we're already initialized or being called from
990 do_mono_metadata_parse_generic_inst().
992 * class.h (MonoGenericInst): Added `initialized' and
993 `init_pending' flags.
995 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
996 `mono_class_init (gklass)' or mono_class_initialize_generic()
997 here; set `generic_inst->init_pending' while parsing the
1000 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
1002 * locales.c: include string.h for memxxx prototypes
1004 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
1006 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
1007 constructor when accessing literal fields.
1009 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
1011 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1013 * reflection.c (assembly_add_resource_manifest): New function to fill
1014 the MANIFESTRESOURCE table.
1016 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
1018 * reflection.h: Update to changes in class layout.
1020 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
1021 Reenable call to mono_runtime_is_shutting_down ().
1023 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
1024 determine if the runtime is shutting down.
1026 2003-12-16 Jackson Harper <jackson@ximian.com>
1028 * icall.c: comment out call to mono_runtime_is_shutting_down to
1031 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
1033 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
1034 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
1036 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
1038 * reflection.c: move definition of swap_with_size
1039 to before its first call
1041 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
1043 * appdomain.c (mono_runtime_is_shutting_down): New public function.
1045 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
1048 * object.c: Fix warnings.
1050 * icall.c (ves_icall_Type_Get...): Only consider inherited static
1051 members if FlattenHierarchy is set.
1053 * reflection.c (mono_image_add_decl_security): New function to emit
1054 declarative security.
1056 * reflection.h reflection.c: Add support for declarative security.
1058 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1060 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
1062 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1064 * appdomain.c verify.c: Moved corlib version checking into its own
1065 function in appdomain.c since it needs to create vtables etc.
1067 2003-12-13 Patrik Torstensson <p@rxc.se>
1069 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
1070 instead of unwrapped server.
1072 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
1074 * verify.c (check_corlib): Fix field index.
1076 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
1078 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
1081 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
1083 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
1084 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
1085 cope with sizeof(size_t) != sizeof(guint32).
1087 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1089 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
1092 2003-12-10 Mark Crichton <crichton@gimp.org>
1094 * icall.c: removed the GetNonZeroBytes. We now handle this case
1097 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
1099 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
1101 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
1104 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
1106 * verify.c (check_corlib): Handle the case when the version field is
1107 initialized by a static constructor.
1109 2003-12-08 Patrik Torstensson <p@rxc.se>
1111 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
1113 2003-12-08 Martin Baulig <martin@ximian.com>
1115 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
1116 a MonoReflectionGenericParameter, also take the parameter index
1117 and name as arguments.
1118 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
1119 (ves_icall_MonoGenericParam_initialize): New interncall.
1120 (ves_icall_Type_make_byref_type): New interncall.
1122 * reflection.h (MonoReflectionGenericParam): Derive from
1123 MonoReflectionType, not just from MonoObject. Added `refobj' and
1126 * reflection.c (mono_reflection_define_generic_parameter): Create
1127 and return a new MonoReflectionGenericParam; don't initialize the
1129 (mono_reflection_initialize_generic_parameter): New public method;
1130 initializes the constraints and creates the `param->pklass'.
1132 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
1134 * reflection.h reflection.c: Use the new fields 'num_types',
1135 'num_fields' and 'num_methods' to track the number of types etc.
1137 * verify.c (check_corlib): Check corlib version number.
1139 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
1141 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
1142 function works on all methods.
1144 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
1146 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
1147 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
1148 the custom_type_info flag of the transparent proxy.
1149 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
1150 objects that supports IRemotingTypeInfo.
1151 * object.h: Added custom_type_info field in transparent proxy.
1153 2003-12-06 Martin Baulig <martin@ximian.com>
1155 * class.c (mono_class_create_from_generic): Removed.
1156 (mono_class_from_generic): Check `ginst->klass' before doing
1157 anything else. This is important to fully support "recursive"
1160 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
1161 empty `generic_inst->klass' before doing anything else.
1163 2003-12-06 Dick Porter <dick@ximian.com>
1168 * locales.c: Use C structs to access class fields. Don't do a
1169 conversion between MonoString and UChar because both are
1170 platform-endian UTF-16. Compare now takes startindex and count
1171 parameters. Add a char overload for IndexOf. Speed up the
1172 invariant string IndexOf.
1174 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
1176 * Makefile.am (monosn_LDADD): Fix parallel build.
1178 2003-12-04 Martin Baulig <martin@ximian.com>
1181 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
1182 (ves_icall_Type_make_array_type): New interncall.
1184 2003-12-04 Martin Baulig <martin@ximian.com>
1186 * locales.c: also change it in the !HAVE_ICU case.
1188 2003-12-04 Dick Porter <dick@ximian.com>
1191 * locales.c: construct_compareinfo is now in CompareInfo, not
1194 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
1196 * image.c (mono_image_load_file_for_image): Cache loaded images in the
1199 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
1202 * assembly.c (mono_assembly_load_references): Only load references
1205 * class.c (mono_class_from_name): Avoid linear search of the
1208 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
1210 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
1212 * image.h (MonoImage): Add 'field_cache' field.
1214 * loader.c (mono_field_from_token): Cache field lookups.
1216 * reflection.c (mono_module_get_object): Fix name property.
1218 * icall.c (ves_icall_get_enum_info): Update after changes to
1219 mono_metadata_get_constant_index ().
1221 * icall.c: Get rid of get_type_info icall, use a separate icall for
1222 each type property to avoid needless memory allocations. Fixes #51514.
1224 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
1225 to avoid needless binary searches.
1227 * class.c (class_compute_field_layout): Move the initialization of
1228 field->def_value to mono_class_vtable ().
1230 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
1233 * object.c (mono_object_allocate): Make it inline.
1235 * object.c (mono_object_allocate_spec): Make it inline.
1237 2003-12-02 Dick Porter <dick@ximian.com>
1239 * locales.c (create_NumberFormat): NumberFormatInfo construction.
1240 Patch by Mohammad DAMT (mdamt@cdl2000.com).
1242 2003-12-01 Dick Porter <dick@ximian.com>
1244 * threads.c: Fix signature and call in CreateMutex and
1247 2003-12-01 Dick Porter <dick@ximian.com>
1250 * locales.c: Implement string compares and searching
1252 * object.h: Add extra Thread field
1254 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
1256 * reflection.c (fixup_method): Add support for MonoCMethod.
1258 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
1260 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
1262 * reflection.c (assembly_name_to_aname): Allow extra characters in
1263 assembly names. Fixes #51468.
1265 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
1267 * exception.c (mono_exception_from_name_domain): New helper function.
1269 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
1270 exception object in the correct domain.
1272 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
1273 formatting + make a copy a the input data.
1275 * loader.c (mono_get_method_from_token): Methods which contain
1276 native code do not have entries in the ImplMap.
1278 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
1279 Thanks to Gonzalo for spotting this.
1281 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
1282 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
1284 * assembly.h (mono_assembly_load_from): Split the second part of
1285 assembly loading into a new public function.
1287 * exception.h (mono_get_exception_bad_image_format): New function.
1289 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
1291 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1292 Enumerate all modules inside a dynamic assembly. Fixes #51293.
1294 * icall.c: Add new icall for creating dynamic methods.
1296 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
1298 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
1300 * reflection.c (mono_reflection_create_dynamic_method): New icall to
1301 create a dynamic method.
1303 * reflection.c (resolve_object): New helper function.
1305 * reflection.c: Generalize ReflectionMethodBuilder and the functions
1306 which manipulate it so they can also work on dynamic methods.
1308 * reflection.c (reflection_method_builder_to_mono_method): Avoid
1309 creating the MonoReflectionMethodAux structure if it is not needed.
1311 * reflection.h verify.c: Update after changes to object layout.
1313 * reflection.c (method_builder_encode_signature): Fix compilation on
1316 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
1318 * appdomain.h: Added support for context static fields. Added static_data
1319 field to MonoAppContext and renamed thread_static_fields to a more
1320 generic special_static_fields in MonoAppDomain, since it can now contain
1321 context static fields.
1322 * domain.c: Updated hashtable name.
1323 * object.c: Replaced field_is_thread_static() for a more generic
1324 field_is_special_static() which also checks for context static attribute.
1325 In mono_class_vtable(), added support for static context fields.
1326 * threads.c: Changed methods that manage thread static fields to more
1327 generic methods so they can be reused both for thread and context static
1329 * threads.h: Declared some new methods.
1331 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
1333 * reflection.h: Update after changes to the managed types.
1335 * reflection.c (encode_custom_modifiers): New helper function.
1337 * reflection.c (method_encode_signature): Emit custom modifiers.
1339 * reflection.c (field_encode_signature): Emit custom modifiers.
1341 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
1343 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
1345 * icall.c (ves_icall_System_ValueType_Equals): New optimized
1348 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
1351 * object.c (mono_field_get_value_object): New function.
1353 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
1356 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
1358 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
1359 return a preallocated out-of-memory exception instance.
1361 * object.c (out_of_memory): Use the new function.
1363 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
1364 flag is before the custom modifiers. Fixes #49802.
1366 2003-11-16 Martin Baulig <martin@ximian.com>
1368 * class.c (mono_class_is_open_constructed_type): Implemented the
1369 MONO_TYPE_GENERICINST case.
1371 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
1373 * assembly.c (mono_assembly_fill_assembly_name): New function to
1374 fill out the MonoAssemblyName structure.
1375 (mono_assembly_open): Use the new function.
1377 * icall.c (fill_reflection_assembly_name): New helper function.
1379 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
1382 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
1384 2003-11-15 Martin Baulig <martin@ximian.com>
1386 * class.c (mono_class_is_open_constructed_type): New public
1387 function; checks whether a type is an open constructed type,
1388 ie. whether it still contains type parameters.
1389 (mono_class_inflate_generic_type): If we're a type parameter and
1390 the inflated type is also a MONO_TYPE_(M)VAR, return the original
1393 * class.h (MonoGenericInst): Added `guint32 is_open'.
1395 * loader.c (method_from_methodspec): Check whether we're an open
1396 or closed constructed type and set `ginst->is_open'.
1398 * reflection.c (mono_reflection_bind_generic_parameters): Check
1399 whether we're an open or closed constructed type and set
1401 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
1402 from open constructed types.
1404 2003-11-15 Martin Baulig <martin@ximian.com>
1406 * reflection.c (mono_reflection_bind_generic_parameters): If we're
1407 a generic instance (instead of a generic type declaration) with
1408 unbound generic parameters, bind them to our actual types.
1410 2003-11-14 Martin Baulig <martin@ximian.com>
1412 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
1414 * reflection.c (mono_reflection_bind_generic_parameters): If we're
1415 an interface type, populate `res->interfaces' with instantiated
1416 versions of all the interfaces we inherit.
1418 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
1420 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
1421 when MONO_PATH is set but doesn't contain the install dir.
1423 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1426 (ves_icall_Type_GetInterfaces): don't return an interface twice when
1427 it's also implemented in base classes. Fixes bug #50927.
1429 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
1431 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
1432 if this method is called from a finalizer. Fixes #50913.
1434 2003-11-12 Miguel de Icaza <miguel@ximian.com>
1436 * threads.c: Implement VolatileRead/VolatileWrite
1438 * icall.c: Add new icalls for VolatileRead/VolatileWrite
1440 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
1442 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
1443 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
1446 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
1447 from Peter Ross (pro@missioncriticalit.com).
1449 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
1451 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
1453 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
1455 * assembly.c (mono_assembly_load_references): Disable check because it
1456 triggers on older corlibs which lots of people have.
1458 2003-11-12 Jackson Harper <jackson@ximian.com>
1460 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
1461 load corlib.dll if mscorlib.dll is not found.
1462 * assembly.h: Remove corlib name define.
1465 * image.c: Change corlib name to mscorlib.
1467 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
1469 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
1471 2003-11-11 Miguel de Icaza <miguel@ximian.com>
1473 * appdomain.h: Added loader_optimization here to sync with the C#
1474 code, and add disallow_binding_redirects field.
1476 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
1478 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
1480 * reflection.c (mono_image_build_metadata): Fix crash on modules
1483 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
1485 * icall.c (ves_icall_get_method_info): Return callingConvention as
1488 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
1489 namespaces from the EXPORTEDTYPE table as well.
1491 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
1492 from all modules inside the assembly.
1494 2003-11-11 Martin Baulig <martin@ximian.com>
1496 * reflection.c (mono_reflection_bind_generic_parameters): Make
1497 this work for interfaces.
1499 2003-11-11 Martin Baulig <martin@ximian.com>
1501 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
1503 2003-11-11 Martin Baulig <martin@ximian.com>
1505 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
1506 "MonoInflatedMethod" and "MonoInflatedCtor".
1508 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
1510 * reflection.c (resolution_scope_from_image): Use the assembly table
1511 from the manifest module, since other modules don't have it.
1513 * debug-helpers.c (mono_type_full_name): New helper function.
1515 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
1517 * image.c (mono_image_load_file_for_image): New public function which
1518 is a replacement for the load_file_for_image in class.c.
1520 * assembly.c (mono_assembly_load_module): A wrapper for the function
1521 above which does assembly association and reference loading too.
1523 * class.c (mono_class_from_name): Call mono_assembly_load_module.
1525 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1527 * appdomain.c: not all of the attributes for the full assembly name
1528 are required and the order doesn't matter. Fixes bug #50787.
1530 2003-11-10 Dick Porter <dick@ximian.com>
1532 * locales.c: Use platform-endian UTF16
1534 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
1536 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
1538 2003-11-10 Martin Baulig <martin@ximian.com>
1541 (mono_metadata_load_generic_params): Make this actually work.
1543 * reflection.c (mono_reflection_bind_generic_parameters): If our
1544 parent is a generic instance, pass all the `types' to it, no
1545 matter whether it has the same number of type parameters or not.
1547 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
1549 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
1551 * assembly.c (mono_assembly_load_references): Move the image<->assembly
1552 assignment code to this function so it gets called recursively for all
1555 * image.c (load_modules): Remove the assembly assignment since it is
1556 now done by mono_assembly_load_references.
1558 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1559 Add 'module' argument.
1560 (mono_module_get_types): New helper function.
1561 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
1563 2003-11-08 Martin Baulig <martin@ximian.com>
1565 * class.c (mono_class_inflate_generic_method): Interface method
1566 don't have a header.
1568 * reflection.c (mono_image_get_methodspec_token): Take an
1569 additional `MonoGenericInst *' argument instead of reading it from
1570 the header; this is necessary to support interfaces.
1571 (mono_image_create_token): Pass the `MonoGenericInst *' from the
1572 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
1573 (inflated_method_get_object): Take an additional `MonoGenericInst *'
1576 * reflection.h (MonoReflectionInflatedMethod): Added
1577 `MonoGenericInst *ginst'.
1579 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
1581 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
1583 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
1585 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
1587 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
1590 (reflection_methodbuilder_from_method_builder):
1591 (reflection_methodbuilder_from_ctor_builder): New helper functions to
1592 initialize a ReflectionMethodBuilder structure.
1593 (mono_image_get_methodbuilder_token):
1594 (mono_image_get_ctorbuilder_token): New functions to emit memberref
1595 tokens which point to types in another module inside the same assembly.
1597 * reflection.c: Use the new helper functions.
1599 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
1601 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
1602 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
1604 * reflection.c (resolution_scope_from_image): Emit a moduleref if
1607 * reflection.c (mono_image_build_metadata): Emit metadata only for the
1608 current module. Emit the manifest only for the main module.
1610 * reflection.c (mono_image_create_token): Add assertion when a
1611 memberref needs to be created.
1613 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
1615 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
1616 larger buffer for the custom attribute blob. Fixes #50637.
1618 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1620 * threadpool.c: notify listener on async processing handles after
1621 invoking the async callback. Thanks to Zoltan.
1623 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
1625 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
1626 avoid code duplication.
1628 * reflection.h (MonoDynamicImage): New type which is currently unused,
1629 but will be used through the ref.emit code in place of
1630 MonoDynamicAssembly.
1632 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
1635 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
1636 a MonoDynamicImage instead of just a MonoImage.
1638 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
1639 icalls to ModuleBuilder but keep their semantics, so they will work
1640 with moduleb->assemblyb. This will change later.
1642 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
1644 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
1647 * reflection.c (mono_image_build_metadata): Avoid creation of a default
1648 main module, since it is now done by the managed code.
1650 2003-11-03 Martin Baulig <martin@ximian.com>
1652 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
1653 `ginst->klass' here.
1654 (method_encode_methodspec): Don't use the `ginst->generic_method's
1655 klass if it's a generic instance, use `ginst->klass' in this case.
1657 2003-11-03 Martin Baulig <martin@ximian.com>
1659 * reflection.c (mono_image_get_generic_method_param_info):
1660 Removed, use mono_image_get_generic_param_info() instead.
1661 (mono_image_get_type_info): Write the GenericParam table before
1662 the Method table. This is neccessary because in the GenericParam
1663 table, type parameters of the class (ie. '!0' etc.) must come
1664 before the ones from its generic methods (ie. '!!0' etc).
1666 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
1668 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
1670 2003-11-02 Martin Baulig <martin@ximian.com>
1672 * reflection.c (create_generic_typespec): Take a
1673 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
1674 the generic parameters from it.
1676 2003-11-02 Martin Baulig <martin@ximian.com>
1678 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
1679 instead of a `MonoClassField *' since we just need the type.
1680 (create_generic_typespec): New static function. Creates a
1681 TypeSpec token for a generic type declaration.
1682 (mono_image_get_generic_field_token): New static function.
1683 (mono_image_create_token): If we're a FieldBuilder in a generic
1684 type declaration, call mono_image_get_generic_field_token() to get
1687 2003-11-02 Martin Baulig <martin@ximian.com>
1690 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
1691 `MonoReflectionGenericInst *declaring_type' and
1692 `MonoReflectionGenericInst *reflected_type' fields.
1694 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
1695 `MonoReflectionGenericInst *declaring_type' and a
1696 `MonoReflectionGenericInst *reflected_type' argument instead of a
1697 single `MonoReflectionGenericInst *type' one. Set
1698 `res->declaring_type' and `res->reflected_type' from them.
1699 (mono_reflection_inflate_field): Likewise.
1701 2003-11-02 Martin Baulig <martin@ximian.com>
1703 * class.c (mono_class_setup_vtable): Don't store generic methods
1706 2003-11-02 Martin Baulig <martin@ximian.com>
1708 * reflection.h (MonoReflectionGenericInst): Added
1709 `MonoReflectionType *declaring_type'.
1711 * reflection.c (mono_reflection_bind_generic_parameters): Use
1712 `if (tb->parent)' instead of `klass->parent'.
1714 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
1716 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
1717 with an empty ASSEMBLY table.
1719 * reflection.c (mono_image_build_metadata): Avoid using the same loop
1720 variable in the inner and outer loops.
1722 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
1724 * metadata.h (mono_metadata_make_token): Put parentheses around macro
1727 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
1729 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
1730 icalls. Instead, do everything in managed code. This is needed since
1731 it is hard to restore the original domain etc. in unmanaged code in the
1732 presence of undeniable exceptions.
1734 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
1735 New icalls to push and pop appdomain refs.
1737 2003-10-31 Martin Baulig <martin@ximian.com>
1739 * class.c (inflate_generic_type): Renamed to
1740 mono_class_inflate_generic_type() and made it public.
1742 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
1745 * loader.c (mono_field_from_memberref): Also set the retklass for
1748 * fielder.c (mono_image_get_inflated_field_token): New static
1749 method; creates a metadata token for an inflated field.
1750 (mono_image_create_token, fixup_method): Added support for
1751 "MonoInflatedField".
1752 (fieldbuilder_to_mono_class_field): New static function.
1753 (mono_reflection_inflate_field): New public function.
1756 (MonoReflectionGenericInst): Added `MonoArray *fields'.
1757 (MonoReflectionInflatedField): New typedef.
1759 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
1761 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
1762 for Solaris and other platforms without s6_addr16
1764 2003-10-30 Martin Baulig <martin@ximian.com>
1766 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
1767 argument instead of two.
1768 (mono_class_inflate_generic_signature): Likewise.
1769 (inflate_generic_header): Likewise.
1770 (mono_class_inflate_generic_method): Likewise. In addition, if
1771 `ginst->klass' is set, it becomes the new `method->klass'.
1773 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
1776 * reflection.c (encode_generic_method_sig): Write a 0xa as the
1778 (method_encode_methodspec): If we have generic parameters, create
1779 a MethodSpec instead of a MethodRef.
1780 (fixup_method): Added support for "MonoInflatedMethod" and
1782 (mono_image_create_token): Added support for "MonoInflatedMethod"
1783 and "MonoInflatedCtor".
1784 (inflated_method_get_object): New static function; returns a
1785 managed "System.Reflection.MonoInflatedMethod" object.
1786 (mono_reflection_bind_generic_method_parameters): Return a
1787 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
1788 (mono_reflection_inflate_method_or_ctor): Likewise.
1789 (mono_image_get_generic_method_param_info): Initialize unused
1791 (mono_image_get_generic_param_info): Likewise.
1793 * reflection.h (MonoReflectionInflatedMethod): New public
1794 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
1795 "S.R.MonoInflatedCtor" classes.
1797 * loader.c (method_from_memberref): If we're a TypeSpec and it
1798 resolves to a generic instance, inflate the method.
1800 2003-10-28 Dick Porter <dick@ximian.com>
1802 * object.c (mono_runtime_run_main): Convert command-line arguments
1803 into utf8, falling back to the user's locale encoding to do so.
1805 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
1807 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
1810 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
1812 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
1813 up icalls at method definition time. Partially fixes #33569.
1815 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
1817 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
1818 marshalling of arrays. Fixes #50116.
1820 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
1822 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
1823 points to a vtable in the dying appdomain.
1825 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
1826 listeners into unmanaged code inside the lock.
1828 * object.c (mono_class_vtable): Turn off typed allocation in non-root
1829 domains and add some comments.
1831 2003-10-25 Martin Baulig <martin@ximian.com>
1833 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
1835 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
1837 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
1838 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
1839 currently parsing. Create the generic class and store it in
1840 `generic_inst->klass' before parsing the type arguments. This is
1841 required to support "recursive" definitions; see mcs/tests/gen-23.cs
1843 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
1844 to support recursive typespec entries.
1846 * class.c (mono_class_setup_parent): If our parent is a generic
1847 instance, we may get called before it has its name set.
1848 (mono_class_from_generic): Splitted into
1849 mono_class_create_from_generic() and mono_class_initialize_generic().
1851 2003-10-25 Martin Baulig <martin@ximian.com>
1853 * icall.c (ves_icall_Type_BindGenericParameters): Return a
1854 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
1855 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
1856 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
1858 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
1859 (create_typespec): Likewise.
1860 (mono_reflection_bind_generic_parameters): Return a
1861 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
1862 (mono_reflection_inflate_method_or_ctor): New public function.
1864 * reflection.h (MonoReflectionGenericInst): New typedef.
1866 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
1868 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
1869 inside the domain lock. Fixes #49993.
1871 * object.c (mono_class_vtable): When typed allocation is used,
1872 allocate vtables in the GC heap instead of in the mempool, since the
1873 vtables contain GC descriptors which are used by the collector even
1874 after the domain owning the mempool is unloaded.
1876 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
1878 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
1879 reflect what it does. Also invalidate mempools instead of freeing
1880 them if a define is set.
1882 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
1885 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
1886 hold the finalizable objects in this domain.
1888 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
1891 * appdomain.c (mono_domain_set): New function to set the current
1892 appdomain, but only if it is not being unloaded.
1894 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
1895 appdomain which is being unloaded.
1897 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
1898 unloading of the root appdomain.
1900 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
1901 icall to execute a method in another appdomain. Intended as a
1902 replacement for InternalSetDomain, which can confuse the code
1903 generation in the JIT.
1905 * appdomain.c (mono_domain_is_unloading): New function to determine
1906 whenever an appdomain is unloading.
1908 * appdomain.c (mono_domain_unload): New function to correctly unload
1911 * assembly.c (mono_assembly_load_references): Check that an assembly
1912 does not references itself.
1914 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
1915 domain manually, it asks the finalizer thread to do it, then waits for
1916 the result. Also added a timeout.
1918 * icall.c: Register the new icalls.
1920 * threads.h threads.c: Export the mono_gc_stop_world and
1921 mono_gc_start_world functions.
1923 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
1924 function to fill out the mempool with 0x2a.
1926 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
1928 * reflection.h (MonoReflectionMethodAux): New structure to store
1929 information which is rarely used, thus is not in the MonoMethod
1932 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
1935 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
1936 and marshalling info into the aux structure.
1938 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
1939 from the aux structure.
1941 * loader.c (mono_method_get_param_names): Retrieve the param names from
1944 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
1946 * exception.h exception.c: Add AppDomainUnloadedException && fix
1949 2003-10-21 Dick Porter <dick@ximian.com>
1952 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
1953 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
1955 2003-10-21 Martin Baulig <martin@ximian.com>
1957 * reflection.c (mono_reflection_bind_generic_parameters):
1958 `klass->parent' is NULL for interfaces.
1960 2003-10-21 Martin Baulig <martin@ximian.com>
1962 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
1964 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
1966 * exception.c (mono_exception_from_name_msg): New helper function for
1967 creating exceptions and initializing their message field.
1969 * exception.c: Simplify functions using the new helper.
1971 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
1974 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
1975 mono_raise_exception, since otherwise gcc doesn't generate the function
1976 epilog for raise_exception, confusing the stack unwinding in the JIT.
1979 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
1980 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
1983 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1985 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
1988 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
1990 * icall.c: Removed GetUninitializedObject method because
1991 AllocateUninitializedClassInstance does the same.
1993 2003-10-18 Martin Baulig <martin@ximian.com>
1995 * class.c (inflate_generic_signature): Renamed to
1996 mono_class_inflate_generic_signature() and made it public.
1997 (my_mono_class_from_generic_parameter): New static function; if we
1998 don't already have the generic parameter's MonoClass, create a
1999 very simple one which is just used internally in the runtime and
2000 not passed back to managed code.
2002 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
2004 * metadata.h (MonoMethodSignature): Moved the
2005 `MonoGenericParam *gen_params' to the MonoMethodHeader.
2006 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
2008 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
2009 ves_icall_MonoMethod_GetGenericArguments(); this is now an
2010 interncall on the MonoMethod class, not on MethodInfo.
2011 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
2012 calling mono_reflection_bind_generic_method_parameters() directly.
2014 * loader.c (mono_method_get_signature): If this is a MethodSpec;
2015 return the already computed `method->signature'.
2016 (method_from_methodspec): New static function to load a method
2017 from a MethodSpec entry.
2018 (mono_get_method_from_token): Call the new method_from_methodspec()
2019 for MethodSpec tokens.
2020 (mono_get_method_from_token): If we're a generic method, load the
2023 * reflection.c (mono_image_get_memberref_token): Allow
2024 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
2026 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
2027 (mono_image_create_token): First check whether it's a generic
2028 method (so we'd need to create a MethodSpec), then do the other
2030 (mono_reflection_bind_generic_method_parameters): Return a
2031 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
2032 called directly from the interncall.
2034 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
2036 * reflection.c (load_public_key): Move loading of the public key
2039 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
2041 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
2044 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
2045 culture, hash_alg and public_key. Fixes #49555.
2047 2003-10-17 Martin Baulig <martin@ximian.com>
2049 * class.h (MonoGenericInst): Moved this declaration here and added
2050 `MonoMethod *generic_method'.
2053 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
2054 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
2056 * metadata.c (mono_metadata_type_equal): Two types of
2057 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
2058 index; ie. don't compare the address of the `MonoGenericParam'
2060 (mono_metadata_load_generic_params): Removed the `MonoMethod
2063 * metadata.h (MonoGenericInst): Moved declaration to class.h.
2064 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
2066 * reflection.c (method_encode_signature): Encode the number of
2068 (encode_generic_method_sig): New static function.
2069 (method_encode_methodspec): New static function; creates an entry
2070 in the MethodSpec table for a generic method.
2071 (mono_image_get_methodspec_token): New static function.
2072 (mono_image_create_token): Call mono_image_get_methodspec_token()
2073 for generic methods.
2074 (mono_reflection_bind_generic_method_parameters): New public
2075 function. Instantiates a generic method.
2077 2003-10-16 Martin Baulig <martin@ximian.com>
2079 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
2080 *gen_params' here from MonoMethodHeader.
2082 * metadata.c (mono_metadata_parse_method_signature): If we have
2083 generic parameters, initialize `method->gen_params' and then set
2084 the correct `type->data.generic_param' in all the parameters.
2086 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
2088 * threads.c (mono_threads_get_default_stacksize): New function to
2089 return the default stacksize.
2091 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
2092 termination of the finalizer thread, since the previous method had
2093 race conditions. Fixes #49628.
2095 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
2096 as for the other managed threads.
2098 2003-10-16 Martin Baulig <martin@ximian.com>
2100 * class.c (inflate_generic_signature): Copy `generic_param_count'
2103 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
2106 * metadata.c (mono_metadata_parse_method_signature): Actually set
2107 the `method->generic_param_count' here.
2108 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
2110 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
2112 * object.h: Add a new field to TypedRef to simplify the implementation
2113 of the REFANY opcodes in the JIT.
2115 * icall.c: Make use of the new field.
2117 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
2120 2003-10-15 Martin Baulig <martin@ximian.com>
2122 * class.c (mono_class_from_gen_param): Renamed to
2123 mono_class_from_generic_parameter() and moved most of the
2124 functionality from mono_reflection_define_generic_parameter()
2125 here; ie. we create a "real" class here.
2126 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
2127 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
2128 previously been called.
2130 * class.h (MonoGenericParam): Moved the declaration of this struct
2131 here from metadata.h and added `MonoMethod *method'.
2133 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
2136 * loader.c (mono_get_method_from_token): If we have any generic
2137 parameters, call mono_metadata_load_generic_params() to read them
2138 from the MONO_TABLE_GENERICPAR.
2140 * metadata.c (mono_metadata_load_generic_params): Added
2141 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
2143 * metadata.h (MonoMethodSignature): Replaced
2144 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
2145 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
2147 * reflection.c (mono_reflection_define_generic_parameter): Moved
2148 most of the functionality into the new
2149 mono_class_from_generic_parameter(); set the `method' field if
2150 we're a method parameter.
2152 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
2154 * marshal.c (emit_struct_conv): if native size is 0
2157 2003-10-14 Martin Baulig <martin@ximian.com>
2159 * icall.c: The generics API has changed in the spec since it was
2160 added to System.Type; these modifications make it match the spec
2162 (ves_icall_Type_GetGenericParameters): Renamed to
2163 `ves_icall_Type_GetGenericArguments'.
2164 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
2165 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
2166 `ves_icall_MonoType_get_HasGenericArguments'.
2167 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
2168 `ves_icall_MonoType_get_IsGenericParameter'.
2169 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
2170 this is no interncall anymore.
2171 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
2172 `ves_icall_TypeBuilder_get_IsGenericParameter'.
2174 2003-10-14 Martin Baulig <martin@ximian.com>
2176 * reflection.c (mono_reflection_bind_generic_parameters): Also
2177 inflate generic methods if we're reading the class from IL.
2179 2003-10-13 Martin Baulig <martin@ximian.com>
2181 * reflection.c (mono_reflection_define_generic_parameter): This
2182 method isn't called directly from the icall anymore; take a
2183 `MonoReflectionAssemblyBuilder *' so we can use this for type and
2184 method generic parameters.
2185 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
2186 (method_builder_encode_signature): Encode generic parameters.
2187 (mono_image_get_method_info): Write generic params to the
2188 MONO_TABLE_GENERICPARAM table.
2190 * reflection.h (MonoReflectionMethodBuilder): Added
2191 `MonoArray *generic_params'.
2193 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
2195 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
2196 wrapper for mono_reflection_define_generic_parameter().
2197 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
2199 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
2201 * marshal.h: Add missing function to fix build.
2203 * marshal.c (mono_marshal_get_native_wrapper): Add support for
2204 the SetLastError pinvoke attribute.
2206 * marshal.c (mono_marshal_set_last_error): New helper function called
2207 by the generated code.
2209 * marshal.c (mono_mb_emit_branch): New helper function.
2211 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
2213 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
2214 classes as parameters and return values of delegates. Fixes #29256.
2216 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
2218 * locales.c: use gint32 in non HAVE_ICU case
2220 2003-10-11 Martin Baulig <martin@ximian.com>
2222 * mono-debug.c (mono_debug_add_method): Added a workaround for
2225 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
2227 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
2228 delegates passed to native code must use the STDCALL calling
2229 convention. Fixes #35987.
2231 2003-10-10 Martin Baulig <martin@ximian.com>
2233 * class.c (inflate_generic_type): If we're inflating for a generic
2234 type instance (and not for a generic method), return
2235 MONO_TYPE_MVAR unchanged.
2237 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2239 * string-icalls.c: Join ignores null strings in the source array.
2240 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
2241 * threads.c: GetAvailableTheads is slightly more accurate.
2243 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
2245 * threads.h threads.c : add mono_threads_set_default_stacksize
2246 and pass default to CreateThread calls.
2248 2003-10-09 Dick Porter <dick@ximian.com>
2252 * locales.c: Internal calls for constructing CultureInfo and
2253 related objects from libicu (if its available.)
2255 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
2257 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
2259 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2261 * threadpool.c: added an argument to async_invoke_thread that is the
2262 item to process, pass the MonoAsyncResult to the thread start function
2263 when creating a new thread. This way we don't need to acquire any lock
2264 when we're creating a new thread. Readded a semaphore for faster
2265 response times (instead of that Sleep i added).
2267 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
2269 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
2270 get daylight change dates better on Windows, fix handling
2271 of platforms without tm_gmtoff.
2273 2003-10-06 Martin Baulig <martin@ximian.com>
2275 * class.c (inflate_generic_method): Renamed to
2276 mono_class_inflate_generic_method() and made public.
2277 (mono_class_init): Don't inflate the generic methods here.
2278 (mono_class_from_generic): Added `gboolean inflate_methods'
2279 argument. Inflate the methods here.
2281 * loader.c (mono_method_get_param_names): Ignore instances of
2282 generic types for the moment.
2284 * reflection.c (fixup_method): Added support for inflated methods.
2285 (mono_image_create_token): Use mono_image_get_methodref_token()
2286 for inflated methods.
2287 (mono_custom_attrs_from_param): Ignore instances of generic types
2289 (mono_reflection_bind_generic_parameters): New public function.
2290 Moved all the functionality from
2291 ves_icall_Type_BindGenericParameters() here and added support for
2293 (mono_reflection_define_generic_parameter): Initialize
2294 `klass->methods' here.
2296 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
2297 functionality into mono_reflection_define_generic_parameter().
2298 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
2299 TypeBuilder, return that TypeBuilder.
2301 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2303 * appdomain.c: removed mono_delegate_semaphore.
2306 (mono_thread_pool_add): moved hash table creation inside and the thread
2307 creation outside of the critical region.
2308 (mono_thread_pool_finish): removed obsolete code.
2309 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
2310 continue or exit the thread depending on the queue.
2312 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
2314 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
2315 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
2316 handle more bool marshalling options
2318 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
2320 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
2321 arrays of structs. Also add a more descriptive error message when
2322 a structure member is marshalled as LPArray.
2324 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
2326 * marshal.c (mono_marshal_get_native_wrapper): Add support for
2327 marshalling arrays of complex types. Fixes #29098. Also remove an
2328 usused and incomplete function.
2330 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
2332 * gc.c: report heap_size - free_bytes as total memory allocated
2335 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
2337 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
2338 fix timezone handling problems on Windows.
2340 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
2341 asserts when the year is outside the range handled by ms the functions.
2343 * class.c (setup_interface_offsets): If the class is an interface,
2344 fill out its interface_offsets slot.
2346 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2348 * threadpool.c: mark threadpool threads as background.
2350 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
2352 * decimal.c - define DECINLINE to nothing if not using GCC
2354 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
2356 * assembly.c: More refcount fixes.
2358 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2360 * string-icalls.c: if we're not trimming, return the same string.
2361 When not splitting, don't create a new string.
2363 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2366 (mono_image_open): increment the ref_count inside the critical section.
2368 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
2370 * image.c (mono_image_open): Fix reference counting bug.
2372 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
2374 * marshal.c (mono_marshal_type_size) struct alignment changed for
2375 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
2376 64bits. Avoid leak in mono_marshal_get_native_wrapper when
2377 mono_lookup_pinvoke_call throws.
2379 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
2381 * reflection.c (mono_reflection_parse_type): Fix #49114.
2383 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
2384 temporary workaround for cygwin header problem.
2386 * object.c (mono_object_isinst): Synchronize this with the code
2387 generated by the JIT for casts.
2389 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
2391 * reflection.c (encode_type): Fix #38332.
2393 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
2395 * marshal.c (mono_marshal_method_from_wrapper): New function to return
2396 the original method from the wrapper method.
2398 2003-09-25 Martin Baulig <martin@ximian.com>
2400 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
2401 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
2402 (ves_icall_Type_get_IsGenericInstance): New interncall.
2404 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
2406 * object.c: fix cast warning in big endian code.
2408 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
2410 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
2412 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2414 * assembly.c: don't call check_env from mono_assembly_load. It's
2415 already done once in mono_assemblies_init and may cause headaches when
2416 multiple threads are loading assemblies.
2418 2003-09-19 Martin Baulig <martin@ximian.com>
2420 * reflection.c (mono_reflection_define_generic_parameter): Don't
2421 allocate `klass->methods', set `klass->flags' to
2422 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
2424 2003-09-18 Martin Baulig <martin@ximian.com>
2426 * class.c (mono_class_init): Don't create `class->methods' if it's
2427 already initialized.
2429 * metadata.c (mono_metadata_load_generic_params): Make this
2432 * reflection.c (mono_reflection_define_generic_parameter): Set
2433 parent class and interfaces from the constraints.
2435 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
2436 to keep this struct in sync with the declaration in TypeBuilder.cs.
2438 2003-09-17 Martin Baulig <martin@ximian.com>
2440 * metadata.h (MonoType): Replaced the data's `int type_param'
2441 field with `MonoGenericParam *generic_param'.
2442 (MonoGenericParam): Added `MonoClass *klass'.
2444 * class.c (mono_class_from_gen_param): Removed the
2445 `MonoImage *image' and `int type_num' arguments.
2447 * metadata.c (mono_metadata_parse_generic_param): New static
2448 method; creates a MonoGenericParam which just contains the index.
2449 (do_mono_metadata_parse_type): Call
2450 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
2453 * reflection.c (mono_image_typedef_or_ref): Generic type
2454 parameters may be in the same assembly, but never use a typedef
2456 (mono_reflection_define_generic_parameter): We're now creating a
2457 "real" class for the type parameter; it's now safe to call
2458 mono_class_from_mono_type() on the class'es type, it'll do the
2461 2003-09-16 Martin Baulig <martin@ximian.com>
2463 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
2464 `symfile->range_entry_size' and `symfile->class_entry_size' here;
2465 the `symfile' data structure must be fully initialized before it
2466 gets added to the table.
2468 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
2470 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
2472 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
2473 class init trampolines.
2475 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
2477 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
2478 to the built-in profiler to turn off time and allocation profiling
2481 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
2483 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
2486 * debug-helpers.c (mono_method_full_name): Print the wrapper type
2487 in human readable form.
2489 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
2491 * reflection.c icall.c: Fixed warnings.
2493 * image.c (load_class_names): Use a temporary hash table to hold the
2494 namespaces in order to avoid doing many string comparisons.
2496 * image.h: Fix typo.
2498 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
2499 Pass NULL instead of g_direct_equal to the GHashTable constructor
2500 since the NULL case is short-circuited inside g_hash_table_lookup,
2501 leading to better performance.
2503 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
2504 obtain the first custom attribute for a given index. Depends on the
2505 CustomAttribute table being sorted by the parent field.
2507 * reflection.c (mono_custom_attrs_from_index): Use the new function
2508 for better performance.
2510 2003-09-07 Martin Baulig <martin@ximian.com>
2512 * class.c (mono_class_init): If we're a generic instance, inflate
2513 all our methods instead of loading them from the image.
2514 (mono_class_from_generic): Set `class->methods = gklass->methods'.
2516 2003-09-07 Martin Baulig <martin@ximian.com>
2518 * mono-debug-debugger.c: Added support for constructors.
2520 2003-09-06 Martin Baulig <martin@ximian.com>
2522 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
2525 * reflection.c (mono_reflection_setup_generic_class): Call
2526 ensure_runtime_vtable() to create the vtable.
2528 2003-09-05 Martin Baulig <martin@ximian.com>
2530 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
2533 2003-09-04 Martin Baulig <martin@ximian.com>
2535 * reflection.c (mono_reflection_define_generic_parameter): Generic
2536 parameters start with zero.
2538 2003-09-04 Martin Baulig <martin@ximian.com>
2540 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
2542 * reflection.h (MonoReflectionGenericParam): New typedef.
2543 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
2544 the generic parameters from the managed TypeBuilder.
2546 * reflection.c (mono_reflection_define_generic_parameter): New function.
2547 (mono_reflection_create_runtime_class): Encode generic parameters.
2548 (mono_reflection_setup_generic_class): New function; this is
2549 called after adding adding all generic params to the TypeBuilder.
2550 (encode_type): Added MONO_TYPE_VAR.
2552 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
2554 * class.h class.c (mono_class_needs_cctor_run): Moved this method
2557 * assembly.h assembly.c: Moved the AOT loading code into an assembly
2560 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
2562 * reflection.h reflection.c class.h class.c: Delete duplicate
2563 definition of mono_type_get_name () from reflection.c and export the
2566 * class.c: Class loading fixes from Bernie Solomon
2567 (bernard@ugsolutions.com).
2569 * reflection.c: Endianness fixes from Bernie Solomon
2570 (bernard@ugsolutions.com).
2572 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
2574 * assembly.h assembly.c: Define a file format version for AOT
2577 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
2579 * appdomain.h (MonoJitInfo): New field to determine whenever the
2580 code is domain neutral.
2582 2003-08-31 Miguel de Icaza <miguel@ximian.com>
2584 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
2586 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
2588 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
2589 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
2590 Avoid caching the result since strings must be domain specific. Fixes
2593 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
2595 * marshal.c (mono_marshal_init): Make this callable multiple times
2596 since it is hard to find a correct place to call it.
2598 * object.c (mono_runtime_class_init): Execute static constructors in
2599 the correct appdomain.
2601 * image.c (build_guid_table): Handle the case when multiple images have
2604 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2606 * icall.c: added a couple of icalls for System.Web.
2608 2003-08-28 Martin Baulig <martin@ximian.com>
2610 * icall.c (ves_icall_Type_BindGenericParameters): Use
2611 `klass->generic_inst' instead of `&klass->byval_arg' in the
2612 mono_type_get_object() call. The returned type must be
2613 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
2615 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
2619 * object.c (mono_class_proxy_vtable): Make it thread safe.
2621 * pedump.c: Fix warning.
2623 * object.c appdomain.h: Get rid of metadata_section.
2624 It is no longer needed and it was causing deadlocks with domain->lock.
2626 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
2628 2003-08-26 Martin Baulig <martin@ximian.com>
2630 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
2632 2003-08-26 Martin Baulig <martin@ximian.com>
2634 * pedump.c (main): Call mono_metadata_init(),
2635 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
2636 and mono_loader_init().
2638 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
2640 * loader.h: Add missing include to fix build.
2642 * image.h: mono_image_load_references is no more.
2644 * assembly.c: Reworked assembly loading to make it really thread safe.
2645 After these changes, the assembly returned by mono_assembly_open is
2646 fully initialized, i.e. all its references assemblies are loaded.
2648 * assembly.c (mono_image_load_references): Renamed to
2649 mono_assembly_load_references, and made private, since clients no
2650 longer need to call it.
2652 * class.c: Removed calls to mono_assembly_load_references, since it was
2653 a source of deadlocks.
2655 * loader.h loader.c class.h class.c: Protect data structures using a
2656 new lock, the loader lock.
2658 * class.c (mono_class_setup_vtable): Create temporary hash tables and
2659 GPtrArrays only when needed.
2661 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
2662 into empty structures by mcs. Fixes pinvoke7.cs.
2664 * domain.c (mono_init): Call a new initialization function.
2666 * appdomain.c (mono_runtime_init): Call the new initializer function
2667 of the marshal module.
2669 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
2670 inserted into empty structures by mcs. Fixes pinvoke7.cs.
2672 * marshal.h marshal.c: Added locks around the wrapper caches to make
2673 this module thread safe.
2675 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
2676 this argument. Fixes pinvoke1.exe.
2678 2003-08-25 Lluis Sanchez <lluis@ximian.com>
2680 * object.h: Added call_type field to MonoMethodMessage and the corresponding
2681 enumeration of values. Removed fields to store remote call output values in
2682 MonoAsyncResult. Not needed any more.
2683 * object.c: Initialize call_type and async_result fields in mono_message_init.
2684 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
2685 dispatching the message.
2686 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
2687 async call to finish. To do it use a message with EndInvoke call type.
2689 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
2691 * loader.h loader.c (mono_method_hash_marhal_info): New function which
2692 determines whenever a method has marshalling info.
2694 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2696 * assembly.c: fix the build on windows.
2698 2003-08-22 Lluis Sanchez <lluis@ximian.com>
2700 * object.cs: Fixed bug #47785.
2702 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
2704 * string-icalls.c (StringReplace): If their are no occurances of
2705 the old string found return a reference to the supplied
2706 string. This saves some memory and matches MS behavoir.
2708 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2710 * socket-io.c: fixed compilation for systems that define AF_INET6
2711 and don't define SOL_IP/SOL_IPV6.
2713 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
2715 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
2716 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
2718 * rawbuffer.c rawbuffer.h: Make this module thread safe.
2720 * domain.c: Make this module thread safe.
2722 * domain.c (mono_init): Call new initialization function.
2724 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
2725 reference types too. Fixes #38812.
2727 * image.c (mono_image_init): Fixed warnings.
2729 * class.c (mono_class_from_typeref): Handle assembly load failure
2732 * appdomain.c (add_assemblies_to_domain): Handle the case when
2733 the references of an assembly are not yet loaded.
2735 * metadata.c image.c assembly.c: Moved initialization of global
2736 variables to a separate function called at startup since lazy
2737 initialization of these variables is not thread safe.
2739 * image.c assembly.c: Made this module thread safe by adding locks in
2740 the appropriate places.
2742 * domain.c (mono_init): Call the new initialization functions of the
2745 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
2747 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
2748 make a direct call. It is proxy's work to make the call asynchronous.
2749 mono_delegate_end_invoke(): If the targe is a proxy, just collect
2751 * object.cs: mono_method_call_message_new(): read AsyncResult and
2752 state object from parameters list, if this info is requested.
2753 * object.h: Added fields to store remote call output values in
2754 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
2756 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
2758 * object.h: add needed fields to MonoThread.
2759 * threads.c, threads.h: allow registering a function to cleanup data
2760 allocated per thread by the JIT.
2762 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
2764 * loader.h: portability fix by Bernie Solomon
2765 * <bernard@ugsolutions.com>.
2767 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
2769 * reflection.h reflection.c (mono_param_get_objects): Changed this to
2770 return a MonoArray. This simplifies the code and also ensures that
2771 the cache allways contains an object reference as a value.
2773 * icall.c (ves_icall_get_parameter_info): Simplified using the new
2776 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2778 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
2779 fixes a problem with byte ordering when getting the address family for
2782 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
2784 * .cvsignore: Added monosn.
2786 * reflection.h reflection.c loader.c: Added support for parameter
2787 marshalling to dynamically created types. Fixes #47295.
2789 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
2791 * rand.c: remove useless warnings.
2793 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
2795 * class.c: implemented ldtoken for methods and fieldrefs.
2797 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2799 * threadpool.c: when mono_async_invoke was called, no one took care of
2800 monitoring the queue. So if the method invoked took some time and we
2801 got new async invoke requests after 500 ms (the thread created waited
2802 that long in WaitForSingleObject), the new async invoke was not called
2803 until the previous one finished.
2805 This is fixed now. Thanks to Totte for helping with it.
2807 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2809 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
2811 2003-08-11 Martin Baulig <martin@ximian.com>
2813 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
2815 2003-08-06 Martin Baulig <martin@ximian.com>
2817 * mono-debug-debugger.c: Added support for static fields,
2818 properties and methods.
2820 2003-08-06 Martin Baulig <martin@ximian.com>
2822 * mono-debug-debugger.c: Don't store the MonoString's vtable to
2823 make this work for applications with multiple application domains.
2825 2003-08-04 Martin Baulig <martin@ximian.com>
2827 * mono-debug-debugger.c: Completely reworked the type support; the
2828 most important thing is that we're now just using one single
2829 `MonoType' instance per type.
2831 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
2833 * mono-endian.h, mono-endian.c, icall.c: Added icall
2834 ves_icall_System_Double_AssertEndianity to assert double word endianity
2835 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
2837 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
2839 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
2840 support, icalls and fixes.
2842 2003-07-31 Miguel de Icaza <miguel@ximian.com>
2844 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
2845 classes that are a punctuation character in .NET is not the same a
2848 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
2850 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
2852 2003-07-29 Miguel de Icaza <miguel@ximian.com>
2854 * icall.c: Add new MemCopy internalcall.
2855 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
2856 Simplified code; It is not necessary to handle all the cases here,
2857 as the C# code takes care of it. Only handle the case of the name
2858 resource embedded into the assembly.
2860 Changed signature to return the data pointer and the size of the
2863 2003-07-26 Miguel de Icaza <miguel@ximian.com>
2865 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
2866 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
2868 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
2870 * socket-io.c: ignore EINTR error in select.
2872 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
2874 * class.h, class.c: removed unused subclasses field in MonoClass.
2876 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
2878 * icall.c: improve fix of get_base_definition(). If the parent class
2879 doesn't have the mehod, look at the parent of the parent.
2880 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
2881 to check if a parameter is an in or out parameter
2882 (PARAM_ATTRIBUTE_IN is not set by default).
2883 mono_method_return_message_restore(): Use mono_class_value_size to
2884 get the size of a value type. mono_type_stack_size (parameterType)
2885 does not return the correct value if parameterType is byRef.
2886 mono_load_remote_field(), mono_load_remote_field_new(),
2887 mono_store_remote_field(), mono_store_remote_field_new():
2888 raise exception if the remote call returns an exception.
2890 2003-07-28 Martin Baulig <martin@ximian.com>
2892 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
2893 method. This is a wrapper around mono_runtime_invoke() which
2894 boxes the instance object if neccessary.
2896 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
2898 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
2899 metadata.h, row-indexes.h, verify.c: first cut of generics support.
2901 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
2903 * icall.c: disable mcs bug workaround.
2905 2003-07-21 Miguel de Icaza <miguel@ximian.com>
2907 * object.c (mono_runtime_class_init): Take the metadata_section
2908 mutex before obtaining the domain mutex.
2910 * appdomain.h: Added definition of metadata_section mutex here.
2912 * object.c: define metadata_mutex here.
2914 2003-07-24 Ravi Pratap <ravi@ximian.com>
2916 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
2919 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
2921 * reflection.c: Fix bug #46669
2923 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2928 * object.h: fill in the type name for TypeLoadException.
2930 2003-07-23 Ravi Pratap <ravi@ximian.com>
2932 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
2933 relationship between TypeBuilders while compiling corlib) and bug
2934 45993 (Array types returned from the runtime while compiling
2935 corlib were from the loaded corlib).
2937 2003-07-22 Martin Baulig <martin@ximian.com>
2939 * mono-debug-debugger.c: Reworked the type support a bit more;
2940 distinguish between types and classes.
2942 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
2944 * icall.c: add IsArrayImpl icall.
2946 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
2948 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
2949 initializing real_size only once. Also fix bug #46602.
2951 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
2953 * object.c: Renamed mono_metadata_section to metadata_section.
2955 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
2957 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
2958 empty array if the type is an array. Fixed.
2959 ves_icall_MonoMethod_get_base_definition: if the base method
2960 is abstract, get the MethodInfo from the list of methods of
2962 * reflection.c: ParameterInfo.PositionImpl should be zero-based
2963 and it was 1-based. Fixed in mono_param_get_objects.
2965 2003-07-20 Martin Baulig <martin@ximian.com>
2967 * mono-debug.h: Set version number to 31.
2968 (mono_debug_init): Added `MonoDomain *' argument.
2970 * mono-debug-debugger.c: Reworked the type support; explicitly
2971 tell the debugger about builtin types; pass the `klass' address to
2974 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
2976 * image.c: Allow new metadata tables to be loaded without a
2977 warning. Also update the warning message to give the new constant value.
2979 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
2981 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
2982 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
2983 array type representation changes.
2985 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
2987 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
2988 on Environment.Exit () call.
2990 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
2992 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
2993 requires a matching corlib.
2995 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
2997 * Changelog: My editor decided to add a CR to each line. Sorry about that.
2998 Committed again without the CRs.
3000 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
3002 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
3003 getting it from the "this" socket instance. Did not work
3004 if the socket is a subclass of Socket.
3005 Also fixed bug #35371.
3007 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
3009 * metadata.c: fixed size for TypedByRef.
3010 * loader.c: when searching for a method, consider the vararg amrker.
3011 * unicode.c, decimal.c: constify some arrays.
3013 2003-07-15 Dick Porter <dick@ximian.com>
3015 * socket-io.c: Fixed compilation for gcc < 3.2.
3017 Fixed compilation for machines that don't have AF_INET6 (thanks to
3018 Bernie Solomon <bernard@ugsolutions.com> for that part.)
3020 Fixed compile warnings.
3022 Fixed formatting and line endings.
3024 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
3027 * socket-io.c: Added IPv6 support.
3029 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
3031 * class.c (mono_class_is_assignable_from): New function to implement
3032 the is_assignable_from logic. Used by mono_object_isinst,
3033 Type::IsAssignableFrom () and the interpreter.
3035 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
3036 Object, even interfaces.
3038 * object.c (mono_object_isinst): Implement in terms of
3041 * icall.c (ves_icall_type_is_assignable_from): New icall.
3043 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
3045 * domain.c (foreach_domain): fix compiler warning.
3047 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
3049 * image.c (load_metadata_ptrs): use g_strndup because strndup is
3050 not available on all plattforms
3052 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
3054 * image.h image.c: Store the metadata version string in MonoImage.
3055 * icall.c: New icall to retrieve the image version.
3056 * reflection.c (create_dynamic_image): Fill in the image version field
3057 * reflection.c (build_compressed_metadata): Use the image version
3058 from the image structure.
3060 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3062 * appdomain.c: modified comment.
3063 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
3064 That will be its last iteration when mono_gc_cleanup is called from
3065 mono_runtime_cleanup and before the domain is unloaded.
3069 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
3071 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
3074 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3076 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
3077 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
3078 Bernie Solomon <bernard@ugsolutions.com>.
3080 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
3082 * object.c, object.h: provide mono_object_new_fast() for faster
3083 allocation in some special cases.
3085 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
3087 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
3088 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
3090 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
3092 * threadpool.c: fix leaks.
3094 2003-07-01 Dick Porter <dick@ximian.com>
3096 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
3097 using MonoGHashTables. Fixes threadpool bug posted to list.
3099 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3101 * image.h, image.c: added support to load an assembly from a byte array.
3102 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
3103 assembly bundle support.
3105 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
3107 * threadpool.c (mono_thread_pool_add): keep a reference to the
3108 AsyncResult to prevent GC
3110 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
3112 * class.c: leak fix.
3114 2003-06-25 Dick Porter <dick@ximian.com>
3116 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
3117 for the async object, the WaitHandle object will close the handle.
3120 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
3122 * class.c: in mono_array_class_get (), lookup from the hash with the
3123 same type we insert: this works around a bug in
3124 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
3125 lluis. The real fix will have to wait for after the release.
3127 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
3129 * icall.c: fix memory leak when getting type members.
3131 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
3133 * reflection.c: added more pubtoken special cases.
3135 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
3137 * class.c: handle field offset correctly when class size
3138 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
3140 2003-06-20 Martin Baulig <martin@ximian.com>
3142 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
3145 2003-06-20 Martin Baulig <martin@ximian.com>
3147 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
3149 2003-06-20 Martin Baulig <martin@ximian.com>
3151 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
3152 just distinguish between variables in registers and variables at
3153 an offset relative to a register.
3155 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3157 * icall.c: #ifdef out latest changes until mcs is fixed.
3159 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3161 * icall.c: return members in metadata order.
3163 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
3165 * icall.c: avoid infinite loop in GetTimeZoneData.
3167 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
3169 * icall.c: added Marshal.Prelink/All icalls.
3171 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
3173 * object.c, object.h: fix warnings and do some overflow checking
3174 when creating arrays.
3176 2003-06-17 Dick Porter <dick@ximian.com>
3179 * file-io.c: File attributes need to be tweaked slightly when
3180 passed from the managed to the w32 world.
3182 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
3183 * profiler.h profiler-private.h profiler.c: Rework last patch
3184 based on suggestion by Paolo.
3186 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
3188 * profiler.h profiler-private.h profiler.c: Added infrastructure for
3189 instruction level coverage data collection.
3190 * profiler.h profiler.c (: Added new callback function which can be
3191 used by the profiler to limit which functions should have coverage
3193 * profiler.c (mono_profiler_load): Call g_module_build_path to
3194 generate the file name of the profiler library.
3196 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3198 * profiler.c, profiler.h, profiler-private.h: added basic block
3199 coverage profiling API.
3201 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
3203 * reflection.c (mono_reflection_create_runtime_class): Add support
3204 for events in dynamically generated code.
3206 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
3209 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
3211 * icall.c: when getting timezone info, return reasonable values if we
3212 can't get the actual data.
3214 2003-06-14 Dick Porter <dick@ximian.com>
3216 * threads.c (start_wrapper): Remove the reference to the thread
3217 object in the TLS data, so the thread object can be finalized.
3218 This won't be reached if the thread threw an uncaught exception,
3219 so those thread handles will stay referenced :-( (This is due to
3220 missing support for scanning thread-specific data in the Boehm GC
3221 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
3223 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
3225 * reflection.c: ensure streams and tables are first allocated with
3226 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
3228 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3230 * icall.c: fixed GetElementType for byrefs (bug# 44792).
3232 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
3234 * reflection.c (mono_reflection_create_runtime_class): Add support for
3235 properties to dynamically created classes.
3236 * reflection.c: Fix a few places where non-MonoObjects were inserted
3237 into the tokens hashtable.
3239 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
3241 * object.c: some support to handle out of memory exceptions.
3243 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
3245 * marshal.c (mono_marshal_get_native_wrapper): support reference
3248 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
3250 * object.h, object.c: more portability stuff from Bernie Solomon.
3251 Unexport mono_object_allocate(). Added mono_object_unbox ().
3252 Set exitcode when an unhandled exception is thrown.
3254 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
3256 * marshal.c (mono_marshal_get_native_wrapper): use custom
3257 marshaler for return types.
3259 2003-06-10 Dick Porter <dick@ximian.com>
3261 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
3262 ip_mreq is available
3264 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
3266 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
3267 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
3268 by Bernie Solomon <bernard@ugsolutions.com>.
3270 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
3272 * gc.c (mono_gc_init): Avoid error message on shutdown when
3273 GC_DONT_GC=1 is used.
3275 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
3276 New icall to return the GUID of a module.
3278 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
3280 * class.c: ensure instance size always includes the parent's size
3281 even whem class size is set explicitly (fixes bug#44294).
3283 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
3285 * profiler.h, profiler.c: made the simple profiler thread-safe,
3286 get more accurate timing info. Allow the loading of an
3287 externally-developed profiler module.
3289 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
3291 * marshal.c (mono_marshal_get_native_wrapper): improved
3292 class/byref arguments.
3293 (mono_marshal_get_native_wrapper): better string marshaling support.
3295 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
3297 * class.c: ensure .pack and .size are handled correctly and
3298 simplified layout of static fields.
3300 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
3303 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
3305 * loader.c (mono_lookup_pinvoke_call): look for modules in the
3306 current directory (fix bug 44008)
3308 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
3310 * marshal.c (mono_marshal_get_native_wrapper): started support for
3312 (mono_delegate_to_ftnptr): consider marshalling specifications
3314 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
3316 * reflection.c, reflection.h: emit custom marshal info.
3318 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3320 * object.c: free the GError.
3321 * icall.c: added CloseEvent_internal.
3323 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
3326 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
3328 * loader.c (mono_method_get_signature): Add support for dynamic
3331 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
3333 * reflection.c: fixed bug #43905.
3335 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
3337 * class.c, domain.c, icall.c, metadata.h, object.h: support for
3338 handling TypedReference and ArgIterator.
3339 * loader.c, loader.h: added function to get signature at call site.
3341 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
3343 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
3344 data readonly. Buglets and warning fixes. Some MethodSpec support.
3346 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
3348 * class.h, class.c, object.c: remove relative numbering support.
3350 2003-05-26 Miguel de Icaza <miguel@ximian.com>
3352 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
3353 free the string, until we get a chance to fix Gtk#
3355 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3357 * marshal.c: revert last patch.
3359 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
3361 * icall.c: updates for new mono_class_vtable() not calling
3362 the type constructor anymore.
3364 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
3366 * object.h, object.c: separate vtable creation from type
3367 initialization. Make running the .cctor thread safe.
3369 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
3371 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
3373 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
3375 * loader.c (mono_get_method): consider calling convention
3377 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
3379 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
3380 to return the invisible global type for a module.
3382 * reflection.c (mono_image_build_metadata): Emit global fields too.
3384 2003-05-20 Peter Williams <peterw@ximian.com>
3386 * loader.c (mono_lookup_internal_call): Add a few newlines.
3388 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
3390 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
3393 * appdomain.c (set_domain_search_path): Recalculate search path when
3394 AppDomainSetup.PrivateBinPath changes.
3396 * object.c (mono_class_compute_gc_descriptor): It turns out some
3397 parts of the class libs (like System.Thread) holds pointers to
3398 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
3399 to treat native int a pointer type here.
3401 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
3403 * appdomain.h, domain.c: add hashtable for jump target resolution.
3405 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
3407 * reflection.h reflection.c icall.c: Added new icalls
3408 GetManifestResourceInfoInternal, GetModulesInternal and support
3411 2003-05-16 Dick Porter <dick@ximian.com>
3415 * file-io.c: Implement System.IO.MonoIO::GetTempPath
3417 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
3419 * object.c: mono_store_remote_field: little fix to previous patch.
3421 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3423 * class.c: add constructors to array classes.
3424 * icall.c: special case array construction for InternalInvoke (),
3426 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
3428 * class.h class.c reflection.c object.c: Added support for field
3429 defaults in dynamically generated classes.
3431 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
3433 * reflection.c: properly encode charset for ddlimport.
3435 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
3437 * threads.c: allow compiling without GC.
3439 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
3441 * appdomain.h, object.c, object.h, threads.c, threads.h: added
3442 handling of thread static data.
3444 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3446 * reflection.h, reflection.c: added mono_custom_attrs_free ().
3448 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
3450 * class.c (mono_array_class_get): always set the serializable flags
3451 (mono_array_class_get): always set the SEALED attribute for array types
3453 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
3455 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
3456 attributes (fix for bug 42021).
3458 2003-05-12 Dick Porter <dick@ximian.com>
3460 * gc.c: Don't run finalizers when the finalizer thread is
3461 finishing up, because the default domain has already been
3464 2003-05-11 Miguel de Icaza <miguel@ximian.com>
3466 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
3467 value is null, we should throw an exception. This is slightly
3468 different than the other conventions used for the constructor.
3470 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3472 * socket-io.c: fixed windows build.
3474 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3476 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
3478 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
3480 * object.c (mono_string_new_wrapper): Compatibility fix for MS
3483 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
3485 * class.c (mono_class_layout_fields): Add experimental GC aware
3486 auto layout facility. Requires class library changes to work correctly.
3488 (mono_class_setup_vtable): Avoid overriding explicit interface
3489 method implementations. Fixes iface3.exe test.
3491 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
3493 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
3494 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
3496 * metadata.h: Add new type classification macro which determines
3497 whenever the type holds an object reference.
3499 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
3501 * marshal.c (mono_marshal_get_native_wrapper): cleanups
3503 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
3505 * gc.c (finalizer_thread): Work around a GC bug.
3507 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
3509 * marshal.c (emit_struct_conv): allow unions
3511 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
3513 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
3515 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
3517 2003-05-06 Martin Baulig <martin@ximian.com>
3519 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
3521 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3524 (Select_internal): allow NULLs, don't create arrays if not needed.
3525 Coupled with Socket.cs changes.
3528 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
3529 register a finalizer for it that will close the semaphore handle. This
3530 fixes the leak and make Lupus' test run with > 4080 loops.
3532 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
3534 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
3535 Jerome Laban (bug #42287)
3537 2003-05-02 Martin Baulig <martin@ximian.com>
3539 * debug-mono-symfile.h
3540 (MonoSymbolFile): Moved declaration into mono-debug.h.
3541 (MonoDebugMethodJitInfo): Likewise.
3542 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
3544 (_mono_debug_address_from_il_offset): Take a
3545 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
3548 (MonoDebugDomainData): New struct.
3549 (mono_debug_get_domain_data): New function.
3550 (mono_debug_add_method): Take an additional `MonoDomain *'
3552 (mono_debug_source_location_from_address): Likewise.
3553 (mono_debug_il_offset_from_address): Likewise.
3554 (mono_debug_address_from_il_offset): Likewise.
3556 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
3558 * reflection.c: one more check for null type in custom attrs.
3560 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3562 * reflection.c: avoid warning (comparison is always false due to limited
3563 range of data type).
3565 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3567 * icall.c: throw an exception in Type.GetField if the argument 'name'
3570 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
3572 * reflection.c: fixed handling of enums in named arguments to custom
3573 attributes (bug #42123).
3575 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
3577 * reflection.c: use the right array element type and handle
3578 a null for a Type argument, too.
3580 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
3582 * reflection.c: handle arrays as arguments to custom attributes.
3584 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
3586 * reflection.c: handle a string value in a custom attr
3587 ctor that takes an object.
3589 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
3591 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
3594 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
3596 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
3598 2003-04-27 Martin Baulig <martin@ximian.com>
3600 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
3601 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
3602 MONO_DEBUGGER_EVENT_BREAKPOINT.
3603 (mono_breakpoint_trampoline_code): Removed.
3604 (mono_debugger_event_handler): The last argument is now a
3606 (mono_debugger_insert_breakpoint_full): Removed the
3607 `use_trampoline' argument.
3608 (mono_debugger_method_has_breakpoint): Likewise.
3609 (mono_debugger_trampoline_breakpoint_callback): Renamed to
3610 mono_debugger_breakpoint_callback(); take the method and
3611 breakpoint number as arguments.
3613 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
3615 * metadata.c: fix off by one when loading parameters attributes.
3617 2003-04-24 Martin Baulig <martin@ximian.com>
3619 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
3621 2003-04-24 Martin Baulig <martin@ximian.com>
3623 * mono-debug-debugger.c: Moved all code which interacts with the
3626 * debug-mono-symfile.c: This code now just deals with the symbol
3627 file itself, the debugger code is now in mono-debug-debugger.c.
3629 2003-04-23 Martin Baulig <martin@ximian.com>
3631 * mono-debug.c (mono_debug_source_location_from_il_offset):
3632 New method; like mono_debug_source_location_from_address(), but
3633 takes an IL offset instead of a machine address.
3635 2003-04-23 Martin Baulig <martin@ximian.com>
3637 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
3638 `line' field; this is now computed by the debugger.
3640 2003-04-23 Martin Baulig <martin@ximian.com>
3642 * mono-debug.[ch]: New files. This is the new debugging interface.
3644 * mono-debug-debugger.[ch]: New files. Moved all code which
3645 interacts with the Mono Debugger here.
3647 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
3649 * domain.c (mono_init): initialize mono_defaults.monitor_class
3651 2003-04-21 Miguel de Icaza <miguel@ximian.com>
3653 * reflection.c (method_encode_code): Add a spicy exception to help
3654 future compiler authors.
3656 2003-04-21 Martin Baulig <martin@ximian.com>
3659 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3660 Make this work with relative pathnames; g_filename_to_uri() needs
3661 an absolute filename.
3663 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
3665 * icall.c: Track name changes in Object and ValueType.
3667 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
3669 * metadata.c (mono_type_stack_size): size should be a multiple of
3672 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3675 (internal_domain_finalize): moved into mono_domain_finalize. No need
3676 to create another thread because the finalizers will be run in the
3679 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
3680 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
3681 to be run (MS does this too).
3683 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
3685 * object.c (mono_class_compute_gc_descriptor): Update comment.
3687 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
3689 * image.h: Add synchronized wrapper cache.
3691 * image.c (do_mono_image_open): Initialize cache.
3693 * reflection.c (create_dynamic_mono_image): Initialize cache.
3695 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3697 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
3698 ves_icall_System_Buffer_ByteLengthInternal.
3700 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
3702 * reflection.c: setup klass->nested_in earlier. Allow
3703 a dash in the assembly name.
3705 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
3707 * metadata.c (mono_type_to_unmanaged): dont access
3708 type->data.klass for MONO_TYPE_OBJECT
3709 (mono_type_to_unmanaged): consider System.Delegate class
3711 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
3713 * class.c: just setup supertypes in the proper place instead of
3714 initializing the full element class for arrays.
3716 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
3718 * class.c: ensure the element class of arrays is initialized.
3719 Setup the supertype info for array classes, too.
3721 2003-04-14 Miguel de Icaza <miguel@ximian.com>
3723 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
3725 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3727 * Makefile.am: re-added -m option when running cygpath. This way,
3728 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
3730 * mono-config.c: same codepath for locating mono config file for WIN32
3732 * assembly.c: if mono_assembly_setrootdir is called, don't override
3735 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3737 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
3738 MONO_ASSEMBLIES variable.
3740 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
3742 * icall.c: added Assembly::GetNamespaces() icall.
3744 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3746 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
3748 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
3750 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
3751 * object.c: fixed bug in the construction of vtable for proxies
3753 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
3755 * object.c (mono_array_new): Mark mono_array_new as an icall.
3757 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3759 * class.c: fixed test for public method when overriding interfaces.
3762 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
3764 * appdomain.h, domain.c: added mono_domain_foreach() to
3765 be able to access the currently loaded appdomains.
3766 * object.c: make string interning work across sppdomains.
3767 Mark some functions for use as icalls.
3769 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
3771 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
3773 * reflection.h reflection.c: Allocate long living data using
3774 GC_MALLOC_ATOMIC so the collector does not need to scan it.
3776 * reflection.c: Double the allocation size in streams instead of
3777 increasing it, to prevent unneccesary copying on large assemblies.
3779 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
3780 creation if the assembly does not have the Run flag set.
3782 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
3784 * class.h: avoid the C++ keywords in header files (Jerome Laban
3785 spotted and fixed this).
3787 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3790 (mono_unhandled_exception): fill in the arguments for the
3791 UnhandledException event. Only trigger that event for the default
3792 domain (as MS does).
3794 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
3796 * object.c: Improve typed allocation stuff based on suggestions from
3797 Paolo. Also turn it on if the GC library supports it.
3799 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
3801 * object.c object.h class.h: Added experimental typed allocation
3802 facility using the interfaces in gc_gcj.h.
3804 * os/gc_wrapper.h: Added new include files.
3806 2003-04-03 Martin Baulig <martin@ximian.com>
3808 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
3809 which is not yet enabled by default.
3811 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
3813 (mono_gc_lock, mono_gc_unlock): New static functions.
3815 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
3816 functions; stop/start the world for the garbage collector. This
3817 is using the windows API; we need to complete the SuspendThread()/
3818 ResumeThread() implementation in the io-layer to make this work on Unix.
3819 (mono_gc_push_all_stacks): New public function; tells the garbage
3820 collector about the stack pointers from all managed threads.
3822 2003-04-03 Martin Baulig <martin@ximian.com>
3824 * object.h (MonoThread): Added `gpointer stack_ptr'.
3826 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
3828 2003-04-03 Martin Baulig <martin@ximian.com>
3830 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
3832 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
3834 * reflection.c (typebuilder_setup_fields): Initialize field.first and
3837 2003-04-02 Miguel de Icaza <miguel@ximian.com>
3839 * loader.c (mono_lookup_internal_call): Report the corlib that is
3842 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
3844 * icall.c (ves_icall_type_GetTypeCode): fixed check for
3845 System.DBNull (it's class not valuetype).
3847 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
3849 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
3850 if the array method was already assigned a token (fixes bug#40646).
3852 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
3854 * reflection.c (mono_reflection_get_type): Attempt type resolve even
3855 if no assembly is given.
3857 2003-04-01 Miguel de Icaza <miguel@ximian.com>
3859 * metadata.h: Added the new tables.
3861 * row-indexes.h: Added definitions for new tables.
3863 * metadata.c: Add schemas for new tables, and add support for
3864 computing the sizes of them.
3866 * class.c: Update for handling the new type cases.
3868 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
3870 * metadata.h (MONO_TYPE_IS_VOID): new macro
3872 2003-03-31 Martin Baulig <martin@ximian.com>
3874 * threads.h (MonoThreadCallbacks): Added `thread_created'.
3876 * threads.c (mono_thread_new_init): Call `thread_created' in the
3877 mono_thread_callbacks.
3879 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
3881 * loader.h: added marshalbyrefobject_class to mono_defaults
3882 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
3883 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
3884 generation of output parameters.
3885 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
3886 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
3887 contextbound and the target object belongs to the context of the caller.
3888 * object.h: added context and unwrapped_server variables in MonoRealProxy.
3889 * object.c: Implemented support for interfaces and abstract classes
3890 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
3891 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
3893 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
3895 * class.h class.c (mono_class_is_subclass_of): New function.
3897 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
3898 routines for most common case (calls from ArrayList::ToArray).
3900 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
3901 routine so programs which call Environment::Exit() can be profiled.
3903 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
3904 Added MONO_ARCH_SAVE_REGS.
3906 * icall.c (ves_icall_type_is_subtype_of): Use new function.
3908 2003-03-29 Miguel de Icaza <miguel@ximian.com>
3910 * blob.h: Add a couple of new MonoType types definitions.
3912 * tabledefs.h: Add a couple of new call convs.
3914 2003-03-27 Zoltan Varga <vargaz@freemail.h>
3916 * reflection.h (MonoReflectionDynamicAssembly): track changes in
3917 the layout of the class.
3919 * reflection.c (alloc_table): double the size on overflow to avoid
3920 unnecessary copying.
3922 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
3923 avoid filling out metadata tables and blobs. Also set mb->ilgen to
3924 null so it can be garbage collected.
3926 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
3928 * reflection.c (mono_reflection_get_type): Return the resolved type
3929 only if it is in the assembly we searched.
3931 * reflection.c (ensure_runtime_vtable): Initialize method slots.
3933 * class.c (mono_class_setup_vtable): Set the slot of the overriding
3936 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3939 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
3940 the right one is 'file:///blah', but MS allows it.
3942 (mono_assembly_open): allow 'file://blah'
3944 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
3946 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
3948 * socket-io.c: fixes bug #40310.
3950 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
3952 * reflection.c (mono_reflection_parse_type): handle deeply nested
3955 * reflection.c (mono_image_create_token): Use unique token values
3956 since they will be put into a hash table.
3958 * class.c (mono_class_setup_vtable): If a method occurs in more than
3959 one place in the vtable, and it gets overriden, then change the
3960 other occurances too.
3962 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
3963 object as return type.
3965 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
3967 * icall.c: Deleted "ToString" implementation for double and float
3968 because they are full implemented in managed code.
3970 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
3972 * reflection.c, reflection.h: implemented and exported functions
3973 to retrieve info about custom attributes.
3975 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3977 * appdomain.c: moved Uri handling to assembly.c
3978 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
3979 work when using a file Uri in *nix and windows.
3981 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
3982 GetReferencedAssemblies.
3984 2003-03-18 Dick Porter <dick@ximian.com>
3986 * icall.c: Rename a couple of internal calls
3988 * threads.c: Set the thread state to Stopped when a thread exits.
3991 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
3993 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
3996 * object.c (mono_class_vtable): fix warning.
3998 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
4000 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
4002 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
4004 (method_encode_clauses): Create exception info structures in the right
4006 (mono_reflection_setup_internal_class): Initialize supertypes field.
4008 * class.c object.c: Handle interfaces which implement other interfaces
4011 * class.h class.c: Move the supertypes array initialization code into
4012 a separate function so it can be used for dynamic types too. Also call
4013 it earlier, in mono_class_init(), since it can be used before the
4014 type is initialized.
4016 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4020 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
4025 * object.c: remove warnings.
4027 2003-03-13 Martin Baulig <martin@ximian.com>
4029 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
4030 (MonoDebugLexicalBlockEntry): New types.
4032 * debug-mono-symfile.c
4033 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
4035 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4037 * process.c: ret can be any non-zero value accroding to MS doc.
4039 2003-03-07 Miguel de Icaza <miguel@ximian.com>
4041 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
4042 fixing a warning for a miss-used prototype, would have cause
4043 random memory corruption.
4045 2003-03-07 Martin Baulig <martin@ximian.com>
4047 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
4048 getting really annoying ....
4050 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
4052 * reflection.c (fixup_method): added support for array methods.
4054 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
4056 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
4057 (pointed out by Michael Adams).
4059 2003-03-04 Dick Porter <dick@ximian.com>
4061 * icall.c: Temporarily reverted the Double and Single ToString()
4062 change, because it broke nunit.
4064 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
4066 * object.h, threads.h: make include files compatible with C++
4067 (patch by Jerome Laban <jlaban@wanadoo.fr>).
4069 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
4071 * icall.c: Erased ToString helper functions for Double and Single.
4072 Now, that implementations ar all in managed code (Double and Single
4075 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
4077 * appdomain.c: Added method for initializing the default context of
4078 a domain. Added internal call for getting the default context.
4079 * appdomain.h: Added context variable in MonoDomain struct.
4080 * domain.c: mono_domain_set also sets the default context of the domain
4081 * icall.c: Mapped internal method InternalGetDefaultContext.
4082 * object.c: mono_object_get_virtual_method returns always a remoting
4083 wrapper if the object is a transparent proxy.
4084 mono_runtime_invoke_array: when creating an object by calling the
4085 constructor, if the created object is a proxy, then the constructor should
4086 be called using the a remoting wrapper.
4088 2003-03-03 Dick Porter <dick@ximian.com>
4090 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
4091 variable so it compiles on solaris. Problem spotted by
4092 Christopher Taylor <ct@cs.clemson.edu>
4094 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4097 (get_info_from_assembly_name): don't leak value.
4100 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
4103 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
4105 * assembly.c: export mono_image_load_references ().
4106 * class.c: handle function pointers. mono_class_from_name() now
4107 supports nested type names directly.
4109 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
4111 * reflection.h reflection.c: Encode already created dynamic methods
4112 and fields correctly as a DEF instead of a REF.
4114 * reflection.c: Get rid of the force_ref argument to
4115 mono_image_typedef_or_ref since it was wrong in the first place.
4117 * string-icalls.c: add error checking to string constructors according
4120 * reflection.c: Emit types in the order their TypeBuilders were
4121 created. Previously, a new table index was assigned to each type before
4122 the tables were emitted. This was wrong because the signature blob
4123 might already refer to a type by its original table index.
4125 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
4127 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
4130 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4132 * Makefile.am: make assemblies dir have \ instead of / on windows.
4134 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
4136 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
4137 iterate over the NESTEDCLASS table using a linear search since the
4138 table is not guaranteed to be sorted by the secondary key.
4140 * class.c (mono_class_create_from_typedef): fixed up call to
4141 mono_metadata_nesting_typedef.
4143 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
4145 * marshal.c (mono_string_to_byvalstr): clear the memory as
4146 suggested by Jerome Laban <jlaban@wanadoo.fr>
4148 2003-02-26 Dick Porter <dick@ximian.com>
4150 * process.c: Cope with padding in .rsrc blocks
4152 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
4154 * metadata.h: reverted the filter_len change, it breaks reflection
4156 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
4158 * metadata.h: added a new field to store the filter_len
4161 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
4163 * reflection.c: handle custom attributes for types and members
4164 created with Reflection.Emit (bug#38422).
4166 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
4168 * reflection.c: define RTSpecialName automatically for constructors for
4169 compatibility with MS.NET.
4171 * reflection.c (mono_reflection_create_runtime_class): initialize
4172 nested_in field of dynamically created classes.
4174 2003-02-22 Martin Baulig <martin@ximian.com>
4176 * debug-mono-symfile.h: Incremented version number.
4178 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
4180 * object.h icall.c process.c: fix warnings.
4182 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
4184 * appdomain.h appdomain.c:
4185 (mono_domain_try_type_resolve): split the
4186 name_or_tb argument into a name and a tb argument.
4187 (mono_domain_has_type_resolve): new function to check whenever the
4188 application has registered a TypeResolve event handler.
4190 * icall.c reflection.h reflection.c: move the type resolve logic into
4191 mono_reflection_get_type () so it will be invoked when
4192 Assembly::GetType () is called.
4195 (mono_reflection_get_type): renamed to get_type_internal.
4196 (mono_reflection_get_type): fixed type name generation so it works
4197 for nested types too.
4198 (mono_reflection_get_type): call has_type_resolve () to avoid the
4199 costly type name generation if there is no resolve event handler.
4201 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
4203 * class.c, image.c: load exported types from file references.
4205 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
4207 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
4208 used to cache the managed methods used to create proxies and make
4209 remote invocation of methods.
4210 * class.h: Added in MonoVTable a flag to indicate that a class needs
4211 to be remotely created.
4212 * object.c: Modified the method mono_class_vtable(). It now initializes
4213 the remote flag of the vtable. Modified mono_object_new_specific(),
4214 so now it checks the remote flag.
4215 * icall.c: Added a couple of internal methods, one for enabling instance
4216 creation interception for a type, and one for creating objects bypassing
4219 2003-02-18 Martin Baulig <martin@ximian.com>
4221 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
4222 New interncall to get a method's metadata token.
4224 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
4225 New interncall for the debugger.
4227 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
4229 * class.c (mono_class_setup_vtable): allocate supertype array
4231 2003-02-18 Martin Baulig <martin@ximian.com>
4233 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
4235 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4238 (assembly_name_to_aname): jump over unknown properties (i've found
4239 something like: 'type, assembly, version=xxx, custom=null, public...',
4240 so now will ignore custom=null and still get the rest of the values).
4242 2003-02-17 Dick Porter <dick@ximian.com>
4244 * threads.c: Have Thread.Start() wait for a semaphore to signal
4245 that the thread has set up all its local data. This fixes bug
4246 34323, where Abort() raced the new thread's TLS data.
4248 Also removes the handle_store() call from start_wrapper, because
4249 threads are now always created suspended and there is no longer a
4250 race between the parent and child threads to store the info.
4252 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
4254 * image.c: explain the #- heap issue in a message, hopefully
4255 avoiding FAQs on mono-list.
4257 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4260 (GetEntryAssembly): if the domain has not invoked
4261 AppDomain.ExecuteAssembly yet, return the assembly of the default
4264 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
4266 * class.c (mono_ldtoken): make it work in dynamic assemblies.
4268 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
4270 * metadata.c, reflection.c: simple speedup to type hash
4273 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
4275 * image.c, image.h, class.c, assembly.c: move module loading
4276 to MonoImage. When loading metadata, consider alignemnet from
4277 the start of metadata, not from the metadata address in memory.
4279 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
4281 * reflection.c (mono_reflection_get_custom_attrs): Added support for
4282 AssemblyBuilder objects. Factored out custom attribute creation into
4283 a separate function.
4284 (create_custom_attr): new function to create custom attributes.
4286 2003-02-12 Miguel de Icaza <miguel@ximian.com>
4288 * Makefile.am: Got tired of typing the full pathname to pedump.
4289 Until there is another option, am installing this.
4291 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
4293 * class.c (class_compute_field_layout): always set field->parent
4294 (mono_ldtoken): use mono_defaults.fieldhandle_class;
4296 2003-02-11 Dick Porter <dick@ximian.com>
4299 * monitor.c: Rewrote Monitor, making lock much faster and
4300 Pulse/Wait work as specified. Also uses much fewer handles, and only
4301 creates them as needed.
4303 * exception.c: Added SynchronizationLockException
4305 * threads.c: Deleted old Monitor implementation. The new one is
4308 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
4310 * class.c: handled TypedReference type code. Set the correct size for
4311 class data. Setup interface_offsets for interface classes, too.
4313 2003-02-09 Martin Baulig <martin@ximian.com>
4315 * debug-mono-symfile.h: Reflect latest symbol writer changes.
4317 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
4319 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
4320 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
4321 * object.c: fixed mono_object_get_virtual_method () for interfaces.
4322 * verify.c: check for code that runs after the end of the method.
4324 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
4326 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
4327 "System.Math::Round2".
4328 * sysmath.h: Added Floor, Round and Round2 definitions.
4329 * sysmath.c: Modified certain functions that were not 100% compliant
4330 with MS.NET (math precision) and added the implementation of Floor,
4333 2003-02-07 Martin Baulig <martin@ximian.com>
4335 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
4337 2003-02-07 Martin Baulig <martin@ximian.com>
4339 * debug-mono-symfile.c: Reflected latest symwriter changes.
4340 (mono_debug_create_mono_symbol_file): Removed.
4341 (mono_debug_open_mono_symbol_file): Take an argument which
4342 specifies whether to create a dynamic symbol file.
4344 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
4346 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
4348 2003-02-05 Martin Baulig <martin@ximian.com>
4350 * reflection.c (mono_image_build_metadata): Make this public,
4351 protect it against being called multiple times, don't create
4352 resources and don't build the compressed metadata here.
4353 (mono_image_create_pefile): Do this here.
4356 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
4358 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4360 * socket-io.c: fixed bug #36322.
4362 2003-02-06 Piers Haken <piersh@friskit.com>
4366 * debug-mono-symfile.c:
4372 * socket-io.c: warning cleanups
4374 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
4376 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
4377 function. works like remoting invoke, but does a check for the Proxy first.
4379 2003-02-05 Miguel de Icaza <miguel@ximian.com>
4381 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
4383 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
4385 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
4387 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
4388 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
4390 * object.c (mono_store_remote_field_new): used by the new jit
4391 instead of mono_store_remote_field
4392 (mono_load_remote_field_new): used by the new jit
4393 instead of mono_load_remote_field
4395 2003-02-05 Patrik Torstensson
4397 * appdomain.c: changed unload to take the domain id instead
4400 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
4403 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4405 * appdomain.c: don't look for assemblies in ApplicationBase if
4406 PrivateBinPathProbe is set.
4408 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4410 * object.c: make the first argument in main_args contain the absolute
4411 path to the assembly. Fixes bug #37511.
4413 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4415 * icall.c: get correct UTC offset for countries not using daylight
4416 time saving. Fixes bug #30030.
4418 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4420 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
4421 and 1 are the family).
4423 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
4425 * icall.c (ves_icall_InternalExecute): removed wrong assertion
4427 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
4429 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
4431 * reflection.c: added support for SignatureHelper tokens, which is
4432 needed by the Calli opcode.
4434 * reflection.h: track changes to SignatureHelper class.
4436 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
4438 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4440 * appdomain.c: fixed loading assemblies from PrivateBinPath.
4442 2003-02-03 Patrik Torstensson
4443 * appdomain.[c|h], domain.c :
4444 - Added support for getting a domain via domain id
4445 - Support for setting and getting domain from System.AppDomain
4446 (used in cross appdomain channel)
4447 - Added support for get/set for a MonoAppContext on a thread
4448 (Context class in System.Runtime.Remoting.Contexts),
4449 - Removed hack in Get/SetData and ExecuteAssembly.
4451 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
4452 the managed world to get control when a proxy is created.
4454 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
4456 2003-02-03 Miguel de Icaza <miguel@ximian.com>
4459 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
4460 Populate the codebase field as well.
4462 2003-02-02 Martin Baulig <martin@ximian.com>
4464 * debug-mono-symfile.c
4465 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
4466 (mono_debug_symfile_add_method): Allow interncalls.
4468 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4470 * icall.c: throw parse exception if strtod fails or the string is empty.
4472 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
4474 * marshal.c: handle object type separately from defined
4477 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
4479 * marshal.c: handle NATIVE_LPSTR for strings when it's
4480 explicitly specified.
4482 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
4484 * reflection.c, reflection.h, icall.c: setup the reflection
4485 handle cache for ModuleBuilders and AssemblyBuilders.
4487 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
4489 * reflection.c (reflection_methodbuilder_to_mono_method): set
4492 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4494 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
4496 2003-01-29 Dick Porter <dick@ximian.com>
4498 * threads.c: No need for the fake_thread kludge now that Thread
4499 doesn't run a class constructor
4501 2003-01-29 Dick Porter <dick@ximian.com>
4503 * threads.c: Use g_direct_hash instead of the rather bogus
4506 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
4508 * marshal.c (mono_marshal_get_native_wrapper): add check for null
4510 (mono_marshal_get_struct_to_ptr): generate valid IL code
4511 (mono_marshal_get_ptr_to_struct): generate valid IL code
4512 (*): correctly set sig->pinvoke, we need to memdup the signature
4515 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
4517 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
4518 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
4520 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
4522 * profiler.c: provide more callers information.
4524 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
4526 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
4528 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
4530 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
4532 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
4534 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
4535 exception instead of going into an infinite loop on dates which it
4538 * string-icalls.c (ves_icall_System_String_get_Chars): raise
4539 out-of-range exception if needed.
4541 * class.c (mono_class_setup_vtable): allow a virtual method to provide
4542 an implementation for an interface method and to override an inherited
4543 method at the same time.
4544 Imagine a scenario when a virtual method is used to override a
4545 virtual abstract method in a parent class, and this same method
4546 provides an implementation for an method inherited from an interface.
4547 In this case, the interface resolution code will set im->slot, which
4548 means that the virtual method override pass will skip this method
4549 which means a pointer to the abstract method inherited from the parent
4550 will remain in the vtable of this non-abstract class.
4552 * class.c: (mono_class_setup_vtable): continue search for a real
4553 method if only an abstract method is found.
4555 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
4557 * reflection.c: add size to encoding for ByValStr and ByValArray
4558 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
4560 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
4562 * class.c (mono_class_setup_vtable): pass the override info as an
4565 * class.c (mono_class_setup_vtable): set the slot of overriding methods
4568 * reflection.c (ensure_runtime_vtable); add support for method
4571 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
4573 * reflection.c (resolution_scope_from_image): Hack to work to work with
4576 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
4577 added a 'force_ref' argument to force this function to allways return
4578 a TypeRef. This is needed by mono_image_get_memberref_token ().
4580 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
4582 * reflection.c (mono_image_get_type_info): interfaces really don't have
4585 * reflection.c (mono_image_basic_init): fill out missing fields of
4588 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
4589 dynamic assemblies. This is required so dynamic assemblies show up in
4590 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
4591 Type::GetType() etc. This is consistent with MS behaviour.
4593 * image.c image.h reflection.c: add newly created classes to the name
4594 cache so mono_class_get () will find them.
4596 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
4598 First part of changes to get IKVM.NET running under mono.
4600 * appdomain.h, appdomain.c: added new function
4601 mono_domain_try_type_resolve() which will emit TypeResolve events.
4602 This function will call AppDomain::DoTypeResolve to do the actual work.
4604 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
4605 moved existing code dealing with dynamic tokens to a new function
4606 called mono_reflection_lookup_dynamic_token (). This function will
4607 raise TypeResolve events when appropriate. Since reflection.c is not
4608 part of libmetadata, a new hook function called
4609 mono_lookup_dynamic_token() is added to class.c which will call this.
4611 * assembly.h assembly.c: make the invoke_load_hook function public,
4612 so it can be called for dynamic assemblies.
4614 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
4616 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
4619 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
4620 MonoGHashTable, since it contains pointers to objects which the GC
4623 * assembly.c (search_loaded): remove unused variable.
4625 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
4627 * object.c: fixed issue exposed by gcc-generated IL programs
4628 that use RVA data for pointers.
4630 2003-01-25 Martin Baulig <martin@ximian.com>
4632 * threads.c (start_wrapper): Moved the initialization of
4633 `start_func' above the mono_new_thread_init() call to which we
4634 pass it as argument.
4636 2003-01-24 Martin Baulig <martin@ximian.com>
4638 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
4639 the MonoThread pointer.
4641 2003-01-21 Miguel de Icaza <miguel@ximian.com>
4643 * icall.c: Rename `PowImpl' to Pow.
4645 2003-01-23 Dick Porter <dick@ximian.com>
4647 * threads.c (start_wrapper): Create a Thread object if needed, so
4648 the Main() thread can do the class initialisation in a subthread
4649 that has been set up to allow managed code execution.
4651 Pass the thread ID instead of the MonoThread pointer to the thread
4652 start and attach callbacks. This change is required, because the
4653 jit thread start callback must be called _before_ the Thread
4654 object can be created.
4656 (mono_thread_init): Removed much object creation code that is no
4657 longer needed. No managed code is called from here now.
4659 * object.c (mono_runtime_exec_managed_code): Create a subthread
4660 for Main, and call back to the runtime to use it.
4661 Set the exit code when Main exits.
4663 * gc.c: Make sure domain finalisation happens in a subthread.
4664 Re-enable threaded GC, fixing bug 31333 (again).
4666 * environment.c: System.Environment internall calls (so far just
4667 ExitCode is here, the others are still in icall.c)
4669 * appdomain.c (mono_runtime_cleanup): All threads running managed
4670 code should have finished before mono_runtime_cleanup() is
4671 reached, so no need to clean up threads.
4673 2003-01-22 Martin Baulig <martin@ximian.com>
4675 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
4676 `gpointer func' arguments.
4677 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
4678 but added `MonoThread *thread' argument.
4679 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
4681 * threads.c (mono_new_thread_init): Added `gpointer func' argument
4682 and pass it to the mono_thread_start_cb callback.
4683 (mono_install_thread_callbacks): New public function to install a
4684 set of callbacks which are set by the debugger.
4685 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
4687 2003-01-22 Martin Baulig <martin@ximian.com>
4689 * Makefile.am: Install debug-mono-symfile.h.
4691 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
4693 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
4695 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
4697 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
4698 * class.c (mono_ptr_class_get): correctly set access levels of pointers
4699 (mono_array_class_get): correctly set access levels of arrays
4701 2003-01-20 Patrik Torstensson
4702 * image.h (MonoAssemblyName): changed major, minor, build, revision
4703 from signed to unsigned.
4705 2003-01-20 sean kasun <skasun@azstarnet.com>
4707 * reflection.c (load_cattr_value): Now this handles
4708 MONO_TYPE_SZARRAY. Fixes bug #35629
4710 2003-01-20 Miguel de Icaza <miguel@ximian.com>
4712 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
4715 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4717 * decimal.c: fixed bug #26056.
4719 2003-01-17 Martin Baulig <martin@ximian.com>
4721 * gc.c: Raise an ExecutionEngineException instead of using g_error().
4723 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4726 (mono_get_exception_type_initialization): new function.
4728 * object.c: throw a TypeInitializationException when an exception is
4729 thrown invoking the class constructor.
4731 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4733 * reflection.c: fixed attribute reading.
4735 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4738 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
4739 provided, look for the type in the calling assembly and then in
4740 mscorlib; if the assembly name is provided, only try that one.
4742 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
4744 * object.c: register the vtable before there is a chance it's
4745 queried again recursively.
4747 2003-01-13 Duncan Mak <duncan@ximian.com>
4749 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
4752 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
4754 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
4756 2003-01-11 Martin Baulig <martin@ximian.com>
4758 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
4759 this to 20 for the release.
4761 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
4763 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
4765 * loader.c (mono_method_get_marshal_info): bug fix
4767 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
4768 structures with explicit layout
4770 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
4772 * profiler.c: made the output more readable (and sorted).
4773 Added caller information for the allocation profiler.
4775 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
4777 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
4779 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4781 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
4784 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
4786 * object.c, profiler.h, profiler.c, profiler-private.h:
4787 Added object allocation profiler.
4789 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
4791 * reflection.h, reflection.c: handle global methods.
4792 Compress blob entries.
4794 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
4796 * marshal.c: fix compilation.
4798 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
4800 * loader.c (mono_method_get_marshal_info): impl.
4802 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
4804 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4806 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
4807 for reference types.
4809 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
4811 * loader.c: fixed off by one error in loaded parameter names.
4813 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
4815 * marshal.c (mono_marshal_get_icall_wrapper): like
4816 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
4817 instead of a MonoMethod.
4819 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4821 * decimal.c: fixed bug #36537.
4823 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
4825 * marshal.c: throw a missing method exception if a
4826 P/Invoke method is not found.
4828 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
4830 * icall.c: allow a null this for constructors.
4832 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
4834 * icall.c: raise the proper exceptions if the arguments to the
4835 internal Invoke are incorrect.
4837 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
4839 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
4841 2003-01-03 Martin Baulig <martin@ximian.com>
4843 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
4845 2002-12-31 Martin Baulig <martin@ximian.com>
4847 * debug-mono-symfile.c: Completely rewrote the type section.
4848 Instead of using individual malloc()ed fields, we use one big
4849 continuous memory area and offsets into this area.
4850 See the comments in the source code for details.
4852 2002-12-30 Martin Baulig <martin@ximian.com>
4854 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
4856 2002-12-30 Martin Baulig <martin@ximian.com>
4858 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
4859 line number table in this data blob instead of using an external
4862 2002-12-28 Martin Baulig <martin@ximian.com>
4864 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
4866 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
4868 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
4869 as a boxed return type.
4871 2002-12-21 Miguel de Icaza <miguel@ximian.com>
4874 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
4875 g_build_filename to properly get separators on the filename created.
4877 * object.h: Small change, introduce MonoMarshalByRefObject to
4878 track the layout of that structure in the C# universe as we make
4881 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
4883 * object.c: removed assert to allow static fields on interfaces.
4884 * loader.c: a TypeSpec may be used for any type, not just arrays.
4886 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
4888 * class.c, class.h: added mono_class_array_element_size ().
4889 Ignore static methods in interfaces.
4891 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4893 * threads.c: fixed the build under cygwin.
4895 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
4897 * reflection.c: handle nullref constants. Allocate keys for
4898 reflection handles with the GC.
4900 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
4902 * threads.c, threads.h: added mono_thread_get_abort_signal()
4903 to get a suitable signal for thread abort.
4905 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
4907 * metadata.c: fix handling of ExportedType table.
4909 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4911 * icall.c: added WriteWindowsDebugString internal call.
4913 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4915 * reflection.h: added fields to match C# implementation.
4917 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4919 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
4921 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
4923 * gc.h, gc-internal.h: Rename header for GC internal calls to
4924 gc-internal.h from gc.h as to not clash with Boehm GC having its
4925 header installed as <gc.h> in outside include paths.
4926 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
4927 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
4929 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4931 * icall.c: assign minor, build and revision in FillName.
4933 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
4935 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
4936 Added support for running code generated by Reflection.Emit.
4938 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4940 * appdomain.c: check for NULL argument in LoadFrom.
4942 2002-12-10 Dick Porter <dick@ximian.com>
4944 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
4946 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4948 * appdomain.c: fix buglet when building exe file name. Handle full
4949 assembly name (needed after latest changes to AssemblyName).
4951 (mono_image_close): free some hashtables.
4953 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
4955 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
4956 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
4957 on some systems (redhat 7.3)
4959 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
4961 * threads.c: delete the critical section of a sync block,
4962 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
4964 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
4966 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
4968 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4970 * appdomain.[ch]: handle the assembly preload event to try loading the
4971 assemblies using the paths we have in the current domain.
4973 * assembly.[ch]: created an assembly preload hook that is called to try
4974 loading the assembly by other means that the ones provided here.
4976 * domain.c: initialize the domain search path.
4978 From now on, assemblies (TODO: except corlib and System) are loaded
4979 according to these rules when using mono_assembly_load ():
4981 1. It tries to load the assembly from the ApplicationBase
4982 of the current domain appending .dll and .exe (TODO: have to
4983 try loading from name/name.dll and name/name.exe).
4985 2. It tries the search path specified in PrivateBinPath for the
4986 current domain (if any).
4988 3. Previous behavior.
4990 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
4992 * icall.c: implemented GetInterfaceMap() related icall.
4993 * domain.c, loader.h: load MethodInfo in mono_defaults.
4995 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
4997 * gc.c: disable the finalizer thread for now, untill all the issues
4998 with it are resolved.
5000 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5002 * string-icalls.c: handle embedded nulls in string ctor when the
5003 length is specified.
5005 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
5007 * class.c: look for explicit interface implementation in parent
5010 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
5012 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
5014 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
5016 * gc.c: protect handles with a critical section.
5018 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5021 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
5022 parameters. If no assembly specified, try getting the type from all
5023 the assemblies in the current domain, else, load the assembly and get
5026 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5028 * marshal.c: applied patch from Aleksey Demakov that fixes
5029 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
5031 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5033 * icall.c: fixed get_location.
5035 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
5037 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
5038 declarations to make it work with older gcc.
5040 * loader.c (mono_get_method): set signature->pinvoke for native calls
5042 2002-11-20 Dick Porter <dick@ximian.com>
5044 * threads.c (mono_thread_init): Set the main thread's handle
5046 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
5048 * gc.c: allow compilation without GC support. Changed to match the
5051 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
5053 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
5055 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
5057 * reflection.c: set a public key token on the core assemblies.
5059 2002-11-18 Dick Porter <dick@ximian.com>
5061 * threads.c: Split out some thread initialisation so that other
5062 files can set the start callback function.
5064 * gc.c: Run finalisers in a separate thread, to avoid stack
5065 overflow. Fixes bug 31333.
5067 * appdomain.c: Set up GC finalisation thread.
5071 * domain.c: Use gc.h macros for GC_malloc
5073 2002-11-15 Dick Porter <dick@ximian.com>
5077 * appdomain.c: Removed mono_runtime_init_with_attach(),
5078 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
5079 merging the extra parameter with the existing function. Removed
5080 unneeded code in mono_thread_attach().
5082 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
5084 * image.c (mono_image_loaded_by_guid): a method to get loaded
5086 (load_metadata_ptrs): we store the guid as string.
5088 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
5090 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
5092 * metadata.c (mono_guid_to_string): imported method form Zoltan
5093 Varga (slightly modified)
5095 * assembly.c (mono_assembly_open): load precompiled code
5097 * loader.h (MonoMethod): we store the method token for use in the
5100 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5102 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
5103 the hook function called when an assembly is loaded.
5105 * domain.c: Modified file.
5106 (mono_domain_assembly_load): removed hash table insertion of assemblies.
5110 2002-11-07 Miguel de Icaza <miguel@ximian.com>
5112 * reflection.c: Map PEFileKind to the value expected by the WinNT
5115 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5117 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
5118 Read until the buffer is filled completely.
5120 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5122 * icall.c: implemented MonoType.InternalGetEvent ().
5124 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5126 * appdomain.c: implemented InitAppDomainSetup. Delayed
5127 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
5130 * assembly.c: base_dir is now an absolute path ending with
5133 * icall.c: modified get_location according to the above changes.
5135 * object.c: init AppDomain.SetupInformation for the default domain after
5136 we have the entry assembly.
5138 * domain.c: when unloading a domain, setup = NULL.
5140 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
5142 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
5144 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
5146 * object.h, object.c: introduced mono_object_get_virtual_method ()
5147 to lookup the method invoked on an object when a callvirt is done on
5149 * icall.c: make MethodInfo::Invoke() always do a virtual call.
5151 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5153 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
5154 current domain when loaded an assembly and failed to load it.
5156 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
5158 2002-10-31 Dick Porter <dick@ximian.com>
5162 * file-io.c: Return the error status in a parameter, as the
5163 GetLastError() value has long since been blown away if we try and
5164 look it up in a subsequent internal call invocation. Delete the
5165 GetLastError() internal call, because it's useless.
5167 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
5169 * class.[ch]: added cast_class to fix bug 29517
5171 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
5173 * marshal.c: create valid IL code in the filter clause:
5174 the new JIT is less forgiving:-)
5176 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5178 * icall.c: removed get_property internal call.
5180 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
5182 * appdomain.h domain.c: Added an ID to appdomains.
5184 * threads.c threads.h icall.c: Implement icall
5185 Thread:GetDomainID(), and remove unused icall
5186 CurrentThreadDomain_internal.
5188 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5190 * icall.c: Don't recurse through the base types in GetConstructor.
5193 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
5195 * mempool.h, mempool.c: added mono_mempool_empty() and
5196 mono_mempool_stats().
5198 2002-10-23 Dick Porter <dick@ximian.com>
5202 * icall.c: Added MonoIO.GetFileType internal call
5204 2002-10-17 Dick Porter <dick@ximian.com>
5206 * appdomain.c (mono_runtime_cleanup): Don't signal the async
5207 delegate semaphore before waiting for all threads to finish,
5208 because new threads can also call async delegates. Fixes bug
5211 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
5212 of 3 seconds, in case another async job is queued. (This part is
5213 needed because the bug fix reintroduced the 3s exit lag.) This
5214 makes the mono_runtime_shutdown flag superfluous.
5216 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
5218 * reflection.c: include ehader size in method section headers.
5219 Really check for suplicated modules entries.
5221 2002-10-17 Martin Baulig <martin@gnome.org>
5223 * debug-mono-symfile.c: Added back support for locals.
5225 2002-10-14 Martin Baulig <martin@gnome.org>
5227 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
5230 2002-10-14 Martin Baulig <martin@gnome.org>
5232 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
5233 mono_class_get() instead of looking in the class cache.
5235 2002-10-13 Martin Baulig <martin@gnome.org>
5237 * debug-mono-symfile.c: Set version number to 28, include the
5238 signature in method names.
5240 2002-10-13 Martin Baulig <martin@gnome.org>
5242 * debug-mono-symfile.h: Set version number to 27.
5244 2002-10-11 Martin Baulig <martin@gnome.org>
5246 * gc.c: Don't register/unregister NULL pointers as disappearing links.
5248 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
5250 * metadata.c, metadata.h: added helper function to allocate signatures.
5252 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5254 * icall.c: added internal call to get the location of machine.config.
5256 2002-10-08 Martin Baulig <martin@gnome.org>
5258 * debug-mono-symfile.c: Ignore classes with a pending init for the
5261 2002-10-03 Dick Porter <dick@ximian.com>
5263 * threads.c: Freebsd pthread_t is a pointer
5265 2002-10-03 Dick Porter <dick@ximian.com>
5267 * socket-io.c: Implemented GetHostName_internal
5269 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5272 (mono_config_parse_file): don't leak the text.
5274 2002-10-02 Martin Baulig <martin@gnome.org>
5276 * debug-mono-symfile.c: Added support for methods.
5278 2002-10-01 Martin Baulig <martin@gnome.org>
5280 * debug-mono-symfile.c: Don't emit methods and line numbers for
5281 the dynamic symbol file, just write the type table. We can easily
5282 have an external helper program which creates a symbol file for an
5285 2002-10-01 Dick Porter <dick@ximian.com>
5287 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
5288 Only add the handle to the cleanup array when we're about to
5289 launch the thread. Bug 31425 deadlocked when the test was run on
5292 2002-10-01 Martin Baulig <martin@gnome.org>
5294 * debug-mono-symfile.c: Added support for properties.
5296 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
5298 * reflection.c: unaligned store fix from Mark Crichton
5299 <crichton@gimp.org>.
5301 2002-09-27 Martin Baulig <martin@gnome.org>
5303 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
5306 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
5308 * assembly.h, assembly.c: use a sane API to hook into the assembly
5309 loading process instead of a useless special-purpouse hack
5310 (ngen needs a hook, too, for example).
5312 2002-09-27 Dick Porter <dick@ximian.com>
5314 * threads.c (mono_thread_init): Call GetCurrentProcess() so
5315 io-layer can set up some process handle info. Not needed on w32,
5316 but doesn't hurt either.
5318 * process.c: Pass the program name in the second parameter to
5319 CreateProcess, so the path is searched. Include the working
5320 directory. Implemented process name, process enumeration, and some
5321 process detail internal calls.
5323 * icall.c: Added internal calls for process lookup, and some
5326 2002-09-26 Martin Baulig <martin@gnome.org>
5328 * assembly.c (mono_install_open_assembly_hook): New global
5329 function to install a function to be invoked each time a new
5331 (mono_assembly_open): Run this callback function if set.
5333 * debug-mono-symfile.c: Put back line numbers for the dynamic
5334 symbol file and also record the .il file as source file. This
5335 allows us to install the temporary symbol file as `file.dbg' just
5336 like a compiler-generated one.
5338 2002-09-26 Nick Zigarovich <nick@chemlab.org>
5340 * Corrected typo in gc.c (BOHEM vs BOEHM).
5342 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5344 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
5345 GetProperties. Also avoid calling g_slist_length in GetProperties and
5348 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
5350 * reflection.c: avoid unaligned stores (bug spotted by
5351 Mark Crichton <crichton@gimp.org>).
5353 2002-09-25 Martin Baulig <martin@gnome.org>
5355 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
5356 instead of guint64 for addresses and added prologue/epilogue info.
5358 2002-09-25 Martin Baulig <martin@gnome.org>
5360 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
5361 store line number info. For the dynamic symbol file, we only need
5362 to provide the JIT generated dynamic line number info for the dynamic
5365 2002-09-25 Martin Baulig <martin@gnome.org>
5367 * debug-mono-symfile.h: Incremented version number.
5369 2002-09-24 Martin Baulig <martin@gnome.org>
5371 * class.c (mono_debugger_class_init_func): New global function
5373 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
5376 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
5377 function. This is called via the mono_debugger_class_init_func
5378 hook to add all types to the dynamic type table.
5379 (ves_icall_MonoDebugger_GetType): New interncall to get a class
5380 from its metadata token.
5382 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
5383 New interncall for the debugger.
5385 2002-09-24 Nick Drochak <ndrochak@gol.com>
5387 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
5388 before using it in case it is null.
5390 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
5392 * metadata.c: allow custom modifiers in local var signatures
5393 (bug spotted by Zoltan Varga).
5395 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
5397 * class.c: deal with the <Module> class that may have a NULL vtable.
5400 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
5402 * image.c, image.h: more strong name helpers.
5403 * monosn.c: more work: convert pem keys to cryptoapi format.
5405 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
5407 * string-icalls.c: speedup IndexOf.
5409 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
5411 * icall.c: updates from Zoltan.2.Varga@nokia.com.
5413 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
5415 * icall.c: cleanup: use mono_object_domain ().
5417 2002-09-23 Martin Baulig <martin@gnome.org>
5419 * debug-mono-symfile.c: Improved type support.
5421 2002-09-22 Martin Baulig <martin@gnome.org>
5423 * debug-mono-symfile.c: Added support for reference types and strings.
5425 2002-09-22 Martin Baulig <martin@gnome.org>
5427 * debug-mono-symfile.c: Started to work on the type table.
5429 2002-09-21 Martin Baulig <martin@gnome.org>
5431 * debug-mono-symfile.c: Largely reworked the symbol table format.
5432 The symbol table is now incrementally updated each time a new
5433 method is added. We're now also using our own magic and version
5434 so that you don't need to recompile all your classes if the
5435 dynamic table changes.
5436 (mono_debug_update_mono_symbol_file): Removed.
5437 (mono_debug_symfile_add_method): New function to add a method.
5439 2002-09-21 Martin Baulig <martin@gnome.org>
5442 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
5445 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
5446 New interncall to get a method from its metadata token.
5448 2002-09-21 Martin Baulig <martin@gnome.org>
5450 * debug-mono-symfile.c: Create type table.
5452 2002-09-20 Martin Baulig <martin@gnome.org>
5454 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
5456 2002-09-20 Martin Baulig <martin@gnome.org>
5458 * debug-mono-symfile.c: Provide information about params and locals.
5460 2002-09-20 Martin Baulig <martin@gnome.org>
5462 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
5465 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
5466 interncall to get a method from its metadata token.
5468 2002-09-20 Martin Baulig <martin@gnome.org>
5470 * debug-mono-symfile.c: Added a few checks for method->header
5471 being non-NULL. This should never happen, but for the moment
5472 let's use a g_warning() rather than a g_assert().
5474 2002-09-19 Mark Crichton <crichton@gimp.org>
5476 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
5477 even if support for it isn't present. Added an #ifdef to fix this.
5479 * socket-io.c: Added checks back for Solaris support.
5481 2002-09-19 Martin Baulig <martin@gnome.org>
5483 * debug-mono-symfile.c (read_string, write_string): Reflect latest
5484 changes in the symbol file format.
5486 2002-09-18 Martin Baulig <martin@gnome.org>
5488 * debug-mono-symfile.c: Set version number to 21.
5490 2002-09-18 Dick Porter <dick@ximian.com>
5492 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
5493 on netbsd. Fixes bug 30051.
5495 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5498 (set_version_from_string): little fix.
5500 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
5502 * monosn.c, Makefile.am: added strong name utility.
5503 * reflection.h, reflection.c: implemented delayed signing,
5504 locale, version and hash id assembly attributes.
5506 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
5508 * loader.c, metadata.c: load param attributes in signatures.
5510 2002-09-16 Martin Baulig <martin@gnome.org>
5512 * debug-mono-symfile.c: Added string table with all method names.
5514 2002-09-14 Martin Baulig <martin@gnome.org>
5516 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
5519 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
5521 * reflection.c: record the public key token of referenced assemblies.
5523 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
5525 * image.c, image.h: added functions to get the strong name and the
5526 public key of an assembly.
5527 * pedump.c: use them.
5529 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
5531 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
5533 2002-09-12 Miguel de Icaza <miguel@ximian.com>
5535 * marshal.c (mono_marshal_get_managed_wrapper): Added
5538 2002-09-11 Martin Baulig <martin@gnome.org>
5540 * gc.c: Call GC_unregister_disappearing_link() on all links when
5541 finalizing them, this is necessary to aviod a crash in boehm's
5544 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
5546 * gc.c: handle GetTarget for finalized objects spotted and fixed by
5549 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
5551 * icall.c: implemented MonoType::Module.
5552 * reflection.c, reflection.h: mono_module_get_object () from
5553 Tomi Pakarinen <tomi.pakarinen@welho.com>.
5555 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
5557 * icall.c: ignore overridden methods in GetMethods ().
5558 Fix for FieldInfo::SetValue().
5559 * object.c: handle float/double in runtime invoke.
5561 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
5563 * object.c: allow a constructor to be called again on an object.
5565 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
5567 * class.h, class.c: move field layout code to it's own function and
5568 export it. Get an interface id earlier. Move fields in MonoClass
5569 so they are more cache friendly and align the bitfields.
5570 * loader.c: temporary handle get_param_names() for a runtime method.
5571 * reflection.c, reflection.h: more code to handle runtime creation of
5574 2002-09-09 Martin Baulig <martin@gnome.org>
5576 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
5577 signature with the pinvoke field being set for the actual call.
5579 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
5581 * icall.c: removed some unused icalls. Start of map of glib charsets
5582 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
5584 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
5586 * debug-helpers.c: break infinite loop (found and fixed by
5587 Holger Arnold <harnold@gmx.de>).
5589 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
5591 * icall.c: target may be null in create_delegate.
5593 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
5595 * marshal.c: handle a boolean return type.
5597 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
5599 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
5601 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
5603 * gc.c: fix weakreferences.
5605 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
5607 * icall.c: added icall to get default codepage.
5609 2002-09-03 Dick Porter <dick@ximian.com>
5612 * threads.c: Use MonoThread instead of MonoObject where
5615 Store running thread objects in a hash table, so that we have all
5616 the info to hand when waiting for them to finish
5617 (means we don't need OpenThread() any more, so mingw builds should
5618 be fully functional again.)
5621 * object.h: Added thread ID to MonoThread
5623 2002-09-03 Martin Baulig <martin@gnome.org>
5625 * icall.c (System.Reflection.Assembly::get_location): New interncall.
5627 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5629 * icall.c: fixed leak in get_temp_path. Thanks lupus.
5631 2002-09-03 Martin Baulig <martin@gnome.org>
5633 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
5634 argument to store the end address of the disassembled instruction.
5636 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
5637 here from debug-symfile.h.
5638 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
5639 JIT into this struct.
5640 (MonoSymbolFile): Added `char *image_file' field.
5641 (MonoDebugGetMethodFunc): Removed.
5642 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
5643 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
5644 (mono_debug_find_method): New method.
5646 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
5647 create a full symbol file.
5648 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
5649 and static symbol files.
5650 (mono_debug_find_method): The symbol file keeps an internal method hash,
5651 call this to get a MonoDebugMethodInfo from a MonoMethod.
5653 * debug-symfile.[ch]: Removed.
5655 2002-08-29 Miguel de Icaza <miguel@ximian.com>
5657 * image.c (do_mono_image_open): Remove linker version check.
5659 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
5661 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
5662 wrappers for instance methods.
5664 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5666 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
5668 2002-08-28 Dick Porter <dick@ximian.com>
5670 * Makefile.am: Export HOST_CC for w32 builds
5672 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
5674 * file-io.c process.c: MonoString are null terminated, no
5675 need for mono_string_to_utf16() anymore.
5677 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
5679 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
5681 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
5683 * icall.c, reflection.h: speedup System.MonoType.
5685 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
5687 * reflection.c: allow null as the value of a string argument in
5688 custom attributes constructors.
5690 2002-08-27 Martin Baulig <martin@gnome.org>
5692 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
5693 `trampoline_address' field.
5695 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
5697 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
5698 check (fixes bug #29486)
5700 2002-08-27 Martin Baulig <martin@gnome.org>
5702 * debug-mono-symfile.c: Changed the file format in a way that allows us
5703 open it read-only and to use a specially malloced area for all the
5704 dynamic data. We can now also generate a symbol file on-the-fly if we're
5705 debugging IL code and there is no MCS generated symbol file for it.
5707 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
5709 * object.c: added a define for a good string and array
5710 creation speedup (not enabled by default because we need to deal with
5713 2002-08-26 Martin Baulig <martin@gnome.org>
5715 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
5716 function to create a dynamic symbol file. This is used by the
5717 debugger to create a symbol file for IL code on-the-fly.
5719 2002-08-26 Martin Baulig <martin@gnome.org>
5721 * loader.c (mono_lookup_pinvoke_call): Include the error message
5722 from g_module_error() in the error message.
5724 2002-08-24 Martin Baulig <martin@gnome.org>
5726 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
5727 function to update the symbol file. The symbol file is mmap()ed
5728 writable, but private. This allows us to install the symbol file
5729 together with the assembly.
5731 2002-08-24 Martin Baulig <martin@gnome.org>
5733 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
5734 but they can read the new symbol file format which mcs is now creating.
5736 * debug-symfile.c (mono_debug_find_source_location): Moved to
5737 debug-mono-symfile.c; this is now operating on the new symbol file.
5739 2002-08-23 Martin Baulig <martin@gnome.org>
5741 * debug-helpers.c (mono_method_desc_from_method): New function to get
5742 a MonoMethodDesc from a MonoMethod.
5744 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
5746 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
5747 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
5749 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
5751 * string-icalls.[ch]: make helper methods static.
5753 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5755 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
5756 types to it and to SetValueInternal.
5758 * object.c: Moved handle_enum label to its proper place. This was the
5761 This time i compiled mcs and gtk-sharp and they both work.
5763 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5765 * icall.c: reverted partially my previous patch until
5766 object.c:set_value handles enums correcly.
5768 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5771 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
5772 (ves_icall_System_Environment_get_MachineName): removed warning when
5773 compiling under cygwin.
5775 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
5777 * object.c: fixed field_get_value() for reference types.
5779 2002-08-22 Dick Porter <dick@ximian.com>
5781 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
5782 Don't free a buffer while it's still needed. Patch from Jonathan
5783 Liger <Jonathan.liger@wanadoo.fr>
5785 2002-08-21 Miguel de Icaza <miguel@ximian.com>
5787 * icall.c (ves_icall_System_Environment_get_Platform): Add new
5790 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
5792 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
5793 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
5795 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
5796 we call unmanaged code which throws exceptions.
5798 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
5800 * appdomain.h: added per-domain entry_assembly.
5801 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
5803 * icall.c: Assembly::GetEntryAssembly icall.
5804 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
5805 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
5807 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
5809 * appdomain.h, gc.c: added mono_domain_finalize ().
5811 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5814 (mono_print_unhandled_exception): changed g_warning by g_printerr
5815 because g_log has a 1024 characters limit (yeah, i got a big stack
5816 trace). Don't print exception name, that should be in ToString
5819 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5821 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
5822 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
5824 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5827 (mono_print_unhandled_exception): after previous commit, i realized
5828 that MS calls ToString on the exception. I changed this function to
5829 do that. This way we get stack_trace for free.
5831 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5834 (mono_print_unhandled_exception): invoke Message property instead of
5835 getting 'message' field from Exception. Don't allocate memory for
5836 'trace' and 'message' if not needed.
5838 2002-08-18 Dick Porter <dick@ximian.com>
5840 * unicode.c: Fix asserts to match Encoder.cs checks
5842 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
5844 * marshal.c: fix unaligned store issue and a few wrong
5845 opcode argument types.
5847 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5849 * icall.c: added GetUninitializedObjectInternal internal call.
5851 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
5853 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
5854 to the right domain.
5856 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
5858 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
5860 * class.c (class_compute_field_layout): set blittable to false for Strings
5862 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
5864 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
5866 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
5867 first chunk of code to create types at runtime. Code to
5868 handle ReflectedType/DeclaringType. Make reflection handles
5871 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
5873 * class.c: set correct name in arrays.
5875 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
5877 * appdomain.c (mono_domain_transfer_object): make it work with
5878 valuetypes. bug fixes.
5880 2002-08-12 Dick Porter <dick@ximian.com>
5882 * object.h: Rename some parameters to avoid c++ keywords (Patch
5883 from Joseph Wenninger <kde@jowenn.at>)
5885 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
5887 * icall.c: added icall to implement Assembly.GetFile*.
5889 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
5891 * reflection.h, reflection.c: code to embed managed resources.
5893 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
5895 * class.c: move all the type size stuff into
5896 class_compute_field_layout().
5898 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
5900 * class.c: ensure enums have always the correct instance size.
5901 * unicode.c: remove wrong assert.
5903 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
5905 * assembly.c: fix mem corruption issue.
5906 * image.h, image.c: added mono_image_get_resource () to access
5908 * icall.c: implemented Assembly.EntryPoint property and some
5909 Managed Resources related internalcalls.
5912 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
5914 * image.c, image.h: impemented mono_image_get_entry_point ().
5915 * appdomain.c: use mono_image_get_entry_point.
5917 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
5919 * reflection.c: support the object type argument when loading
5922 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
5924 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
5925 String as return type.
5927 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
5929 * reflection.c: fix encoding of named args for custom attrs to match
5930 the ms implementation. Read them back when instantiating custom
5933 2002-08-02 Radek Doulik <rodo@ximian.com>
5935 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
5936 by Dietmar as quick fix
5937 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
5938 16 as stack size, used on more places as quick fix before Dietmar
5939 will fix it properly
5941 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
5943 * object.h, object.c: added accessors for fields and properties.
5945 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
5947 * class.c, class.h: made mono_class_get_field_from_name ()
5948 loop on parent types.
5949 Added mono_class_get_property_from_name ().
5951 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
5953 * class.c, class.h: move the code to setup the type vtable in its own
5954 function so that it can be reused also for types created at runtime.
5955 Eliminate the "class" identifier from the header file.
5956 * reflection.c: setup the vtable for enums so that we can create
5957 objects for use in SetConstant ().
5959 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
5961 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
5962 instead of the delegate itself as this pointer (bug #28383)
5964 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
5966 * marshal.c (mono_marshal_get_managed_wrapper): added return type
5969 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
5971 * loader.c: don't set the pinvoke bit on icalls.
5973 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
5975 * debug-helpers.c (mono_method_full_name): only print a number to
5976 indicate wrapper type (so that the output is more readable in traces).
5978 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
5980 * class.c (mono_class_init): include method override patch from Paolo
5982 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
5984 * icall.c: fixed GetTypeCode().
5986 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
5988 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
5989 use real delegate invoke function to make it work with multicast
5990 delegates (fix bug# 28291).
5992 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
5994 * object.c: load constant strings.
5996 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
5998 * reflection.c: no magic numbers.
5999 * tabledefs.h: security action enum.
6001 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
6003 * assembly.c: fix possible memory corruption.
6005 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6007 * reflection.h, reflection.c: added support for linking resources.
6008 * verify.c: check we have an updated corlib.
6010 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
6012 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
6014 (mono_marshal_string_array): null terminate unmanaged string arrays.
6015 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
6017 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
6019 * icall.c: Type.GetType () can now return also types from the
6022 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
6024 * loader.h, loader.c: stack walking support.
6025 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
6028 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
6030 * marshal.c: added optimisations for blittable types
6032 * class.c (mono_array_class_get): do not set blittable attribute on arrays
6033 (mono_class_setup_mono_type): set blittable attribute for single
6036 * marshal.c (mono_string_utf8_to_builder): impl.
6037 (mono_string_builder_to_utf8): impl.
6038 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
6040 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
6042 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
6043 (mono_marshal_get_managed_wrapper): impl. byref types
6045 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6048 (search_method): don't display debug message.
6050 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
6052 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
6054 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
6056 * appdomain.c: set the missing filename when throwing exception.
6058 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
6060 * metadata.c (mono_type_size): code cleanup
6061 (mono_type_stack_size): removed some test code
6063 2002-07-21 Miguel de Icaza <miguel@ximian.com>
6065 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
6066 mono_get_exception_file_not_found now.
6068 * exception.c (mono_exception_from_name_two_strings): New version
6069 that will call a constructor with two string arguments.
6070 (mono_get_exception_file_not_found): New helper routine, used to
6071 report file-not-found errors.
6073 2002-07-20 Dick Porter <dick@ximian.com>
6076 * process.c: Pass file handles to CreateProcess
6080 * file-io.c: Implemented CreatePipe
6082 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
6084 * metadata.c (mono_get_param_info): set alignment for value types
6086 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6088 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
6089 Constify mono_domain_assembly_open().
6090 * loader.c: handle null namespace in icalls.
6092 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
6094 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
6095 (emit_str_to_ptr_conv): marshal object as structs
6097 * metadata.c (mono_type_to_unmanaged): marshal object as structs
6099 * marshal.c (mono_marshal_get_runtime_invoke): support value types
6101 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
6103 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
6104 (mono_marshal_get_native_wrapper): we an now return value types
6106 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6108 * verify.c: more checks implemented.
6110 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
6112 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
6114 (mono_marshal_get_native_wrapper): allow byref arguments
6115 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
6116 impl. PtrToStringXXX methods
6117 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
6118 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
6119 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
6120 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
6121 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
6123 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6125 * reflection.c: fix buglet in parsing an assembly name.
6127 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
6129 * marshal.c (emit_ptr_to_str_conv): first impl.
6131 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
6133 * object.c, class.h: cache the vtable in the class as suggested by
6134 vargaz@freemail.hu (Zoltan Varga).
6136 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6138 * class.h, loader.c: added mono_field_from_token().
6139 * verify.c: first cut of type checking code.
6141 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
6143 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
6145 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
6147 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
6149 (mono_marshal_get_remoting_invoke): impl.
6150 (mono_delegate_begin_invoke): impl.
6151 (mono_mb_emit_save_args): impl.
6152 (mono_delegate_end_invoke): impl.
6153 (mono_marshal_get_delegate_begin_invoke):
6154 (mono_marshal_get_delegate_end_invoke):
6155 (mono_marshal_get_delegate_invoke): generate a special name for
6156 those methods (including the signature) and associate them whith
6159 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
6162 (mono_reflection_type_from_name): now it has a MonoImage parameter
6163 which is used as the default image to search the type in. If the image
6164 is NULL or getting the type from it fails, it defaults to corlib.
6166 * icall.c: changed 1 call to mono_reflection_type_from_name to match
6169 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6171 * reflection.c: update the parameter table index.
6173 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
6175 * domain.c: don't include the mark byte in the string hash.
6177 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
6179 * icall.cs: icall for Type.GetTypeCode ().
6180 * verify: a couple of fixes and disabled local initialization checks.
6182 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
6184 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
6186 * debug-helpers.c (mono_method_full_name): print the type of the
6189 * metadata.c (mono_signature_hash): a hash function for signatures
6190 (mono_signature_hash): better hash algorithm
6192 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
6194 * debug-helpers.c (mono_method_full_name): this can now generate
6195 method names with signatures
6197 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
6198 method dont have this pointers.
6200 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
6202 * reflection.c: fixup typebuilder tokens.
6203 * image.c: fix buglet.
6204 * marshal.h: remove whitespace.
6205 * metadata.h, metadata.c: reinstate code that was removed.
6206 * verify.c: handle catch directives and fix another couple of bugs.
6208 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
6210 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
6211 (mono_marshal_get_native_wrapper): make it comp. with the old code
6212 (mono_marshal_get_native_wrapper): support boolean
6213 (mono_marshal_get_managed_wrapper): support more types
6215 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
6217 * class.c (class_compute_field_layout): compute class->blittable attribute.
6219 2002-07-09 Dick Porter <dick@ximian.com>
6221 * threads.c: Make the thread cleaning up cope with threads that
6224 2002-07-08 Radek Doulik <rodo@ximian.com>
6226 * reflection.c (method_encode_code): use non-translated values to
6227 compute finally_start, this fixes exception handling on ppc, yay!
6229 * decimal.h (struct signscale): fix endianess
6231 2002-07-07 Radek Doulik <rodo@ximian.com>
6233 * reflection.c: swap box_val and not val
6235 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
6237 * reflection.c, reflection.h: handle full assembly info in type name.
6238 Handle Type arguments when loading custom attributes.
6239 * icall.c: updated to use new mono_reflection_type_from_name () method.
6241 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6244 (method_from_memberref): also print assembly name when method not found.
6246 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6249 (ves_icall_TypeGetProperties): fixed bug #27473.
6251 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6253 * reflection.c: display image name and token when cannot find the
6254 .ctor for an attribute.
6256 2002-07-05 Martin Baulig <martin@gnome.org>
6258 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
6260 2002-07-04 Dick Porter <dick@ximian.com>
6262 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
6263 compile on mingw. This will cause mingw builds to not wait for
6264 subthreads to terminate after the main thread does. I've lodged a
6265 bug with the mingw developers for them to wrap OpenThread().
6267 2002-07-03 Dick Porter <dick@ximian.com>
6269 * threads.c: Store thread IDs instead of handles, because
6270 GetCurrentThread() returns a pseudohandle and therefore stores
6271 useless values. mono_thread_cleanup() continues checking the
6272 array of threads until it is empty, to cope with subthreads
6273 spawning new threads after the main thread has finished.
6277 * profiler-private.h: Pass the thread ID to thread profiler
6278 functions, instead of a handle
6280 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
6282 * verify.c: fixes to make it more usable.
6283 * pedump.c: added --verify code to verify IL code in an assembly.
6285 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6287 * reflection.c: turn errors into warnings to allow compiling corlib.
6289 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
6291 * reflection.c: add special cases to compile corlib.
6293 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
6295 * reflection.c: handle properties with only a set method.
6297 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
6299 * opcodes.h: add enum with opcodes in opval order.
6301 2002-07-01 Dick Porter <dick@ximian.com>
6304 * object.c (mono_runtime_run_main): Removed unneeded argument
6306 2002-06-28 Martin Baulig <martin@gnome.org>
6308 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
6310 2002-06-27 Dick Porter <dick@ximian.com>
6312 * threads.c: Store the handle in both the parent thread and in the
6313 subthread, to minimise the time between starting a new thread and
6316 2002-06-26 Dick Porter <dick@ximian.com>
6318 * appdomain.c (mono_runtime_cleanup): Close the socket library
6319 after all the threads have finished, not before
6321 2002-06-26 Martin Baulig <martin@gnome.org>
6323 * debug-symfile.c (mono_debug_find_source_location): Added
6324 `guint32 *line_number' argument. If it's not NULL, store the line number
6325 there and return the file name without the line number.
6327 2002-06-25 Dick Porter <dick@ximian.com>
6331 * process.c: Process forking and other support functions
6333 2002-06-25 Dick Porter <dick@ximian.com>
6335 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
6336 things dont happen when the image is closed.
6337 (mono_image_lookup_resource): Walk the resource section looking
6338 for a particular entry
6340 * cil-coff.h: PE resource section decoding
6342 2002-06-25 Dick Porter <dick@ximian.com>
6346 (mono_assembly_foreach): Accessor functions to walk the list of
6348 (mono_assembly_set_main):
6349 (mono_assembly_get_main): Process methods need to know which
6350 assembly is the "main" one
6352 * object.c (mono_runtime_run_main): Record the main assembly
6354 * debug-helpers.c: Fix typo
6356 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
6358 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
6359 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
6361 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
6363 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
6365 2002-06-21 Miguel de Icaza <miguel@ximian.com>
6367 * image.c (do_mono_image_open): Initialize reference count,
6368 otherwise we leak the MonoImage.
6370 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
6372 * reflection.c: small tweak to handle self-hosting.
6374 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6376 * reflection.c: fix type name parse code.
6378 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
6380 * reflection.c: break out of the loop.
6381 * image.c: special case corlib.
6383 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6385 * reflection.c: add all the custom attrs at the end to ensure the
6386 ctors have been properly initialized when the attributes are defined
6387 in the current assembly.
6389 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
6391 * reflection.c: handle correctly multiple-nested types.
6393 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
6395 * row-indexes.h: fix typos.
6396 * reflection.c: adjust for typos and fix method_def_or_ref
6397 encoding in MethodImpl table.
6399 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
6401 * reflection.c: fix entry point patching (thanks Serge!).
6403 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
6405 * verify.c: add check for System.Exception
6407 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
6409 * image.c, class.c: minifix for code just c&p'ed.
6410 * reflection.c: warning fix.
6411 * object.h, loader.h, domain.c: load also StringBuilder.
6413 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
6415 * marshal.h, marshal.c: some support code to handle complex marshaling.
6417 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6419 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
6420 Better signatures with vtable error dump.
6422 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
6424 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
6426 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
6428 * icall.c (ves_icall_Type_GetField): impl.
6430 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6432 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
6433 to retrieve a marshal description blob for a field or param.
6435 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6437 * reflection.h, reflection.c: change order of nested type emission
6438 to avoid table corruption. The NestedTypes table is sorted.
6439 * icall.c: change order of GetConstructor results to workaround mcs bug.
6441 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
6443 * reflection.h, reflection.c: handle field and param marshal
6446 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6448 * icall.c, marshal.c marshal.h: more Marshal class implementation.
6450 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6452 * reflection.c: fix call convention.
6454 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6456 * reflection.h, reflection.c: mono_image_get_memberref_token()
6457 takes a type instead of a class, now. Added
6458 mono_image_get_array_token() to create tokens for the special
6459 multi-dim array methods.
6461 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6463 * assembly.c: handle modules (no assembly table). Split
6464 loading references in its own function.
6465 * class.c: handle moduleref resolution scope.
6466 * image.c, image.h: cache module name in image.
6468 2002-06-07 Martin Baulig <martin@gnome.org>
6470 * reflection.c (mono_image_get_type_info): Only add a class layout entry
6471 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
6473 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
6475 * icall.c: more signature fixes that used uint instead of int.
6477 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6479 * reflection.c: fixed signature of field refs.
6481 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
6483 * class.c, reflection.c: handle typerefs of nested types
6484 (both on read and when writing files).
6486 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
6488 * icall.c: fix method signatures that tried to workaround the previous
6491 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
6493 * debug-helpers.c: fix typo.
6495 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
6497 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
6498 rewrote the PE/COFF writing code (our programs are understood by the
6501 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
6503 * gc.c, gc.h, icall.c: weakreference support.
6505 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6507 * Makefile.am, mono-config.c: use $(sysconfdir).
6509 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
6511 * icall.c: changed default precision of Double.ToString() to 15.
6512 Fixed memory leak. Unified with Single.ToString.
6514 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
6516 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
6518 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
6520 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
6521 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
6522 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
6525 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
6527 * debug-symfile.c, sysmath.c: yet more compilation fixes.
6529 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6531 * reflection.c, socket-io.c: more compilation fixes.
6533 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
6535 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
6536 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
6537 unicode.c: warning and compiler compatibility fixes.
6539 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
6541 * class.h, metadata.c: fixed warnings/compilation errors.
6543 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
6545 * Makefile.am, mono-config.c, mono-config.h: configuration file
6547 * loader.c, loader.h: make Dll mapping configurable at runtime in the
6548 config file. Export methods to insert and lookup mappings.
6550 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6552 * reflection.c: handle types and boxed objects in custom attr
6555 2002-05-30 Martin Baulig <martin@gnome.org>
6558 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
6560 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
6562 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
6563 to lookup the implmap row for a P/Invoke method.
6564 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
6565 P/Invoke method from the runtime on an as needed basis.
6567 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
6569 * metadata.c (mono_metadata_parse_signature): impl.
6571 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6573 * class.c: handle .pack directive.
6575 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6577 * object.c: initialize static fields with RVA data.
6579 2002-05-25 Martin Baulig <martin@gnome.org>
6582 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
6584 2002-05-24 Martin Baulig <martin@gnome.org>
6587 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
6588 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
6589 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
6591 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
6593 * object.c: special case string ctros in invoke.
6594 * gc.c: silly whitespace changes.
6596 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
6598 * threadpool.[ch]: impl. a threadpool that can
6599 be used by mint and mono.
6601 2002-05-22 Martin Baulig <martin@gnome.org>
6603 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
6604 The first argument is now a `MonoReflectionModuleBuilder *', the return
6605 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
6606 `methods' field to get the method builder. The `token' argument is the
6609 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
6610 invalid characters instead of g_assert_not_reached()ing. This seems
6611 to be the behaviour of mscorlib.
6613 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
6615 * object.c (mono_runtime_invoke_array): applied patch from Rachel
6616 Hestilow to fix bug #25104
6618 2002-05-21 Martin Baulig <martin@gnome.org>
6620 * debug-symfile.c (mono_debug_find_source_location): New function.
6621 Looks up an IL offset in the line number table and returns the source
6622 location as a string.
6624 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6627 (mono_double_ToStringImpl): changed %f by %g until we have something
6630 2002-05-21 Nick Drochak <ndrochak@gol.com>
6632 * icall.c : Use different name for Math.Pow's icall. Needed to check
6633 parameters first in C#.
6635 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
6637 * icall.c, reflection.h: added icall to get info about an event.
6639 2002-05-20 Radek Doulik <rodo@ximian.com>
6641 * object.c (mono_value_box): don't use memcpy for boxing on BIG
6643 (mono_value_box): don't use memcpy for small sizes on
6644 architectures with unaligned access
6646 2002-05-20 Martin Baulig <martin@gnome.org>
6648 * reflection.c (mono_reflection_setup_internal_class): Don't crash
6649 if `tb->parent == NULL'.
6650 (mono_reflection_create_internal_class): New function. This is
6651 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
6654 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
6657 2002-05-19 Martin Baulig <martin@gnome.org>
6659 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
6660 argument to get the length, don't default to the array length.
6662 2002-05-18 Miguel de Icaza <miguel@ximian.com>
6664 * assembly.c (mono_assembly_setrootdir): New function used to
6665 override the MONO_ASSEMBLIES directory.
6667 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
6669 * icall.c: ValueType_GetHashCode() initialize local var.
6671 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
6673 * reflection.c: sort custom attributes table.
6675 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6677 * reflection.c: support named args in custom attributes (write support).
6679 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
6681 * reflection.c: fix finally position calculation.
6683 2002-05-15 Radek Doulik <rodo@ximian.com>
6685 * reflection.c: fixed endianess at many places
6687 * icall.c (ves_icall_InitializeArray): comment out debug msg
6689 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
6691 * object.c (mono_unhandled_exception): new function to handle
6692 unhandled exceptions.
6693 (mono_unhandled_exception): call the UnhandledException event.
6694 (mono_runtime_delegate_invoke): impl.
6696 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
6698 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
6699 returns the RVA, not the direct pointer to the data. Handle the case
6700 when the class size is fixed.
6702 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
6704 * reflection.c: fix some endianess issues.
6706 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
6708 * object.c (mono_runtime_invoke): is now able to catch exceptions.
6710 * threads.c (mono_thread_init): added a callback which is invoked
6713 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
6715 * icall.c: make GetHashCode return non-negative values.
6717 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
6719 * object.c, icall.c, gc.c: revert to address-based hashcode.
6721 2002-05-13 Miguel de Icaza <miguel@ximian.com>
6723 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
6725 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
6727 * icall.c, class.c: special case <Module>.
6729 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
6731 * icall.c: fix bug in GetNow().
6733 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
6735 * object.c (mono_runtime_class_init): make sure that we call all
6736 static class constructors.
6738 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6740 * reflection.c: sort methodsemantics table.
6742 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6744 * reflection.h, reflection.c: honour init locals setting.
6746 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
6748 * icall.c: copied Double ToStringImpl for Single ToStringImpl
6750 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
6752 * reflection.c: support ContructorBuilders in attribute blob creation.
6754 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
6756 * reflection.c: some changes to build a binary that can be run
6757 directly in windows.
6759 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
6761 * loader.c: print a big message when an icall can't be found.
6763 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6765 * string-icalls.c: fix bug 24248.
6767 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
6769 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
6770 icall.c, reflection.h: separate assembly loading by pathname and by
6771 assembly name. Use the MONO_PATH env var to search for assemblies.
6773 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
6775 * assembly.c, image.h: add some support for assemblies
6776 with multiple modules.
6777 * class.c, class.h: export mono_class_from_typeref().
6778 * loader.c: remove duplicated code and use mono_class_from_typeref(),
6781 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
6783 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
6784 documentation says (the ECMA one is correct).
6786 2002-05-02 Dick Porter <dick@ximian.com>
6788 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
6789 Don't name the synchronisation mutex.
6791 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
6794 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
6795 Make the prototypes match.
6796 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
6800 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
6801 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
6802 all systems have tm.tm_zone, so use strftime() with %Z to print
6803 the timezone abreviation into a temp string.
6805 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
6806 rather than mono_array_addr() on a MonoString on Big Endian
6809 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
6811 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
6814 2002-04-30 Dick Porter <dick@ximian.com>
6816 * socket-io.c: Cope with SOCKET being an integer rather than a
6819 * threads.c: Added Thread_free_internal, to deal with thread
6820 handle cleanup. Moved calls to handle_store() and handle_remove()
6821 to start_wrapper(), so each can only be called once. Allocate
6822 synchronisation blocks with GC_malloc(), and use GC finalisation
6823 to close the handles.
6825 * icall.c: added System.Threading.Thread::Thread_free_internal
6827 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6829 * icall.c: support Environment.Exit, CommandLineArgs().
6831 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6833 * object.c, object.h: added mono_runtime_run_main () and
6834 mono_runtime_get_main_args () for use in System.Environment.
6836 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
6838 * gc.c: fix thinko, enable actual finalization since the jit is now
6841 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
6843 * gc.c, object.c: take into account that an object may be offset wrt the address
6844 returned by GC_malloc().
6846 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
6848 * image.c: handle files without entries in the assembly table (modules).
6850 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
6852 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
6853 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
6854 allowed to be null when it's System.Object class setup.
6856 2002-04-27 Martin Baulig <martin@gnome.org>
6858 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
6859 if `tb->parent == NULL' rather than crashing.
6861 2002-04-28 Nick Drochak <ndrochak@gol.com>
6863 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
6864 calling acos() where asin() should have been called.
6866 2002-04-26 Martin Baulig <martin@gnome.org>
6868 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
6869 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
6870 there's a subdirectory called `System', but we don't want to read that
6871 subdirectory as an assembly.
6873 2002-04-25 Martin Baulig <martin@gnome.org>
6875 * debug-symfile.c: Reflect latest MonoString changes.
6877 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6879 * rand.c, rand.h: instance method icalls need to have an explicit
6880 this pointer as first argument in the C implementation.
6882 2002-04-25 Nick Drochak <ndrochak@gol.com>
6884 * icall.c: Fix typo in map for GetNonZeroBytes
6886 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
6888 * string-icalls.c : String does now passes unit tests without any
6889 errors, the following changes has been made:
6891 Implemented replace methods.
6892 Renaming of methods to (try) follow the standard.
6893 Fixed compare ordinal
6894 Made all memory allocated directly to function instead of via icall function.
6895 Small performance fix in is_in_array function
6897 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
6899 c (mono_string_Internal_ctor_charp_int_int):
6900 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
6901 sindex < 0, throw ArgumentOutOfRangeException instead of
6902 ArgumentNullException.
6904 Added new check for length == 0, however
6905 I need to make it return String.Empty from the C code.
6907 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
6908 that calculate the length for us here.
6910 (mono_string_Internal_ctor_sbytep_int_int): Replaced
6911 mono_string_new_utf16 with mono_string_new, since value is utf8.
6913 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6915 * object.c: register the object for finalization if needed.
6916 Allocate one more char in the string for the terminating 0 char.
6918 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6920 * class.c, class.h, image.c: check if a type implemenst a destructor.
6921 Use the proper key for array class lookups.
6922 * icall.c: register the icalls in the System.GC class.
6923 * gc.c, gc.h: GC-related functions and icalls.
6925 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6929 * unicode.c: free some strings gotten from mono_string_to_utf8 and
6930 changed a couple of free () by g_free ().
6932 * decimal.c: one-liner in the comments for decimal2string ().
6934 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
6936 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
6938 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
6940 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
6941 * object.c (mono_runtime_invoke_array) : handle null in params
6943 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
6945 * string-icalls.c: fixed bug in split (one off bug)
6947 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
6949 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
6950 * icalls.c: added String::Equals as internal method
6952 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
6954 * threads.c: fixed bug in the double interlocked functions
6956 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
6958 * threads.c: implemented all of the new interlocked icalls.
6959 * string-icalls.c: fix a bug in insert.
6960 * icalls.c: added the icalls for interlocked, removed old string functions.
6962 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
6964 * loader.c: fix off-by-one error when reading argument names.
6966 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
6968 * profiler.c: win32 counter implementation (untested).
6969 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
6970 (the latter needs testing and more complete impl. from win32 folks).
6972 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
6974 * object.c: mono_array_new_full workaround mono_array_class_get
6977 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
6979 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
6980 * object.h (mono_string_chars): Changed casting type.
6982 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
6984 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
6985 method signatures to use gunichar2 instead of gint16.
6987 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
6989 * object.h, object.c: domain-specific versions of mono_object_new and
6992 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
6994 * object.c: changed String layout
6996 * string-icalls.c (mono_string_Internal_ctor_chara): added
6997 internal string constructors.
6999 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
7001 * threads.c: pass 'this' to the thread start routine.
7003 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7005 * string-icalls.c: fix IndexOf and LastIndexOf. Now
7006 InternalCompareStr don't call twice mono_string_cmp_char for the last
7007 character. Improved performance in mono_string_cmp_char.
7009 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7011 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
7012 code into its own library: libmonoruntime.
7014 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
7016 * object.h, object.c: changed array format so that szarrays do not
7017 require a bounds structure.
7018 * icall.c, appdomain.c: support for new szarray format.
7020 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
7022 * metadata.c: compare also the retuns type when comparing signatures:
7023 we didn't do this as an optimization since really overloaded methods
7024 must differ also in the arguments, but this doesn't work with
7025 low-level IL code (or when using explicit conversion operators: see
7026 bug#23498 for an example).
7028 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7030 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
7032 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
7034 * icall.c: make MonoType::GetElementType its own icall.
7036 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7038 * icall.c: remove MonoMethod_get_Name().
7039 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
7042 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
7044 * string-icalls.c: optimized a few methods.
7046 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
7048 * icall.c: added all new string internal calls
7049 * string-icalls.c: added, new string internal call implementation.
7050 * object.c: added mono_string_new_size for allocating a string a size
7052 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
7054 * object.c (mono_object_isinst): use the same code as in the
7055 optimized x86 version.
7057 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7059 * profiler.c: TSC-based timer code (faster and more accurate).
7060 Not hooked up in configure, yet (set USE_X86TSC to 1).
7062 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
7064 * profiler.c, profiler.h: track time spent compiling methods.
7065 * threads.c: track thread creation/destruction.
7067 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
7069 * profiler.c, profiler.h, profiler-private.h: profiling interface
7070 and sample implementation. Moved here so that it can be used also by
7073 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
7075 * reflection.c, reflection.h: keep types and other handles separate in
7076 the hash tables for referred tokens. Add guid for modules.
7078 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7080 * assembly.c: fix bugs found with valgrind.
7081 * metadata.h, metadata.c: added mono_metadata_guid_heap().
7083 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
7085 * threads: added icall support for getting current domain for
7088 2002-04-13 Martin Baulig <martin@gnome.org>
7090 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
7091 (MonoDebugVarInfo): Added `index' field for register based addresses.
7092 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
7093 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
7094 `MonoDebugVarInfo *params' and `guint32 this_offset' with
7095 `MonoDebugVarInfo *this_var'.
7097 * debug-symfile.c (relocate_variable): New static function to write
7098 a location description for a local variable or method parameter.
7100 2002-04-12 Martin Baulig <martin@gnome.org>
7102 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
7103 stack offset and begin/end scope address of a local variable.
7104 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
7105 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
7106 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
7108 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
7109 Added new relocation types for start/end scope of a local variable.
7111 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7113 * object.h: add mono_object_domain() macro.
7114 * reflection.c: handle typespecs.
7115 * icall.c: MonoMethod::get_Name() implementation.
7117 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7119 * icall.c: String::GetHashCode() icall implementation.
7121 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7123 * icall.c: String::IndexOfAny icall.
7124 * object.c, object.h: make array->max_length more useful.
7125 Intrduced mono_object_class() and mono_string_length() macros.
7127 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7129 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
7130 instead of g_unichar_isdigit.
7132 2002-04-11 Nick Drochak <ndrochak@gol.com>
7134 * icall.c: Implement a simple Double.ToString().
7136 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7138 * appdomain.h: only io-layer.h is supposed to be included.
7139 * icall.c: explicitly import environ. Fix warning.
7141 2002-04-10 Nick Drochak <ndrochak@gol.com>
7143 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
7144 return true even if it's not Daylight Savings time.
7145 Only return false for the case where the function isn't
7146 implemented for a plaform (read Windows).
7148 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7150 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
7153 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
7155 * mempool.c (mono_mempool_alloc): only use g_malloc when
7156 absolutely necessary.
7158 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
7160 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
7162 * class.c (mono_class_vtable): use domain mempool to allocate vtable
7163 (mono_class_proxy_vtable): use domain mempool
7165 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7167 * appdomain.h, appdomain.c: split initialization that requires the
7168 execution engine support into mono_runtime_init().
7170 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
7172 * class.c (mono_class_init): don't include vtable inside MonoClass
7173 to save some memory, gather some statistics.
7174 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
7176 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7178 * icall.c: internalcall implementation for ValueType.Equals().
7180 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
7182 * object.c (mono_message_init): moved
7183 (mono_runtime_exec_main): new arch. independent impl.
7184 (mono_runtime_invoke_array): new method - like
7185 mono_runtime_invoke, but you can pass an array of objects.
7186 (mono_remoting_invoke): new arch. independent impl.
7187 (mono_message_invoke): new arch. independent impl.
7188 (mono_runtime_class_init): new arch. independent impl.
7189 (mono_runtime_object_init): new arch. independent impl.
7191 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7193 * metadata.c, object.c, reflection.c: documented the exported
7196 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7198 * icall.c: simpler code to pass the assembly builder data to corlib.
7199 Implement GetNestedTypes() internalcall.
7201 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7203 * class.c: warn if a type can't be loaded.
7205 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
7207 * image.h: typedef MonoImageOpenStatus
7208 * types.h: removed unused file
7210 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
7212 * icall.c: Enum_ToObject accepts enum value arguments.
7214 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7216 * class.c: move initialization of properties, events and nested
7217 classes, so that they happen for interfaces, too.
7219 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7221 * icall.c: cleanup some ugly casts in Array_SetValue*.
7223 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7225 * icall.c: the values array fro enums is of the correct type, now.
7226 Implement (correctly) getFullName instead of assQualifiedName for
7228 * reflection.h, reflection.c: added mono_type_get_name ().
7230 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7232 * assembly.c, image.h: for each MonoImage, record from wich assembly
7234 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
7235 Make Type.Assembly work.
7237 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
7239 * debug-symfile.h: use char* instead of gpointer to avoid
7242 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
7244 * icall.c (ves_icall_InternalExecute): impl. FielSetter
7245 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
7247 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
7249 * icall.c (mono_message_init): impl. (code cleanup)
7250 (ves_icall_InternalExecute): impl. FieldGetter
7252 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
7253 defined we call all (non-static)methods through the vtable.
7255 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
7257 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
7258 finalizer even though the memory is still referenced (and the chunk of
7259 memory is not freed).
7261 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
7263 * assembly.c: fix brokeness.
7265 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
7267 * class.c: kill some warnings. Check explicit interface method
7268 implementation also without considering the namespace.
7269 Load also literal strings in static class data.
7271 2002-03-29 Miguel de Icaza <miguel@ximian.com>
7273 * assembly.c (default_assembly_name_resolver): Kill memory leak.
7274 (default_assembly_name_resolver): Make the resolver take the
7275 "base" directory where the assembly was originally defined, so we
7276 can load DLLs that are in the same directory as the assembly that
7277 is being referenced.
7279 2002-03-28 Dick Porter <dick@ximian.com>
7285 * unicode.c: Warning cleanups
7287 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
7289 * object.h, reflection.h: use the correct type instead of MonoObject.
7291 2002-03-28 Martin Baulig <martin@gnome.org>
7293 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
7294 (mono_debug_update_symbol_file): Initialize classes if necessary.
7296 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
7298 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
7299 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
7301 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
7303 * assembly.h: fix function prototype.
7304 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
7305 * mono-endian.h: use const cast.
7307 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
7309 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
7311 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
7313 * loader.c: don't assert when a typeref can't be loaded, give
7314 a chance to the runtime to trow an exception instead.
7315 * loader.h: fix warning.
7317 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
7319 * class.c (mono_class_proxy_vtable): added proxy support
7321 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
7323 * icall.c: removed last of PAL calls, added System.Environment
7324 * file-io.h, file-io.c: MonoIO implementation
7325 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
7327 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
7329 * appdomain.c: do not use the byte marker in ldstr table lookup.
7330 * debug-helpers.c: allow two ':' to separate class and method name.
7331 * object.c: allocate arrays bounds with the GC, too.
7332 * verify: add a few more checks.
7334 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
7336 * reflection.c: output also literal strings. Allocate parameter data
7337 with GC_malloc() (thanks, Martin, for catching this!).
7339 2002-03-26 Martin Baulig <martin@gnome.org>
7341 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
7342 include the `this' offset in the `param_offsets'.
7344 2002-03-25 Martin Baulig <martin@gnome.org>
7346 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
7347 mono_debug_get_class() function to get the classes. Added new
7348 relocation types for arrays and strings.
7349 (mono_debug_get_class): New static function to search in all
7350 referenced assemblies for a metadata token.
7352 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
7354 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7356 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
7357 hold gc-allocated objects. Make the string heap a stream like the
7358 others. Removed duplicated code when writing stream info.
7359 Added asserts to catch possible buffer overflows. Set the sorted map
7360 for tables that need sorting. Added some documentation.
7362 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
7364 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
7365 for interned strings and vtables.
7367 2002-03-24 Martin Baulig <martin@gnome.org>
7369 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
7370 it in the array since it was created with g_slist_prepend().
7372 2002-03-24 Martin Baulig <martin@gnome.org>
7374 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
7375 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
7376 (mono_debug_method_from_token): Renamed to
7377 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
7378 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
7380 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
7383 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
7385 2002-03-24 Martin Baulig <martin@gnome.org>
7387 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
7388 (mono_debug_method_from_token): New func.
7390 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
7391 New interncall, calls mono_debug_local_type_from_signature().
7392 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
7393 calls mono_debug_method_from_token().
7395 2002-03-23 Martin Baulig <martin@gnome.org>
7397 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
7398 specifies the number of bytes to be converted, not the array size.
7399 Return the number of chars, not the number of bytes.
7400 (ves_icall_iconv_get_chars): The `byteCount' argument
7401 specifies the number of bytes to be converted, not the array size.
7403 2002-03-23 Martin Baulig <martin@gnome.org>
7405 * reflection.h (MonoReflectionSigHelper): New type.
7407 * reflection.c (mono_reflection_sighelper_get_signature_local),
7408 (mono_reflection_sighelper_get_signature_local): New functions.
7410 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
7411 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
7414 2002-03-23 Martin Baulig <martin@gnome.org>
7416 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
7417 is_writeable is set.
7418 (mono_raw_buffer_update): New function to write the modified map
7421 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
7423 * debug-symfile.c (mono_debug_update_symbol_file): Call
7424 mono_raw_buffer_update() when done writing.
7426 2002-03-23 Martin Baulig <martin@gnome.org>
7428 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
7430 * debug-symfile.c: Added support for arguments and local variables.
7432 2002-03-23 Dick Porter <dick@ximian.com>
7434 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
7435 protected by ifdefs, hence breaking the w32 build.
7437 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7439 * object.c: implement is_interned() the right way.
7441 2002-03-21 Martin Baulig <martin@gnome.org>
7443 * debug-symfile.[ch]: New files to handle debugging information
7444 files. There's also support to dynamically update these symbol
7445 files to include machine dependent information.
7447 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
7449 * threads.c (mono_thread_create): new function to create thread
7452 2002-03-20 Martin Baulig <martin@gnome.org>
7454 * icall.c (ves_icall_InternalInvoke): Create a new object if the
7455 method is a constructor.
7456 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
7457 points to ves_icall_InternalInvoke().
7459 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
7461 * file-io.c: Flush shouldn't throw exceptions.
7463 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
7465 * file-io.c: FileStream flush support; FileSetLength now
7466 restores file pointer.
7468 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
7470 * class.c: set image for pointer classes.
7472 2002/03/19 Nick Drochak <ndrochak@gol.com>
7474 * sysmath.c: Forgot one.
7476 2002-03-18 Miguel de Icaza <miguel@ximian.com>
7478 * sysmath.c: Avoid redefining existing names.
7480 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
7482 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
7483 handled by runtime as icall rather than dllimport from libm.so
7484 * file-io.c, file-io.h: fixed handle argument type.
7486 2002-03-18 Dick Porter <dick@ximian.com>
7488 * reflection.c (mono_image_get_type_info): rename interface to
7489 iface, because of "#define interface struct" on windows.
7491 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
7493 * class.c, class.h: rename and export mono_ptr_class_get().
7494 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
7495 * reflection.c, reflection.h, icall.c: better/saner type name
7496 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
7499 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
7501 * class.c (mono_class_init): removed hardcoded GHC_SLOT
7503 * icall.c (ves_icall_InternalInvoke): impl.
7505 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7507 * reflection.c: output the interface map table, too.
7509 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
7511 * class.c (class_compute_field_layout): separate computation of
7514 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
7516 * icall.c: added System.Buffer support.
7517 * file-io.c: moved file icalls from PAL to FileStream.
7519 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
7521 * icall.c (ves_icall_System_Object_GetHashCode): impl.
7523 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
7525 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
7527 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7529 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
7531 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
7533 * debug-helpers.{c,h}: moved here from monograph some useful functions
7534 to locate a method by name/signature in a class or image. Included
7535 also a small and flexible IL disassembler.
7537 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
7539 * reflection.c: fixup tokens in methods with small header size, too.
7541 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
7543 * object.c (mono_string_to_utf8): remove assert(!error), instead
7546 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
7548 * icall.c: update to the new mono_Array_class_get interface.
7550 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
7552 * appdomain.c, object.c: Boehm-GC enable.
7553 * icall.c: make get_data_chunk() support split data requests.
7554 Ensure a class is initialized in more cases. Return only the first
7555 property found in GetProperties() or the compiler gets confused.
7556 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
7557 * reflection.h, reflection.c: add fixup mechanism for field and method
7558 tokens. Initialize assembly->typeref in a single place. Output
7559 properties after events. Support custom attributes for events, too.
7560 Typo fix for paramter custom attrs.
7562 2002-03-07 Martin Baulig <martin@gnome.org>
7564 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
7566 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
7568 * class.c (mono_array_class_get): fix. for multi. dim. arrays
7570 2002-03-06 Martin Baulig <martin@gnome.org>
7572 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
7573 non-zero lower bounds. See testcases #F10-#F13.
7575 2002-03-05 Martin Baulig <martin@gnome.org>
7577 * exception.c (mono_get_exception_argument_out_of_range): New exception.
7579 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
7580 ves_icall_System_Array_GetValue(), only calculate the absolute array position
7582 (ves_icall_System_Array_SetValue): Likewise.
7583 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
7584 as argument and does the actual work. This function is used when copying a
7585 multi-dimensional array.
7586 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
7587 now do all the widening conversions of value types.
7588 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
7590 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7592 * class.c: remove some magic numbers and use the smbolic names,
7593 instead. Added init_events() to load event info at class init time.
7594 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
7595 and mono_metadata_methods_from_event().
7596 * reflection.h, reflection.c: added support for writing out the evnets
7597 related information.
7599 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
7601 * reflection.h, icall.c: use a different method (GetInterfaces)
7602 to gather interface info and add isbyref, isprimitive and
7603 ispointer to the ves_icall_get_type_info() return value.
7605 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
7607 * class.h: stared adding support for events.
7608 * icall.c: split find_members implementation. Added debug icall to get
7609 the address of an object.
7610 * reflection.c: handle TypeBuilders in mono_type_get_object().
7612 2002-03-01 Martin Baulig <martin@gnome.org>
7614 * icall.c (ves_icall_System_Array_GetLength): This must throw an
7615 ArgumentOutOfRangeException(), not an ArgumentException().
7616 (ves_icall_System_Array_GetLowerBound): Likewise.
7617 (ves_icall_System_Array_GetValue): Improved argument checking.
7618 (ves_icall_System_Array_SetValue): Improved argument checking.
7620 2002-03-01 Martin Baulig <martin@gnome.org>
7622 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
7623 called with invalid arguments rather than just dying with g_assert().
7624 (ves_icall_System_Array_SetValue): Likewise.
7625 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
7626 raise a NotImplementedException instead.
7627 (ves_icall_System_Array_GetLength): Added argument checking.
7628 (ves_icall_System_Array_GetLowerBound): Added argument checking.
7630 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
7632 * object.h (mono_assert): new macros mono_assert and
7633 mono_assert_not_reached
7635 2002-02-28 Martin Baulig <martin@gnome.org>
7637 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
7638 and "System::String::IsInterned" to "System::String::_IsInterned".
7640 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
7642 * icall.c: remove hacks for typebuilder. Added icall to create a
7643 modified type from a tybebuilder.
7644 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
7645 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
7646 to create a backing MonoClass for a TypeBuilder.
7648 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
7650 * class.c, class.h: more refactoring of class init.
7651 Export mono_class_setup_mono_type() and mono_class_setup_parent().
7653 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
7655 * marshal.c, marshal.h: start of marshaling interface.
7657 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
7659 * icall.c: fix order in assembly qualified name icall.
7661 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
7663 * class.c: do not free str, since we store it in the hash table.
7664 * reflection.h: add label field to MonoILExceptionInfo.
7665 * reflection.c: handle references to more than one assembly. Handle
7666 case when there isn't a module created in the assembly.
7668 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
7670 * class.c: Fix typo. Start refactoring of class init code.
7672 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
7674 * appdomain.c: exit with 1 on error.
7675 * class.c: we already have the name in MonoClassField.
7676 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
7677 MonoStreamHeader instead of an offset of image->raw_metadata.
7679 2002-02-26 Miguel de Icaza <miguel@ximian.com>
7681 * appdomain.c (mono_init): Be even more descriptive about the error.
7683 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
7685 * appdomain.c: give the user an informative message when corlib can't
7688 2002-02-26 Martin Baulig <martin@gnome.org>
7690 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
7691 New icall to get the time zone data.
7693 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
7695 * reflection.c: set virtual and raw size of section correctly.
7696 * threads.c: transfer domain information to newly created threads.
7698 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
7700 * class.c: when instancing a class in a domain, load the default
7701 vaules for static fields from the constant table. Fix System.Enum to
7703 * icall.c: implement Object::GetType() internalcall. Implemented
7704 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
7705 Fixed checking of binding flags in find_members().
7706 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
7707 * reflection.c: handle enumerations when writing to the constant
7708 table. Use a different object cache for types.
7711 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
7713 * object.c (mono_object_isinst): fix for arrays
7715 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
7717 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
7719 * object.c: don't use mprotect () and fix intern pool hash table
7720 lookup for big endian systems.
7722 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
7724 * icall.c: change type_is_subtype_of () signature.
7726 2002-02-21 Mark Crichton <crichton@gimp.org>
7728 * rand.c, rand.h: Added random number generator for
7729 System.Security.Cryptography classes.
7731 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
7733 * icall.c: Added System.Security.Cryptography calls.
7735 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
7737 * class.c, icall.c, metadata.c: better support for pointer types.
7738 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
7739 * reflection.c: Add support for getting custom attrs for properties
7740 and simplify some code.
7742 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
7744 * icall.c: change getToken () and add custom attribute GetBlob()helper
7746 * reflection.h: add custom attrs array to the reflection builder structures.
7747 * reflection.c: encode and emit custom attributes for all the relevant
7748 reflection objects. Cache fieldref and methodref tokens. Change
7749 mono_image_create_token() interface to take a MonoDynamicAssembly.
7750 More complete custom attributes decoder. Load custom attributes for
7751 Assembly, Field, Method and Constructor objects, too. Make the
7752 returned array an Attribute[] one, not object[]. Added
7753 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
7754 custom attribute constructor.
7756 2002-02-20 Dick Porter <dick@ximian.com>
7760 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
7761 problem code out for now).
7763 2002-02-19 Radek Doulik <rodo@ximian.com>
7765 * object.c (mono_ldstr): use hash table to avoid multiple swapping
7767 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
7769 * icall.c: register the GetCustomAttributes method.
7770 * object.c, object.h: add mono_string_new_len ().
7771 * reflection.h, reflection.c: added mono_runtime_invoke(),
7772 mono_install_runtime_invoke(). Added
7773 mono_reflection_get_custom_attrs () to load custom attributes and
7774 create the attribute objects.
7776 2002-02-19 Dick Porter <dick@ximian.com>
7777 * threads-dummy-types.c:
7778 * threads-dummy-types.h:
7781 * threads-pthread-types.c:
7782 * threads-pthread-types.h:
7783 * threads-pthread.c:
7784 * threads-pthread.h: Deleted obsolete files
7786 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
7788 * class.c (mono_class_vtable): runtime init the class when we
7789 allocate static class data.
7791 * icall.c (ves_icall_System_Array_SetValue): check for null values.
7793 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
7794 and String - but we will need generic marshalling support in the
7796 (mono_init): set the domain name in a ms compatible way
7798 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
7801 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
7803 * object.c (mono_array_clone): use alloca() instead of g_malloc
7806 * appdomain.c (mono_domain_unload): impl.
7808 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7810 * appdomain.c, object.c: fix intern pool implementation.
7811 * class.c: fix alignment code.
7813 2002-02-16 Radek Doulik <rodo@ximian.com>
7815 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
7816 and s2 > s1, just copy lower bytes to be compatible with little
7817 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
7818 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
7820 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
7821 force big_endian to be 1 for big endian machines
7822 (ves_icall_iconv_new_decoder): ditto
7824 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
7826 * socket-io.c (convert_sockopt_level_and_name): If the system
7827 doesn't define SOL_IP or SOL_TCP, get them by hand using
7828 getprotobyname() and caching the values (because this could be a
7830 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
7831 Use the appropriate struct when the system does support it. Ie,
7832 not all systems have struct ip_mreqn so use struct ip_mreq when
7835 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
7837 * reflection.c: handle finally clauses.
7839 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
7841 * socket-io.c: use g_snprintf() instead of snprintf.
7843 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
7845 * reflection.c (mono_param_get_objects): Cast second argument to
7846 mono_method_get_param_names to a const char** to silence the
7849 * appdomain.c (mono_domain_assembly_open): Put parens around the
7850 truth statement in the for-loop.
7852 * unicode.c (iconv_convert): Got rid of a compiler warning about
7853 int i being unused when the system has a new iconv.
7854 (iconv_get_length): Same.
7856 * image.c (load_class_names): Cast the second argument to
7857 g_hash_table_insert() to char* to hush compiler warnings about the
7859 (mono_image_open): Same here.
7861 * socket-io.c: Don't conditionally include sys/filio.h or
7862 sys/sockio.h here anymore since we now get them from
7864 (inet_pton): If the system doesn't support inet_aton, implement
7865 using inet_addr and also #define INADDR_NONE if it isn't defined
7868 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
7870 * metadata.c, metadata.h: added function to get packing and size info
7872 * reflection.h, reflection.c: handle field RVA data. Save info about
7873 the table layout if needed. Assign typedef indexes to all the types
7874 before dumping the info about them to avoid forward reference problems.
7876 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
7878 * socket-io.c (convert_sockopt_level_and_name): ifdef
7879 SO_ACCEPTCONN because it is not defined on my system (old debian)
7881 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7883 * opcode.c: use stddef.h to get NULL.
7885 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
7887 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
7888 for FIONBIO, FIONREAD and SIOCATMARK.
7889 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
7890 define INADDR_NONE and besides, inet_addr() is deprecated and
7891 should not be used. Use inet_pton() instead - it also has the
7892 added bonus that it can easily handle IPv6 addresses as well.
7893 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
7895 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
7897 * decimal.c: remove _MSC_VER conditional.
7899 2002-02-13 Dick Porter <dick@ximian.com>
7902 * icall.c: Internal calls for Blocking, Select, Shutdown,
7903 GetSocketOption and SetSocketOption
7905 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7907 * assembly.cs: better resolver: use it instead of some kludgy
7910 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
7912 * reflection.c: the best way to speed-up the compiler is to avoid
7915 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
7917 * class.c (mono_class_vtable): changed the object layout
7918 (obj->vtable->class).
7919 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
7921 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7923 * assembly.c: look for assemblies in the assembly dir, too.
7925 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7927 * class.c: fix thinko in mono_class_from_type().
7929 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
7931 * exception.h, exception.c: added TypeLoadException.
7932 * object.h, object.c: added mono_array_clone ().
7933 * icall.c: handle throwOnError in AssemblyGetType().
7934 Added Array.Clone().
7935 * opcode.h, opcode.c: use a single value for the opcode val.
7936 Compile fix for non-gcc compilers.
7938 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
7940 * opcodes.c, opcodes.h: export interesting info about opcodes.
7942 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
7944 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
7947 * class.c (class_compute_field_layout): set element_class for enums
7948 (mono_class_create_from_typedef): set element_class for normal classes
7950 * icall.c (ves_icall_System_Enum_get_value): impl.
7952 * class.c (mono_class_create_from_typedef): do not set valuetype
7953 flag for System.ValueType and System.Enum
7955 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
7957 * unicode.c (iconv_convert): fix big endian problem.
7959 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7961 * class.c: add asserts if we are ever going to scribble over memory.
7962 * socket-io.c: not all systems have AF_IRDA defined.
7964 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
7966 * class.c (class_compute_field_layout): do not consider static
7967 fields to compute alignment
7969 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
7971 * appdomain.c (mono_appdomain_get): impl.
7972 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
7974 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
7976 * icall.c: ignore "file://" prefix when loading an assembly.
7978 2002-01-23 Dick Porter <dick@ximian.com>
7982 * Makefile.am: Added socket support
7984 2002-01-23 Miguel de Icaza <miguel@ximian.com>
7986 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
7987 code back. This should return the assemblies that are loaded by
7988 the runtime on behalf of an application domain.
7990 The current implementation is still broken, it just returns every
7991 assembly loaded, but until we get real applications domain this
7994 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
7996 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
7999 2002-01-23 Miguel de Icaza <miguel@ximian.com>
8001 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
8002 the mono_class_from_name lookup.
8003 (ves_icall_get_parameter_info): ditto.
8004 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
8006 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
8008 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
8010 * class.c: load also nested classes on class init.
8011 System.ValueType instance methods gets passed boxed
8012 values, unless methods in derived classed that get a pointer to the
8014 * icall.c: use better name parsing code in GetType().
8015 * image.c, image.h: add mono_image_loaded ().
8016 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
8017 * reflection.c, reflection.h: added mono_reflection_parse_type().
8019 2002-01-22 Veronica De Santis <veron78@interfree.it>
8021 * icall.c : Added mapping of internal calls for Manual and Auto reset events
8022 * threads.c : Added the implementation of internal calls for events
8023 * threads.h : Added prototypes of internal calls for events
8025 2002-01-21 Radek Doulik <rodo@ximian.com>
8027 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
8029 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
8031 * class.c (mono_class_init): set min_align to 1 (instead of 0)
8032 (mono_class_value_size): use min_align
8034 2002-01-20 Dick Porter <dick@ximian.com>
8037 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
8038 so it compiles on w32.
8040 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
8042 * metadata.c (mono_type_stack_size): impl.
8044 * class.c (mono_class_get_field): impl. memberref token
8046 2002-01-16 Veronica De Santis <veron78@@interfree.it>
8048 * icall.h : Added the internal calls mapping for CreateMutex_internal
8049 and ReleaseMutex_internal.
8050 * threads.h : Added the prototype of mutexes internal calls.
8051 * threads.c : Added the implementations of mutexes internal calls.
8053 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
8055 * metaparse.h: removed unused file.
8056 * reflection.c, reflection.h: added stream_data_align () function
8057 to align data in streams and keep stream aligned. Add support for
8058 exception support in method headers.
8060 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
8062 * unicode.c: make iconv_convert () return the number of bytess written
8063 in the output buffer.
8065 2002-01-15 Dick Porter <dick@ximian.com>
8066 * threads.c: Make the runtime's idea of infinite timeouts coincide
8067 with the class library's
8069 Fix a particularly egregious bug in mono_thread_cleanup(). That
8070 code was so utterly bogus it must have been written on a Monday.
8072 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
8074 * reflection.h: add subtypes field to TypeBuilder.
8075 * reflection.c: encode constants for literal fields.
8076 Handle subtypes. Fix user string token (and add a zero byte)
8079 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
8081 * class.c (mono_class_init): bug fix: assign slot numbers for
8084 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8086 * reflection.c: don't try to output a code RVA for abstract methods.
8087 Small fixes for method header format. Output parameter info to the
8088 ParamDef table. Save method overriding info to MethodImpl table.
8089 Fix property support. Allow typedef.extends to be a type in the
8091 * verify.c: fix off-by-one error.
8093 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
8095 * class.c: fix mono_class_from_mono_type () for szarray types.
8096 Remove unused cache check in mono_class_from_type_spec().
8097 * icall.c: *type_from_name () functions handle simple arrays and byref.
8098 * reflection.c: handle byref and szarray types. Handle methods without
8099 body (gets P/Invoke compilation working). Handle types and fields in
8101 * reflection.h: add rank to MonoTypeInfo.
8103 2002-01-10 Dick Porter <dick@ximian.com>
8105 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
8108 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
8110 * icall.c: initialize class in type_from_handle ().
8111 Loop also in parent classes for get_method ().
8112 * reflection.c: properly encode class and valuetype types.
8113 Start on encoding TypeBuilder types. Handle fieldrefs.
8114 Use correct length when registering a user string.
8115 Handle ConstructorBuilder and MonoMethod in get_token ().
8116 Make mono_type_get_object () aware of cached types.
8117 * object.c: back out change to mono_string_new ().
8119 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
8120 * object.c: mono_string_new should return a NULL when the string
8121 passed in is NULL -- not try to deference it.
8123 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
8125 * icall.c: hack to make IsSubType work for TypeBuilders.
8126 * reflection.c: emit constructors before methods.
8127 Retrieve param names in mono_param_get_objects().
8129 2002/01/05 Nick Drochak <ndrochak@gol.com>
8131 * Makefile.am: fix list of headers and sources so automake 1.5
8132 doesn't complain. Removed \# at end of list.
8134 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
8136 * reflection.c: get token for a method ref. Set return type of
8137 constructor to void.
8138 * loader.c: debug message.
8139 * class.c: typo fix.
8141 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
8143 * icall.c: fix array init with rank > 1. FindMembers
8144 loops in parent class as well.
8145 * image.c: do not insert nested types in name cache.
8146 * reflection.c: warning fix.
8147 * reflection.h: add override method (for interface impl).
8149 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
8151 * metadata.c: fix customattr decoding.
8153 2001-12-21 Miguel de Icaza <miguel@ximian.com>
8155 * rawbuffer.cs: Added native Win32 implementation, avoids using
8156 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
8158 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
8160 * class.c: make the low-level routines handle the cache.
8162 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
8164 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
8166 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
8168 * class.c: fix mono_array_element_size() for objects.
8169 * class.h, class.c: add properties to MonoClass and load them
8171 * icall.c: check with isinst() when assigning a value to an array
8172 instead of requiring the classes to match exactly.
8173 Implemented icall for System.Type::GetType().
8174 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
8175 enums. Handle bindingflags when looking for methods and fields.
8176 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
8177 and mono_metadata_methods_from_property().
8178 * reflection.h, reflection.c: added structures for propreties,
8179 parameters and enums. Implemented mono_property_get_object() and
8180 mono_param_get_objects().
8182 2001-12-18 Dick Porter <dick@ximian.com>
8184 * file-io.c: Use mono_string_to_utf16() instead of
8187 * object.c: Added mono_string_to_utf16(), which copies the non
8188 NULL-terminated MonoString into a new double-null-terminated
8191 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
8193 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
8195 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
8197 * file-io.c: raise exceptions if handle is invalid.
8199 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
8201 * assembly.c: yet another check for mscorlib.
8202 * class.c, class.h: load nesting info for classes.
8203 * icall.c: many new functions to support the Reflection classes.
8204 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
8205 * reflection.h, reflection.c: mono_image_create_token(),
8206 mono_assembly_get_object(), mono_type_get_object(),
8207 mono_method_get_object(), mono_field_get_object(): methods to return
8208 objects that parallel the C representation of assemblies, types,
8211 2001-12-11 Dick Porter <dick@ximian.com>
8214 * file-io.c: Internal calls for file IO.
8216 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
8218 * tabledefs.h: missing FileAttributes.
8219 * verify.h, verify.c: use is_valid_string () to simplify and check for
8220 valid strings more correctly. Fix warnings and speeling.
8221 Check more tables: Filed, File, ModuleRef, StandAloneSig.
8222 Check code: branches, maxstack, method calls.
8224 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
8226 * object.c (mono_object_allocate): removed static, so that the jit
8227 can allocate value types.
8229 * icall.c (ves_icall_System_DateTime_GetNow): impl.
8231 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
8233 * class.c: init enum types right away and register the
8234 token->MonoClass map in mono_class_create_from_typedef ().
8235 * verify.h, verify.c: first cut of the verifier.
8236 * pedump.c: add --verify switch to verify metadata tables.
8237 * tabledefs.h: add some missing enums.
8239 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
8241 * class.c (mono_install_runtime_class_init): impl.
8242 (mono_class_init): renamed mono_class_metadata_init to
8243 mono_class_init, also removed the metadata_inited flag
8245 * object.c (mono_object_isinst): use faster algorithm
8247 2001-11-30 Radek Doulik <rodo@ximian.com>
8249 * mono-endian.h: reverted last change
8250 added function prototypes
8252 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
8253 add mono-endian.c back
8255 * mono-endian.c: returned back, as Paolo pointed out, it's needed
8256 for unaligned access, I've mistaked it with endianess. I am
8258 (mono_read16): fix reverted endianess
8259 (mono_read64): ditto
8260 (mono_read32): ditto
8262 2001-11-30 Dick Porter <dick@ximian.com>
8264 * exception.c: Implement mono_exception_from_name()
8266 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
8268 * metadata.h, metadata.c: remove params_size and locals_size and their
8269 calculation from the metadata code: they are only usefult to the
8272 2001-11-29 Radek Doulik <rodo@ximian.com>
8274 * object.c (mono_ldstr): swap bytes here, it's probably not the
8275 best place, but works for me now, I'll redo it once I know mono
8276 better, also note that I add PROT_WRITE and don't reset back, also
8277 note that it's only affects big endians, so x86 should be OK
8279 * mono-endian.h (read16): use just glib macros for both endians
8281 * mono-endian.c: removed as glib macros are used in in
8282 mono-endian.h so we don't need to care about endianess for read
8283 macros as glib does that for us already
8285 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
8287 * class.h, class.h: take minimum alignment into consideration so
8288 that the fields of a class remain aligned also when in an array.
8290 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
8292 * loader.h, loader.c: add mono_method_get_param_names().
8293 * class.c: 0-init class fields.
8295 2001-11-26 Dick Porter <dick@ximian.com>
8299 * threads.c: New file that handles System.Threading on all platforms
8302 * object.h: Remove the synchronisation struct from MonoObject,
8303 replace it with a pointer that gets initialised on demand
8305 * Makefile.am: Replace all the system-specific threading code with
8306 a single file that uses the new wrapper library
8308 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
8310 * class.c, class.h: add mono_install_trampoline() so that the runtime
8311 can register a function to create a trampoline: removes the ugly
8312 requirement that a runtime needed to export arch_create_jit_trampoline.
8313 * object.h, object.c: added mono_install_handler() so that the runtime
8314 can install an handler for exceptions generated in C code (with
8315 mono_raise_exception()). Added C struct for System.Delegate.
8316 * pedump.c: removed arch_create_jit_trampoline.
8317 * reflection.c: some cleanups to allow registering user strings and
8318 later getting a token for methodrefs and fieldrefs before the assembly
8320 * row-indexes.h: updates and fixes from the new ECMA specs.
8322 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
8324 * class.h, class.c: add enum_basetype field to MonoClass.
8325 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
8326 to get index in the constant table reated to a field, param or
8328 * reflection.h, reflection.c: handle constructors. Set public-key and
8329 version number of the built assembly to 0.
8330 * row-indexes.h: update from new ECMA spec.
8332 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
8334 * class.h, class.c: add a max_interface_id to MonoClass.
8335 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
8336 since it's used to do that. Added mono_type_type_from_obj().
8337 Make GetType() return NULL instead of segfaulting if the type was not
8338 found. Handle simple arrays in assQualifiedName.
8339 * object.h: add a struct to represent an Exception.
8340 * reflection.c: output call convention in method signature.
8341 Add code to support P/Invoke methods and fixed offsets for fields.
8343 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
8345 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
8347 * icall.c: use mono_array_addr instead of array->vector: fixes the
8348 reflection image writing.
8349 * reflection.c: init call convention byte to 0 in method signature.
8350 Encode the property signature. Don't output property-related methods
8351 twice. Really process the properties for a type (don't cast a field to
8352 a property, my mom always told me that).
8353 Fix 64 bit issues in pointer alignment in a different and more
8356 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
8358 * loader.h: Removed type class from MonoDefaults, added monotype
8360 * loader.c: Loaded MonoType, removed loading of Type
8362 * icall.c (my_mono_new_object): Now returns a System.MonoType,
8363 and fills in System.Type._impl with a RuntimeTypeHandle rather
8364 than the actual MonoClass *
8366 (ves_icall_type_from_handle): change from type_class to
8369 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
8372 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
8375 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
8377 (ves_icall_System_Reflection_Assembly_GetType): implemented
8379 (ves_icall_System_MonoType_assQualifiedName): implemented
8381 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
8383 2001-11-09 Miguel de Icaza <miguel@ximian.com>
8385 * assembly.c (mono_assembly_open): Implement a cache for the
8388 (mono_assembly_close): only destroy the assembly when the last
8391 2001-11-09 Dick Porter <dick@ximian.com>
8393 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
8395 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
8397 * class.c (mono_class_metadata_init): bug fix: compute the right slot
8399 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
8401 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
8402 from Martin Weindel.
8403 * object.h: add mono_string_chars ().
8405 2001-11-07 Miguel de Icaza <miguel@ximian.com>
8407 * reflection.c (build_compressed_metadata): Eliminates warnings
8408 and uses 64-bit clean code.
8410 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
8411 (mono_type_equal): Change signature to eliminate warnings.
8413 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
8415 * icall.c, loader.c: remove the internalcall array constructors.
8416 Changes to match the new MonoArray structure.
8417 * object.h, object.c: an array object doesn't allocate an extra
8418 vector. Add mono_array_new_full () to create jagged arrays easily.
8420 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
8422 * metadata.h, metadata.c: add mono_metadata_field_info () to
8423 retreive all the info about a field from vairous tables.
8424 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
8425 * class.h, class.c: augment MonoClassField with more info.
8426 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
8427 policy and load a field's RVA if needed.
8429 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
8431 * class.c (mono_class_metadata_init): create a trampoline for all
8432 virtual functions instead of actually compiling them.
8434 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
8436 * class.h, class.c: include name in MonoClassField.
8437 * class.c: fix fundamental type of System.Object and System.String.
8438 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
8440 * icall.c: remove internalcalls for the Reflection stuff that is now
8442 * loader.c: mono_field_from_memberref () implementation.
8443 * mono-endian.c: thinko (s/struct/union/g).
8444 * object.c, object.h: make the mono_string_* prototypes actually use
8445 MonoString instead of MonoObject.
8446 * reflection.c, reflection.h: updates for changes in the reflection
8447 code in corlib: we use C structures that map to the actual C# classes.
8448 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
8449 fat method header if needed and use the info from the ILGenerator for
8450 methods. Handle fields in types. Misc fixes.
8452 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
8454 * class.c (mono_class_metadata_init): bug fix: always allocate
8455 space for static class data
8457 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
8459 * class.c (mono_compute_relative_numbering): use relative
8460 numbering to support fast runtime type checks.
8462 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
8464 * class.c (mono_class_create_from_typeref): added debugging output
8465 to print class name when MonoDummy is returned instead of real class
8467 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
8469 * class.c (mono_class_metadata_init): interface offset table now
8470 contains pointers into the vtable - this is more efficient for the jit
8472 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
8474 * class.c (mono_class_metadata_init): use a temporary vtable (the
8475 old algorithm only worked for the interpreter, but not for the jit)
8477 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
8479 * loader.c (method_from_memberref): use mono_class_get to get the
8480 class of an array instead of using System.Array directly.
8481 (mono_get_method): also add MEMBERREF methods to the method cache
8482 which usefull for arrays.
8484 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
8486 * pedump.c (arch_compile_method): added to compute vtable entry
8488 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
8489 number of interfaces.
8491 * class.h: merged MonoArrayClass into MonoClass
8493 * class.c (mono_class_create_from_typedef): compute the vtable size and
8494 allocate space to include the vtable inside MonoClass
8495 (mono_class_metadata_init): initialize the vtable
8497 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
8499 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
8500 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
8501 * image.c: endian fixes by Laurent Rioux.
8502 * object.h, object.c: rename MonoStringObject to MonoString and
8503 MonoArrayObject to MonoArray. Change some function names to conform to
8504 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
8505 guint16* as first argument, so don't use char*.
8506 Provide macros to do the interesting things on arrays in a portable way.
8507 * threads-pthread.c: updates for the API changes and #include <sched.h>
8508 (required for sched_yield()).
8509 * icall.c: updates for the API changes above.
8510 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
8511 platforms that need them.
8513 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
8515 * class.c: set the correct type for all the fundamental
8516 type when loading the class.
8518 2001-10-05 Dick Porter <dick@ximian.com>
8520 * threads-pthread.c (pthread_mutex_timedlock): Simple
8521 compatibility version for C libraries that lack this call.
8523 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
8525 * class.c: MonoTypes stored in MonoClass are stored as
8526 fundamental MonoTypes when the class represents a
8527 fundamental type (System.Int32, ...).
8528 The TypeHandle return by ldtoken is a MonoType*.
8529 * icall.c: ves_icall_get_data_chunk () write out all the
8530 PE/COFF stuff. Implement ves_icall_define_method (),
8531 ves_icall_set_method_body (), ves_icall_type_from_handle ().
8532 * image.c: properly skip unknown streams.
8533 * loader.h, loader.c: add type_class to mono_defaults.
8534 * metadata.c, metadata.h: export compute_size () as
8535 mono_metadata_compute_size () with a better interface.
8537 * pedump.c: don't try to print the entry point RVA if there is no entry point.
8538 * reflection.c, reflection.h: many cleanups, fixes, output method
8539 signatures and headers, typedef and typeref info, compress the metadata
8540 tables, output all the heap streams, cli header etc.
8541 * row-indexes.h: typo fixes.
8543 2001-10-04 Dick Porter <dick@ximian.com>
8545 * object.h: Add a synchronisation mutex struct to MonoObject
8547 * object.c (mono_new_object): Initialise the object
8548 synchronisation mutexes
8550 * icall.c: System.Threading.Monitor internal calls
8552 * threads-pthread.h:
8553 * threads-pthread.c: System.Threading.Monitor internal calls
8555 * threads-types.h: New file, includes the system-specific thread
8558 * threads-pthread-types.h:
8559 * threads-pthread-types.c: New files, handle pthread-specific
8560 synchronisation types
8562 * threads-dummy-types.h:
8563 * threads-dummy-types.c: New files of dummy support for
8564 thread-specific types
8568 * pedump.c: include mono-endian.h not endian.h
8570 * Makefile.am: More threads files.
8571 Name mono-endian.h not endian.h
8573 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
8575 * Makefile.am, reflection.h, reflection.c: move here the reflection related
8576 stuff and implement a few more bits.
8577 * icall.c: a field needs to be dereferenced twice. Do not use the same
8578 name for two variables in the same scope.
8579 * image.c, image.h: cleanups.
8581 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
8583 * class.c (mono_class_metadata_init): bug fix: compute the right size
8585 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
8587 * icall.c: implemented some of the Reflection internalcalls.
8588 * image.c, image.h: start writing out the PE/COFF image.
8589 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
8590 that does the reverse than decode_blob_size ().
8591 * object.c: use mono_metadata_encode_value (). Move here
8592 temporary implementation of mono_string_to_utf8 ().
8593 * rawbuffer.c: make malloc_map static.
8595 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
8597 * metadata.c: fix type comparison for arrays.
8598 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
8599 Added a couple of new classes to monodefaults.
8600 * icall.c: added a couple of Reflection-related internalcalls.
8601 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
8602 Added a byval_arg MonoType to MonoClass.
8604 2001-09-28 Dick Porter <dick@ximian.com>
8607 * threads-pthread.h:
8608 * threads-pthread.c: Implemented internal calls for
8609 LocalDataStoreSlot operations. Applied mutexes around all shared
8610 data. Reworked the thread creation and Start() operations to
8611 avoid a race condition.
8614 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
8616 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
8618 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
8620 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
8622 * class.c, loader.c: warn and return NULL instead of erroring out.
8623 * icall.c: added System.AppDomain::getCurDomain().
8624 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
8626 2001-09-25 Dick Porter <dick@ximian.com>
8628 * threads-pthread.h:
8629 * threads-pthread.c: Implemented timed thread joining and added
8630 System.Threading.Thread::Join_internal internal call
8632 * icall.c: Added System.Threading.Thread::Join_internal internal call
8635 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
8637 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
8639 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
8640 mono_string_intern () to implement the semantics of the ldstr opcode
8641 and the interning of System.Strings.
8642 * icall.c: provide hooks to make String::IsIntern and String::Intern
8645 2001-09-23 Dick Porter <dick@ximian.com>
8648 * threads-dummy.h: New files of dummy threading routines
8650 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
8651 support code based on system specifics
8653 Rename PTHREAD_LIBS to THREAD_LIBS
8655 2001-09-23 Dick Porter <dick@ximian.com>
8657 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
8658 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
8660 (mono_thread_init): Set up a Thread object instance to return when
8661 the main thread calls Thread.CurrentThread
8662 (mono_thread_cleanup): Wait for all subthreads to exit
8664 * icall.c: New internal calls for System.Threading.Thread::Sleep
8665 (including Schedule) and CurrentThread
8667 * threads.h: New file, to insulate thread-specific stuff from the
8670 2001-09-21 Dick Porter <dick@ximian.com>
8672 * threads-pthread.h:
8673 * threads-pthread.c: New file, for handling pthreads-style
8674 threading support. Start() now starts a new thread and executes
8675 the ThreadStart delegate instance.
8677 * icall.c: Added the internalcall for
8678 System.Threading.Thread::Start_internal
8680 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
8682 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
8684 * loader.c: work around the different signatures for delegates
8685 constructors csc generates in compiled code vs the ones compiled in mscorlib.
8687 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
8689 * class.h, class.c: add mono_class_get_field_from_name ().
8690 * *: Fix C comments and other ANSI C issues.
8692 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
8694 * endian.h, assembly.c: fix some endianness issues.
8696 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
8698 * loader.h, load.c: add delegate_class to mono_defaults.
8699 Handle runtime provided methods in mono_get_method ().
8701 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
8703 * loader.c (mono_get_method): use pinvoke for internal call
8705 * icall.c: use pinvoke for internal call
8707 * loader.c (method_from_memberref): set the method name
8709 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
8711 * metadata.c: help the compiler generate better code for
8712 mono_class_from_mono_type ().
8714 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
8716 * class.c (mono_class_metadata_init): delayed computing of the
8717 class size to mono_class_metadata_init ()
8719 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
8721 * class.c, class.h: add an interfaces member to MonoClass.
8722 * image.c, image.h: add assembly_name field to MonoImage
8723 from the assembly table.
8724 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
8726 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
8728 * class.c: Handle Array in mono_class_from_mono_type ().
8729 * metadata.c, pedump.c: some endian fixes.
8731 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
8733 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
8734 * metadata.c: fix small problem introduced with the latest commit.
8736 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
8738 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
8739 We don't need a MonoMetadata pointer anymore to compare signatures in
8740 mono_metadata_signature_equal (), update callers.
8741 Reduced memory usage an number of allocations for MonoMethodHeader and
8742 MonoMethodSignature.
8744 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
8746 * metadata.c: added compare for szarray.
8748 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
8750 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
8751 and add a couple more types to it and mono_defaults. Give an hint on
8752 classes that need implementing in our corlib and are referenced
8755 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
8757 * class.h, class.c: keep track if a class is also an Enum.
8758 * loader.c: Implement a couple more types for use in libffi
8759 marshalling. Gives better diagnostics when failing to dlopen
8760 a library. Set method->klass for P/Invoke methods, too.
8762 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
8764 * class.c, class.h: add a MonoType this_arg to MonoClass that
8765 represents a pointer to an object of the class' type that
8766 can be used by the interpreter and later the type cache.
8767 Add best guess alignment info for valuetype objects.
8769 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
8771 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
8772 into MonoType: one less level of indirection and allocation and
8773 simplifies quite a bit of code. Added cache for MonoTypes that are
8774 used frequently, so that we don't need to allocate them all the time.
8776 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
8778 * class.c (mono_class_create_from_typedef): System.Enum is also a
8779 value type, although it does not derive from System.ValueType
8780 (maybe a bug in the ms compiler?)
8782 * metadata.c (mono_type_size): return the right size for value types
8784 * loader.c (mono_get_method): only initialize method header if not abstract
8786 * class.c (mono_class_from_mono_type): use mono_default values.
8788 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
8790 * *: use MonoClass pointers instead of <type_tokens>
8792 * class.h: new flag: metadata_inited.
8794 * class.c (mono_class_metadata_init): impl.
8795 (mono_class_instance_size): impl.
8796 (mono_class_data_size): impl.
8798 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
8800 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
8801 MonoClass now has the name and name_space fields.
8802 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
8803 mono_get_method () takes and optional MonoClass as argument.
8804 Removed mono_typedef_from_name() and added mono_class_token_from_name()
8805 instead that takes advantage of a map from class names to typedef
8806 tokens in MonoImage.
8808 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
8810 * metadata.c: zero is not a valid alignment boundary.
8811 Merge MONO_TYPE_VOID in default decoding code.
8813 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
8815 * image.h: merged MonoMetadata into MonoImage
8817 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
8818 identify the type of elements.
8820 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
8822 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
8823 * cil-coff.h: split MonoMSDOSHeader and add size info.
8824 * image.c: add some consistency checks.
8825 * metadata.c: fix row size computation: one programmer
8826 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
8827 add explanation for the locator routine.
8828 Fix decoding of size in method header.
8830 2001-08-20 Miguel de Icaza <miguel@ximian.com>
8832 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
8833 (g_concat_dir_and_file): Bring g_concat_dir_and_file
8834 function from gnome-libs. This uses the right path separator
8835 based on the OS, and also works around a bug in some systems where
8836 a double slash is not allowed.
8837 (default_assembly_name_resolver): Use g_concat_dir_and_file
8838 (mono_assembly_open): ditto.
8840 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
8842 * metadata.c (mono_metadata_signature_equal): impl.
8844 * *: void is now a realy MonoType (instead of using NULL)
8846 * metadata.c (do_mono_metadata_parse_type): use
8847 mono_metadata_parse_type to parse void value.
8849 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
8851 * metadata.c, metadata.h: in the signature and method header store
8852 only the space required for holding the loca vars and incoming arguments.
8854 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
8856 * metadata.c (do_mono_metadata_parse_type): treat void like any
8857 other type (instead of assigning NULL);
8859 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
8861 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
8863 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
8865 * image.c (do_mono_image_open): added a cache for arrays.
8867 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
8869 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
8870 decode a single column from a row in a metadata table and changes
8871 to take advantage of it in the typedef locator (gives a nice speed up).
8872 Store offset info for function params.
8874 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
8876 * image.h (MONO_IMAGE_IS_CORLIB): removed
8878 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
8880 * assembly.c: how could mono_assembly_close () had ever worked?
8881 * metadata.c, metadata.h: provide offset info for local vars.
8882 Implement mono_type_size () to take care of alignment as well
8883 as size (it was mono_field_type_size in cli/class.c before).
8885 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
8887 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
8889 * assembly.h (CORLIB_NAME): set to corlib.dll
8891 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
8893 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
8895 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
8896 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
8897 tokentype.h: massive namespace cleanup.
8899 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
8901 * metadata.h, metadata.c: decode exception clauses when parsing method header.
8903 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
8905 * metadata.c (mono_metadata_free_type): added check for type !=
8906 NULL (void) before calling mono_metadata_free_type()
8908 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
8910 * metadata.h, row_indexes.h: added header with enumerations to use
8911 to index in the columns from tables in metadata and to decode coded
8912 tokens: we should start using this instead of embedding magic numbers
8915 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
8917 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
8918 Move metadata_t info from cli_image_info_t to MonoImage, where
8919 it's easily accessible. Changed all the uses accordingly.
8920 Added the method and class caches to MonoImage.
8921 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
8922 and mono_metadata_decode_value () signature to be more consistent
8923 with the other parse functions (and simplify code). Taken advantage
8924 of zero-length array allocation with GCC. Removed reduntant (and
8925 wrong) MonoFieldType struct and use MonoParam instead. Changed
8926 mono_metadata_parse_field_type () to use common code for parsing.
8927 Added mono_metadata_typedef_from_field () and
8928 mono_metadata_typedef_from_method () to lookup a typedef index from a
8929 field or method token.
8930 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
8932 2001-07-23 Miguel de Icaza <miguel@ximian.com>
8934 * metadata.c (mono_metadata_parse_field_type): Implement.
8935 (do_mono_metadata_parse_type): Split engine from
8936 mono_metadata_parse_type, so that we can create smaller structures
8937 for things that just have one pointer to the MonoType (look at
8940 2001-07-20 Miguel de Icaza <miguel@ximian.com>
8942 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
8943 as Jan Gray found out, it is incorrect.
8945 2001-07-18 Miguel de Icaza <miguel@ximian.com>
8947 * assembly.c: Implement asssembly loading. This loads an image
8948 and loads all the referenced assemblies. Come to think of it, we
8949 could always do lazy loading of the assemblies.
8951 * image.c (mono_image_open): Keep loaded images in a hashtable.
8953 * image.h (MonoImage): Add reference count.
8955 2001-07-17 Miguel de Icaza <miguel@ximian.com>
8957 * assembly.c (mono_assembly_open): Keep track of the file name in
8958 case the assembly has no ASSEMBLY table.
8960 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
8963 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
8965 * metadata.c, metadata.h: decode local vars in method header
8966 parse function. Change callers accordingly.
8968 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
8970 * metadata.h, cil-coff.h: protect against multiple inclusion.
8971 Added some new structures to hold information decoded from metadata:
8972 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
8973 and relevant decoding/free functions.
8974 * metadata.c: implement decoding functions. Add warning for out of bounds
8975 index in mono_metadata_locate(). Implement mono_get_method () to retreive
8976 all the info about a method signature and invocation. Remove check on
8977 uninitialized local var in parse_mh() and fix memory leak.
8979 2001-07-12 Miguel de Icaza <miguel@ximian.com>
8981 * metadata.h: More macros.
8983 * tokentype.h: New file.
8985 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
8987 * assembly.c: added a consistency check and initialize
8988 some structures with g_new0().
8989 * metadata.c: fixed a couple more bugs in table size computation
8990 and add other checks for out-of bound access to metadata.
8992 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
8994 * metatada.c: fix bugs computing table sizes. Spew a
8995 warning when index in string heap is out of bounds.
8997 2001-07-04 Miguel de Icaza <miguel@ximian.com>
8999 * metadata.h: Add a couple of macros to manipulate tokens.
9001 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
9003 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
9004 cli_section_tables).
9006 2001-07-01 Miguel de Icaza <miguel@ximian.com>
9008 * metadata.c (mono_metadata_user_string): New function, provides
9009 access to the UserString heap.
9011 2001-06-27 Miguel de Icaza <miguel@ximian.com>
9013 * metadata.c: Add inline documentation.
9015 2001-06-26 Miguel de Icaza <miguel@ximian.com>
9017 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
9020 2001-06-22 Miguel de Icaza <miguel@ximian.com>
9022 * typeattr.h: New file, TypeAttribute flags.
9024 2001-06-21 Miguel de Icaza <miguel@ximian.com>
9026 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
9027 mono_assembly_ensure_section): Section loading code.
9028 (load_section_tables): Load the sections.
9030 * mono/metadata/metadata.c (mono_metadata_locate_token,
9031 mono_metadata_locate): Functions to locate the information
9032 definition given a token or a table and an index.
9033 (mono_metadata_compute_table_bases): New.
9034 (compute_size): New function to compute the sizes of the various
9037 * mono/metadata/metadata.h: Finish listing the different index
9040 * mono/metadata/pedump.c: Improve to dump new information.
9042 2001-06-19 Miguel de Icaza <miguel@ximian.com>
9044 * mono/metadata/metadata.c: Entered all the tables matching
9047 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2