1 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
3 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
4 InternalToUpper/InternalToLower.
5 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
6 removed invariant culture shortcut. This is now done in managed code.
7 * locales.c: (string_invariant_toupper/tolower) removed.
9 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
12 Added Poll internal call.
14 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
15 call for Poll. Select was too heavy for polling a single socket.
17 * threadpool.[ch]: added mono_threadpool_cleanup.
18 * threads.c: use it. Don't use Thread_Abort on windows.
20 2004-04-23 Martin Baulig <martin@ximian.com>
22 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
24 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
26 * icall.c: Registred new icalls for key pair protection and added an
27 icall for Environment.GetFolderPath on Windows.
28 * security.c|h: Added new icalls for key pair protection.
30 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32 * socket-io.c: don't display the non-supported family warning for known
33 families. Now this is not displayed on windows when checking support
36 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
38 * class.c: don't display the layout warning for static fields.
40 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
42 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
43 * locales.c, locales.h: Added new icalls for culture-specific
44 Char.ToLower and Char.ToUpper.
46 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
48 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
51 2004-04-20 Martin Baulig <martin@ximian.com>
53 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
54 of the type name before passing it to mono_reflection_type_from_name().
56 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
58 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
59 encodings here. Fixes #56965.
61 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
63 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
64 fix test on strstr result not that I can see anything that
67 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
69 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
72 * marshal.c (mono_marshal_get_string_encoding): New helper function.
74 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
75 function to determine which marshalling to use for strings. Fixes
78 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
80 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
82 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
84 * icall.c: #include mono-config.h
86 2004-04-15 Jackson Harper <jackson@ximian.com>
88 * culture-info-tables.h: Fix date formats for en-US culture.
90 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
92 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
93 ThreadPool.SetMinThreads.
94 * threadpool.c: Implemented ThreadPool.GetMinThreads and
95 ThreadPool.SetMinThreads.
97 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
99 * mono-config.c: also load the .config file in the directory
100 where the assembly was found.
102 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
104 * assembly.c: load per-assembly config files.
105 * icall.c: decrapified code to get the config dir and moved to
107 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
108 per-assembly config files. When doing a dll map lookup give precedence
109 to the per-assembly data.
111 2004-04-14 Martin Baulig <martin@ximian.com>
113 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
114 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
115 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
117 * mono-debugger-debugger.c: While the debugger is locked, remember
118 whether the symbol tables have changes and send one single
119 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
121 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
123 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
125 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
128 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
129 account when marshalling string arrays. Fixes #56965.
131 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
133 * icall.c: Add new icalls mapping for security.
134 * security.c|h: Add internal calls for WindowsIdentity,
135 WindowsImpersonationContext and WindowsPrincipal.
137 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
139 * class.c: Added comment to ensure the System.MonoDummy class
140 is removed when no longer necessary
142 2004-04-13 Miguel de Icaza <miguel@ximian.com>
144 * appdomain.c: Pass arguments to the bootstraping exceptions to
145 minimize JITed methods at boot
147 * metadata.c (mono_exception_from_name_two_strings): Allow for the
148 second string to be null.
150 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
151 Change the protocol to minimize the JIT methods at startup. Now
152 it Returns the internal codepage, if the value of "int_code_page"
153 is 1 at entry, and we can not compute a suitable code page
154 number, returns the code page as a string.
156 2004-04-13 Jackson Harper <jackson@ximian.com>
158 * culture-info-tables.h: Fix number of decimal digits for all
161 2004-04-13 Jackson Harper <jackson@ximian.com>
163 * icall.c: Clairfy out of sync error message. It is not always
164 your corlib that is out of sync.
166 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
168 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
169 properties when only the set accessor is overriden. Fixes #55874.
171 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
173 * assembly.c (mono_assembly_load_references): Make this thread safe.
176 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
178 * monosn.c: Add missing initialization calls.
180 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
183 ves_icall_System_Globalization_CultureInfo_construct_number_format
184 Fix g_assert so it compiles on fussier compilers re int/ptr
187 2004-04-08 Dick Porter <dick@ximian.com>
190 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
191 53992. Also rearrange the code so that the internal calls return
192 an error value and exceptions are thrown from managed code.
194 * icall.c: Add type info to the socket icalls.
196 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
198 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
201 2004-04-07 Martin Baulig <martin@ximian.com>
203 * class.c (mono_class_from_generic_parameter): Don't default
204 `klass->parent' to `mono_defaults.object_type'.
206 2004-04-07 Martin Baulig <martin@ximian.com>
208 * reflection.c (mono_reflection_initialize_generic_parameter): Set
209 `param->pklass->reflection_info'.
211 2004-04-07 Jackson Harper <jackson@ximian.com>
213 * culture-info-tables.h: Fix date separator symbol.
215 2004-04-07 Martin Baulig <martin@ximian.com>
217 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
218 from System.Type to System.MonoType.
220 2004-04-07 Martin Baulig <martin@ximian.com>
223 (MonoReflectionGenericParam): Added `has_reference_type' and
224 `has_value_type' fields.
226 * reflection.c (mono_image_get_generic_param_info): Encode the
227 correct flags if we have the `class' or `struct' constraint.
229 2004-04-07 Martin Baulig <martin@ximian.com>
232 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
234 2004-04-07 Jackson Harper <jackson@ximian.com>
236 * appdomain.c: Revert extra patches, just wanted to bump the
239 2004-04-07 Jackson Harper <jackson@ximian.com>
241 * Makefile.am: Add culture-info private headers.
242 * icall.c: Add new icalls for contructing locales.
243 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
244 * locales.h: Declare new culture info construction methods.
245 * object.h: Add new fields used to avoid the CultureMap to
247 * culture-info.h: Definition of structs used in the culture info
249 * culture-info-tables.h: Autogenerated tables that contain culture
250 info data. This file was generated with the locale-builder tool.
251 * appdomain.c: Incement corlib version number.
253 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
255 * appdomain.c: (mono_runtime_init) move mono_thread_init
256 to before mono_object_new calls so critical sections
257 are initialized before use.
259 2004-04-07 Martin Baulig <martin@ximian.com>
262 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
263 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
264 (ves_icall_MonoGenericParam_initialize): Removed.
265 (monogenericparam_icalls): Removed.
266 (generictypeparambuilder_icalls): Added new table for
267 System.Reflection.Emit.GenericTypeParameterBuilder.
270 (mono_reflection_define_generic_parameter): Removed.
271 (mono_reflection_initialize_generic_parameter): This is now called
272 from GenericTypeParameterBuilder's .ctor.
274 2004-04-06 Martin Baulig <martin@ximian.com>
276 * class.c (mono_class_init): Don't inflate nested classes in a
278 (mono_type_get_name_recurse): Include the generic arguments for
279 generic instances and generic type declarations.
280 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
281 (_mono_class_get_instantiation_name): Removed.
282 (mono_class_create_generic): Always use `gklass->name' as our name.
284 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
286 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
287 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
288 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
289 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
290 closed generic methods here.
293 (mono_reflection_generic_inst_get_nested_types): Removed.
294 (inflate_mono_method): Copy the generic parameters from the
295 MonoMethodHeader into out MonoGenericMethod.
297 2004-04-06 Martin Baulig <martin@ximian.com>
300 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
302 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
304 * reflection.c (build_compressed_metadata): If we have any entries
305 in the GenericParam, MethodSpec or GenericParamConstraint tables,
306 set the header version to 1.1.
309 2004-04-06 Martin Baulig <martin@ximian.com>
311 * class.c (mono_class_init): If we're a generic instance,
312 initialize our nested classes, too.
313 (_mono_class_get_instantiation_name): Deal with the new `!%d'
316 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
318 * process.c: quote the argument passed to the shell on windows.
320 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
322 * threads.c (mono_alloc_special_static_data): Allow this to be
323 called during startup.
325 2004-04-02 Martin Baulig <martin@ximian.com>
328 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
330 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
332 * icall.c: Fix build.
334 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
336 * Makefile.am: Added security.c|h.
337 * icall.c: Added icall for get_UserName;
338 * security.c: New file for security related icalls. Added function
339 get_UserName for System.Environment (fix #56144).
340 * security.h: New. Header file for security.c
342 2004-04-02 Dick Porter <dick@ximian.com>
344 * icall.c: Deleted the icalls that were obsoleted some time ago
345 by the ICU string code, and which were mixed into the icall
346 rearranging. Fixes bug 55969.
349 * string-icalls.c: Deleted the code that those icalls reference.
351 2004-04-01 Martin Baulig <martin@ximian.com>
353 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
355 * class.c (mono_class_from_generic_parameter): Don't set
356 TYPE_ATTRIBUTE_INTERFACE.
357 (my_mono_class_from_generic_parameter): Likewise.
359 2004-04-01 Martin Baulig <martin@ximian.com>
361 * loader.c (find_method): Added an optional `MonoClass *ic'
362 argument to search in a specific interface.
363 (mono_get_method_constrained): New public function.
365 2004-04-01 Martin Baulig <martin@ximian.com>
367 * reflection.c (mono_image_get_generic_field_token): Use the
368 `handleref' cache here.
370 2004-04-01 Martin Baulig <martin@ximian.com>
372 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
374 * reflection.c (create_generic_typespec): Use the `typespec' hash
375 here, not the `typeref' one.
377 2004-04-01 Martin Baulig <martin@ximian.com>
379 * class.c (mono_class_inflate_generic_type): Moved the
380 functionality into a new static inflate_generic_type() which
381 returns NULL if it didn't do anything. Only increment the
382 `mono_stats.inflated_type_count' if we actually inflated
384 (mono_class_get_full): Check the classes type to see whether we
385 need to inflate it; also inflate MONO_TYPE_(M)VAR.
387 2004-04-01 Jackson Harper <jackson@ximian.com>
389 * reflection.c: Set culture for assembly references.
391 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
393 * reflection.[ch], icall.[ch], Fix support for pinning variables.
395 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
398 (do_mono_assembly_open): the critical section also covers
399 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
401 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
404 (mono_manage_threads): abort the background threads when finishing.
407 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
409 * gc.c: only close the done_event handle if there was no timeout.
412 2004-03-30 Martin Baulig <martin@ximian.com>
414 * icall.c (icall_entries): It's called "System.Activator", not
417 2004-03-30 Martin Baulig <martin@ximian.com>
419 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
420 (mono_class_create_from_typespec): Likewise.
422 2004-03-30 Martin Baulig <martin@ximian.com>
424 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
425 `has_ctor_constraint' and `initialized'.
427 2004-03-30 Martin Baulig <martin@ximian.com>
429 * reflection.c (encode_new_constraint): New static function to add
430 the constructor constraint attribute to a type parameter.
431 (encode_constraints): Call encode_new_constraint() if necessary.
434 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
436 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
438 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
440 * reflection.c, icall.c: add support for pinning variables.
442 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
444 * marshal.c (mono_marshal_get_managed_wrapper):
445 init bool local with zero rather than null.
447 2004-03-29 Martin Baulig <martin@ximian.com>
449 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
450 the "official" behavior here.
451 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
453 2004-03-29 Martin Baulig <martin@ximian.com>
455 * icall.c: Reflect latest API changes.
457 2004-03-29 Martin Baulig <martin@ximian.com>
459 * loader.c (mono_get_method_from_token): Also call
460 mono_metadata_load_generic_params () for abstract and interface
461 methods; replace the type arguments in the method signature with
462 the ones which are loaded from the metadata.
464 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
466 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
467 of the lock is not the current thread. MS.NET don't do it, in spite of
468 what the documentation says. See bug #56157.
470 2004-03-28 Martin Baulig <martin@ximian.com>
472 * class.c (mono_class_init): Don't call init_properties() and
473 init_events() for generic instances; set `prop->parent' when
474 inflating properties.
476 * reflection.c (mono_generic_inst_get_object): Call
477 `mono_class_init (ginst->klass)'.
478 (mono_type_get_object): Only create a MonoGenericInst if your
479 generic type is a TypeBuilder.
480 (do_mono_reflection_bind_generic_parameters): Only set
481 `ginst->is_dynamic' if our generic type is a TypeBuilder.
483 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
485 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
488 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
490 * icall.c: added Kill_internal icall.
491 * process.[ch]: added Kill_internal icall.
493 2004-03-25 Martin Baulig <martin@ximian.com>
495 * class.h (MonoStats): Added `generic_instance_count',
496 `inflated_method_count', `inflated_type_count' and
497 `generics_metadata_size'.
499 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
501 * reflection.c: no warnings now.
503 2004-03-25 Martin Baulig <martin@ximian.com>
505 * class.c (mono_class_get_full): New public function; does a
506 mono_class_get(), but also takes a `MonoGenericContext *'.
508 * loader.c (mono_field_from_memberref): Renamed to
509 `field_from_memberref', made static and added `MonoGenericContext *'
511 (mono_field_from_token): Added `MonoGenericInst *' argument.
512 (method_from_memberef): Likewise.
513 (mono_get_method_from_token): Likewise.
514 (mono_get_method_full): New public function; does a
515 mono_get_method(), but also takes a `MonoGenericContext *'.
517 * verify.c (mono_method_verify): Get the method's generic context
518 and pass it to mono_field_from_token(), mono_get_method_full() and
519 mono_class_get_full().
521 2004-03-25 Martin Baulig <martin@ximian.com>
523 * class.c (mono_class_inflate_generic_type): Take a
524 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
525 `MonoGenericMethod *'.
527 2004-03-25 Martin Baulig <martin@ximian.com>
529 * loader.h (MonoMethodInflated): Store the MonoGenericContext
530 instead of the MonoGenericMethod here.
532 2004-03-25 Martin Baulig <martin@ximian.com>
534 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
535 each time we create a new MonoGenericInst, we also create a new
536 context which points back to us.
538 * class.c (inflate_method): Use `ginst->context' instead of
539 creating a new context.
541 * loader.c (method_from_memberref): Use
542 `klass->generic_inst->context' instead of creating a new context.
544 2004-03-25 Martin Baulig <martin@ximian.com>
546 * class.h (MonoGenericContext): New struct.
547 (MonoGenericMethod): Removed `generic_inst'.
549 * class.c (mono_class_inflate_generic_method): Take a
550 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
552 2004-03-25 Martin Baulig <martin@ximian.com>
554 * loader.h (MonoMethodInflated): New typedef.
556 * metadata.h (MonoMethodSignature): Removed `gen_method', make
557 `generic_param_count' consume just 30 bits, added `is_inflated'
558 and `has_type_parameters' flags (one bit each).
560 * class.c (mono_class_inflate_generic_method): Create a
561 MonoMethodInflated instead of a MonoMethodNormal and set
562 `is_inflated' in the method signature.
564 * class.h (MonoGenericMethod): Removed `generic_method'.
566 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
568 * image.c: Make sure the name of a MonoImage is always an absolute path.
569 This fixes bug #54415.
571 2004-03-24 Martin Baulig <martin@ximian.com>
573 * class.c (mono_class_setup_vtable): If we're a generic instance,
574 use our generic type's vtable size.
576 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
578 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
579 MONO_NO_UNLOAD env var as a temporary workaround for unloading
582 2004-03-23 Martin Baulig <martin@ximian.com>
584 * class.h (MonoDynamicGenericInst): Added `int count_events' and
587 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
588 (typebuilder_icalls): Added "get_event_info"; calls
589 mono_reflection_event_builder_get_event_info().
591 * reflection.c (mono_reflection_generic_inst_initialize): Added
593 (mono_reflection_event_builder_get_event_info): New function.
595 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
597 * object.h: add mono_type_initialization_init
599 * object.c (mono_runtime_class_init):
600 implement class constructor synchronization rules
601 to cope with threading issues.
602 add mono_type_initialization_init
604 * appdomain.c (mono_runtime_init): call
605 mono_type_initialization_init
607 * class.h: removing initializing field from MonoVTable
609 2004-03-23 Martin Baulig <martin@ximian.com>
611 * class.c (my_mono_class_from_generic_parameter): Use
612 `param->name' if it's not NULL.
614 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
616 * class.c: do not insert non-virtual methods in the vtable.
617 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
618 that means the method is non-virtual. This never would have
621 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
623 * profiler.c: Added lock for accessing coverage_hash.
625 2004-03-22 Martin Baulig <martin@ximian.com>
627 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
628 `method->method->signature->generic_param_count != 0' to make it
629 work for interface methods.
631 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
633 * process.c: quote the string passed to the shell using g_shell_quote.
635 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
638 (mono_threads_manage): don't remove the finalizer thread and self
639 from the threads hash table so that mono_thread_manage can be called
642 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
644 * process.c: quote the arguments when UseShellExecute is true. Fixes
647 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
649 * threads.c: set mono_thread_detach as a cleanup routine for every
650 thread. This way it's always executed upon thread termination, either
651 aborted or finished normally. No more xsp hangs!
653 2004-03-17 Martin Baulig <martin@ximian.com>
655 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
656 `int count_nested' and a `MonoType **nested'.
658 * reflection.c (mono_reflection_bind_generic_parameters): Moved
659 most of the functionality into a new static
660 do_mono_reflection_bind_generic_parameters() and don't take a
661 `MonoType *nested_in' argument any more. Don't compute nested
663 (mono_reflection_generic_inst_get_nested_types): New public method
666 * class.c (mono_class_create_generic): Set `klass->nested_in' if
667 we're a nested class.
669 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
670 mono_reflection_generic_inst_get_nested_types() to compute the
673 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
675 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
676 descriptive error message under windows.
678 2004-03-17 Martin Baulig <martin@ximian.com>
680 * class.c (dup_type): Added `const MonoType *original' argument;
681 copy the attrs from the original type.
683 2004-03-17 Martin Baulig <martin@ximian.com>
685 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
686 `m->generic_inst_cache' here.
688 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
690 * exception.h exception.c: Add stack_overflow_exception.
692 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
695 (overlapped_callback): call SetEvent *after* invoking the callback.
696 No need to call CloseHandle.
698 2004-03-16 Martin Baulig <martin@ximian.com>
700 * reflection.c (mono_image_get_fieldref_token): Take a
701 `MonoReflectionField *' instead of a `MonoClassField *' and a
702 `MonoClass *'; store the `MonoReflectionField *' in the hash.
704 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
706 * appdomain.c: don't add the culture to the filename we're looking for
707 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
709 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
711 * locales.c: don't ignore symbols when doing case insensitive compares.
712 Thanks Dick! Fixes bug #54046.
714 * threads.c: surround 'threads' usage with enter/leave in
717 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
719 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
720 implicitly marshalled as [Out]. Fixes #55450.
722 (mono_marshal_get_runtime_invoke): Zero out the result if there is
725 2004-03-16 Martin Baulig <martin@ximian.com>
727 * class.c (mono_class_from_generic_parameter): Use the actual
730 2004-03-16 Martin Baulig <martin@ximian.com>
732 * reflection.c (type_get_signature_size): New static function.
733 Compues the size of the type in a method signature.
734 (method_get_signature_size): New static function; calls
735 type_get_signature_size() to compute the actual size of the
737 (method_encode_signature): Use method_get_signature_size() to get
738 the signature's size rather than using `nparams * 10'.
740 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
742 * file-io.h: define here WapiOverlapped on windows. I don't want the
743 regular OVERLAPPED one.
746 * threadpool.c: somehow, BindIoCompletionCallback is not found.
747 Disabling AIO on windows.
749 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
751 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
754 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
756 * appdomain.c: upgraded corlib version.
758 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
759 and BeginWrite. Allow opening files for asynchrnous operations.
761 * file-io.h: new struct that maps FileStreamAsyncResult.
762 * icall.c: added new icalls.
763 * process.[ch]: support setting child process environment variables
764 and use the SHELL or COMSPEC when UseShellExecute is true.
766 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
767 callback for async. IO is here and also BindHandle.
769 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
772 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
774 * reflection.c (create_custom_attr): Allow len == 0.
776 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
777 computation on big-endian machines.
779 2004-03-13 Martin Baulig <martin@ximian.com>
781 * class.h (MonoGenericInst): Added `int count_ifaces'.
783 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
784 `ginst->count_ifaces' instead `klass->interface_count' since we
785 may get called before the vtable is created.
787 * loader.c (mono_method_get_param_names): If we're a generic
788 instance, return and don't initialize the class.
790 * reflection.c (mono_reflection_setup_generic_class): Don't call
791 ensure_runtime_vtable().
792 (mono_reflection_bind_generic_parameters): Set
793 `ginst->count_ifaces'.
795 2004-03-11 Jackson Harper <jackson@ximian.com>
799 * unicode.h: Remove unused System.Char icalls.
801 2004-03-11 Miguel de Icaza <miguel@ximian.com>
803 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
804 code when we P/Invoke the first library in Windows.Forms, instead
805 of when we first open the assembly.
807 * assembly.c: Drop the lookup from here.
809 2004-03-10 Martin Baulig <martin@ximian.com>
811 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
812 class for properties, fields and events. Finally fixes #54945.
814 2004-03-10 Martin Baulig <martin@ximian.com>
816 * metadata.c (mono_metadata_class_equal): New static function;
817 checks whether two generic instances or two generic parameters are
819 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
822 2004-03-10 Martin Baulig <martin@ximian.com>
824 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
826 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
827 argument and write it into the `reflection_info' field.
830 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
831 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
833 2004-03-09 Jackson Harper <jackson@ximian.com>
835 * char-conversions.h: use 8 bits for numeric data its all we need
836 * icall.c: numeric data is only 8 bits now.
838 2004-03-09 Martin Baulig <martin@ximian.com>
840 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
842 * class.c (init_properties, init_events): Initialize the new
845 * reflection.c (typebuilder_setup_properties): Likewise.
846 (typebuilder_setup_events): Likewise.
848 * reflection.h (MonoEventInfo): Replaced `parent with
849 `declaring_type' and `reflected_type'.
851 * icall.c (ves_icall_get_property_info): Distinguish between
852 declaring and reflected type.
853 (ves_icall_get_event_info): Likewise.
855 2004-03-09 Martin Baulig <martin@ximian.com>
857 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
858 (ves_icall_Type_GetField): Correctly set field->klass.
860 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
862 * loader.h: Fix warning.
864 2004-03-08 Miguel de Icaza <miguel@ximian.com>
866 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
867 library routine if present. Notice that it will still continue
868 executing even if its missing, for those working on the Gtk#
869 edition of Windows.Forms.
871 * assembly.c (do_mono_assembly_open): If loading the
872 System.Windows.Forms call mono_loader_wini_init.
874 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
876 * class.h: Added MonoRemoteClass struct.
877 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
878 function for MonoStrings.
879 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
880 Added internal call for getting the proxy type.
881 * marshal.c: Get the type of transparent proxies from its remote_class.
882 Added methods that generate the IL for type checks and casts:
883 mono_marshal_get_isinst, mono_marshal_get_castclass,
884 mono_marshal_get_proxy_cancast.
885 * marshal.h: Declaration of the previous new methods.
886 * object.c: Added new moethods for creating and updating MonoRemoteClass
887 instances: mono_remote_class, mono_upgrade_remote_class,
888 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
889 * verify.c: FIx transparent_proxy_fields layout.
890 * appdomain.c: Bump corlib version.
892 2004-03-04 Jackson Harper <jackson@ximian.com>
894 * icall.c: Add icall to access char conversion tables.
895 * char-conversions.h: Character conversion tables.
896 * Makefile.am: Add char-conversions.h private header file.
898 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
900 * appdomain.c (unload_thread_main): Increase unloading timeout to
901 10 sec as a temporary workaround for Nant problems.
903 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
905 * gc.c: Add checks for GC_enable and GC_disable.
907 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
908 (jaak@zd.com.pl). Fix memory corruption in String.Replace
911 2004-02-27 Martin Baulig <martin@ximian.com>
913 * reflection.c (mono_reflection_bind_generic_parameters): Take a
914 `MonoReflectionType *' instead of a `MonoType *'.
916 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
918 * gc.c (run_finalize): Avoid finalizing the object representing the
920 (finalizer_thread): Fix warning.
922 2004-02-25 Martin Baulig <martin@ximian.com>
924 * class.c (_mono_class_get_instantiation_name): Added `int offset'
925 argument for nested types.
926 (mono_class_create_generic): Added support for nested generictypes.
928 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
931 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
933 * reflection.c (method_encode_signature): Increase the minimum
934 value of `size' from 10 to 11.
935 (mono_reflection_bind_generic_parameters): Take `int type_argc'
936 and `MonoType **types' arguments instead of the `MonoArray
937 *types'; added `MonoType *nested_in'. Recursively instantiate
940 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
942 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
943 stack_overflow_ex members which are used by exception handling.
945 * appdomain.c (mono_runtime_init): Initialize the new members.
947 * gc.c (mono_gc_enable): New helper function.
948 * gc.c (mono_gc_disable): New helper function.
950 2004-02-23 Martin Baulig <martin@ximian.com>
952 * icall.c: I must have been really stupid - make it actually work
955 2004-02-23 Martin Baulig <martin@ximian.com>
957 * loader.c (method_from_memberref): Only inflate the method if
958 it's in another klass.
960 2004-02-23 Martin Baulig <martin@ximian.com>
962 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
963 (mono_class_init): If we're a generic instance and an interface,
964 compute `class->interface_id'; also create `class->interfaces'
965 here and inflate them.
967 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
969 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
971 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
973 2004-02-15 Miguel de Icaza <miguel@ximian.com>
975 * reflection.c (method_encode_code): Improved the error message
976 generated by the exception.
978 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
980 * icall.c: Martin did not do what he said in the ChangeLog for
981 2004-02-18, but put back the changes for properties and events.
982 Commenting those changes out again and adding comment to bug #54518.
984 * process.c: removed warning.
986 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
988 * marshal.c (emit_struct_conv): Print an error message instead of
989 asserting when a type does not have the StructLayout attribute.
991 2004-02-20 Martin Baulig <martin@ximian.com>
993 * reflection.c (mono_type_get_object): Also use the cache for
995 (mono_reflection_bind_generic_parameters): Always compute
998 2004-02-20 Martin Baulig <martin@ximian.com>
1000 * class.h (MonoGenericMethod): Removed `klass'.
1002 * class.c (mono_class_inflate_generic_method): Added `MonoClass
1005 2004-02-20 Martin Baulig <martin@ximian.com>
1007 * reflection.c (method_encode_methodspec): Actually use the
1008 uninflated signature for the memberref.
1010 2004-02-20 Martin Baulig <martin@ximian.com>
1012 * class.h (MonoGenericMethod): Removed `declaring'.
1014 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
1015 is NULL, compute it here.
1017 2004-02-20 Martin Baulig <martin@ximian.com>
1019 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
1021 * metadata.c (mono_metadata_generic_inst_hash): New method.
1022 (mono_metadata_generic_inst_equal): New method.
1024 * reflection.c (mono_reflection_bind_generic_parameters): Use the
1025 `klass->image->generic_inst_cache' cache to avoid creating
1026 duplicate MonoGenericInst's.
1028 * class.c (mono_class_inflate_generic_type): Use the cache.
1030 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1032 * object.c: fixed gc descriptor calculation for embedded valuetypes.
1034 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1036 * icall.c: added Socket.WSAIoctl icall.
1038 * socket-io.[ch]: implemented
1039 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
1041 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
1043 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
1045 2004-02-18 Urs C Muff <umuff@quark.com>
1047 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
1048 this work on PPC and other big-endian architectures.
1050 * debug-mono-symfile.h: Prepended the names of all the `guint32'
1051 fields with an underscore to make sure they're only accessed by
1054 2004-02-18 Martin Baulig <martin@ximian.com>
1056 * icall.c: Put the klass->refclass changes back for methods and
1057 fields, but not for properties and events. We're currently not
1058 distinguishing between DeclaringType and ReflectedType for
1059 properties and events, that's what caused the regressions.
1061 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1064 (mono_async_result_new): the handle can be NULL.
1066 * threadpool.c: Use an event instead of a semaphore, don't initialize
1067 it until needed. This saves quite a few semaphores from being created
1068 when using the threadpool.
1070 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
1072 * object.c (mono_string_is_interned_lookup): Fix interning of long
1073 strings. Fixes #54473.
1075 * domain.c (ldstr_equal): Optimize if the two strings are equal.
1077 * icall.c: Revert the klass->refclass changes since they introduce
1078 regressions (bug #54518).
1080 2004-02-18 Martin Baulig <martin@ximian.com>
1082 * class.c (mono_class_init): If we're a generic instance and don't
1083 come from a TypeBuilder, inflate our members here.
1084 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
1085 (mono_class_create_generic): New public method.
1086 (mono_class_initialize_generic): Removed.
1087 (get_instantiation_name): Renamed to
1088 _mono_class_get_instantiation_name() and made it public.
1090 2004-02-18 Martin Baulig <martin@ximian.com>
1092 * class.c (mono_class_inflate_generic_type): Clear the new
1093 instance's `nginst->klass' when inflating a generic instance.
1094 (mono_class_is_subclass_of): Added (basic) support for generic
1097 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
1099 * appdomain.h, domain.c: use a MonoCodeManager instead of a
1100 MonoMempool to hold compiled native code.
1102 2004-02-17 Martin Baulig <martin@ximian.com>
1104 * class.h (MonoDynamicGenericInst): Added `count_properties' and
1107 * reflection.c (mono_reflection_generic_inst_initialize): Added
1108 `MonoArray *properties' argument.
1110 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
1112 2004-02-17 Martin Baulig <martin@ximian.com>
1114 * icall.c (ves_icall_Type_GetFields): Renamed to
1115 ves_icall_Type_GetFields_internal() and added a
1116 `MonoReflectionType *rtype' argument; pass it to
1117 mono_field_get_object() to set the field's "reflected" type.
1118 (ves_icall_Type_GetConstructors): Likewise.
1119 (ves_icall_Type_GetEvents): Likewise.
1120 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
1121 argument; pass it to mono_method_get_object() to set the method's
1124 2004-02-17 Martin Baulig <martin@ximian.com>
1126 * class.h (MonoDynamicGenericInst): New type.
1127 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
1129 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
1130 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
1131 (ves_icall_MonoGenericInst_GetFields): New interncall.
1133 * class.c (mono_class_from_generic): Don't call
1134 mono_class_initialize_generic() if this is a dynamic instance;
1135 ie. it's being created from a TypeBuilder.
1136 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
1137 `class->byval_arg.type'.
1139 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
1140 to `inflate_method' and made static.
1141 (mono_reflection_inflate_field): Removed.
1142 (mono_reflection_generic_inst_initialize): New public method.
1144 * reflection.h (MonoReflectionGenericInst): Removed `methods',
1145 `ctors' and `fields'; added `initialized'.
1147 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
1149 * debug-helpers.c (mono_method_full_name): Fix output for empty
1152 2004-02-12 Martin Baulig <martin@ximian.com>
1154 * class.h (MonoClassField): Added `MonoType *generic_type'.
1156 * reflection.c (mono_image_get_fieldref_token): Added support for
1157 instantiated generic types.
1158 (field_encode_inflated_field): Removed.
1159 (mono_image_get_inflated_field_token): Removed.
1160 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
1162 * reflection.h (MonoReflectionInflatedField): Removed.
1164 2004-02-12 Martin Baulig <martin@ximian.com>
1166 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
1167 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
1169 * reflection.c (mono_image_get_methodspec_token): Take a
1170 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
1171 (mono_image_create_token): Check whether we have a
1172 `method->signature->gen_method' and call
1173 mono_image_get_methodspec_token() if appropriate.
1174 (inflated_method_get_object): Removed.
1175 (mono_reflection_bind_generic_method_parameters): Return a
1176 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
1177 (mono_reflection_inflate_method_or_ctor): Likewise.
1179 * reflection.h (MonoReflectionInflatedMethod): Removed.
1181 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
1183 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
1184 for custom valuetype marshalling.
1186 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
1188 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1190 * icall.c: fixed WSAGetLastError_internal name.
1192 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
1194 * threads.c (mono_thread_attach): Allow this to be called multiple
1197 * threads.c (build_wait_tids): Do not wait for ourselves.
1199 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
1200 appdomain list is empty.
1202 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
1203 memory returned by mono_string_builder_to_utf16, since it points into
1204 managed memory. Thanks to Bernie Solomon for noticing this.
1206 * icall.c: Add AppDomainSetup icalls.
1208 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
1210 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
1213 * reflection.c (reflection_methodbuilder_to_mono_method): Save
1214 custom attributes to the method_aux struct. Also fix array indexes etc.
1216 * loader.c (mono_method_get_param_names): Make dynamic case work again.
1218 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
1220 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
1221 (both static and runtime) and reduce startup time.
1223 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
1225 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
1226 AsAny marshalling conversion instead of crashing.
1228 * marshal.c: Fix warnings.
1230 2004-02-09 Martin Baulig <martin@ximian.com>
1232 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
1234 * reflection.h (MonoReflectionInflatedMethod): Removed the
1235 `declaring' field, it's now in the unmanaged MonoGenericMethod.
1237 * reflection.c (method_encode_methodspec): Removed the `method'
1238 argument; we get it from `gmethod->declaring'.
1239 (inflated_method_get_object): Removed the `declaring' argument.
1241 2004-02-09 Martin Baulig <martin@ximian.com>
1243 * class.h (MonoGenericMethod): New type.
1244 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
1247 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
1248 a `MonoGenericMethod *gen_method' one.
1250 * class.c (mono_class_inflate_generic_type): Take an additional
1251 `MonoGenericMethod * argument. This is only non-NULL if we're
1252 inflating types for a generic method.
1253 (mono_class_inflate_generic_signature): Renamed to
1254 inflate_generic_signature() and made static; take a
1255 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1256 (inflate_generic_header): Take a `MonoGenericMethod *' argument
1257 instead of a `MonoGenericInst *' one.
1258 (mono_class_inflate_generic_method): Likewise.
1260 * reflection.c (encode_generic_method_sig): Take a
1261 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
1262 (method_encode_methodspec): Likewise.
1263 (inflated_method_get_object): Likewise.
1265 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
1266 field with a `MonoGenericMethod *gmethod' one.
1268 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
1270 * class.h (mono_class_has_parent): add parens to expansion
1273 2004-02-08 Martin Baulig <martin@ximian.com>
1275 * image.h (MonoImage): Removed `generics_cache'.
1277 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
1278 instead of a `MonoType *' argument; removed the `inflate_methods'
1279 argument. Don't inflate methods here.
1281 * loader.c (find_method): If it's a generic instance, call
1282 mono_class_init() on the `sclass->generic_inst->generic_type'.
1284 * metadata.c (mono_type_size): Make this work on uninitialized
1285 generic instances; call it on the `ginst->generic_type's class.
1287 * reflection.c (mono_reflection_bind_generic_parameters): Call
1288 mono_class_from_generic() to create the `ginst->klass'.
1290 2004-02-08 Martin Baulig <martin@ximian.com>
1292 * class.h (MonoClass): Changed type of `generic_inst' from
1293 `MonoType *' to `MonoGenericInst *'.
1295 2004-02-08 Martin Baulig <martin@ximian.com>
1297 * icall.c (ves_icall_Type_BindGenericParameters): Just call
1298 mono_type_get_object(), this is now creating a `MonoGenericInst'
1299 for MONO_TYPE_GENERICINST.
1300 (ves_icall_MonoGenericInst_GetParentType): Likewise.
1301 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
1303 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
1304 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
1305 (inflated_method_get_object): Added `MonoClass *refclass' argument.
1306 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
1309 * reflection.h (MonoReflectionInflatedMethod): Removed
1310 `declaring_type' and `reflected_type'.
1312 2004-02-08 Martin Baulig <martin@ximian.com>
1314 * class.h (MonoGenericInst): Added `MonoType *parent' and
1315 `MonoType **ifaces'.
1317 * reflection.h (MonoReflectionGenericInst): Removed `klass',
1318 `parent' and `interfaces'.
1320 * reflection.c (mono_reflection_bind_generic_parameters): Take a
1321 `MonoType *' argument and return a `MonoType *'.
1324 (ves_icall_MonoGenericInst_GetParentType): New interncall.
1325 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
1327 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
1329 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
1330 valuetype marshalling.
1332 2004-02-06 Martin Baulig <martin@ximian.com>
1335 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
1336 (my_mono_class_from_generic_parameter): Likewise.
1338 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
1340 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
1341 contents of the symbol files lazily.
1343 * object.h (MonoThread): Add 'name' and 'name_len' fields.
1345 * threads.h threads.c icall.c: New icalls for getting and setting the
1348 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
1350 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
1351 Raise an exception when the domain is not found.
1353 2004-02-03 Martin Baulig <martin@ximian.com>
1355 * reflection.c (mono_image_get_methodspec_token): Use the
1356 uninflated signature; fixes gen-33.
1358 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
1360 * gc.c threads.c: Make the finalizer thread a normal managed thread so
1361 the finalizer code can use thread functionality.
1363 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
1364 the finalizer thread.
1366 * threads.c: Make some functions more robust.
1368 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
1370 * metadata.h: Add new marshalling conventions.
1372 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
1373 stringbuilder marshalling. Fixes #53700.
1375 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
1377 * reflection.c (mono_image_get_type_info): Save declarative security
1380 * reflection.c (mono_image_get_field_info): Handle uninitialized
1381 unmanaged fields as well.
1383 * appdomain.c: Bump corlib version.
1385 2004-02-01 Martin Baulig <martin@ximian.com>
1387 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
1388 method type arguments.
1390 2004-01-30 Duncan Mak <duncan@ximian.com>
1392 * marshal.h: Add prototype for
1393 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
1395 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
1398 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
1400 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
1401 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
1403 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
1405 * marshal.c (mono_marshal_get_native_wrapper): Add support for
1406 custom marshalling of valuetypes.
1408 * marshal.c: Fix some warnings.
1410 2004-01-29 Martin Baulig <martin@ximian.com>
1412 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
1413 for generic method parameters.
1415 * reflection.c (method_encode_methodspec): Write the uninflated
1416 signature into the methodspec table.
1417 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
1418 is always the uninflated method.
1419 (reflection_methodbuilder_to_mono_method): Copy the generic
1420 parameters from the MethodBuilder into `header->gen_params'.
1422 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
1424 * class.c (mono_class_from_generic_parameter): Fix warning.
1426 2004-01-27 Martin Baulig <martin@ximian.com>
1428 * class.c (mono_class_from_generic_parameter): Don't create
1429 `klass->methods' here.
1431 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
1433 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
1434 extension since it does not work with libraries named lib<FOO>.dll.so.
1436 2004-01-25 Martin Baulig <martin@ximian.com>
1438 * class.c (mono_class_inflate_generic_type): Added support for
1439 MONO_TYPE_GENERICINST.
1441 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
1442 inflate methods on open constructed types.
1444 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1446 * object.c: fire ProcessExit event in the root AppDomain after running
1447 Main. Fixes bug #53299.
1449 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
1451 * socket-io.c: include the new socket-wrappers.h header.
1452 Use the wrappers instead of the unix socket functions to make the code
1455 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
1457 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
1459 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
1462 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
1464 * reflection.c (mono_image_create_pefile): Handle the case when the
1465 entry point is not a MethodBuilder.
1467 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
1468 field to ReflectionMethod since it is not allways a builder.
1470 * reflection.c (type_get_fully_qualified_name): New helper function to
1471 return the fully qualified name of a type.
1473 * reflection.c (encode_marshal_blob): Always emit the fully qualified
1474 type name for custom marshallers.
1476 * reflection.c (mono_marshal_spec_from_builder): Ditto.
1478 * class.c (mono_class_setup_vtable): If a parent class already
1479 implements an interface, use the implementing methods from that class.
1482 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1484 * threadpool.c: just return instead of ExitThread to allow for thread
1487 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
1489 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
1490 when closing resource modules.
1492 * reflection.c (mono_image_create_pefile): Handle the case when the
1493 entry point is not a MethodBuilder.
1495 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
1496 field to ReflectionMethod since it is not allways a builder.
1498 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
1500 * marshal.c (mono_marshal_get_managed_wrapper):
1501 mono_marshal_alloc takes native int so CONV_I
1504 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
1506 * reflection.c (fixup_cattrs): New function to fixup the methoddef
1507 tokens in the cattr table. Fixes #53108.
1509 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1511 * loader.c: don't trim ".dll" before looking up in the config file.
1512 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
1514 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
1516 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
1517 Return the module which contains the resource as well.
1518 (ves_icall_System_Reflection_Module_Close): New icall.
1520 * appdomain.c: Bump corlib version number.
1522 * image.c (mono_image_addref): New public function.
1524 * assembly.c: Call mono_image_addref.
1526 * reflection.c (mono_module_get_object): Increase reference count of
1529 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
1532 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
1533 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
1534 proper exceptions on DllImport problems.
1536 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
1538 * class.c, metadata.c: eliminate CSIZE macro.
1540 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
1542 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
1543 * object.h: Added async_callback field in MonoAsyncResult.
1544 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
1545 * verify.c: Added async_callback in MonoAsyncResult layout.
1547 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
1549 * reflection.c (mono_reflection_get_custom_attrs): Add support
1552 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
1554 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
1556 (mono_marshal_method_from_wrapper): Add null pointer check.
1558 2004-01-16 Martin Baulig <martin@ximian.com>
1560 * debug-mono-symfile.h: Set version number to 36 and reflect
1561 latest symbol writer changes.
1563 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
1565 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
1566 multi-dimensional arrays.
1567 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
1568 (mono_class_from_mono_type): Use bounded_array_class_get.
1570 * class.c (mono_bounded_array_class_get): New function which takes
1571 a 'bounded' bool argument to distinguish vectors from one dimensional
1574 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
1575 bounded_array_class_get if the array has bounds.
1577 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1578 Search modules loaded using AssemblyBuilder:AddModule as well.
1580 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1582 * appdomain.c: increased corlib version.
1583 * filewatcher.c: removed g_print.
1585 (get_property_info): only allocate what is actually requested.
1586 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
1588 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1590 * Makefile.am: added filewatcher.[ch]
1591 * filewatcher.[ch]: FileSystemWatcher runtime support.
1592 * icall.c: added new FSW icalls.
1594 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
1596 * string-icalls.c: fix stringbuilder regression as suggested by
1597 Iain McCoy <iain@mccoy.id.au>.
1599 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
1601 * process.c (process_read_stringtable_block): Recognize '007f' as
1602 a language neutral stringtable block.
1604 2004-01-12 Patrik Torstensson
1606 * object.h (MonoStringBuilder) : Changed layout to support our
1607 new stringbuilder class.
1608 * marshal.c: Change marshalling to support the new layout of
1610 * appdomain.c: increased version number because new layout of
1613 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
1615 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
1616 assembly name as an string instead of an AssemblyName, since it is
1617 easier to extract info from it.
1619 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
1620 the culture subdirectories too. Fixes #52231.
1622 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1624 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
1625 It takes 2 new parameters with an optional name for the method to look
1626 for and case ignoring info.
1628 * threadpool.c: removed unused variable.
1630 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1632 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
1633 It takes 2 new parameters with an optional name for the property to look
1634 for and case ignoring info.
1637 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
1639 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
1642 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1645 * assembly.c: escape the uri before passing it to g_filename_from_uri.
1648 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
1650 * reflection.c: Add support for more than one unmanaged resource.
1652 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
1653 in field->def_value, as done in all other cases.
1655 * reflection.c (mono_reflection_get_custom_attrs): Add support for
1658 * reflection.c (mono_reflection_create_runtime_class): Remove
1659 errorneous assignment to klass->element_class, since it is already
1660 done in mono_reflection_setup_internal_class.
1662 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1664 * gc.c: added missing LeaveCriticalSection.
1665 * icall.c: indented a couple of lines.
1666 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
1667 if we call EndInvoke inside a callback. Fixes bug #52601.
1669 2004-01-07 Martin Baulig <martin@ximian.com>
1671 * mono-debug-debugger.h
1672 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
1674 2004-01-06 Miguel de Icaza <miguel@ximian.com>
1676 * appdomain.c: Use messages in NotImplementedException.
1678 * exception.c (mono_get_exception_not_implemented): Now this takes
1681 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
1682 exception instead of g_asserting an aborting when something is not
1685 Add some inline docs.
1687 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
1689 * reflection.h: Update after changes to object layout.
1691 * reflection.c: Implement saving of unmanaged aka win32 resources.
1693 * appdomain.c: Bump version number.
1695 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
1696 Handle missing domains gracefully.
1698 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
1700 * file-io.c : On Windows, there are much more invalid_path_chars.
1702 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
1704 * class.h, object.c: prepare for GetType () speedup.
1706 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
1708 * profiler.c: workaround for --profile null reference exception on
1709 cygwin. Patch by Patrik Torstensson.
1711 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
1713 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
1714 make work for unaligned access.
1716 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
1718 * class.c: small cleanup (class->fields [i] -> field).
1719 * image.c: check address of metadata is valid.
1721 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
1723 * assembly.h assembly.c (mono_assembly_loaded): New public function to
1724 search the list of loaded assemblies.
1726 * reflection.c (mono_reflection_type_from_name): Use
1727 mono_assembly_loaded instead of mono_image_loaded.
1729 * reflection.c: Fix warnings.
1731 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
1733 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
1734 is dynamic. This is needed since an assembly can contain both dynamic and
1737 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
1740 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
1742 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
1743 to store modules loaded using AddModule.
1745 * reflection.c (mono_image_fill_file_table): Generalize this so it works
1748 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
1750 * reflection.c (mono_image_fill_export_table_from_module): New function to
1751 fill out the EXPORTEDTYPES table from a module.
1753 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
1754 into a separate function. Also handle loaded non-dynamic modules.
1756 * reflection.c (mono_image_basic_init): Fix memory allocation.
1758 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1760 * assembly.c (mono_assembly_load_references): Make this public.
1762 2003-12-19 Martin Baulig <martin@ximian.com>
1764 * class.c (mono_class_initialize_generic): Made this static, take
1765 a `MonoGenericInst *' instead of a `MonoClass *'.
1766 (mono_class_from_generic): Call mono_class_initialize_generic()
1767 unless we're already initialized or being called from
1768 do_mono_metadata_parse_generic_inst().
1770 * class.h (MonoGenericInst): Added `initialized' and
1771 `init_pending' flags.
1773 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
1774 `mono_class_init (gklass)' or mono_class_initialize_generic()
1775 here; set `generic_inst->init_pending' while parsing the
1778 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
1780 * locales.c: include string.h for memxxx prototypes
1782 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
1784 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
1785 constructor when accessing literal fields.
1787 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
1789 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1791 * reflection.c (assembly_add_resource_manifest): New function to fill
1792 the MANIFESTRESOURCE table.
1794 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
1796 * reflection.h: Update to changes in class layout.
1798 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
1799 Reenable call to mono_runtime_is_shutting_down ().
1801 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
1802 determine if the runtime is shutting down.
1804 2003-12-16 Jackson Harper <jackson@ximian.com>
1806 * icall.c: comment out call to mono_runtime_is_shutting_down to
1809 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
1811 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
1812 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
1814 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
1816 * reflection.c: move definition of swap_with_size
1817 to before its first call
1819 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
1821 * appdomain.c (mono_runtime_is_shutting_down): New public function.
1823 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
1826 * object.c: Fix warnings.
1828 * icall.c (ves_icall_Type_Get...): Only consider inherited static
1829 members if FlattenHierarchy is set.
1831 * reflection.c (mono_image_add_decl_security): New function to emit
1832 declarative security.
1834 * reflection.h reflection.c: Add support for declarative security.
1836 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1838 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
1840 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
1842 * appdomain.c verify.c: Moved corlib version checking into its own
1843 function in appdomain.c since it needs to create vtables etc.
1845 2003-12-13 Patrik Torstensson <p@rxc.se>
1847 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
1848 instead of unwrapped server.
1850 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
1852 * verify.c (check_corlib): Fix field index.
1854 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
1856 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
1859 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
1861 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
1862 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
1863 cope with sizeof(size_t) != sizeof(guint32).
1865 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1867 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
1870 2003-12-10 Mark Crichton <crichton@gimp.org>
1872 * icall.c: removed the GetNonZeroBytes. We now handle this case
1875 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
1877 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
1879 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
1882 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
1884 * verify.c (check_corlib): Handle the case when the version field is
1885 initialized by a static constructor.
1887 2003-12-08 Patrik Torstensson <p@rxc.se>
1889 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
1891 2003-12-08 Martin Baulig <martin@ximian.com>
1893 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
1894 a MonoReflectionGenericParameter, also take the parameter index
1895 and name as arguments.
1896 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
1897 (ves_icall_MonoGenericParam_initialize): New interncall.
1898 (ves_icall_Type_make_byref_type): New interncall.
1900 * reflection.h (MonoReflectionGenericParam): Derive from
1901 MonoReflectionType, not just from MonoObject. Added `refobj' and
1904 * reflection.c (mono_reflection_define_generic_parameter): Create
1905 and return a new MonoReflectionGenericParam; don't initialize the
1907 (mono_reflection_initialize_generic_parameter): New public method;
1908 initializes the constraints and creates the `param->pklass'.
1910 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
1912 * reflection.h reflection.c: Use the new fields 'num_types',
1913 'num_fields' and 'num_methods' to track the number of types etc.
1915 * verify.c (check_corlib): Check corlib version number.
1917 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
1919 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
1920 function works on all methods.
1922 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
1924 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
1925 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
1926 the custom_type_info flag of the transparent proxy.
1927 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
1928 objects that supports IRemotingTypeInfo.
1929 * object.h: Added custom_type_info field in transparent proxy.
1931 2003-12-06 Martin Baulig <martin@ximian.com>
1933 * class.c (mono_class_create_from_generic): Removed.
1934 (mono_class_from_generic): Check `ginst->klass' before doing
1935 anything else. This is important to fully support "recursive"
1938 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
1939 empty `generic_inst->klass' before doing anything else.
1941 2003-12-06 Dick Porter <dick@ximian.com>
1946 * locales.c: Use C structs to access class fields. Don't do a
1947 conversion between MonoString and UChar because both are
1948 platform-endian UTF-16. Compare now takes startindex and count
1949 parameters. Add a char overload for IndexOf. Speed up the
1950 invariant string IndexOf.
1952 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
1954 * Makefile.am (monosn_LDADD): Fix parallel build.
1956 2003-12-04 Martin Baulig <martin@ximian.com>
1959 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
1960 (ves_icall_Type_make_array_type): New interncall.
1962 2003-12-04 Martin Baulig <martin@ximian.com>
1964 * locales.c: also change it in the !HAVE_ICU case.
1966 2003-12-04 Dick Porter <dick@ximian.com>
1969 * locales.c: construct_compareinfo is now in CompareInfo, not
1972 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
1974 * image.c (mono_image_load_file_for_image): Cache loaded images in the
1977 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
1980 * assembly.c (mono_assembly_load_references): Only load references
1983 * class.c (mono_class_from_name): Avoid linear search of the
1986 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
1988 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
1990 * image.h (MonoImage): Add 'field_cache' field.
1992 * loader.c (mono_field_from_token): Cache field lookups.
1994 * reflection.c (mono_module_get_object): Fix name property.
1996 * icall.c (ves_icall_get_enum_info): Update after changes to
1997 mono_metadata_get_constant_index ().
1999 * icall.c: Get rid of get_type_info icall, use a separate icall for
2000 each type property to avoid needless memory allocations. Fixes #51514.
2002 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
2003 to avoid needless binary searches.
2005 * class.c (class_compute_field_layout): Move the initialization of
2006 field->def_value to mono_class_vtable ().
2008 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
2011 * object.c (mono_object_allocate): Make it inline.
2013 * object.c (mono_object_allocate_spec): Make it inline.
2015 2003-12-02 Dick Porter <dick@ximian.com>
2017 * locales.c (create_NumberFormat): NumberFormatInfo construction.
2018 Patch by Mohammad DAMT (mdamt@cdl2000.com).
2020 2003-12-01 Dick Porter <dick@ximian.com>
2022 * threads.c: Fix signature and call in CreateMutex and
2025 2003-12-01 Dick Porter <dick@ximian.com>
2028 * locales.c: Implement string compares and searching
2030 * object.h: Add extra Thread field
2032 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
2034 * reflection.c (fixup_method): Add support for MonoCMethod.
2036 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
2038 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
2040 * reflection.c (assembly_name_to_aname): Allow extra characters in
2041 assembly names. Fixes #51468.
2043 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
2045 * exception.c (mono_exception_from_name_domain): New helper function.
2047 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
2048 exception object in the correct domain.
2050 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
2051 formatting + make a copy a the input data.
2053 * loader.c (mono_get_method_from_token): Methods which contain
2054 native code do not have entries in the ImplMap.
2056 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
2057 Thanks to Gonzalo for spotting this.
2059 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
2060 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
2062 * assembly.h (mono_assembly_load_from): Split the second part of
2063 assembly loading into a new public function.
2065 * exception.h (mono_get_exception_bad_image_format): New function.
2067 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
2069 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2070 Enumerate all modules inside a dynamic assembly. Fixes #51293.
2072 * icall.c: Add new icall for creating dynamic methods.
2074 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
2076 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
2078 * reflection.c (mono_reflection_create_dynamic_method): New icall to
2079 create a dynamic method.
2081 * reflection.c (resolve_object): New helper function.
2083 * reflection.c: Generalize ReflectionMethodBuilder and the functions
2084 which manipulate it so they can also work on dynamic methods.
2086 * reflection.c (reflection_method_builder_to_mono_method): Avoid
2087 creating the MonoReflectionMethodAux structure if it is not needed.
2089 * reflection.h verify.c: Update after changes to object layout.
2091 * reflection.c (method_builder_encode_signature): Fix compilation on
2094 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
2096 * appdomain.h: Added support for context static fields. Added static_data
2097 field to MonoAppContext and renamed thread_static_fields to a more
2098 generic special_static_fields in MonoAppDomain, since it can now contain
2099 context static fields.
2100 * domain.c: Updated hashtable name.
2101 * object.c: Replaced field_is_thread_static() for a more generic
2102 field_is_special_static() which also checks for context static attribute.
2103 In mono_class_vtable(), added support for static context fields.
2104 * threads.c: Changed methods that manage thread static fields to more
2105 generic methods so they can be reused both for thread and context static
2107 * threads.h: Declared some new methods.
2109 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
2111 * reflection.h: Update after changes to the managed types.
2113 * reflection.c (encode_custom_modifiers): New helper function.
2115 * reflection.c (method_encode_signature): Emit custom modifiers.
2117 * reflection.c (field_encode_signature): Emit custom modifiers.
2119 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
2121 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
2123 * icall.c (ves_icall_System_ValueType_Equals): New optimized
2126 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
2129 * object.c (mono_field_get_value_object): New function.
2131 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
2134 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
2136 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
2137 return a preallocated out-of-memory exception instance.
2139 * object.c (out_of_memory): Use the new function.
2141 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
2142 flag is before the custom modifiers. Fixes #49802.
2144 2003-11-16 Martin Baulig <martin@ximian.com>
2146 * class.c (mono_class_is_open_constructed_type): Implemented the
2147 MONO_TYPE_GENERICINST case.
2149 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
2151 * assembly.c (mono_assembly_fill_assembly_name): New function to
2152 fill out the MonoAssemblyName structure.
2153 (mono_assembly_open): Use the new function.
2155 * icall.c (fill_reflection_assembly_name): New helper function.
2157 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
2160 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
2162 2003-11-15 Martin Baulig <martin@ximian.com>
2164 * class.c (mono_class_is_open_constructed_type): New public
2165 function; checks whether a type is an open constructed type,
2166 ie. whether it still contains type parameters.
2167 (mono_class_inflate_generic_type): If we're a type parameter and
2168 the inflated type is also a MONO_TYPE_(M)VAR, return the original
2171 * class.h (MonoGenericInst): Added `guint32 is_open'.
2173 * loader.c (method_from_methodspec): Check whether we're an open
2174 or closed constructed type and set `ginst->is_open'.
2176 * reflection.c (mono_reflection_bind_generic_parameters): Check
2177 whether we're an open or closed constructed type and set
2179 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
2180 from open constructed types.
2182 2003-11-15 Martin Baulig <martin@ximian.com>
2184 * reflection.c (mono_reflection_bind_generic_parameters): If we're
2185 a generic instance (instead of a generic type declaration) with
2186 unbound generic parameters, bind them to our actual types.
2188 2003-11-14 Martin Baulig <martin@ximian.com>
2190 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
2192 * reflection.c (mono_reflection_bind_generic_parameters): If we're
2193 an interface type, populate `res->interfaces' with instantiated
2194 versions of all the interfaces we inherit.
2196 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
2198 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
2199 when MONO_PATH is set but doesn't contain the install dir.
2201 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2204 (ves_icall_Type_GetInterfaces): don't return an interface twice when
2205 it's also implemented in base classes. Fixes bug #50927.
2207 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
2209 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
2210 if this method is called from a finalizer. Fixes #50913.
2212 2003-11-12 Miguel de Icaza <miguel@ximian.com>
2214 * threads.c: Implement VolatileRead/VolatileWrite
2216 * icall.c: Add new icalls for VolatileRead/VolatileWrite
2218 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
2220 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
2221 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
2224 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
2225 from Peter Ross (pro@missioncriticalit.com).
2227 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
2229 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
2231 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
2233 * assembly.c (mono_assembly_load_references): Disable check because it
2234 triggers on older corlibs which lots of people have.
2236 2003-11-12 Jackson Harper <jackson@ximian.com>
2238 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
2239 load corlib.dll if mscorlib.dll is not found.
2240 * assembly.h: Remove corlib name define.
2243 * image.c: Change corlib name to mscorlib.
2245 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
2247 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
2249 2003-11-11 Miguel de Icaza <miguel@ximian.com>
2251 * appdomain.h: Added loader_optimization here to sync with the C#
2252 code, and add disallow_binding_redirects field.
2254 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
2256 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
2258 * reflection.c (mono_image_build_metadata): Fix crash on modules
2261 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
2263 * icall.c (ves_icall_get_method_info): Return callingConvention as
2266 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
2267 namespaces from the EXPORTEDTYPE table as well.
2269 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
2270 from all modules inside the assembly.
2272 2003-11-11 Martin Baulig <martin@ximian.com>
2274 * reflection.c (mono_reflection_bind_generic_parameters): Make
2275 this work for interfaces.
2277 2003-11-11 Martin Baulig <martin@ximian.com>
2279 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
2281 2003-11-11 Martin Baulig <martin@ximian.com>
2283 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
2284 "MonoInflatedMethod" and "MonoInflatedCtor".
2286 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
2288 * reflection.c (resolution_scope_from_image): Use the assembly table
2289 from the manifest module, since other modules don't have it.
2291 * debug-helpers.c (mono_type_full_name): New helper function.
2293 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
2295 * image.c (mono_image_load_file_for_image): New public function which
2296 is a replacement for the load_file_for_image in class.c.
2298 * assembly.c (mono_assembly_load_module): A wrapper for the function
2299 above which does assembly association and reference loading too.
2301 * class.c (mono_class_from_name): Call mono_assembly_load_module.
2303 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2305 * appdomain.c: not all of the attributes for the full assembly name
2306 are required and the order doesn't matter. Fixes bug #50787.
2308 2003-11-10 Dick Porter <dick@ximian.com>
2310 * locales.c: Use platform-endian UTF16
2312 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
2314 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
2316 2003-11-10 Martin Baulig <martin@ximian.com>
2319 (mono_metadata_load_generic_params): Make this actually work.
2321 * reflection.c (mono_reflection_bind_generic_parameters): If our
2322 parent is a generic instance, pass all the `types' to it, no
2323 matter whether it has the same number of type parameters or not.
2325 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
2327 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
2329 * assembly.c (mono_assembly_load_references): Move the image<->assembly
2330 assignment code to this function so it gets called recursively for all
2333 * image.c (load_modules): Remove the assembly assignment since it is
2334 now done by mono_assembly_load_references.
2336 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2337 Add 'module' argument.
2338 (mono_module_get_types): New helper function.
2339 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
2341 2003-11-08 Martin Baulig <martin@ximian.com>
2343 * class.c (mono_class_inflate_generic_method): Interface method
2344 don't have a header.
2346 * reflection.c (mono_image_get_methodspec_token): Take an
2347 additional `MonoGenericInst *' argument instead of reading it from
2348 the header; this is necessary to support interfaces.
2349 (mono_image_create_token): Pass the `MonoGenericInst *' from the
2350 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
2351 (inflated_method_get_object): Take an additional `MonoGenericInst *'
2354 * reflection.h (MonoReflectionInflatedMethod): Added
2355 `MonoGenericInst *ginst'.
2357 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
2359 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
2361 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
2363 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
2365 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
2368 (reflection_methodbuilder_from_method_builder):
2369 (reflection_methodbuilder_from_ctor_builder): New helper functions to
2370 initialize a ReflectionMethodBuilder structure.
2371 (mono_image_get_methodbuilder_token):
2372 (mono_image_get_ctorbuilder_token): New functions to emit memberref
2373 tokens which point to types in another module inside the same assembly.
2375 * reflection.c: Use the new helper functions.
2377 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
2379 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
2380 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
2382 * reflection.c (resolution_scope_from_image): Emit a moduleref if
2385 * reflection.c (mono_image_build_metadata): Emit metadata only for the
2386 current module. Emit the manifest only for the main module.
2388 * reflection.c (mono_image_create_token): Add assertion when a
2389 memberref needs to be created.
2391 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
2393 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
2394 larger buffer for the custom attribute blob. Fixes #50637.
2396 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2398 * threadpool.c: notify listener on async processing handles after
2399 invoking the async callback. Thanks to Zoltan.
2401 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
2403 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
2404 avoid code duplication.
2406 * reflection.h (MonoDynamicImage): New type which is currently unused,
2407 but will be used through the ref.emit code in place of
2408 MonoDynamicAssembly.
2410 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
2413 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
2414 a MonoDynamicImage instead of just a MonoImage.
2416 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
2417 icalls to ModuleBuilder but keep their semantics, so they will work
2418 with moduleb->assemblyb. This will change later.
2420 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
2422 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
2425 * reflection.c (mono_image_build_metadata): Avoid creation of a default
2426 main module, since it is now done by the managed code.
2428 2003-11-03 Martin Baulig <martin@ximian.com>
2430 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
2431 `ginst->klass' here.
2432 (method_encode_methodspec): Don't use the `ginst->generic_method's
2433 klass if it's a generic instance, use `ginst->klass' in this case.
2435 2003-11-03 Martin Baulig <martin@ximian.com>
2437 * reflection.c (mono_image_get_generic_method_param_info):
2438 Removed, use mono_image_get_generic_param_info() instead.
2439 (mono_image_get_type_info): Write the GenericParam table before
2440 the Method table. This is neccessary because in the GenericParam
2441 table, type parameters of the class (ie. '!0' etc.) must come
2442 before the ones from its generic methods (ie. '!!0' etc).
2444 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
2446 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
2448 2003-11-02 Martin Baulig <martin@ximian.com>
2450 * reflection.c (create_generic_typespec): Take a
2451 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
2452 the generic parameters from it.
2454 2003-11-02 Martin Baulig <martin@ximian.com>
2456 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
2457 instead of a `MonoClassField *' since we just need the type.
2458 (create_generic_typespec): New static function. Creates a
2459 TypeSpec token for a generic type declaration.
2460 (mono_image_get_generic_field_token): New static function.
2461 (mono_image_create_token): If we're a FieldBuilder in a generic
2462 type declaration, call mono_image_get_generic_field_token() to get
2465 2003-11-02 Martin Baulig <martin@ximian.com>
2468 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
2469 `MonoReflectionGenericInst *declaring_type' and
2470 `MonoReflectionGenericInst *reflected_type' fields.
2472 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
2473 `MonoReflectionGenericInst *declaring_type' and a
2474 `MonoReflectionGenericInst *reflected_type' argument instead of a
2475 single `MonoReflectionGenericInst *type' one. Set
2476 `res->declaring_type' and `res->reflected_type' from them.
2477 (mono_reflection_inflate_field): Likewise.
2479 2003-11-02 Martin Baulig <martin@ximian.com>
2481 * class.c (mono_class_setup_vtable): Don't store generic methods
2484 2003-11-02 Martin Baulig <martin@ximian.com>
2486 * reflection.h (MonoReflectionGenericInst): Added
2487 `MonoReflectionType *declaring_type'.
2489 * reflection.c (mono_reflection_bind_generic_parameters): Use
2490 `if (tb->parent)' instead of `klass->parent'.
2492 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
2494 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
2495 with an empty ASSEMBLY table.
2497 * reflection.c (mono_image_build_metadata): Avoid using the same loop
2498 variable in the inner and outer loops.
2500 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
2502 * metadata.h (mono_metadata_make_token): Put parentheses around macro
2505 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
2507 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
2508 icalls. Instead, do everything in managed code. This is needed since
2509 it is hard to restore the original domain etc. in unmanaged code in the
2510 presence of undeniable exceptions.
2512 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
2513 New icalls to push and pop appdomain refs.
2515 2003-10-31 Martin Baulig <martin@ximian.com>
2517 * class.c (inflate_generic_type): Renamed to
2518 mono_class_inflate_generic_type() and made it public.
2520 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
2523 * loader.c (mono_field_from_memberref): Also set the retklass for
2526 * fielder.c (mono_image_get_inflated_field_token): New static
2527 method; creates a metadata token for an inflated field.
2528 (mono_image_create_token, fixup_method): Added support for
2529 "MonoInflatedField".
2530 (fieldbuilder_to_mono_class_field): New static function.
2531 (mono_reflection_inflate_field): New public function.
2534 (MonoReflectionGenericInst): Added `MonoArray *fields'.
2535 (MonoReflectionInflatedField): New typedef.
2537 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
2539 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
2540 for Solaris and other platforms without s6_addr16
2542 2003-10-30 Martin Baulig <martin@ximian.com>
2544 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
2545 argument instead of two.
2546 (mono_class_inflate_generic_signature): Likewise.
2547 (inflate_generic_header): Likewise.
2548 (mono_class_inflate_generic_method): Likewise. In addition, if
2549 `ginst->klass' is set, it becomes the new `method->klass'.
2551 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
2554 * reflection.c (encode_generic_method_sig): Write a 0xa as the
2556 (method_encode_methodspec): If we have generic parameters, create
2557 a MethodSpec instead of a MethodRef.
2558 (fixup_method): Added support for "MonoInflatedMethod" and
2560 (mono_image_create_token): Added support for "MonoInflatedMethod"
2561 and "MonoInflatedCtor".
2562 (inflated_method_get_object): New static function; returns a
2563 managed "System.Reflection.MonoInflatedMethod" object.
2564 (mono_reflection_bind_generic_method_parameters): Return a
2565 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
2566 (mono_reflection_inflate_method_or_ctor): Likewise.
2567 (mono_image_get_generic_method_param_info): Initialize unused
2569 (mono_image_get_generic_param_info): Likewise.
2571 * reflection.h (MonoReflectionInflatedMethod): New public
2572 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
2573 "S.R.MonoInflatedCtor" classes.
2575 * loader.c (method_from_memberref): If we're a TypeSpec and it
2576 resolves to a generic instance, inflate the method.
2578 2003-10-28 Dick Porter <dick@ximian.com>
2580 * object.c (mono_runtime_run_main): Convert command-line arguments
2581 into utf8, falling back to the user's locale encoding to do so.
2583 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
2585 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
2588 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
2590 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
2591 up icalls at method definition time. Partially fixes #33569.
2593 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
2595 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
2596 marshalling of arrays. Fixes #50116.
2598 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
2600 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
2601 points to a vtable in the dying appdomain.
2603 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
2604 listeners into unmanaged code inside the lock.
2606 * object.c (mono_class_vtable): Turn off typed allocation in non-root
2607 domains and add some comments.
2609 2003-10-25 Martin Baulig <martin@ximian.com>
2611 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
2613 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
2615 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
2616 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
2617 currently parsing. Create the generic class and store it in
2618 `generic_inst->klass' before parsing the type arguments. This is
2619 required to support "recursive" definitions; see mcs/tests/gen-23.cs
2621 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
2622 to support recursive typespec entries.
2624 * class.c (mono_class_setup_parent): If our parent is a generic
2625 instance, we may get called before it has its name set.
2626 (mono_class_from_generic): Splitted into
2627 mono_class_create_from_generic() and mono_class_initialize_generic().
2629 2003-10-25 Martin Baulig <martin@ximian.com>
2631 * icall.c (ves_icall_Type_BindGenericParameters): Return a
2632 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
2633 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
2634 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
2636 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
2637 (create_typespec): Likewise.
2638 (mono_reflection_bind_generic_parameters): Return a
2639 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
2640 (mono_reflection_inflate_method_or_ctor): New public function.
2642 * reflection.h (MonoReflectionGenericInst): New typedef.
2644 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
2646 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
2647 inside the domain lock. Fixes #49993.
2649 * object.c (mono_class_vtable): When typed allocation is used,
2650 allocate vtables in the GC heap instead of in the mempool, since the
2651 vtables contain GC descriptors which are used by the collector even
2652 after the domain owning the mempool is unloaded.
2654 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
2656 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
2657 reflect what it does. Also invalidate mempools instead of freeing
2658 them if a define is set.
2660 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
2663 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
2664 hold the finalizable objects in this domain.
2666 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
2669 * appdomain.c (mono_domain_set): New function to set the current
2670 appdomain, but only if it is not being unloaded.
2672 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
2673 appdomain which is being unloaded.
2675 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
2676 unloading of the root appdomain.
2678 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
2679 icall to execute a method in another appdomain. Intended as a
2680 replacement for InternalSetDomain, which can confuse the code
2681 generation in the JIT.
2683 * appdomain.c (mono_domain_is_unloading): New function to determine
2684 whenever an appdomain is unloading.
2686 * appdomain.c (mono_domain_unload): New function to correctly unload
2689 * assembly.c (mono_assembly_load_references): Check that an assembly
2690 does not references itself.
2692 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
2693 domain manually, it asks the finalizer thread to do it, then waits for
2694 the result. Also added a timeout.
2696 * icall.c: Register the new icalls.
2698 * threads.h threads.c: Export the mono_gc_stop_world and
2699 mono_gc_start_world functions.
2701 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
2702 function to fill out the mempool with 0x2a.
2704 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
2706 * reflection.h (MonoReflectionMethodAux): New structure to store
2707 information which is rarely used, thus is not in the MonoMethod
2710 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
2713 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
2714 and marshalling info into the aux structure.
2716 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
2717 from the aux structure.
2719 * loader.c (mono_method_get_param_names): Retrieve the param names from
2722 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
2724 * exception.h exception.c: Add AppDomainUnloadedException && fix
2727 2003-10-21 Dick Porter <dick@ximian.com>
2730 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
2731 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
2733 2003-10-21 Martin Baulig <martin@ximian.com>
2735 * reflection.c (mono_reflection_bind_generic_parameters):
2736 `klass->parent' is NULL for interfaces.
2738 2003-10-21 Martin Baulig <martin@ximian.com>
2740 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
2742 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
2744 * exception.c (mono_exception_from_name_msg): New helper function for
2745 creating exceptions and initializing their message field.
2747 * exception.c: Simplify functions using the new helper.
2749 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
2752 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
2753 mono_raise_exception, since otherwise gcc doesn't generate the function
2754 epilog for raise_exception, confusing the stack unwinding in the JIT.
2757 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
2758 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
2761 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2763 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
2766 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
2768 * icall.c: Removed GetUninitializedObject method because
2769 AllocateUninitializedClassInstance does the same.
2771 2003-10-18 Martin Baulig <martin@ximian.com>
2773 * class.c (inflate_generic_signature): Renamed to
2774 mono_class_inflate_generic_signature() and made it public.
2775 (my_mono_class_from_generic_parameter): New static function; if we
2776 don't already have the generic parameter's MonoClass, create a
2777 very simple one which is just used internally in the runtime and
2778 not passed back to managed code.
2780 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
2782 * metadata.h (MonoMethodSignature): Moved the
2783 `MonoGenericParam *gen_params' to the MonoMethodHeader.
2784 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
2786 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
2787 ves_icall_MonoMethod_GetGenericArguments(); this is now an
2788 interncall on the MonoMethod class, not on MethodInfo.
2789 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
2790 calling mono_reflection_bind_generic_method_parameters() directly.
2792 * loader.c (mono_method_get_signature): If this is a MethodSpec;
2793 return the already computed `method->signature'.
2794 (method_from_methodspec): New static function to load a method
2795 from a MethodSpec entry.
2796 (mono_get_method_from_token): Call the new method_from_methodspec()
2797 for MethodSpec tokens.
2798 (mono_get_method_from_token): If we're a generic method, load the
2801 * reflection.c (mono_image_get_memberref_token): Allow
2802 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
2804 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
2805 (mono_image_create_token): First check whether it's a generic
2806 method (so we'd need to create a MethodSpec), then do the other
2808 (mono_reflection_bind_generic_method_parameters): Return a
2809 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
2810 called directly from the interncall.
2812 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
2814 * reflection.c (load_public_key): Move loading of the public key
2817 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
2819 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
2822 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
2823 culture, hash_alg and public_key. Fixes #49555.
2825 2003-10-17 Martin Baulig <martin@ximian.com>
2827 * class.h (MonoGenericInst): Moved this declaration here and added
2828 `MonoMethod *generic_method'.
2831 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
2832 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
2834 * metadata.c (mono_metadata_type_equal): Two types of
2835 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
2836 index; ie. don't compare the address of the `MonoGenericParam'
2838 (mono_metadata_load_generic_params): Removed the `MonoMethod
2841 * metadata.h (MonoGenericInst): Moved declaration to class.h.
2842 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
2844 * reflection.c (method_encode_signature): Encode the number of
2846 (encode_generic_method_sig): New static function.
2847 (method_encode_methodspec): New static function; creates an entry
2848 in the MethodSpec table for a generic method.
2849 (mono_image_get_methodspec_token): New static function.
2850 (mono_image_create_token): Call mono_image_get_methodspec_token()
2851 for generic methods.
2852 (mono_reflection_bind_generic_method_parameters): New public
2853 function. Instantiates a generic method.
2855 2003-10-16 Martin Baulig <martin@ximian.com>
2857 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
2858 *gen_params' here from MonoMethodHeader.
2860 * metadata.c (mono_metadata_parse_method_signature): If we have
2861 generic parameters, initialize `method->gen_params' and then set
2862 the correct `type->data.generic_param' in all the parameters.
2864 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
2866 * threads.c (mono_threads_get_default_stacksize): New function to
2867 return the default stacksize.
2869 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
2870 termination of the finalizer thread, since the previous method had
2871 race conditions. Fixes #49628.
2873 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
2874 as for the other managed threads.
2876 2003-10-16 Martin Baulig <martin@ximian.com>
2878 * class.c (inflate_generic_signature): Copy `generic_param_count'
2881 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
2884 * metadata.c (mono_metadata_parse_method_signature): Actually set
2885 the `method->generic_param_count' here.
2886 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
2888 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
2890 * object.h: Add a new field to TypedRef to simplify the implementation
2891 of the REFANY opcodes in the JIT.
2893 * icall.c: Make use of the new field.
2895 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
2898 2003-10-15 Martin Baulig <martin@ximian.com>
2900 * class.c (mono_class_from_gen_param): Renamed to
2901 mono_class_from_generic_parameter() and moved most of the
2902 functionality from mono_reflection_define_generic_parameter()
2903 here; ie. we create a "real" class here.
2904 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
2905 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
2906 previously been called.
2908 * class.h (MonoGenericParam): Moved the declaration of this struct
2909 here from metadata.h and added `MonoMethod *method'.
2911 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
2914 * loader.c (mono_get_method_from_token): If we have any generic
2915 parameters, call mono_metadata_load_generic_params() to read them
2916 from the MONO_TABLE_GENERICPAR.
2918 * metadata.c (mono_metadata_load_generic_params): Added
2919 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
2921 * metadata.h (MonoMethodSignature): Replaced
2922 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
2923 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
2925 * reflection.c (mono_reflection_define_generic_parameter): Moved
2926 most of the functionality into the new
2927 mono_class_from_generic_parameter(); set the `method' field if
2928 we're a method parameter.
2930 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
2932 * marshal.c (emit_struct_conv): if native size is 0
2935 2003-10-14 Martin Baulig <martin@ximian.com>
2937 * icall.c: The generics API has changed in the spec since it was
2938 added to System.Type; these modifications make it match the spec
2940 (ves_icall_Type_GetGenericParameters): Renamed to
2941 `ves_icall_Type_GetGenericArguments'.
2942 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
2943 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
2944 `ves_icall_MonoType_get_HasGenericArguments'.
2945 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
2946 `ves_icall_MonoType_get_IsGenericParameter'.
2947 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
2948 this is no interncall anymore.
2949 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
2950 `ves_icall_TypeBuilder_get_IsGenericParameter'.
2952 2003-10-14 Martin Baulig <martin@ximian.com>
2954 * reflection.c (mono_reflection_bind_generic_parameters): Also
2955 inflate generic methods if we're reading the class from IL.
2957 2003-10-13 Martin Baulig <martin@ximian.com>
2959 * reflection.c (mono_reflection_define_generic_parameter): This
2960 method isn't called directly from the icall anymore; take a
2961 `MonoReflectionAssemblyBuilder *' so we can use this for type and
2962 method generic parameters.
2963 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
2964 (method_builder_encode_signature): Encode generic parameters.
2965 (mono_image_get_method_info): Write generic params to the
2966 MONO_TABLE_GENERICPARAM table.
2968 * reflection.h (MonoReflectionMethodBuilder): Added
2969 `MonoArray *generic_params'.
2971 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
2973 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
2974 wrapper for mono_reflection_define_generic_parameter().
2975 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
2977 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
2979 * marshal.h: Add missing function to fix build.
2981 * marshal.c (mono_marshal_get_native_wrapper): Add support for
2982 the SetLastError pinvoke attribute.
2984 * marshal.c (mono_marshal_set_last_error): New helper function called
2985 by the generated code.
2987 * marshal.c (mono_mb_emit_branch): New helper function.
2989 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
2991 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
2992 classes as parameters and return values of delegates. Fixes #29256.
2994 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
2996 * locales.c: use gint32 in non HAVE_ICU case
2998 2003-10-11 Martin Baulig <martin@ximian.com>
3000 * mono-debug.c (mono_debug_add_method): Added a workaround for
3003 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
3005 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
3006 delegates passed to native code must use the STDCALL calling
3007 convention. Fixes #35987.
3009 2003-10-10 Martin Baulig <martin@ximian.com>
3011 * class.c (inflate_generic_type): If we're inflating for a generic
3012 type instance (and not for a generic method), return
3013 MONO_TYPE_MVAR unchanged.
3015 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3017 * string-icalls.c: Join ignores null strings in the source array.
3018 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
3019 * threads.c: GetAvailableTheads is slightly more accurate.
3021 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
3023 * threads.h threads.c : add mono_threads_set_default_stacksize
3024 and pass default to CreateThread calls.
3026 2003-10-09 Dick Porter <dick@ximian.com>
3030 * locales.c: Internal calls for constructing CultureInfo and
3031 related objects from libicu (if its available.)
3033 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
3035 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
3037 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3039 * threadpool.c: added an argument to async_invoke_thread that is the
3040 item to process, pass the MonoAsyncResult to the thread start function
3041 when creating a new thread. This way we don't need to acquire any lock
3042 when we're creating a new thread. Readded a semaphore for faster
3043 response times (instead of that Sleep i added).
3045 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
3047 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
3048 get daylight change dates better on Windows, fix handling
3049 of platforms without tm_gmtoff.
3051 2003-10-06 Martin Baulig <martin@ximian.com>
3053 * class.c (inflate_generic_method): Renamed to
3054 mono_class_inflate_generic_method() and made public.
3055 (mono_class_init): Don't inflate the generic methods here.
3056 (mono_class_from_generic): Added `gboolean inflate_methods'
3057 argument. Inflate the methods here.
3059 * loader.c (mono_method_get_param_names): Ignore instances of
3060 generic types for the moment.
3062 * reflection.c (fixup_method): Added support for inflated methods.
3063 (mono_image_create_token): Use mono_image_get_methodref_token()
3064 for inflated methods.
3065 (mono_custom_attrs_from_param): Ignore instances of generic types
3067 (mono_reflection_bind_generic_parameters): New public function.
3068 Moved all the functionality from
3069 ves_icall_Type_BindGenericParameters() here and added support for
3071 (mono_reflection_define_generic_parameter): Initialize
3072 `klass->methods' here.
3074 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
3075 functionality into mono_reflection_define_generic_parameter().
3076 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
3077 TypeBuilder, return that TypeBuilder.
3079 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3081 * appdomain.c: removed mono_delegate_semaphore.
3084 (mono_thread_pool_add): moved hash table creation inside and the thread
3085 creation outside of the critical region.
3086 (mono_thread_pool_finish): removed obsolete code.
3087 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
3088 continue or exit the thread depending on the queue.
3090 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
3092 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
3093 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
3094 handle more bool marshalling options
3096 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
3098 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
3099 arrays of structs. Also add a more descriptive error message when
3100 a structure member is marshalled as LPArray.
3102 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
3104 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3105 marshalling arrays of complex types. Fixes #29098. Also remove an
3106 usused and incomplete function.
3108 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3110 * gc.c: report heap_size - free_bytes as total memory allocated
3113 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
3115 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
3116 fix timezone handling problems on Windows.
3118 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
3119 asserts when the year is outside the range handled by ms the functions.
3121 * class.c (setup_interface_offsets): If the class is an interface,
3122 fill out its interface_offsets slot.
3124 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3126 * threadpool.c: mark threadpool threads as background.
3128 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
3130 * decimal.c - define DECINLINE to nothing if not using GCC
3132 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
3134 * assembly.c: More refcount fixes.
3136 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3138 * string-icalls.c: if we're not trimming, return the same string.
3139 When not splitting, don't create a new string.
3141 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3144 (mono_image_open): increment the ref_count inside the critical section.
3146 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
3148 * image.c (mono_image_open): Fix reference counting bug.
3150 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
3152 * marshal.c (mono_marshal_type_size) struct alignment changed for
3153 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
3154 64bits. Avoid leak in mono_marshal_get_native_wrapper when
3155 mono_lookup_pinvoke_call throws.
3157 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
3159 * reflection.c (mono_reflection_parse_type): Fix #49114.
3161 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
3162 temporary workaround for cygwin header problem.
3164 * object.c (mono_object_isinst): Synchronize this with the code
3165 generated by the JIT for casts.
3167 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
3169 * reflection.c (encode_type): Fix #38332.
3171 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
3173 * marshal.c (mono_marshal_method_from_wrapper): New function to return
3174 the original method from the wrapper method.
3176 2003-09-25 Martin Baulig <martin@ximian.com>
3178 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
3179 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
3180 (ves_icall_Type_get_IsGenericInstance): New interncall.
3182 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
3184 * object.c: fix cast warning in big endian code.
3186 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
3188 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
3190 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3192 * assembly.c: don't call check_env from mono_assembly_load. It's
3193 already done once in mono_assemblies_init and may cause headaches when
3194 multiple threads are loading assemblies.
3196 2003-09-19 Martin Baulig <martin@ximian.com>
3198 * reflection.c (mono_reflection_define_generic_parameter): Don't
3199 allocate `klass->methods', set `klass->flags' to
3200 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
3202 2003-09-18 Martin Baulig <martin@ximian.com>
3204 * class.c (mono_class_init): Don't create `class->methods' if it's
3205 already initialized.
3207 * metadata.c (mono_metadata_load_generic_params): Make this
3210 * reflection.c (mono_reflection_define_generic_parameter): Set
3211 parent class and interfaces from the constraints.
3213 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
3214 to keep this struct in sync with the declaration in TypeBuilder.cs.
3216 2003-09-17 Martin Baulig <martin@ximian.com>
3218 * metadata.h (MonoType): Replaced the data's `int type_param'
3219 field with `MonoGenericParam *generic_param'.
3220 (MonoGenericParam): Added `MonoClass *klass'.
3222 * class.c (mono_class_from_gen_param): Removed the
3223 `MonoImage *image' and `int type_num' arguments.
3225 * metadata.c (mono_metadata_parse_generic_param): New static
3226 method; creates a MonoGenericParam which just contains the index.
3227 (do_mono_metadata_parse_type): Call
3228 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
3231 * reflection.c (mono_image_typedef_or_ref): Generic type
3232 parameters may be in the same assembly, but never use a typedef
3234 (mono_reflection_define_generic_parameter): We're now creating a
3235 "real" class for the type parameter; it's now safe to call
3236 mono_class_from_mono_type() on the class'es type, it'll do the
3239 2003-09-16 Martin Baulig <martin@ximian.com>
3241 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
3242 `symfile->range_entry_size' and `symfile->class_entry_size' here;
3243 the `symfile' data structure must be fully initialized before it
3244 gets added to the table.
3246 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
3248 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
3250 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
3251 class init trampolines.
3253 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
3255 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
3256 to the built-in profiler to turn off time and allocation profiling
3259 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
3261 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
3264 * debug-helpers.c (mono_method_full_name): Print the wrapper type
3265 in human readable form.
3267 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
3269 * reflection.c icall.c: Fixed warnings.
3271 * image.c (load_class_names): Use a temporary hash table to hold the
3272 namespaces in order to avoid doing many string comparisons.
3274 * image.h: Fix typo.
3276 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
3277 Pass NULL instead of g_direct_equal to the GHashTable constructor
3278 since the NULL case is short-circuited inside g_hash_table_lookup,
3279 leading to better performance.
3281 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
3282 obtain the first custom attribute for a given index. Depends on the
3283 CustomAttribute table being sorted by the parent field.
3285 * reflection.c (mono_custom_attrs_from_index): Use the new function
3286 for better performance.
3288 2003-09-07 Martin Baulig <martin@ximian.com>
3290 * class.c (mono_class_init): If we're a generic instance, inflate
3291 all our methods instead of loading them from the image.
3292 (mono_class_from_generic): Set `class->methods = gklass->methods'.
3294 2003-09-07 Martin Baulig <martin@ximian.com>
3296 * mono-debug-debugger.c: Added support for constructors.
3298 2003-09-06 Martin Baulig <martin@ximian.com>
3300 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
3303 * reflection.c (mono_reflection_setup_generic_class): Call
3304 ensure_runtime_vtable() to create the vtable.
3306 2003-09-05 Martin Baulig <martin@ximian.com>
3308 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
3311 2003-09-04 Martin Baulig <martin@ximian.com>
3313 * reflection.c (mono_reflection_define_generic_parameter): Generic
3314 parameters start with zero.
3316 2003-09-04 Martin Baulig <martin@ximian.com>
3318 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3320 * reflection.h (MonoReflectionGenericParam): New typedef.
3321 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
3322 the generic parameters from the managed TypeBuilder.
3324 * reflection.c (mono_reflection_define_generic_parameter): New function.
3325 (mono_reflection_create_runtime_class): Encode generic parameters.
3326 (mono_reflection_setup_generic_class): New function; this is
3327 called after adding adding all generic params to the TypeBuilder.
3328 (encode_type): Added MONO_TYPE_VAR.
3330 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
3332 * class.h class.c (mono_class_needs_cctor_run): Moved this method
3335 * assembly.h assembly.c: Moved the AOT loading code into an assembly
3338 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
3340 * reflection.h reflection.c class.h class.c: Delete duplicate
3341 definition of mono_type_get_name () from reflection.c and export the
3344 * class.c: Class loading fixes from Bernie Solomon
3345 (bernard@ugsolutions.com).
3347 * reflection.c: Endianness fixes from Bernie Solomon
3348 (bernard@ugsolutions.com).
3350 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
3352 * assembly.h assembly.c: Define a file format version for AOT
3355 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
3357 * appdomain.h (MonoJitInfo): New field to determine whenever the
3358 code is domain neutral.
3360 2003-08-31 Miguel de Icaza <miguel@ximian.com>
3362 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
3364 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
3366 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
3367 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
3368 Avoid caching the result since strings must be domain specific. Fixes
3371 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
3373 * marshal.c (mono_marshal_init): Make this callable multiple times
3374 since it is hard to find a correct place to call it.
3376 * object.c (mono_runtime_class_init): Execute static constructors in
3377 the correct appdomain.
3379 * image.c (build_guid_table): Handle the case when multiple images have
3382 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3384 * icall.c: added a couple of icalls for System.Web.
3386 2003-08-28 Martin Baulig <martin@ximian.com>
3388 * icall.c (ves_icall_Type_BindGenericParameters): Use
3389 `klass->generic_inst' instead of `&klass->byval_arg' in the
3390 mono_type_get_object() call. The returned type must be
3391 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
3393 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
3397 * object.c (mono_class_proxy_vtable): Make it thread safe.
3399 * pedump.c: Fix warning.
3401 * object.c appdomain.h: Get rid of metadata_section.
3402 It is no longer needed and it was causing deadlocks with domain->lock.
3404 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
3406 2003-08-26 Martin Baulig <martin@ximian.com>
3408 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
3410 2003-08-26 Martin Baulig <martin@ximian.com>
3412 * pedump.c (main): Call mono_metadata_init(),
3413 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
3414 and mono_loader_init().
3416 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
3418 * loader.h: Add missing include to fix build.
3420 * image.h: mono_image_load_references is no more.
3422 * assembly.c: Reworked assembly loading to make it really thread safe.
3423 After these changes, the assembly returned by mono_assembly_open is
3424 fully initialized, i.e. all its references assemblies are loaded.
3426 * assembly.c (mono_image_load_references): Renamed to
3427 mono_assembly_load_references, and made private, since clients no
3428 longer need to call it.
3430 * class.c: Removed calls to mono_assembly_load_references, since it was
3431 a source of deadlocks.
3433 * loader.h loader.c class.h class.c: Protect data structures using a
3434 new lock, the loader lock.
3436 * class.c (mono_class_setup_vtable): Create temporary hash tables and
3437 GPtrArrays only when needed.
3439 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
3440 into empty structures by mcs. Fixes pinvoke7.cs.
3442 * domain.c (mono_init): Call a new initialization function.
3444 * appdomain.c (mono_runtime_init): Call the new initializer function
3445 of the marshal module.
3447 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
3448 inserted into empty structures by mcs. Fixes pinvoke7.cs.
3450 * marshal.h marshal.c: Added locks around the wrapper caches to make
3451 this module thread safe.
3453 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
3454 this argument. Fixes pinvoke1.exe.
3456 2003-08-25 Lluis Sanchez <lluis@ximian.com>
3458 * object.h: Added call_type field to MonoMethodMessage and the corresponding
3459 enumeration of values. Removed fields to store remote call output values in
3460 MonoAsyncResult. Not needed any more.
3461 * object.c: Initialize call_type and async_result fields in mono_message_init.
3462 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
3463 dispatching the message.
3464 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
3465 async call to finish. To do it use a message with EndInvoke call type.
3467 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
3469 * loader.h loader.c (mono_method_hash_marhal_info): New function which
3470 determines whenever a method has marshalling info.
3472 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3474 * assembly.c: fix the build on windows.
3476 2003-08-22 Lluis Sanchez <lluis@ximian.com>
3478 * object.cs: Fixed bug #47785.
3480 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
3482 * string-icalls.c (StringReplace): If their are no occurances of
3483 the old string found return a reference to the supplied
3484 string. This saves some memory and matches MS behavoir.
3486 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3488 * socket-io.c: fixed compilation for systems that define AF_INET6
3489 and don't define SOL_IP/SOL_IPV6.
3491 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
3493 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
3494 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
3496 * rawbuffer.c rawbuffer.h: Make this module thread safe.
3498 * domain.c: Make this module thread safe.
3500 * domain.c (mono_init): Call new initialization function.
3502 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
3503 reference types too. Fixes #38812.
3505 * image.c (mono_image_init): Fixed warnings.
3507 * class.c (mono_class_from_typeref): Handle assembly load failure
3510 * appdomain.c (add_assemblies_to_domain): Handle the case when
3511 the references of an assembly are not yet loaded.
3513 * metadata.c image.c assembly.c: Moved initialization of global
3514 variables to a separate function called at startup since lazy
3515 initialization of these variables is not thread safe.
3517 * image.c assembly.c: Made this module thread safe by adding locks in
3518 the appropriate places.
3520 * domain.c (mono_init): Call the new initialization functions of the
3523 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
3525 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
3526 make a direct call. It is proxy's work to make the call asynchronous.
3527 mono_delegate_end_invoke(): If the targe is a proxy, just collect
3529 * object.cs: mono_method_call_message_new(): read AsyncResult and
3530 state object from parameters list, if this info is requested.
3531 * object.h: Added fields to store remote call output values in
3532 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
3534 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3536 * object.h: add needed fields to MonoThread.
3537 * threads.c, threads.h: allow registering a function to cleanup data
3538 allocated per thread by the JIT.
3540 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3542 * loader.h: portability fix by Bernie Solomon
3543 * <bernard@ugsolutions.com>.
3545 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
3547 * reflection.h reflection.c (mono_param_get_objects): Changed this to
3548 return a MonoArray. This simplifies the code and also ensures that
3549 the cache allways contains an object reference as a value.
3551 * icall.c (ves_icall_get_parameter_info): Simplified using the new
3554 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3556 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
3557 fixes a problem with byte ordering when getting the address family for
3560 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
3562 * .cvsignore: Added monosn.
3564 * reflection.h reflection.c loader.c: Added support for parameter
3565 marshalling to dynamically created types. Fixes #47295.
3567 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
3569 * rand.c: remove useless warnings.
3571 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
3573 * class.c: implemented ldtoken for methods and fieldrefs.
3575 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3577 * threadpool.c: when mono_async_invoke was called, no one took care of
3578 monitoring the queue. So if the method invoked took some time and we
3579 got new async invoke requests after 500 ms (the thread created waited
3580 that long in WaitForSingleObject), the new async invoke was not called
3581 until the previous one finished.
3583 This is fixed now. Thanks to Totte for helping with it.
3585 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3587 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
3589 2003-08-11 Martin Baulig <martin@ximian.com>
3591 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
3593 2003-08-06 Martin Baulig <martin@ximian.com>
3595 * mono-debug-debugger.c: Added support for static fields,
3596 properties and methods.
3598 2003-08-06 Martin Baulig <martin@ximian.com>
3600 * mono-debug-debugger.c: Don't store the MonoString's vtable to
3601 make this work for applications with multiple application domains.
3603 2003-08-04 Martin Baulig <martin@ximian.com>
3605 * mono-debug-debugger.c: Completely reworked the type support; the
3606 most important thing is that we're now just using one single
3607 `MonoType' instance per type.
3609 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
3611 * mono-endian.h, mono-endian.c, icall.c: Added icall
3612 ves_icall_System_Double_AssertEndianity to assert double word endianity
3613 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
3615 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3617 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
3618 support, icalls and fixes.
3620 2003-07-31 Miguel de Icaza <miguel@ximian.com>
3622 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
3623 classes that are a punctuation character in .NET is not the same a
3626 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
3628 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
3630 2003-07-29 Miguel de Icaza <miguel@ximian.com>
3632 * icall.c: Add new MemCopy internalcall.
3633 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
3634 Simplified code; It is not necessary to handle all the cases here,
3635 as the C# code takes care of it. Only handle the case of the name
3636 resource embedded into the assembly.
3638 Changed signature to return the data pointer and the size of the
3641 2003-07-26 Miguel de Icaza <miguel@ximian.com>
3643 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
3644 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
3646 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
3648 * socket-io.c: ignore EINTR error in select.
3650 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
3652 * class.h, class.c: removed unused subclasses field in MonoClass.
3654 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
3656 * icall.c: improve fix of get_base_definition(). If the parent class
3657 doesn't have the mehod, look at the parent of the parent.
3658 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
3659 to check if a parameter is an in or out parameter
3660 (PARAM_ATTRIBUTE_IN is not set by default).
3661 mono_method_return_message_restore(): Use mono_class_value_size to
3662 get the size of a value type. mono_type_stack_size (parameterType)
3663 does not return the correct value if parameterType is byRef.
3664 mono_load_remote_field(), mono_load_remote_field_new(),
3665 mono_store_remote_field(), mono_store_remote_field_new():
3666 raise exception if the remote call returns an exception.
3668 2003-07-28 Martin Baulig <martin@ximian.com>
3670 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
3671 method. This is a wrapper around mono_runtime_invoke() which
3672 boxes the instance object if neccessary.
3674 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3676 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
3677 metadata.h, row-indexes.h, verify.c: first cut of generics support.
3679 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3681 * icall.c: disable mcs bug workaround.
3683 2003-07-21 Miguel de Icaza <miguel@ximian.com>
3685 * object.c (mono_runtime_class_init): Take the metadata_section
3686 mutex before obtaining the domain mutex.
3688 * appdomain.h: Added definition of metadata_section mutex here.
3690 * object.c: define metadata_mutex here.
3692 2003-07-24 Ravi Pratap <ravi@ximian.com>
3694 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
3697 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
3699 * reflection.c: Fix bug #46669
3701 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3706 * object.h: fill in the type name for TypeLoadException.
3708 2003-07-23 Ravi Pratap <ravi@ximian.com>
3710 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
3711 relationship between TypeBuilders while compiling corlib) and bug
3712 45993 (Array types returned from the runtime while compiling
3713 corlib were from the loaded corlib).
3715 2003-07-22 Martin Baulig <martin@ximian.com>
3717 * mono-debug-debugger.c: Reworked the type support a bit more;
3718 distinguish between types and classes.
3720 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
3722 * icall.c: add IsArrayImpl icall.
3724 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
3726 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
3727 initializing real_size only once. Also fix bug #46602.
3729 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
3731 * object.c: Renamed mono_metadata_section to metadata_section.
3733 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
3735 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
3736 empty array if the type is an array. Fixed.
3737 ves_icall_MonoMethod_get_base_definition: if the base method
3738 is abstract, get the MethodInfo from the list of methods of
3740 * reflection.c: ParameterInfo.PositionImpl should be zero-based
3741 and it was 1-based. Fixed in mono_param_get_objects.
3743 2003-07-20 Martin Baulig <martin@ximian.com>
3745 * mono-debug.h: Set version number to 31.
3746 (mono_debug_init): Added `MonoDomain *' argument.
3748 * mono-debug-debugger.c: Reworked the type support; explicitly
3749 tell the debugger about builtin types; pass the `klass' address to
3752 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
3754 * image.c: Allow new metadata tables to be loaded without a
3755 warning. Also update the warning message to give the new constant value.
3757 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
3759 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
3760 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
3761 array type representation changes.
3763 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
3765 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
3766 on Environment.Exit () call.
3768 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
3770 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
3771 requires a matching corlib.
3773 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
3775 * Changelog: My editor decided to add a CR to each line. Sorry about that.
3776 Committed again without the CRs.
3778 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
3780 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
3781 getting it from the "this" socket instance. Did not work
3782 if the socket is a subclass of Socket.
3783 Also fixed bug #35371.
3785 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
3787 * metadata.c: fixed size for TypedByRef.
3788 * loader.c: when searching for a method, consider the vararg amrker.
3789 * unicode.c, decimal.c: constify some arrays.
3791 2003-07-15 Dick Porter <dick@ximian.com>
3793 * socket-io.c: Fixed compilation for gcc < 3.2.
3795 Fixed compilation for machines that don't have AF_INET6 (thanks to
3796 Bernie Solomon <bernard@ugsolutions.com> for that part.)
3798 Fixed compile warnings.
3800 Fixed formatting and line endings.
3802 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
3805 * socket-io.c: Added IPv6 support.
3807 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
3809 * class.c (mono_class_is_assignable_from): New function to implement
3810 the is_assignable_from logic. Used by mono_object_isinst,
3811 Type::IsAssignableFrom () and the interpreter.
3813 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
3814 Object, even interfaces.
3816 * object.c (mono_object_isinst): Implement in terms of
3819 * icall.c (ves_icall_type_is_assignable_from): New icall.
3821 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
3823 * domain.c (foreach_domain): fix compiler warning.
3825 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
3827 * image.c (load_metadata_ptrs): use g_strndup because strndup is
3828 not available on all plattforms
3830 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
3832 * image.h image.c: Store the metadata version string in MonoImage.
3833 * icall.c: New icall to retrieve the image version.
3834 * reflection.c (create_dynamic_image): Fill in the image version field
3835 * reflection.c (build_compressed_metadata): Use the image version
3836 from the image structure.
3838 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3840 * appdomain.c: modified comment.
3841 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
3842 That will be its last iteration when mono_gc_cleanup is called from
3843 mono_runtime_cleanup and before the domain is unloaded.
3847 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
3849 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
3852 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
3854 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
3855 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
3856 Bernie Solomon <bernard@ugsolutions.com>.
3858 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
3860 * object.c, object.h: provide mono_object_new_fast() for faster
3861 allocation in some special cases.
3863 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
3865 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
3866 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
3868 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
3870 * threadpool.c: fix leaks.
3872 2003-07-01 Dick Porter <dick@ximian.com>
3874 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
3875 using MonoGHashTables. Fixes threadpool bug posted to list.
3877 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
3879 * image.h, image.c: added support to load an assembly from a byte array.
3880 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
3881 assembly bundle support.
3883 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
3885 * threadpool.c (mono_thread_pool_add): keep a reference to the
3886 AsyncResult to prevent GC
3888 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
3890 * class.c: leak fix.
3892 2003-06-25 Dick Porter <dick@ximian.com>
3894 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
3895 for the async object, the WaitHandle object will close the handle.
3898 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
3900 * class.c: in mono_array_class_get (), lookup from the hash with the
3901 same type we insert: this works around a bug in
3902 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
3903 lluis. The real fix will have to wait for after the release.
3905 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
3907 * icall.c: fix memory leak when getting type members.
3909 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
3911 * reflection.c: added more pubtoken special cases.
3913 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
3915 * class.c: handle field offset correctly when class size
3916 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
3918 2003-06-20 Martin Baulig <martin@ximian.com>
3920 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
3923 2003-06-20 Martin Baulig <martin@ximian.com>
3925 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
3927 2003-06-20 Martin Baulig <martin@ximian.com>
3929 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
3930 just distinguish between variables in registers and variables at
3931 an offset relative to a register.
3933 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3935 * icall.c: #ifdef out latest changes until mcs is fixed.
3937 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
3939 * icall.c: return members in metadata order.
3941 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
3943 * icall.c: avoid infinite loop in GetTimeZoneData.
3945 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
3947 * icall.c: added Marshal.Prelink/All icalls.
3949 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
3951 * object.c, object.h: fix warnings and do some overflow checking
3952 when creating arrays.
3954 2003-06-17 Dick Porter <dick@ximian.com>
3957 * file-io.c: File attributes need to be tweaked slightly when
3958 passed from the managed to the w32 world.
3960 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
3961 * profiler.h profiler-private.h profiler.c: Rework last patch
3962 based on suggestion by Paolo.
3964 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
3966 * profiler.h profiler-private.h profiler.c: Added infrastructure for
3967 instruction level coverage data collection.
3968 * profiler.h profiler.c (: Added new callback function which can be
3969 used by the profiler to limit which functions should have coverage
3971 * profiler.c (mono_profiler_load): Call g_module_build_path to
3972 generate the file name of the profiler library.
3974 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
3976 * profiler.c, profiler.h, profiler-private.h: added basic block
3977 coverage profiling API.
3979 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
3981 * reflection.c (mono_reflection_create_runtime_class): Add support
3982 for events in dynamically generated code.
3984 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
3987 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
3989 * icall.c: when getting timezone info, return reasonable values if we
3990 can't get the actual data.
3992 2003-06-14 Dick Porter <dick@ximian.com>
3994 * threads.c (start_wrapper): Remove the reference to the thread
3995 object in the TLS data, so the thread object can be finalized.
3996 This won't be reached if the thread threw an uncaught exception,
3997 so those thread handles will stay referenced :-( (This is due to
3998 missing support for scanning thread-specific data in the Boehm GC
3999 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
4001 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
4003 * reflection.c: ensure streams and tables are first allocated with
4004 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
4006 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
4008 * icall.c: fixed GetElementType for byrefs (bug# 44792).
4010 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
4012 * reflection.c (mono_reflection_create_runtime_class): Add support for
4013 properties to dynamically created classes.
4014 * reflection.c: Fix a few places where non-MonoObjects were inserted
4015 into the tokens hashtable.
4017 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4019 * object.c: some support to handle out of memory exceptions.
4021 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
4023 * marshal.c (mono_marshal_get_native_wrapper): support reference
4026 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4028 * object.h, object.c: more portability stuff from Bernie Solomon.
4029 Unexport mono_object_allocate(). Added mono_object_unbox ().
4030 Set exitcode when an unhandled exception is thrown.
4032 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
4034 * marshal.c (mono_marshal_get_native_wrapper): use custom
4035 marshaler for return types.
4037 2003-06-10 Dick Porter <dick@ximian.com>
4039 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
4040 ip_mreq is available
4042 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
4044 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
4045 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
4046 by Bernie Solomon <bernard@ugsolutions.com>.
4048 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
4050 * gc.c (mono_gc_init): Avoid error message on shutdown when
4051 GC_DONT_GC=1 is used.
4053 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
4054 New icall to return the GUID of a module.
4056 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
4058 * class.c: ensure instance size always includes the parent's size
4059 even whem class size is set explicitly (fixes bug#44294).
4061 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4063 * profiler.h, profiler.c: made the simple profiler thread-safe,
4064 get more accurate timing info. Allow the loading of an
4065 externally-developed profiler module.
4067 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
4069 * marshal.c (mono_marshal_get_native_wrapper): improved
4070 class/byref arguments.
4071 (mono_marshal_get_native_wrapper): better string marshaling support.
4073 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
4075 * class.c: ensure .pack and .size are handled correctly and
4076 simplified layout of static fields.
4078 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
4081 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
4083 * loader.c (mono_lookup_pinvoke_call): look for modules in the
4084 current directory (fix bug 44008)
4086 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
4088 * marshal.c (mono_marshal_get_native_wrapper): started support for
4090 (mono_delegate_to_ftnptr): consider marshalling specifications
4092 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
4094 * reflection.c, reflection.h: emit custom marshal info.
4096 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4098 * object.c: free the GError.
4099 * icall.c: added CloseEvent_internal.
4101 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
4104 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
4106 * loader.c (mono_method_get_signature): Add support for dynamic
4109 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
4111 * reflection.c: fixed bug #43905.
4113 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
4115 * class.c, domain.c, icall.c, metadata.h, object.h: support for
4116 handling TypedReference and ArgIterator.
4117 * loader.c, loader.h: added function to get signature at call site.
4119 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4121 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
4122 data readonly. Buglets and warning fixes. Some MethodSpec support.
4124 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
4126 * class.h, class.c, object.c: remove relative numbering support.
4128 2003-05-26 Miguel de Icaza <miguel@ximian.com>
4130 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
4131 free the string, until we get a chance to fix Gtk#
4133 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4135 * marshal.c: revert last patch.
4137 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
4139 * icall.c: updates for new mono_class_vtable() not calling
4140 the type constructor anymore.
4142 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
4144 * object.h, object.c: separate vtable creation from type
4145 initialization. Make running the .cctor thread safe.
4147 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
4149 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
4151 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
4153 * loader.c (mono_get_method): consider calling convention
4155 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
4157 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
4158 to return the invisible global type for a module.
4160 * reflection.c (mono_image_build_metadata): Emit global fields too.
4162 2003-05-20 Peter Williams <peterw@ximian.com>
4164 * loader.c (mono_lookup_internal_call): Add a few newlines.
4166 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
4168 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
4171 * appdomain.c (set_domain_search_path): Recalculate search path when
4172 AppDomainSetup.PrivateBinPath changes.
4174 * object.c (mono_class_compute_gc_descriptor): It turns out some
4175 parts of the class libs (like System.Thread) holds pointers to
4176 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
4177 to treat native int a pointer type here.
4179 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
4181 * appdomain.h, domain.c: add hashtable for jump target resolution.
4183 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
4185 * reflection.h reflection.c icall.c: Added new icalls
4186 GetManifestResourceInfoInternal, GetModulesInternal and support
4189 2003-05-16 Dick Porter <dick@ximian.com>
4193 * file-io.c: Implement System.IO.MonoIO::GetTempPath
4195 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
4197 * object.c: mono_store_remote_field: little fix to previous patch.
4199 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
4201 * class.c: add constructors to array classes.
4202 * icall.c: special case array construction for InternalInvoke (),
4204 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
4206 * class.h class.c reflection.c object.c: Added support for field
4207 defaults in dynamically generated classes.
4209 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
4211 * reflection.c: properly encode charset for ddlimport.
4213 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
4215 * threads.c: allow compiling without GC.
4217 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
4219 * appdomain.h, object.c, object.h, threads.c, threads.h: added
4220 handling of thread static data.
4222 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
4224 * reflection.h, reflection.c: added mono_custom_attrs_free ().
4226 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
4228 * class.c (mono_array_class_get): always set the serializable flags
4229 (mono_array_class_get): always set the SEALED attribute for array types
4231 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
4233 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
4234 attributes (fix for bug 42021).
4236 2003-05-12 Dick Porter <dick@ximian.com>
4238 * gc.c: Don't run finalizers when the finalizer thread is
4239 finishing up, because the default domain has already been
4242 2003-05-11 Miguel de Icaza <miguel@ximian.com>
4244 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
4245 value is null, we should throw an exception. This is slightly
4246 different than the other conventions used for the constructor.
4248 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4250 * socket-io.c: fixed windows build.
4252 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4254 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
4256 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
4258 * object.c (mono_string_new_wrapper): Compatibility fix for MS
4261 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
4263 * class.c (mono_class_layout_fields): Add experimental GC aware
4264 auto layout facility. Requires class library changes to work correctly.
4266 (mono_class_setup_vtable): Avoid overriding explicit interface
4267 method implementations. Fixes iface3.exe test.
4269 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
4271 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
4272 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
4274 * metadata.h: Add new type classification macro which determines
4275 whenever the type holds an object reference.
4277 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
4279 * marshal.c (mono_marshal_get_native_wrapper): cleanups
4281 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
4283 * gc.c (finalizer_thread): Work around a GC bug.
4285 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
4287 * marshal.c (emit_struct_conv): allow unions
4289 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
4291 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
4293 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
4295 2003-05-06 Martin Baulig <martin@ximian.com>
4297 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
4299 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4302 (Select_internal): allow NULLs, don't create arrays if not needed.
4303 Coupled with Socket.cs changes.
4306 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
4307 register a finalizer for it that will close the semaphore handle. This
4308 fixes the leak and make Lupus' test run with > 4080 loops.
4310 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
4312 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
4313 Jerome Laban (bug #42287)
4315 2003-05-02 Martin Baulig <martin@ximian.com>
4317 * debug-mono-symfile.h
4318 (MonoSymbolFile): Moved declaration into mono-debug.h.
4319 (MonoDebugMethodJitInfo): Likewise.
4320 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
4322 (_mono_debug_address_from_il_offset): Take a
4323 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
4326 (MonoDebugDomainData): New struct.
4327 (mono_debug_get_domain_data): New function.
4328 (mono_debug_add_method): Take an additional `MonoDomain *'
4330 (mono_debug_source_location_from_address): Likewise.
4331 (mono_debug_il_offset_from_address): Likewise.
4332 (mono_debug_address_from_il_offset): Likewise.
4334 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
4336 * reflection.c: one more check for null type in custom attrs.
4338 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4340 * reflection.c: avoid warning (comparison is always false due to limited
4341 range of data type).
4343 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4345 * icall.c: throw an exception in Type.GetField if the argument 'name'
4348 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
4350 * reflection.c: fixed handling of enums in named arguments to custom
4351 attributes (bug #42123).
4353 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
4355 * reflection.c: use the right array element type and handle
4356 a null for a Type argument, too.
4358 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
4360 * reflection.c: handle arrays as arguments to custom attributes.
4362 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
4364 * reflection.c: handle a string value in a custom attr
4365 ctor that takes an object.
4367 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
4369 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
4372 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
4374 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
4376 2003-04-27 Martin Baulig <martin@ximian.com>
4378 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
4379 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
4380 MONO_DEBUGGER_EVENT_BREAKPOINT.
4381 (mono_breakpoint_trampoline_code): Removed.
4382 (mono_debugger_event_handler): The last argument is now a
4384 (mono_debugger_insert_breakpoint_full): Removed the
4385 `use_trampoline' argument.
4386 (mono_debugger_method_has_breakpoint): Likewise.
4387 (mono_debugger_trampoline_breakpoint_callback): Renamed to
4388 mono_debugger_breakpoint_callback(); take the method and
4389 breakpoint number as arguments.
4391 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
4393 * metadata.c: fix off by one when loading parameters attributes.
4395 2003-04-24 Martin Baulig <martin@ximian.com>
4397 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
4399 2003-04-24 Martin Baulig <martin@ximian.com>
4401 * mono-debug-debugger.c: Moved all code which interacts with the
4404 * debug-mono-symfile.c: This code now just deals with the symbol
4405 file itself, the debugger code is now in mono-debug-debugger.c.
4407 2003-04-23 Martin Baulig <martin@ximian.com>
4409 * mono-debug.c (mono_debug_source_location_from_il_offset):
4410 New method; like mono_debug_source_location_from_address(), but
4411 takes an IL offset instead of a machine address.
4413 2003-04-23 Martin Baulig <martin@ximian.com>
4415 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
4416 `line' field; this is now computed by the debugger.
4418 2003-04-23 Martin Baulig <martin@ximian.com>
4420 * mono-debug.[ch]: New files. This is the new debugging interface.
4422 * mono-debug-debugger.[ch]: New files. Moved all code which
4423 interacts with the Mono Debugger here.
4425 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
4427 * domain.c (mono_init): initialize mono_defaults.monitor_class
4429 2003-04-21 Miguel de Icaza <miguel@ximian.com>
4431 * reflection.c (method_encode_code): Add a spicy exception to help
4432 future compiler authors.
4434 2003-04-21 Martin Baulig <martin@ximian.com>
4437 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
4438 Make this work with relative pathnames; g_filename_to_uri() needs
4439 an absolute filename.
4441 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
4443 * icall.c: Track name changes in Object and ValueType.
4445 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
4447 * metadata.c (mono_type_stack_size): size should be a multiple of
4450 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4453 (internal_domain_finalize): moved into mono_domain_finalize. No need
4454 to create another thread because the finalizers will be run in the
4457 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
4458 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
4459 to be run (MS does this too).
4461 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
4463 * object.c (mono_class_compute_gc_descriptor): Update comment.
4465 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
4467 * image.h: Add synchronized wrapper cache.
4469 * image.c (do_mono_image_open): Initialize cache.
4471 * reflection.c (create_dynamic_mono_image): Initialize cache.
4473 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4475 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
4476 ves_icall_System_Buffer_ByteLengthInternal.
4478 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
4480 * reflection.c: setup klass->nested_in earlier. Allow
4481 a dash in the assembly name.
4483 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
4485 * metadata.c (mono_type_to_unmanaged): dont access
4486 type->data.klass for MONO_TYPE_OBJECT
4487 (mono_type_to_unmanaged): consider System.Delegate class
4489 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
4491 * class.c: just setup supertypes in the proper place instead of
4492 initializing the full element class for arrays.
4494 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
4496 * class.c: ensure the element class of arrays is initialized.
4497 Setup the supertype info for array classes, too.
4499 2003-04-14 Miguel de Icaza <miguel@ximian.com>
4501 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
4503 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4505 * Makefile.am: re-added -m option when running cygpath. This way,
4506 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
4508 * mono-config.c: same codepath for locating mono config file for WIN32
4510 * assembly.c: if mono_assembly_setrootdir is called, don't override
4513 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4515 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
4516 MONO_ASSEMBLIES variable.
4518 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
4520 * icall.c: added Assembly::GetNamespaces() icall.
4522 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4524 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
4526 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
4528 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
4529 * object.c: fixed bug in the construction of vtable for proxies
4531 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
4533 * object.c (mono_array_new): Mark mono_array_new as an icall.
4535 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4537 * class.c: fixed test for public method when overriding interfaces.
4540 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
4542 * appdomain.h, domain.c: added mono_domain_foreach() to
4543 be able to access the currently loaded appdomains.
4544 * object.c: make string interning work across sppdomains.
4545 Mark some functions for use as icalls.
4547 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
4549 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
4551 * reflection.h reflection.c: Allocate long living data using
4552 GC_MALLOC_ATOMIC so the collector does not need to scan it.
4554 * reflection.c: Double the allocation size in streams instead of
4555 increasing it, to prevent unneccesary copying on large assemblies.
4557 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
4558 creation if the assembly does not have the Run flag set.
4560 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
4562 * class.h: avoid the C++ keywords in header files (Jerome Laban
4563 spotted and fixed this).
4565 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4568 (mono_unhandled_exception): fill in the arguments for the
4569 UnhandledException event. Only trigger that event for the default
4570 domain (as MS does).
4572 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
4574 * object.c: Improve typed allocation stuff based on suggestions from
4575 Paolo. Also turn it on if the GC library supports it.
4577 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
4579 * object.c object.h class.h: Added experimental typed allocation
4580 facility using the interfaces in gc_gcj.h.
4582 * os/gc_wrapper.h: Added new include files.
4584 2003-04-03 Martin Baulig <martin@ximian.com>
4586 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
4587 which is not yet enabled by default.
4589 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
4591 (mono_gc_lock, mono_gc_unlock): New static functions.
4593 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
4594 functions; stop/start the world for the garbage collector. This
4595 is using the windows API; we need to complete the SuspendThread()/
4596 ResumeThread() implementation in the io-layer to make this work on Unix.
4597 (mono_gc_push_all_stacks): New public function; tells the garbage
4598 collector about the stack pointers from all managed threads.
4600 2003-04-03 Martin Baulig <martin@ximian.com>
4602 * object.h (MonoThread): Added `gpointer stack_ptr'.
4604 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
4606 2003-04-03 Martin Baulig <martin@ximian.com>
4608 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
4610 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
4612 * reflection.c (typebuilder_setup_fields): Initialize field.first and
4615 2003-04-02 Miguel de Icaza <miguel@ximian.com>
4617 * loader.c (mono_lookup_internal_call): Report the corlib that is
4620 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
4622 * icall.c (ves_icall_type_GetTypeCode): fixed check for
4623 System.DBNull (it's class not valuetype).
4625 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
4627 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
4628 if the array method was already assigned a token (fixes bug#40646).
4630 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
4632 * reflection.c (mono_reflection_get_type): Attempt type resolve even
4633 if no assembly is given.
4635 2003-04-01 Miguel de Icaza <miguel@ximian.com>
4637 * metadata.h: Added the new tables.
4639 * row-indexes.h: Added definitions for new tables.
4641 * metadata.c: Add schemas for new tables, and add support for
4642 computing the sizes of them.
4644 * class.c: Update for handling the new type cases.
4646 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
4648 * metadata.h (MONO_TYPE_IS_VOID): new macro
4650 2003-03-31 Martin Baulig <martin@ximian.com>
4652 * threads.h (MonoThreadCallbacks): Added `thread_created'.
4654 * threads.c (mono_thread_new_init): Call `thread_created' in the
4655 mono_thread_callbacks.
4657 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
4659 * loader.h: added marshalbyrefobject_class to mono_defaults
4660 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
4661 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
4662 generation of output parameters.
4663 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
4664 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
4665 contextbound and the target object belongs to the context of the caller.
4666 * object.h: added context and unwrapped_server variables in MonoRealProxy.
4667 * object.c: Implemented support for interfaces and abstract classes
4668 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
4669 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
4671 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
4673 * class.h class.c (mono_class_is_subclass_of): New function.
4675 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
4676 routines for most common case (calls from ArrayList::ToArray).
4678 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
4679 routine so programs which call Environment::Exit() can be profiled.
4681 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
4682 Added MONO_ARCH_SAVE_REGS.
4684 * icall.c (ves_icall_type_is_subtype_of): Use new function.
4686 2003-03-29 Miguel de Icaza <miguel@ximian.com>
4688 * blob.h: Add a couple of new MonoType types definitions.
4690 * tabledefs.h: Add a couple of new call convs.
4692 2003-03-27 Zoltan Varga <vargaz@freemail.h>
4694 * reflection.h (MonoReflectionDynamicAssembly): track changes in
4695 the layout of the class.
4697 * reflection.c (alloc_table): double the size on overflow to avoid
4698 unnecessary copying.
4700 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
4701 avoid filling out metadata tables and blobs. Also set mb->ilgen to
4702 null so it can be garbage collected.
4704 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
4706 * reflection.c (mono_reflection_get_type): Return the resolved type
4707 only if it is in the assembly we searched.
4709 * reflection.c (ensure_runtime_vtable): Initialize method slots.
4711 * class.c (mono_class_setup_vtable): Set the slot of the overriding
4714 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4717 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
4718 the right one is 'file:///blah', but MS allows it.
4720 (mono_assembly_open): allow 'file://blah'
4722 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
4724 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
4726 * socket-io.c: fixes bug #40310.
4728 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
4730 * reflection.c (mono_reflection_parse_type): handle deeply nested
4733 * reflection.c (mono_image_create_token): Use unique token values
4734 since they will be put into a hash table.
4736 * class.c (mono_class_setup_vtable): If a method occurs in more than
4737 one place in the vtable, and it gets overriden, then change the
4738 other occurances too.
4740 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
4741 object as return type.
4743 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
4745 * icall.c: Deleted "ToString" implementation for double and float
4746 because they are full implemented in managed code.
4748 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
4750 * reflection.c, reflection.h: implemented and exported functions
4751 to retrieve info about custom attributes.
4753 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4755 * appdomain.c: moved Uri handling to assembly.c
4756 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
4757 work when using a file Uri in *nix and windows.
4759 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
4760 GetReferencedAssemblies.
4762 2003-03-18 Dick Porter <dick@ximian.com>
4764 * icall.c: Rename a couple of internal calls
4766 * threads.c: Set the thread state to Stopped when a thread exits.
4769 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
4771 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
4774 * object.c (mono_class_vtable): fix warning.
4776 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
4778 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
4780 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
4782 (method_encode_clauses): Create exception info structures in the right
4784 (mono_reflection_setup_internal_class): Initialize supertypes field.
4786 * class.c object.c: Handle interfaces which implement other interfaces
4789 * class.h class.c: Move the supertypes array initialization code into
4790 a separate function so it can be used for dynamic types too. Also call
4791 it earlier, in mono_class_init(), since it can be used before the
4792 type is initialized.
4794 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4798 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
4803 * object.c: remove warnings.
4805 2003-03-13 Martin Baulig <martin@ximian.com>
4807 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
4808 (MonoDebugLexicalBlockEntry): New types.
4810 * debug-mono-symfile.c
4811 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
4813 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4815 * process.c: ret can be any non-zero value accroding to MS doc.
4817 2003-03-07 Miguel de Icaza <miguel@ximian.com>
4819 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
4820 fixing a warning for a miss-used prototype, would have cause
4821 random memory corruption.
4823 2003-03-07 Martin Baulig <martin@ximian.com>
4825 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
4826 getting really annoying ....
4828 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
4830 * reflection.c (fixup_method): added support for array methods.
4832 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
4834 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
4835 (pointed out by Michael Adams).
4837 2003-03-04 Dick Porter <dick@ximian.com>
4839 * icall.c: Temporarily reverted the Double and Single ToString()
4840 change, because it broke nunit.
4842 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
4844 * object.h, threads.h: make include files compatible with C++
4845 (patch by Jerome Laban <jlaban@wanadoo.fr>).
4847 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
4849 * icall.c: Erased ToString helper functions for Double and Single.
4850 Now, that implementations ar all in managed code (Double and Single
4853 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
4855 * appdomain.c: Added method for initializing the default context of
4856 a domain. Added internal call for getting the default context.
4857 * appdomain.h: Added context variable in MonoDomain struct.
4858 * domain.c: mono_domain_set also sets the default context of the domain
4859 * icall.c: Mapped internal method InternalGetDefaultContext.
4860 * object.c: mono_object_get_virtual_method returns always a remoting
4861 wrapper if the object is a transparent proxy.
4862 mono_runtime_invoke_array: when creating an object by calling the
4863 constructor, if the created object is a proxy, then the constructor should
4864 be called using the a remoting wrapper.
4866 2003-03-03 Dick Porter <dick@ximian.com>
4868 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
4869 variable so it compiles on solaris. Problem spotted by
4870 Christopher Taylor <ct@cs.clemson.edu>
4872 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4875 (get_info_from_assembly_name): don't leak value.
4878 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
4881 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
4883 * assembly.c: export mono_image_load_references ().
4884 * class.c: handle function pointers. mono_class_from_name() now
4885 supports nested type names directly.
4887 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
4889 * reflection.h reflection.c: Encode already created dynamic methods
4890 and fields correctly as a DEF instead of a REF.
4892 * reflection.c: Get rid of the force_ref argument to
4893 mono_image_typedef_or_ref since it was wrong in the first place.
4895 * string-icalls.c: add error checking to string constructors according
4898 * reflection.c: Emit types in the order their TypeBuilders were
4899 created. Previously, a new table index was assigned to each type before
4900 the tables were emitted. This was wrong because the signature blob
4901 might already refer to a type by its original table index.
4903 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
4905 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
4908 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4910 * Makefile.am: make assemblies dir have \ instead of / on windows.
4912 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
4914 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
4915 iterate over the NESTEDCLASS table using a linear search since the
4916 table is not guaranteed to be sorted by the secondary key.
4918 * class.c (mono_class_create_from_typedef): fixed up call to
4919 mono_metadata_nesting_typedef.
4921 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
4923 * marshal.c (mono_string_to_byvalstr): clear the memory as
4924 suggested by Jerome Laban <jlaban@wanadoo.fr>
4926 2003-02-26 Dick Porter <dick@ximian.com>
4928 * process.c: Cope with padding in .rsrc blocks
4930 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
4932 * metadata.h: reverted the filter_len change, it breaks reflection
4934 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
4936 * metadata.h: added a new field to store the filter_len
4939 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
4941 * reflection.c: handle custom attributes for types and members
4942 created with Reflection.Emit (bug#38422).
4944 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
4946 * reflection.c: define RTSpecialName automatically for constructors for
4947 compatibility with MS.NET.
4949 * reflection.c (mono_reflection_create_runtime_class): initialize
4950 nested_in field of dynamically created classes.
4952 2003-02-22 Martin Baulig <martin@ximian.com>
4954 * debug-mono-symfile.h: Incremented version number.
4956 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
4958 * object.h icall.c process.c: fix warnings.
4960 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
4962 * appdomain.h appdomain.c:
4963 (mono_domain_try_type_resolve): split the
4964 name_or_tb argument into a name and a tb argument.
4965 (mono_domain_has_type_resolve): new function to check whenever the
4966 application has registered a TypeResolve event handler.
4968 * icall.c reflection.h reflection.c: move the type resolve logic into
4969 mono_reflection_get_type () so it will be invoked when
4970 Assembly::GetType () is called.
4973 (mono_reflection_get_type): renamed to get_type_internal.
4974 (mono_reflection_get_type): fixed type name generation so it works
4975 for nested types too.
4976 (mono_reflection_get_type): call has_type_resolve () to avoid the
4977 costly type name generation if there is no resolve event handler.
4979 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
4981 * class.c, image.c: load exported types from file references.
4983 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
4985 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
4986 used to cache the managed methods used to create proxies and make
4987 remote invocation of methods.
4988 * class.h: Added in MonoVTable a flag to indicate that a class needs
4989 to be remotely created.
4990 * object.c: Modified the method mono_class_vtable(). It now initializes
4991 the remote flag of the vtable. Modified mono_object_new_specific(),
4992 so now it checks the remote flag.
4993 * icall.c: Added a couple of internal methods, one for enabling instance
4994 creation interception for a type, and one for creating objects bypassing
4997 2003-02-18 Martin Baulig <martin@ximian.com>
4999 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
5000 New interncall to get a method's metadata token.
5002 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
5003 New interncall for the debugger.
5005 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
5007 * class.c (mono_class_setup_vtable): allocate supertype array
5009 2003-02-18 Martin Baulig <martin@ximian.com>
5011 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
5013 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5016 (assembly_name_to_aname): jump over unknown properties (i've found
5017 something like: 'type, assembly, version=xxx, custom=null, public...',
5018 so now will ignore custom=null and still get the rest of the values).
5020 2003-02-17 Dick Porter <dick@ximian.com>
5022 * threads.c: Have Thread.Start() wait for a semaphore to signal
5023 that the thread has set up all its local data. This fixes bug
5024 34323, where Abort() raced the new thread's TLS data.
5026 Also removes the handle_store() call from start_wrapper, because
5027 threads are now always created suspended and there is no longer a
5028 race between the parent and child threads to store the info.
5030 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
5032 * image.c: explain the #- heap issue in a message, hopefully
5033 avoiding FAQs on mono-list.
5035 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5038 (GetEntryAssembly): if the domain has not invoked
5039 AppDomain.ExecuteAssembly yet, return the assembly of the default
5042 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
5044 * class.c (mono_ldtoken): make it work in dynamic assemblies.
5046 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
5048 * metadata.c, reflection.c: simple speedup to type hash
5051 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
5053 * image.c, image.h, class.c, assembly.c: move module loading
5054 to MonoImage. When loading metadata, consider alignemnet from
5055 the start of metadata, not from the metadata address in memory.
5057 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
5059 * reflection.c (mono_reflection_get_custom_attrs): Added support for
5060 AssemblyBuilder objects. Factored out custom attribute creation into
5061 a separate function.
5062 (create_custom_attr): new function to create custom attributes.
5064 2003-02-12 Miguel de Icaza <miguel@ximian.com>
5066 * Makefile.am: Got tired of typing the full pathname to pedump.
5067 Until there is another option, am installing this.
5069 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
5071 * class.c (class_compute_field_layout): always set field->parent
5072 (mono_ldtoken): use mono_defaults.fieldhandle_class;
5074 2003-02-11 Dick Porter <dick@ximian.com>
5077 * monitor.c: Rewrote Monitor, making lock much faster and
5078 Pulse/Wait work as specified. Also uses much fewer handles, and only
5079 creates them as needed.
5081 * exception.c: Added SynchronizationLockException
5083 * threads.c: Deleted old Monitor implementation. The new one is
5086 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
5088 * class.c: handled TypedReference type code. Set the correct size for
5089 class data. Setup interface_offsets for interface classes, too.
5091 2003-02-09 Martin Baulig <martin@ximian.com>
5093 * debug-mono-symfile.h: Reflect latest symbol writer changes.
5095 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
5097 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
5098 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
5099 * object.c: fixed mono_object_get_virtual_method () for interfaces.
5100 * verify.c: check for code that runs after the end of the method.
5102 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
5104 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
5105 "System.Math::Round2".
5106 * sysmath.h: Added Floor, Round and Round2 definitions.
5107 * sysmath.c: Modified certain functions that were not 100% compliant
5108 with MS.NET (math precision) and added the implementation of Floor,
5111 2003-02-07 Martin Baulig <martin@ximian.com>
5113 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
5115 2003-02-07 Martin Baulig <martin@ximian.com>
5117 * debug-mono-symfile.c: Reflected latest symwriter changes.
5118 (mono_debug_create_mono_symbol_file): Removed.
5119 (mono_debug_open_mono_symbol_file): Take an argument which
5120 specifies whether to create a dynamic symbol file.
5122 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
5124 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
5126 2003-02-05 Martin Baulig <martin@ximian.com>
5128 * reflection.c (mono_image_build_metadata): Make this public,
5129 protect it against being called multiple times, don't create
5130 resources and don't build the compressed metadata here.
5131 (mono_image_create_pefile): Do this here.
5134 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
5136 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5138 * socket-io.c: fixed bug #36322.
5140 2003-02-06 Piers Haken <piersh@friskit.com>
5144 * debug-mono-symfile.c:
5150 * socket-io.c: warning cleanups
5152 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
5154 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
5155 function. works like remoting invoke, but does a check for the Proxy first.
5157 2003-02-05 Miguel de Icaza <miguel@ximian.com>
5159 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
5161 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
5163 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
5165 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
5166 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
5168 * object.c (mono_store_remote_field_new): used by the new jit
5169 instead of mono_store_remote_field
5170 (mono_load_remote_field_new): used by the new jit
5171 instead of mono_load_remote_field
5173 2003-02-05 Patrik Torstensson
5175 * appdomain.c: changed unload to take the domain id instead
5178 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
5181 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5183 * appdomain.c: don't look for assemblies in ApplicationBase if
5184 PrivateBinPathProbe is set.
5186 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5188 * object.c: make the first argument in main_args contain the absolute
5189 path to the assembly. Fixes bug #37511.
5191 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5193 * icall.c: get correct UTC offset for countries not using daylight
5194 time saving. Fixes bug #30030.
5196 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5198 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
5199 and 1 are the family).
5201 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
5203 * icall.c (ves_icall_InternalExecute): removed wrong assertion
5205 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
5207 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
5209 * reflection.c: added support for SignatureHelper tokens, which is
5210 needed by the Calli opcode.
5212 * reflection.h: track changes to SignatureHelper class.
5214 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
5216 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5218 * appdomain.c: fixed loading assemblies from PrivateBinPath.
5220 2003-02-03 Patrik Torstensson
5221 * appdomain.[c|h], domain.c :
5222 - Added support for getting a domain via domain id
5223 - Support for setting and getting domain from System.AppDomain
5224 (used in cross appdomain channel)
5225 - Added support for get/set for a MonoAppContext on a thread
5226 (Context class in System.Runtime.Remoting.Contexts),
5227 - Removed hack in Get/SetData and ExecuteAssembly.
5229 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
5230 the managed world to get control when a proxy is created.
5232 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
5234 2003-02-03 Miguel de Icaza <miguel@ximian.com>
5237 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
5238 Populate the codebase field as well.
5240 2003-02-02 Martin Baulig <martin@ximian.com>
5242 * debug-mono-symfile.c
5243 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
5244 (mono_debug_symfile_add_method): Allow interncalls.
5246 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5248 * icall.c: throw parse exception if strtod fails or the string is empty.
5250 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
5252 * marshal.c: handle object type separately from defined
5255 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
5257 * marshal.c: handle NATIVE_LPSTR for strings when it's
5258 explicitly specified.
5260 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
5262 * reflection.c, reflection.h, icall.c: setup the reflection
5263 handle cache for ModuleBuilders and AssemblyBuilders.
5265 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
5267 * reflection.c (reflection_methodbuilder_to_mono_method): set
5270 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5272 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
5274 2003-01-29 Dick Porter <dick@ximian.com>
5276 * threads.c: No need for the fake_thread kludge now that Thread
5277 doesn't run a class constructor
5279 2003-01-29 Dick Porter <dick@ximian.com>
5281 * threads.c: Use g_direct_hash instead of the rather bogus
5284 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
5286 * marshal.c (mono_marshal_get_native_wrapper): add check for null
5288 (mono_marshal_get_struct_to_ptr): generate valid IL code
5289 (mono_marshal_get_ptr_to_struct): generate valid IL code
5290 (*): correctly set sig->pinvoke, we need to memdup the signature
5293 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5295 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
5296 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
5298 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
5300 * profiler.c: provide more callers information.
5302 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
5304 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
5306 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
5308 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
5310 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5312 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
5313 exception instead of going into an infinite loop on dates which it
5316 * string-icalls.c (ves_icall_System_String_get_Chars): raise
5317 out-of-range exception if needed.
5319 * class.c (mono_class_setup_vtable): allow a virtual method to provide
5320 an implementation for an interface method and to override an inherited
5321 method at the same time.
5322 Imagine a scenario when a virtual method is used to override a
5323 virtual abstract method in a parent class, and this same method
5324 provides an implementation for an method inherited from an interface.
5325 In this case, the interface resolution code will set im->slot, which
5326 means that the virtual method override pass will skip this method
5327 which means a pointer to the abstract method inherited from the parent
5328 will remain in the vtable of this non-abstract class.
5330 * class.c: (mono_class_setup_vtable): continue search for a real
5331 method if only an abstract method is found.
5333 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
5335 * reflection.c: add size to encoding for ByValStr and ByValArray
5336 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
5338 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5340 * class.c (mono_class_setup_vtable): pass the override info as an
5343 * class.c (mono_class_setup_vtable): set the slot of overriding methods
5346 * reflection.c (ensure_runtime_vtable); add support for method
5349 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5351 * reflection.c (resolution_scope_from_image): Hack to work to work with
5354 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
5355 added a 'force_ref' argument to force this function to allways return
5356 a TypeRef. This is needed by mono_image_get_memberref_token ().
5358 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5360 * reflection.c (mono_image_get_type_info): interfaces really don't have
5363 * reflection.c (mono_image_basic_init): fill out missing fields of
5366 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
5367 dynamic assemblies. This is required so dynamic assemblies show up in
5368 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
5369 Type::GetType() etc. This is consistent with MS behaviour.
5371 * image.c image.h reflection.c: add newly created classes to the name
5372 cache so mono_class_get () will find them.
5374 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
5376 First part of changes to get IKVM.NET running under mono.
5378 * appdomain.h, appdomain.c: added new function
5379 mono_domain_try_type_resolve() which will emit TypeResolve events.
5380 This function will call AppDomain::DoTypeResolve to do the actual work.
5382 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
5383 moved existing code dealing with dynamic tokens to a new function
5384 called mono_reflection_lookup_dynamic_token (). This function will
5385 raise TypeResolve events when appropriate. Since reflection.c is not
5386 part of libmetadata, a new hook function called
5387 mono_lookup_dynamic_token() is added to class.c which will call this.
5389 * assembly.h assembly.c: make the invoke_load_hook function public,
5390 so it can be called for dynamic assemblies.
5392 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
5394 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
5397 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
5398 MonoGHashTable, since it contains pointers to objects which the GC
5401 * assembly.c (search_loaded): remove unused variable.
5403 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
5405 * object.c: fixed issue exposed by gcc-generated IL programs
5406 that use RVA data for pointers.
5408 2003-01-25 Martin Baulig <martin@ximian.com>
5410 * threads.c (start_wrapper): Moved the initialization of
5411 `start_func' above the mono_new_thread_init() call to which we
5412 pass it as argument.
5414 2003-01-24 Martin Baulig <martin@ximian.com>
5416 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
5417 the MonoThread pointer.
5419 2003-01-21 Miguel de Icaza <miguel@ximian.com>
5421 * icall.c: Rename `PowImpl' to Pow.
5423 2003-01-23 Dick Porter <dick@ximian.com>
5425 * threads.c (start_wrapper): Create a Thread object if needed, so
5426 the Main() thread can do the class initialisation in a subthread
5427 that has been set up to allow managed code execution.
5429 Pass the thread ID instead of the MonoThread pointer to the thread
5430 start and attach callbacks. This change is required, because the
5431 jit thread start callback must be called _before_ the Thread
5432 object can be created.
5434 (mono_thread_init): Removed much object creation code that is no
5435 longer needed. No managed code is called from here now.
5437 * object.c (mono_runtime_exec_managed_code): Create a subthread
5438 for Main, and call back to the runtime to use it.
5439 Set the exit code when Main exits.
5441 * gc.c: Make sure domain finalisation happens in a subthread.
5442 Re-enable threaded GC, fixing bug 31333 (again).
5444 * environment.c: System.Environment internall calls (so far just
5445 ExitCode is here, the others are still in icall.c)
5447 * appdomain.c (mono_runtime_cleanup): All threads running managed
5448 code should have finished before mono_runtime_cleanup() is
5449 reached, so no need to clean up threads.
5451 2003-01-22 Martin Baulig <martin@ximian.com>
5453 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
5454 `gpointer func' arguments.
5455 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
5456 but added `MonoThread *thread' argument.
5457 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
5459 * threads.c (mono_new_thread_init): Added `gpointer func' argument
5460 and pass it to the mono_thread_start_cb callback.
5461 (mono_install_thread_callbacks): New public function to install a
5462 set of callbacks which are set by the debugger.
5463 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
5465 2003-01-22 Martin Baulig <martin@ximian.com>
5467 * Makefile.am: Install debug-mono-symfile.h.
5469 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
5471 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
5473 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
5475 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
5476 * class.c (mono_ptr_class_get): correctly set access levels of pointers
5477 (mono_array_class_get): correctly set access levels of arrays
5479 2003-01-20 Patrik Torstensson
5480 * image.h (MonoAssemblyName): changed major, minor, build, revision
5481 from signed to unsigned.
5483 2003-01-20 sean kasun <skasun@azstarnet.com>
5485 * reflection.c (load_cattr_value): Now this handles
5486 MONO_TYPE_SZARRAY. Fixes bug #35629
5488 2003-01-20 Miguel de Icaza <miguel@ximian.com>
5490 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
5493 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5495 * decimal.c: fixed bug #26056.
5497 2003-01-17 Martin Baulig <martin@ximian.com>
5499 * gc.c: Raise an ExecutionEngineException instead of using g_error().
5501 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5504 (mono_get_exception_type_initialization): new function.
5506 * object.c: throw a TypeInitializationException when an exception is
5507 thrown invoking the class constructor.
5509 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5511 * reflection.c: fixed attribute reading.
5513 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5516 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
5517 provided, look for the type in the calling assembly and then in
5518 mscorlib; if the assembly name is provided, only try that one.
5520 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
5522 * object.c: register the vtable before there is a chance it's
5523 queried again recursively.
5525 2003-01-13 Duncan Mak <duncan@ximian.com>
5527 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
5530 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
5532 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
5534 2003-01-11 Martin Baulig <martin@ximian.com>
5536 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
5537 this to 20 for the release.
5539 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
5541 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
5543 * loader.c (mono_method_get_marshal_info): bug fix
5545 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
5546 structures with explicit layout
5548 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
5550 * profiler.c: made the output more readable (and sorted).
5551 Added caller information for the allocation profiler.
5553 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
5555 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
5557 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5559 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
5562 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
5564 * object.c, profiler.h, profiler.c, profiler-private.h:
5565 Added object allocation profiler.
5567 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
5569 * reflection.h, reflection.c: handle global methods.
5570 Compress blob entries.
5572 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
5574 * marshal.c: fix compilation.
5576 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
5578 * loader.c (mono_method_get_marshal_info): impl.
5580 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
5582 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5584 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
5585 for reference types.
5587 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
5589 * loader.c: fixed off by one error in loaded parameter names.
5591 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
5593 * marshal.c (mono_marshal_get_icall_wrapper): like
5594 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
5595 instead of a MonoMethod.
5597 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5599 * decimal.c: fixed bug #36537.
5601 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
5603 * marshal.c: throw a missing method exception if a
5604 P/Invoke method is not found.
5606 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
5608 * icall.c: allow a null this for constructors.
5610 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
5612 * icall.c: raise the proper exceptions if the arguments to the
5613 internal Invoke are incorrect.
5615 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
5617 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
5619 2003-01-03 Martin Baulig <martin@ximian.com>
5621 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
5623 2002-12-31 Martin Baulig <martin@ximian.com>
5625 * debug-mono-symfile.c: Completely rewrote the type section.
5626 Instead of using individual malloc()ed fields, we use one big
5627 continuous memory area and offsets into this area.
5628 See the comments in the source code for details.
5630 2002-12-30 Martin Baulig <martin@ximian.com>
5632 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
5634 2002-12-30 Martin Baulig <martin@ximian.com>
5636 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
5637 line number table in this data blob instead of using an external
5640 2002-12-28 Martin Baulig <martin@ximian.com>
5642 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
5644 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
5646 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
5647 as a boxed return type.
5649 2002-12-21 Miguel de Icaza <miguel@ximian.com>
5652 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
5653 g_build_filename to properly get separators on the filename created.
5655 * object.h: Small change, introduce MonoMarshalByRefObject to
5656 track the layout of that structure in the C# universe as we make
5659 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
5661 * object.c: removed assert to allow static fields on interfaces.
5662 * loader.c: a TypeSpec may be used for any type, not just arrays.
5664 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
5666 * class.c, class.h: added mono_class_array_element_size ().
5667 Ignore static methods in interfaces.
5669 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5671 * threads.c: fixed the build under cygwin.
5673 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
5675 * reflection.c: handle nullref constants. Allocate keys for
5676 reflection handles with the GC.
5678 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
5680 * threads.c, threads.h: added mono_thread_get_abort_signal()
5681 to get a suitable signal for thread abort.
5683 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
5685 * metadata.c: fix handling of ExportedType table.
5687 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5689 * icall.c: added WriteWindowsDebugString internal call.
5691 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5693 * reflection.h: added fields to match C# implementation.
5695 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5697 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
5699 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
5701 * gc.h, gc-internal.h: Rename header for GC internal calls to
5702 gc-internal.h from gc.h as to not clash with Boehm GC having its
5703 header installed as <gc.h> in outside include paths.
5704 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
5705 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
5707 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5709 * icall.c: assign minor, build and revision in FillName.
5711 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
5713 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
5714 Added support for running code generated by Reflection.Emit.
5716 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5718 * appdomain.c: check for NULL argument in LoadFrom.
5720 2002-12-10 Dick Porter <dick@ximian.com>
5722 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
5724 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5726 * appdomain.c: fix buglet when building exe file name. Handle full
5727 assembly name (needed after latest changes to AssemblyName).
5729 (mono_image_close): free some hashtables.
5731 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
5733 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
5734 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
5735 on some systems (redhat 7.3)
5737 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
5739 * threads.c: delete the critical section of a sync block,
5740 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
5742 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
5744 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
5746 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5748 * appdomain.[ch]: handle the assembly preload event to try loading the
5749 assemblies using the paths we have in the current domain.
5751 * assembly.[ch]: created an assembly preload hook that is called to try
5752 loading the assembly by other means that the ones provided here.
5754 * domain.c: initialize the domain search path.
5756 From now on, assemblies (TODO: except corlib and System) are loaded
5757 according to these rules when using mono_assembly_load ():
5759 1. It tries to load the assembly from the ApplicationBase
5760 of the current domain appending .dll and .exe (TODO: have to
5761 try loading from name/name.dll and name/name.exe).
5763 2. It tries the search path specified in PrivateBinPath for the
5764 current domain (if any).
5766 3. Previous behavior.
5768 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
5770 * icall.c: implemented GetInterfaceMap() related icall.
5771 * domain.c, loader.h: load MethodInfo in mono_defaults.
5773 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
5775 * gc.c: disable the finalizer thread for now, untill all the issues
5776 with it are resolved.
5778 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
5780 * string-icalls.c: handle embedded nulls in string ctor when the
5781 length is specified.
5783 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
5785 * class.c: look for explicit interface implementation in parent
5788 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
5790 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
5792 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
5794 * gc.c: protect handles with a critical section.
5796 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5799 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
5800 parameters. If no assembly specified, try getting the type from all
5801 the assemblies in the current domain, else, load the assembly and get
5804 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5806 * marshal.c: applied patch from Aleksey Demakov that fixes
5807 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
5809 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5811 * icall.c: fixed get_location.
5813 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
5815 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
5816 declarations to make it work with older gcc.
5818 * loader.c (mono_get_method): set signature->pinvoke for native calls
5820 2002-11-20 Dick Porter <dick@ximian.com>
5822 * threads.c (mono_thread_init): Set the main thread's handle
5824 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
5826 * gc.c: allow compilation without GC support. Changed to match the
5829 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
5831 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
5833 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
5835 * reflection.c: set a public key token on the core assemblies.
5837 2002-11-18 Dick Porter <dick@ximian.com>
5839 * threads.c: Split out some thread initialisation so that other
5840 files can set the start callback function.
5842 * gc.c: Run finalisers in a separate thread, to avoid stack
5843 overflow. Fixes bug 31333.
5845 * appdomain.c: Set up GC finalisation thread.
5849 * domain.c: Use gc.h macros for GC_malloc
5851 2002-11-15 Dick Porter <dick@ximian.com>
5855 * appdomain.c: Removed mono_runtime_init_with_attach(),
5856 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
5857 merging the extra parameter with the existing function. Removed
5858 unneeded code in mono_thread_attach().
5860 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
5862 * image.c (mono_image_loaded_by_guid): a method to get loaded
5864 (load_metadata_ptrs): we store the guid as string.
5866 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
5868 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
5870 * metadata.c (mono_guid_to_string): imported method form Zoltan
5871 Varga (slightly modified)
5873 * assembly.c (mono_assembly_open): load precompiled code
5875 * loader.h (MonoMethod): we store the method token for use in the
5878 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5880 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
5881 the hook function called when an assembly is loaded.
5883 * domain.c: Modified file.
5884 (mono_domain_assembly_load): removed hash table insertion of assemblies.
5888 2002-11-07 Miguel de Icaza <miguel@ximian.com>
5890 * reflection.c: Map PEFileKind to the value expected by the WinNT
5893 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5895 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
5896 Read until the buffer is filled completely.
5898 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5900 * icall.c: implemented MonoType.InternalGetEvent ().
5902 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5904 * appdomain.c: implemented InitAppDomainSetup. Delayed
5905 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
5908 * assembly.c: base_dir is now an absolute path ending with
5911 * icall.c: modified get_location according to the above changes.
5913 * object.c: init AppDomain.SetupInformation for the default domain after
5914 we have the entry assembly.
5916 * domain.c: when unloading a domain, setup = NULL.
5918 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
5920 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
5922 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
5924 * object.h, object.c: introduced mono_object_get_virtual_method ()
5925 to lookup the method invoked on an object when a callvirt is done on
5927 * icall.c: make MethodInfo::Invoke() always do a virtual call.
5929 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5931 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
5932 current domain when loaded an assembly and failed to load it.
5934 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
5936 2002-10-31 Dick Porter <dick@ximian.com>
5940 * file-io.c: Return the error status in a parameter, as the
5941 GetLastError() value has long since been blown away if we try and
5942 look it up in a subsequent internal call invocation. Delete the
5943 GetLastError() internal call, because it's useless.
5945 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
5947 * class.[ch]: added cast_class to fix bug 29517
5949 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
5951 * marshal.c: create valid IL code in the filter clause:
5952 the new JIT is less forgiving:-)
5954 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5956 * icall.c: removed get_property internal call.
5958 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
5960 * appdomain.h domain.c: Added an ID to appdomains.
5962 * threads.c threads.h icall.c: Implement icall
5963 Thread:GetDomainID(), and remove unused icall
5964 CurrentThreadDomain_internal.
5966 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5968 * icall.c: Don't recurse through the base types in GetConstructor.
5971 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
5973 * mempool.h, mempool.c: added mono_mempool_empty() and
5974 mono_mempool_stats().
5976 2002-10-23 Dick Porter <dick@ximian.com>
5980 * icall.c: Added MonoIO.GetFileType internal call
5982 2002-10-17 Dick Porter <dick@ximian.com>
5984 * appdomain.c (mono_runtime_cleanup): Don't signal the async
5985 delegate semaphore before waiting for all threads to finish,
5986 because new threads can also call async delegates. Fixes bug
5989 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
5990 of 3 seconds, in case another async job is queued. (This part is
5991 needed because the bug fix reintroduced the 3s exit lag.) This
5992 makes the mono_runtime_shutdown flag superfluous.
5994 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
5996 * reflection.c: include ehader size in method section headers.
5997 Really check for suplicated modules entries.
5999 2002-10-17 Martin Baulig <martin@gnome.org>
6001 * debug-mono-symfile.c: Added back support for locals.
6003 2002-10-14 Martin Baulig <martin@gnome.org>
6005 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
6008 2002-10-14 Martin Baulig <martin@gnome.org>
6010 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
6011 mono_class_get() instead of looking in the class cache.
6013 2002-10-13 Martin Baulig <martin@gnome.org>
6015 * debug-mono-symfile.c: Set version number to 28, include the
6016 signature in method names.
6018 2002-10-13 Martin Baulig <martin@gnome.org>
6020 * debug-mono-symfile.h: Set version number to 27.
6022 2002-10-11 Martin Baulig <martin@gnome.org>
6024 * gc.c: Don't register/unregister NULL pointers as disappearing links.
6026 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6028 * metadata.c, metadata.h: added helper function to allocate signatures.
6030 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6032 * icall.c: added internal call to get the location of machine.config.
6034 2002-10-08 Martin Baulig <martin@gnome.org>
6036 * debug-mono-symfile.c: Ignore classes with a pending init for the
6039 2002-10-03 Dick Porter <dick@ximian.com>
6041 * threads.c: Freebsd pthread_t is a pointer
6043 2002-10-03 Dick Porter <dick@ximian.com>
6045 * socket-io.c: Implemented GetHostName_internal
6047 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6050 (mono_config_parse_file): don't leak the text.
6052 2002-10-02 Martin Baulig <martin@gnome.org>
6054 * debug-mono-symfile.c: Added support for methods.
6056 2002-10-01 Martin Baulig <martin@gnome.org>
6058 * debug-mono-symfile.c: Don't emit methods and line numbers for
6059 the dynamic symbol file, just write the type table. We can easily
6060 have an external helper program which creates a symbol file for an
6063 2002-10-01 Dick Porter <dick@ximian.com>
6065 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
6066 Only add the handle to the cleanup array when we're about to
6067 launch the thread. Bug 31425 deadlocked when the test was run on
6070 2002-10-01 Martin Baulig <martin@gnome.org>
6072 * debug-mono-symfile.c: Added support for properties.
6074 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6076 * reflection.c: unaligned store fix from Mark Crichton
6077 <crichton@gimp.org>.
6079 2002-09-27 Martin Baulig <martin@gnome.org>
6081 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
6084 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
6086 * assembly.h, assembly.c: use a sane API to hook into the assembly
6087 loading process instead of a useless special-purpouse hack
6088 (ngen needs a hook, too, for example).
6090 2002-09-27 Dick Porter <dick@ximian.com>
6092 * threads.c (mono_thread_init): Call GetCurrentProcess() so
6093 io-layer can set up some process handle info. Not needed on w32,
6094 but doesn't hurt either.
6096 * process.c: Pass the program name in the second parameter to
6097 CreateProcess, so the path is searched. Include the working
6098 directory. Implemented process name, process enumeration, and some
6099 process detail internal calls.
6101 * icall.c: Added internal calls for process lookup, and some
6104 2002-09-26 Martin Baulig <martin@gnome.org>
6106 * assembly.c (mono_install_open_assembly_hook): New global
6107 function to install a function to be invoked each time a new
6109 (mono_assembly_open): Run this callback function if set.
6111 * debug-mono-symfile.c: Put back line numbers for the dynamic
6112 symbol file and also record the .il file as source file. This
6113 allows us to install the temporary symbol file as `file.dbg' just
6114 like a compiler-generated one.
6116 2002-09-26 Nick Zigarovich <nick@chemlab.org>
6118 * Corrected typo in gc.c (BOHEM vs BOEHM).
6120 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6122 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
6123 GetProperties. Also avoid calling g_slist_length in GetProperties and
6126 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6128 * reflection.c: avoid unaligned stores (bug spotted by
6129 Mark Crichton <crichton@gimp.org>).
6131 2002-09-25 Martin Baulig <martin@gnome.org>
6133 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
6134 instead of guint64 for addresses and added prologue/epilogue info.
6136 2002-09-25 Martin Baulig <martin@gnome.org>
6138 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
6139 store line number info. For the dynamic symbol file, we only need
6140 to provide the JIT generated dynamic line number info for the dynamic
6143 2002-09-25 Martin Baulig <martin@gnome.org>
6145 * debug-mono-symfile.h: Incremented version number.
6147 2002-09-24 Martin Baulig <martin@gnome.org>
6149 * class.c (mono_debugger_class_init_func): New global function
6151 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
6154 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
6155 function. This is called via the mono_debugger_class_init_func
6156 hook to add all types to the dynamic type table.
6157 (ves_icall_MonoDebugger_GetType): New interncall to get a class
6158 from its metadata token.
6160 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
6161 New interncall for the debugger.
6163 2002-09-24 Nick Drochak <ndrochak@gol.com>
6165 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
6166 before using it in case it is null.
6168 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
6170 * metadata.c: allow custom modifiers in local var signatures
6171 (bug spotted by Zoltan Varga).
6173 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
6175 * class.c: deal with the <Module> class that may have a NULL vtable.
6178 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6180 * image.c, image.h: more strong name helpers.
6181 * monosn.c: more work: convert pem keys to cryptoapi format.
6183 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6185 * string-icalls.c: speedup IndexOf.
6187 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6189 * icall.c: updates from Zoltan.2.Varga@nokia.com.
6191 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6193 * icall.c: cleanup: use mono_object_domain ().
6195 2002-09-23 Martin Baulig <martin@gnome.org>
6197 * debug-mono-symfile.c: Improved type support.
6199 2002-09-22 Martin Baulig <martin@gnome.org>
6201 * debug-mono-symfile.c: Added support for reference types and strings.
6203 2002-09-22 Martin Baulig <martin@gnome.org>
6205 * debug-mono-symfile.c: Started to work on the type table.
6207 2002-09-21 Martin Baulig <martin@gnome.org>
6209 * debug-mono-symfile.c: Largely reworked the symbol table format.
6210 The symbol table is now incrementally updated each time a new
6211 method is added. We're now also using our own magic and version
6212 so that you don't need to recompile all your classes if the
6213 dynamic table changes.
6214 (mono_debug_update_mono_symbol_file): Removed.
6215 (mono_debug_symfile_add_method): New function to add a method.
6217 2002-09-21 Martin Baulig <martin@gnome.org>
6220 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
6223 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
6224 New interncall to get a method from its metadata token.
6226 2002-09-21 Martin Baulig <martin@gnome.org>
6228 * debug-mono-symfile.c: Create type table.
6230 2002-09-20 Martin Baulig <martin@gnome.org>
6232 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
6234 2002-09-20 Martin Baulig <martin@gnome.org>
6236 * debug-mono-symfile.c: Provide information about params and locals.
6238 2002-09-20 Martin Baulig <martin@gnome.org>
6240 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
6243 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
6244 interncall to get a method from its metadata token.
6246 2002-09-20 Martin Baulig <martin@gnome.org>
6248 * debug-mono-symfile.c: Added a few checks for method->header
6249 being non-NULL. This should never happen, but for the moment
6250 let's use a g_warning() rather than a g_assert().
6252 2002-09-19 Mark Crichton <crichton@gimp.org>
6254 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
6255 even if support for it isn't present. Added an #ifdef to fix this.
6257 * socket-io.c: Added checks back for Solaris support.
6259 2002-09-19 Martin Baulig <martin@gnome.org>
6261 * debug-mono-symfile.c (read_string, write_string): Reflect latest
6262 changes in the symbol file format.
6264 2002-09-18 Martin Baulig <martin@gnome.org>
6266 * debug-mono-symfile.c: Set version number to 21.
6268 2002-09-18 Dick Porter <dick@ximian.com>
6270 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
6271 on netbsd. Fixes bug 30051.
6273 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6276 (set_version_from_string): little fix.
6278 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6280 * monosn.c, Makefile.am: added strong name utility.
6281 * reflection.h, reflection.c: implemented delayed signing,
6282 locale, version and hash id assembly attributes.
6284 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
6286 * loader.c, metadata.c: load param attributes in signatures.
6288 2002-09-16 Martin Baulig <martin@gnome.org>
6290 * debug-mono-symfile.c: Added string table with all method names.
6292 2002-09-14 Martin Baulig <martin@gnome.org>
6294 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
6297 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
6299 * reflection.c: record the public key token of referenced assemblies.
6301 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
6303 * image.c, image.h: added functions to get the strong name and the
6304 public key of an assembly.
6305 * pedump.c: use them.
6307 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
6309 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
6311 2002-09-12 Miguel de Icaza <miguel@ximian.com>
6313 * marshal.c (mono_marshal_get_managed_wrapper): Added
6316 2002-09-11 Martin Baulig <martin@gnome.org>
6318 * gc.c: Call GC_unregister_disappearing_link() on all links when
6319 finalizing them, this is necessary to aviod a crash in boehm's
6322 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6324 * gc.c: handle GetTarget for finalized objects spotted and fixed by
6327 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
6329 * icall.c: implemented MonoType::Module.
6330 * reflection.c, reflection.h: mono_module_get_object () from
6331 Tomi Pakarinen <tomi.pakarinen@welho.com>.
6333 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
6335 * icall.c: ignore overridden methods in GetMethods ().
6336 Fix for FieldInfo::SetValue().
6337 * object.c: handle float/double in runtime invoke.
6339 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
6341 * object.c: allow a constructor to be called again on an object.
6343 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6345 * class.h, class.c: move field layout code to it's own function and
6346 export it. Get an interface id earlier. Move fields in MonoClass
6347 so they are more cache friendly and align the bitfields.
6348 * loader.c: temporary handle get_param_names() for a runtime method.
6349 * reflection.c, reflection.h: more code to handle runtime creation of
6352 2002-09-09 Martin Baulig <martin@gnome.org>
6354 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
6355 signature with the pinvoke field being set for the actual call.
6357 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6359 * icall.c: removed some unused icalls. Start of map of glib charsets
6360 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
6362 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
6364 * debug-helpers.c: break infinite loop (found and fixed by
6365 Holger Arnold <harnold@gmx.de>).
6367 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
6369 * icall.c: target may be null in create_delegate.
6371 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
6373 * marshal.c: handle a boolean return type.
6375 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
6377 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
6379 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
6381 * gc.c: fix weakreferences.
6383 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
6385 * icall.c: added icall to get default codepage.
6387 2002-09-03 Dick Porter <dick@ximian.com>
6390 * threads.c: Use MonoThread instead of MonoObject where
6393 Store running thread objects in a hash table, so that we have all
6394 the info to hand when waiting for them to finish
6395 (means we don't need OpenThread() any more, so mingw builds should
6396 be fully functional again.)
6399 * object.h: Added thread ID to MonoThread
6401 2002-09-03 Martin Baulig <martin@gnome.org>
6403 * icall.c (System.Reflection.Assembly::get_location): New interncall.
6405 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6407 * icall.c: fixed leak in get_temp_path. Thanks lupus.
6409 2002-09-03 Martin Baulig <martin@gnome.org>
6411 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
6412 argument to store the end address of the disassembled instruction.
6414 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
6415 here from debug-symfile.h.
6416 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
6417 JIT into this struct.
6418 (MonoSymbolFile): Added `char *image_file' field.
6419 (MonoDebugGetMethodFunc): Removed.
6420 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
6421 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
6422 (mono_debug_find_method): New method.
6424 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
6425 create a full symbol file.
6426 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
6427 and static symbol files.
6428 (mono_debug_find_method): The symbol file keeps an internal method hash,
6429 call this to get a MonoDebugMethodInfo from a MonoMethod.
6431 * debug-symfile.[ch]: Removed.
6433 2002-08-29 Miguel de Icaza <miguel@ximian.com>
6435 * image.c (do_mono_image_open): Remove linker version check.
6437 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
6439 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
6440 wrappers for instance methods.
6442 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6444 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
6446 2002-08-28 Dick Porter <dick@ximian.com>
6448 * Makefile.am: Export HOST_CC for w32 builds
6450 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
6452 * file-io.c process.c: MonoString are null terminated, no
6453 need for mono_string_to_utf16() anymore.
6455 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6457 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
6459 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
6461 * icall.c, reflection.h: speedup System.MonoType.
6463 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
6465 * reflection.c: allow null as the value of a string argument in
6466 custom attributes constructors.
6468 2002-08-27 Martin Baulig <martin@gnome.org>
6470 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
6471 `trampoline_address' field.
6473 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
6475 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
6476 check (fixes bug #29486)
6478 2002-08-27 Martin Baulig <martin@gnome.org>
6480 * debug-mono-symfile.c: Changed the file format in a way that allows us
6481 open it read-only and to use a specially malloced area for all the
6482 dynamic data. We can now also generate a symbol file on-the-fly if we're
6483 debugging IL code and there is no MCS generated symbol file for it.
6485 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
6487 * object.c: added a define for a good string and array
6488 creation speedup (not enabled by default because we need to deal with
6491 2002-08-26 Martin Baulig <martin@gnome.org>
6493 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
6494 function to create a dynamic symbol file. This is used by the
6495 debugger to create a symbol file for IL code on-the-fly.
6497 2002-08-26 Martin Baulig <martin@gnome.org>
6499 * loader.c (mono_lookup_pinvoke_call): Include the error message
6500 from g_module_error() in the error message.
6502 2002-08-24 Martin Baulig <martin@gnome.org>
6504 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
6505 function to update the symbol file. The symbol file is mmap()ed
6506 writable, but private. This allows us to install the symbol file
6507 together with the assembly.
6509 2002-08-24 Martin Baulig <martin@gnome.org>
6511 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
6512 but they can read the new symbol file format which mcs is now creating.
6514 * debug-symfile.c (mono_debug_find_source_location): Moved to
6515 debug-mono-symfile.c; this is now operating on the new symbol file.
6517 2002-08-23 Martin Baulig <martin@gnome.org>
6519 * debug-helpers.c (mono_method_desc_from_method): New function to get
6520 a MonoMethodDesc from a MonoMethod.
6522 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
6524 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
6525 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
6527 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
6529 * string-icalls.[ch]: make helper methods static.
6531 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6533 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
6534 types to it and to SetValueInternal.
6536 * object.c: Moved handle_enum label to its proper place. This was the
6539 This time i compiled mcs and gtk-sharp and they both work.
6541 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6543 * icall.c: reverted partially my previous patch until
6544 object.c:set_value handles enums correcly.
6546 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6549 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
6550 (ves_icall_System_Environment_get_MachineName): removed warning when
6551 compiling under cygwin.
6553 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
6555 * object.c: fixed field_get_value() for reference types.
6557 2002-08-22 Dick Porter <dick@ximian.com>
6559 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
6560 Don't free a buffer while it's still needed. Patch from Jonathan
6561 Liger <Jonathan.liger@wanadoo.fr>
6563 2002-08-21 Miguel de Icaza <miguel@ximian.com>
6565 * icall.c (ves_icall_System_Environment_get_Platform): Add new
6568 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
6570 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
6571 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
6573 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
6574 we call unmanaged code which throws exceptions.
6576 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6578 * appdomain.h: added per-domain entry_assembly.
6579 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
6581 * icall.c: Assembly::GetEntryAssembly icall.
6582 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
6583 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
6585 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6587 * appdomain.h, gc.c: added mono_domain_finalize ().
6589 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6592 (mono_print_unhandled_exception): changed g_warning by g_printerr
6593 because g_log has a 1024 characters limit (yeah, i got a big stack
6594 trace). Don't print exception name, that should be in ToString
6597 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6599 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
6600 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
6602 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6605 (mono_print_unhandled_exception): after previous commit, i realized
6606 that MS calls ToString on the exception. I changed this function to
6607 do that. This way we get stack_trace for free.
6609 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6612 (mono_print_unhandled_exception): invoke Message property instead of
6613 getting 'message' field from Exception. Don't allocate memory for
6614 'trace' and 'message' if not needed.
6616 2002-08-18 Dick Porter <dick@ximian.com>
6618 * unicode.c: Fix asserts to match Encoder.cs checks
6620 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6622 * marshal.c: fix unaligned store issue and a few wrong
6623 opcode argument types.
6625 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6627 * icall.c: added GetUninitializedObjectInternal internal call.
6629 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
6631 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
6632 to the right domain.
6634 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
6636 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
6638 * class.c (class_compute_field_layout): set blittable to false for Strings
6640 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
6642 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6644 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
6645 first chunk of code to create types at runtime. Code to
6646 handle ReflectedType/DeclaringType. Make reflection handles
6649 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
6651 * class.c: set correct name in arrays.
6653 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
6655 * appdomain.c (mono_domain_transfer_object): make it work with
6656 valuetypes. bug fixes.
6658 2002-08-12 Dick Porter <dick@ximian.com>
6660 * object.h: Rename some parameters to avoid c++ keywords (Patch
6661 from Joseph Wenninger <kde@jowenn.at>)
6663 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
6665 * icall.c: added icall to implement Assembly.GetFile*.
6667 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6669 * reflection.h, reflection.c: code to embed managed resources.
6671 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
6673 * class.c: move all the type size stuff into
6674 class_compute_field_layout().
6676 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
6678 * class.c: ensure enums have always the correct instance size.
6679 * unicode.c: remove wrong assert.
6681 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
6683 * assembly.c: fix mem corruption issue.
6684 * image.h, image.c: added mono_image_get_resource () to access
6686 * icall.c: implemented Assembly.EntryPoint property and some
6687 Managed Resources related internalcalls.
6690 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
6692 * image.c, image.h: impemented mono_image_get_entry_point ().
6693 * appdomain.c: use mono_image_get_entry_point.
6695 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6697 * reflection.c: support the object type argument when loading
6700 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
6702 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
6703 String as return type.
6705 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
6707 * reflection.c: fix encoding of named args for custom attrs to match
6708 the ms implementation. Read them back when instantiating custom
6711 2002-08-02 Radek Doulik <rodo@ximian.com>
6713 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
6714 by Dietmar as quick fix
6715 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
6716 16 as stack size, used on more places as quick fix before Dietmar
6717 will fix it properly
6719 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
6721 * object.h, object.c: added accessors for fields and properties.
6723 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
6725 * class.c, class.h: made mono_class_get_field_from_name ()
6726 loop on parent types.
6727 Added mono_class_get_property_from_name ().
6729 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
6731 * class.c, class.h: move the code to setup the type vtable in its own
6732 function so that it can be reused also for types created at runtime.
6733 Eliminate the "class" identifier from the header file.
6734 * reflection.c: setup the vtable for enums so that we can create
6735 objects for use in SetConstant ().
6737 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
6739 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
6740 instead of the delegate itself as this pointer (bug #28383)
6742 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
6744 * marshal.c (mono_marshal_get_managed_wrapper): added return type
6747 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6749 * loader.c: don't set the pinvoke bit on icalls.
6751 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
6753 * debug-helpers.c (mono_method_full_name): only print a number to
6754 indicate wrapper type (so that the output is more readable in traces).
6756 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
6758 * class.c (mono_class_init): include method override patch from Paolo
6760 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
6762 * icall.c: fixed GetTypeCode().
6764 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
6766 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
6767 use real delegate invoke function to make it work with multicast
6768 delegates (fix bug# 28291).
6770 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
6772 * object.c: load constant strings.
6774 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
6776 * reflection.c: no magic numbers.
6777 * tabledefs.h: security action enum.
6779 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
6781 * assembly.c: fix possible memory corruption.
6783 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
6785 * reflection.h, reflection.c: added support for linking resources.
6786 * verify.c: check we have an updated corlib.
6788 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
6790 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
6792 (mono_marshal_string_array): null terminate unmanaged string arrays.
6793 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
6795 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
6797 * icall.c: Type.GetType () can now return also types from the
6800 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
6802 * loader.h, loader.c: stack walking support.
6803 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
6806 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
6808 * marshal.c: added optimisations for blittable types
6810 * class.c (mono_array_class_get): do not set blittable attribute on arrays
6811 (mono_class_setup_mono_type): set blittable attribute for single
6814 * marshal.c (mono_string_utf8_to_builder): impl.
6815 (mono_string_builder_to_utf8): impl.
6816 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
6818 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
6820 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
6821 (mono_marshal_get_managed_wrapper): impl. byref types
6823 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6826 (search_method): don't display debug message.
6828 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
6830 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
6832 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
6834 * appdomain.c: set the missing filename when throwing exception.
6836 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
6838 * metadata.c (mono_type_size): code cleanup
6839 (mono_type_stack_size): removed some test code
6841 2002-07-21 Miguel de Icaza <miguel@ximian.com>
6843 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
6844 mono_get_exception_file_not_found now.
6846 * exception.c (mono_exception_from_name_two_strings): New version
6847 that will call a constructor with two string arguments.
6848 (mono_get_exception_file_not_found): New helper routine, used to
6849 report file-not-found errors.
6851 2002-07-20 Dick Porter <dick@ximian.com>
6854 * process.c: Pass file handles to CreateProcess
6858 * file-io.c: Implemented CreatePipe
6860 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
6862 * metadata.c (mono_get_param_info): set alignment for value types
6864 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
6866 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
6867 Constify mono_domain_assembly_open().
6868 * loader.c: handle null namespace in icalls.
6870 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
6872 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
6873 (emit_str_to_ptr_conv): marshal object as structs
6875 * metadata.c (mono_type_to_unmanaged): marshal object as structs
6877 * marshal.c (mono_marshal_get_runtime_invoke): support value types
6879 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
6881 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
6882 (mono_marshal_get_native_wrapper): we an now return value types
6884 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
6886 * verify.c: more checks implemented.
6888 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
6890 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
6892 (mono_marshal_get_native_wrapper): allow byref arguments
6893 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
6894 impl. PtrToStringXXX methods
6895 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
6896 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
6897 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
6898 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
6899 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
6901 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6903 * reflection.c: fix buglet in parsing an assembly name.
6905 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
6907 * marshal.c (emit_ptr_to_str_conv): first impl.
6909 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
6911 * object.c, class.h: cache the vtable in the class as suggested by
6912 vargaz@freemail.hu (Zoltan Varga).
6914 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
6916 * class.h, loader.c: added mono_field_from_token().
6917 * verify.c: first cut of type checking code.
6919 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
6921 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
6923 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
6925 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
6927 (mono_marshal_get_remoting_invoke): impl.
6928 (mono_delegate_begin_invoke): impl.
6929 (mono_mb_emit_save_args): impl.
6930 (mono_delegate_end_invoke): impl.
6931 (mono_marshal_get_delegate_begin_invoke):
6932 (mono_marshal_get_delegate_end_invoke):
6933 (mono_marshal_get_delegate_invoke): generate a special name for
6934 those methods (including the signature) and associate them whith
6937 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
6940 (mono_reflection_type_from_name): now it has a MonoImage parameter
6941 which is used as the default image to search the type in. If the image
6942 is NULL or getting the type from it fails, it defaults to corlib.
6944 * icall.c: changed 1 call to mono_reflection_type_from_name to match
6947 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
6949 * reflection.c: update the parameter table index.
6951 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
6953 * domain.c: don't include the mark byte in the string hash.
6955 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
6957 * icall.cs: icall for Type.GetTypeCode ().
6958 * verify: a couple of fixes and disabled local initialization checks.
6960 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
6962 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
6964 * debug-helpers.c (mono_method_full_name): print the type of the
6967 * metadata.c (mono_signature_hash): a hash function for signatures
6968 (mono_signature_hash): better hash algorithm
6970 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
6972 * debug-helpers.c (mono_method_full_name): this can now generate
6973 method names with signatures
6975 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
6976 method dont have this pointers.
6978 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
6980 * reflection.c: fixup typebuilder tokens.
6981 * image.c: fix buglet.
6982 * marshal.h: remove whitespace.
6983 * metadata.h, metadata.c: reinstate code that was removed.
6984 * verify.c: handle catch directives and fix another couple of bugs.
6986 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
6988 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
6989 (mono_marshal_get_native_wrapper): make it comp. with the old code
6990 (mono_marshal_get_native_wrapper): support boolean
6991 (mono_marshal_get_managed_wrapper): support more types
6993 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
6995 * class.c (class_compute_field_layout): compute class->blittable attribute.
6997 2002-07-09 Dick Porter <dick@ximian.com>
6999 * threads.c: Make the thread cleaning up cope with threads that
7002 2002-07-08 Radek Doulik <rodo@ximian.com>
7004 * reflection.c (method_encode_code): use non-translated values to
7005 compute finally_start, this fixes exception handling on ppc, yay!
7007 * decimal.h (struct signscale): fix endianess
7009 2002-07-07 Radek Doulik <rodo@ximian.com>
7011 * reflection.c: swap box_val and not val
7013 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
7015 * reflection.c, reflection.h: handle full assembly info in type name.
7016 Handle Type arguments when loading custom attributes.
7017 * icall.c: updated to use new mono_reflection_type_from_name () method.
7019 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7022 (method_from_memberref): also print assembly name when method not found.
7024 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7027 (ves_icall_TypeGetProperties): fixed bug #27473.
7029 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7031 * reflection.c: display image name and token when cannot find the
7032 .ctor for an attribute.
7034 2002-07-05 Martin Baulig <martin@gnome.org>
7036 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7038 2002-07-04 Dick Porter <dick@ximian.com>
7040 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
7041 compile on mingw. This will cause mingw builds to not wait for
7042 subthreads to terminate after the main thread does. I've lodged a
7043 bug with the mingw developers for them to wrap OpenThread().
7045 2002-07-03 Dick Porter <dick@ximian.com>
7047 * threads.c: Store thread IDs instead of handles, because
7048 GetCurrentThread() returns a pseudohandle and therefore stores
7049 useless values. mono_thread_cleanup() continues checking the
7050 array of threads until it is empty, to cope with subthreads
7051 spawning new threads after the main thread has finished.
7055 * profiler-private.h: Pass the thread ID to thread profiler
7056 functions, instead of a handle
7058 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7060 * verify.c: fixes to make it more usable.
7061 * pedump.c: added --verify code to verify IL code in an assembly.
7063 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7065 * reflection.c: turn errors into warnings to allow compiling corlib.
7067 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
7069 * reflection.c: add special cases to compile corlib.
7071 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7073 * reflection.c: handle properties with only a set method.
7075 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7077 * opcodes.h: add enum with opcodes in opval order.
7079 2002-07-01 Dick Porter <dick@ximian.com>
7082 * object.c (mono_runtime_run_main): Removed unneeded argument
7084 2002-06-28 Martin Baulig <martin@gnome.org>
7086 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
7088 2002-06-27 Dick Porter <dick@ximian.com>
7090 * threads.c: Store the handle in both the parent thread and in the
7091 subthread, to minimise the time between starting a new thread and
7094 2002-06-26 Dick Porter <dick@ximian.com>
7096 * appdomain.c (mono_runtime_cleanup): Close the socket library
7097 after all the threads have finished, not before
7099 2002-06-26 Martin Baulig <martin@gnome.org>
7101 * debug-symfile.c (mono_debug_find_source_location): Added
7102 `guint32 *line_number' argument. If it's not NULL, store the line number
7103 there and return the file name without the line number.
7105 2002-06-25 Dick Porter <dick@ximian.com>
7109 * process.c: Process forking and other support functions
7111 2002-06-25 Dick Porter <dick@ximian.com>
7113 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
7114 things dont happen when the image is closed.
7115 (mono_image_lookup_resource): Walk the resource section looking
7116 for a particular entry
7118 * cil-coff.h: PE resource section decoding
7120 2002-06-25 Dick Porter <dick@ximian.com>
7124 (mono_assembly_foreach): Accessor functions to walk the list of
7126 (mono_assembly_set_main):
7127 (mono_assembly_get_main): Process methods need to know which
7128 assembly is the "main" one
7130 * object.c (mono_runtime_run_main): Record the main assembly
7132 * debug-helpers.c: Fix typo
7134 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
7136 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
7137 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
7139 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7141 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
7143 2002-06-21 Miguel de Icaza <miguel@ximian.com>
7145 * image.c (do_mono_image_open): Initialize reference count,
7146 otherwise we leak the MonoImage.
7148 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7150 * reflection.c: small tweak to handle self-hosting.
7152 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7154 * reflection.c: fix type name parse code.
7156 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7158 * reflection.c: break out of the loop.
7159 * image.c: special case corlib.
7161 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7163 * reflection.c: add all the custom attrs at the end to ensure the
7164 ctors have been properly initialized when the attributes are defined
7165 in the current assembly.
7167 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7169 * reflection.c: handle correctly multiple-nested types.
7171 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7173 * row-indexes.h: fix typos.
7174 * reflection.c: adjust for typos and fix method_def_or_ref
7175 encoding in MethodImpl table.
7177 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7179 * reflection.c: fix entry point patching (thanks Serge!).
7181 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
7183 * verify.c: add check for System.Exception
7185 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
7187 * image.c, class.c: minifix for code just c&p'ed.
7188 * reflection.c: warning fix.
7189 * object.h, loader.h, domain.c: load also StringBuilder.
7191 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
7193 * marshal.h, marshal.c: some support code to handle complex marshaling.
7195 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7197 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
7198 Better signatures with vtable error dump.
7200 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
7202 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
7204 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
7206 * icall.c (ves_icall_Type_GetField): impl.
7208 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7210 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
7211 to retrieve a marshal description blob for a field or param.
7213 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7215 * reflection.h, reflection.c: change order of nested type emission
7216 to avoid table corruption. The NestedTypes table is sorted.
7217 * icall.c: change order of GetConstructor results to workaround mcs bug.
7219 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7221 * reflection.h, reflection.c: handle field and param marshal
7224 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7226 * icall.c, marshal.c marshal.h: more Marshal class implementation.
7228 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7230 * reflection.c: fix call convention.
7232 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7234 * reflection.h, reflection.c: mono_image_get_memberref_token()
7235 takes a type instead of a class, now. Added
7236 mono_image_get_array_token() to create tokens for the special
7237 multi-dim array methods.
7239 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7241 * assembly.c: handle modules (no assembly table). Split
7242 loading references in its own function.
7243 * class.c: handle moduleref resolution scope.
7244 * image.c, image.h: cache module name in image.
7246 2002-06-07 Martin Baulig <martin@gnome.org>
7248 * reflection.c (mono_image_get_type_info): Only add a class layout entry
7249 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
7251 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7253 * icall.c: more signature fixes that used uint instead of int.
7255 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7257 * reflection.c: fixed signature of field refs.
7259 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7261 * class.c, reflection.c: handle typerefs of nested types
7262 (both on read and when writing files).
7264 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
7266 * icall.c: fix method signatures that tried to workaround the previous
7269 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7271 * debug-helpers.c: fix typo.
7273 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7275 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
7276 rewrote the PE/COFF writing code (our programs are understood by the
7279 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
7281 * gc.c, gc.h, icall.c: weakreference support.
7283 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
7285 * Makefile.am, mono-config.c: use $(sysconfdir).
7287 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7289 * icall.c: changed default precision of Double.ToString() to 15.
7290 Fixed memory leak. Unified with Single.ToString.
7292 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
7294 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
7296 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
7298 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
7299 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
7300 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
7303 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7305 * debug-symfile.c, sysmath.c: yet more compilation fixes.
7307 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7309 * reflection.c, socket-io.c: more compilation fixes.
7311 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7313 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
7314 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
7315 unicode.c: warning and compiler compatibility fixes.
7317 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7319 * class.h, metadata.c: fixed warnings/compilation errors.
7321 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
7323 * Makefile.am, mono-config.c, mono-config.h: configuration file
7325 * loader.c, loader.h: make Dll mapping configurable at runtime in the
7326 config file. Export methods to insert and lookup mappings.
7328 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7330 * reflection.c: handle types and boxed objects in custom attr
7333 2002-05-30 Martin Baulig <martin@gnome.org>
7336 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
7338 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
7340 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
7341 to lookup the implmap row for a P/Invoke method.
7342 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
7343 P/Invoke method from the runtime on an as needed basis.
7345 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
7347 * metadata.c (mono_metadata_parse_signature): impl.
7349 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7351 * class.c: handle .pack directive.
7353 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7355 * object.c: initialize static fields with RVA data.
7357 2002-05-25 Martin Baulig <martin@gnome.org>
7360 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
7362 2002-05-24 Martin Baulig <martin@gnome.org>
7365 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
7366 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
7367 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
7369 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7371 * object.c: special case string ctros in invoke.
7372 * gc.c: silly whitespace changes.
7374 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
7376 * threadpool.[ch]: impl. a threadpool that can
7377 be used by mint and mono.
7379 2002-05-22 Martin Baulig <martin@gnome.org>
7381 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
7382 The first argument is now a `MonoReflectionModuleBuilder *', the return
7383 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
7384 `methods' field to get the method builder. The `token' argument is the
7387 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
7388 invalid characters instead of g_assert_not_reached()ing. This seems
7389 to be the behaviour of mscorlib.
7391 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
7393 * object.c (mono_runtime_invoke_array): applied patch from Rachel
7394 Hestilow to fix bug #25104
7396 2002-05-21 Martin Baulig <martin@gnome.org>
7398 * debug-symfile.c (mono_debug_find_source_location): New function.
7399 Looks up an IL offset in the line number table and returns the source
7400 location as a string.
7402 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7405 (mono_double_ToStringImpl): changed %f by %g until we have something
7408 2002-05-21 Nick Drochak <ndrochak@gol.com>
7410 * icall.c : Use different name for Math.Pow's icall. Needed to check
7411 parameters first in C#.
7413 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7415 * icall.c, reflection.h: added icall to get info about an event.
7417 2002-05-20 Radek Doulik <rodo@ximian.com>
7419 * object.c (mono_value_box): don't use memcpy for boxing on BIG
7421 (mono_value_box): don't use memcpy for small sizes on
7422 architectures with unaligned access
7424 2002-05-20 Martin Baulig <martin@gnome.org>
7426 * reflection.c (mono_reflection_setup_internal_class): Don't crash
7427 if `tb->parent == NULL'.
7428 (mono_reflection_create_internal_class): New function. This is
7429 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
7432 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
7435 2002-05-19 Martin Baulig <martin@gnome.org>
7437 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
7438 argument to get the length, don't default to the array length.
7440 2002-05-18 Miguel de Icaza <miguel@ximian.com>
7442 * assembly.c (mono_assembly_setrootdir): New function used to
7443 override the MONO_ASSEMBLIES directory.
7445 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
7447 * icall.c: ValueType_GetHashCode() initialize local var.
7449 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
7451 * reflection.c: sort custom attributes table.
7453 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7455 * reflection.c: support named args in custom attributes (write support).
7457 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
7459 * reflection.c: fix finally position calculation.
7461 2002-05-15 Radek Doulik <rodo@ximian.com>
7463 * reflection.c: fixed endianess at many places
7465 * icall.c (ves_icall_InitializeArray): comment out debug msg
7467 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
7469 * object.c (mono_unhandled_exception): new function to handle
7470 unhandled exceptions.
7471 (mono_unhandled_exception): call the UnhandledException event.
7472 (mono_runtime_delegate_invoke): impl.
7474 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
7476 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
7477 returns the RVA, not the direct pointer to the data. Handle the case
7478 when the class size is fixed.
7480 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
7482 * reflection.c: fix some endianess issues.
7484 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
7486 * object.c (mono_runtime_invoke): is now able to catch exceptions.
7488 * threads.c (mono_thread_init): added a callback which is invoked
7491 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
7493 * icall.c: make GetHashCode return non-negative values.
7495 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
7497 * object.c, icall.c, gc.c: revert to address-based hashcode.
7499 2002-05-13 Miguel de Icaza <miguel@ximian.com>
7501 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
7503 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7505 * icall.c, class.c: special case <Module>.
7507 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
7509 * icall.c: fix bug in GetNow().
7511 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
7513 * object.c (mono_runtime_class_init): make sure that we call all
7514 static class constructors.
7516 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7518 * reflection.c: sort methodsemantics table.
7520 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
7522 * reflection.h, reflection.c: honour init locals setting.
7524 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
7526 * icall.c: copied Double ToStringImpl for Single ToStringImpl
7528 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7530 * reflection.c: support ContructorBuilders in attribute blob creation.
7532 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7534 * reflection.c: some changes to build a binary that can be run
7535 directly in windows.
7537 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
7539 * loader.c: print a big message when an icall can't be found.
7541 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7543 * string-icalls.c: fix bug 24248.
7545 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
7547 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
7548 icall.c, reflection.h: separate assembly loading by pathname and by
7549 assembly name. Use the MONO_PATH env var to search for assemblies.
7551 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7553 * assembly.c, image.h: add some support for assemblies
7554 with multiple modules.
7555 * class.c, class.h: export mono_class_from_typeref().
7556 * loader.c: remove duplicated code and use mono_class_from_typeref(),
7559 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7561 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
7562 documentation says (the ECMA one is correct).
7564 2002-05-02 Dick Porter <dick@ximian.com>
7566 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
7567 Don't name the synchronisation mutex.
7569 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
7572 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
7573 Make the prototypes match.
7574 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
7578 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
7579 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
7580 all systems have tm.tm_zone, so use strftime() with %Z to print
7581 the timezone abreviation into a temp string.
7583 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
7584 rather than mono_array_addr() on a MonoString on Big Endian
7587 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
7589 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
7592 2002-04-30 Dick Porter <dick@ximian.com>
7594 * socket-io.c: Cope with SOCKET being an integer rather than a
7597 * threads.c: Added Thread_free_internal, to deal with thread
7598 handle cleanup. Moved calls to handle_store() and handle_remove()
7599 to start_wrapper(), so each can only be called once. Allocate
7600 synchronisation blocks with GC_malloc(), and use GC finalisation
7601 to close the handles.
7603 * icall.c: added System.Threading.Thread::Thread_free_internal
7605 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7607 * icall.c: support Environment.Exit, CommandLineArgs().
7609 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
7611 * object.c, object.h: added mono_runtime_run_main () and
7612 mono_runtime_get_main_args () for use in System.Environment.
7614 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
7616 * gc.c: fix thinko, enable actual finalization since the jit is now
7619 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7621 * gc.c, object.c: take into account that an object may be offset wrt the address
7622 returned by GC_malloc().
7624 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7626 * image.c: handle files without entries in the assembly table (modules).
7628 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
7630 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
7631 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
7632 allowed to be null when it's System.Object class setup.
7634 2002-04-27 Martin Baulig <martin@gnome.org>
7636 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
7637 if `tb->parent == NULL' rather than crashing.
7639 2002-04-28 Nick Drochak <ndrochak@gol.com>
7641 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
7642 calling acos() where asin() should have been called.
7644 2002-04-26 Martin Baulig <martin@gnome.org>
7646 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
7647 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
7648 there's a subdirectory called `System', but we don't want to read that
7649 subdirectory as an assembly.
7651 2002-04-25 Martin Baulig <martin@gnome.org>
7653 * debug-symfile.c: Reflect latest MonoString changes.
7655 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7657 * rand.c, rand.h: instance method icalls need to have an explicit
7658 this pointer as first argument in the C implementation.
7660 2002-04-25 Nick Drochak <ndrochak@gol.com>
7662 * icall.c: Fix typo in map for GetNonZeroBytes
7664 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
7666 * string-icalls.c : String does now passes unit tests without any
7667 errors, the following changes has been made:
7669 Implemented replace methods.
7670 Renaming of methods to (try) follow the standard.
7671 Fixed compare ordinal
7672 Made all memory allocated directly to function instead of via icall function.
7673 Small performance fix in is_in_array function
7675 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
7677 c (mono_string_Internal_ctor_charp_int_int):
7678 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
7679 sindex < 0, throw ArgumentOutOfRangeException instead of
7680 ArgumentNullException.
7682 Added new check for length == 0, however
7683 I need to make it return String.Empty from the C code.
7685 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
7686 that calculate the length for us here.
7688 (mono_string_Internal_ctor_sbytep_int_int): Replaced
7689 mono_string_new_utf16 with mono_string_new, since value is utf8.
7691 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7693 * object.c: register the object for finalization if needed.
7694 Allocate one more char in the string for the terminating 0 char.
7696 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
7698 * class.c, class.h, image.c: check if a type implemenst a destructor.
7699 Use the proper key for array class lookups.
7700 * icall.c: register the icalls in the System.GC class.
7701 * gc.c, gc.h: GC-related functions and icalls.
7703 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7707 * unicode.c: free some strings gotten from mono_string_to_utf8 and
7708 changed a couple of free () by g_free ().
7710 * decimal.c: one-liner in the comments for decimal2string ().
7712 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
7714 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
7716 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
7718 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
7719 * object.c (mono_runtime_invoke_array) : handle null in params
7721 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
7723 * string-icalls.c: fixed bug in split (one off bug)
7725 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
7727 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
7728 * icalls.c: added String::Equals as internal method
7730 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
7732 * threads.c: fixed bug in the double interlocked functions
7734 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
7736 * threads.c: implemented all of the new interlocked icalls.
7737 * string-icalls.c: fix a bug in insert.
7738 * icalls.c: added the icalls for interlocked, removed old string functions.
7740 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7742 * loader.c: fix off-by-one error when reading argument names.
7744 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7746 * profiler.c: win32 counter implementation (untested).
7747 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
7748 (the latter needs testing and more complete impl. from win32 folks).
7750 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
7752 * object.c: mono_array_new_full workaround mono_array_class_get
7755 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
7757 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
7758 * object.h (mono_string_chars): Changed casting type.
7760 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
7762 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
7763 method signatures to use gunichar2 instead of gint16.
7765 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
7767 * object.h, object.c: domain-specific versions of mono_object_new and
7770 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
7772 * object.c: changed String layout
7774 * string-icalls.c (mono_string_Internal_ctor_chara): added
7775 internal string constructors.
7777 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
7779 * threads.c: pass 'this' to the thread start routine.
7781 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7783 * string-icalls.c: fix IndexOf and LastIndexOf. Now
7784 InternalCompareStr don't call twice mono_string_cmp_char for the last
7785 character. Improved performance in mono_string_cmp_char.
7787 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
7789 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
7790 code into its own library: libmonoruntime.
7792 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
7794 * object.h, object.c: changed array format so that szarrays do not
7795 require a bounds structure.
7796 * icall.c, appdomain.c: support for new szarray format.
7798 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
7800 * metadata.c: compare also the retuns type when comparing signatures:
7801 we didn't do this as an optimization since really overloaded methods
7802 must differ also in the arguments, but this doesn't work with
7803 low-level IL code (or when using explicit conversion operators: see
7804 bug#23498 for an example).
7806 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
7808 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
7810 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
7812 * icall.c: make MonoType::GetElementType its own icall.
7814 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
7816 * icall.c: remove MonoMethod_get_Name().
7817 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
7820 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
7822 * string-icalls.c: optimized a few methods.
7824 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
7826 * icall.c: added all new string internal calls
7827 * string-icalls.c: added, new string internal call implementation.
7828 * object.c: added mono_string_new_size for allocating a string a size
7830 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
7832 * object.c (mono_object_isinst): use the same code as in the
7833 optimized x86 version.
7835 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
7837 * profiler.c: TSC-based timer code (faster and more accurate).
7838 Not hooked up in configure, yet (set USE_X86TSC to 1).
7840 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
7842 * profiler.c, profiler.h: track time spent compiling methods.
7843 * threads.c: track thread creation/destruction.
7845 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
7847 * profiler.c, profiler.h, profiler-private.h: profiling interface
7848 and sample implementation. Moved here so that it can be used also by
7851 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
7853 * reflection.c, reflection.h: keep types and other handles separate in
7854 the hash tables for referred tokens. Add guid for modules.
7856 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
7858 * assembly.c: fix bugs found with valgrind.
7859 * metadata.h, metadata.c: added mono_metadata_guid_heap().
7861 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
7863 * threads: added icall support for getting current domain for
7866 2002-04-13 Martin Baulig <martin@gnome.org>
7868 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
7869 (MonoDebugVarInfo): Added `index' field for register based addresses.
7870 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
7871 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
7872 `MonoDebugVarInfo *params' and `guint32 this_offset' with
7873 `MonoDebugVarInfo *this_var'.
7875 * debug-symfile.c (relocate_variable): New static function to write
7876 a location description for a local variable or method parameter.
7878 2002-04-12 Martin Baulig <martin@gnome.org>
7880 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
7881 stack offset and begin/end scope address of a local variable.
7882 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
7883 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
7884 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
7886 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
7887 Added new relocation types for start/end scope of a local variable.
7889 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
7891 * object.h: add mono_object_domain() macro.
7892 * reflection.c: handle typespecs.
7893 * icall.c: MonoMethod::get_Name() implementation.
7895 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7897 * icall.c: String::GetHashCode() icall implementation.
7899 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7901 * icall.c: String::IndexOfAny icall.
7902 * object.c, object.h: make array->max_length more useful.
7903 Intrduced mono_object_class() and mono_string_length() macros.
7905 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7907 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
7908 instead of g_unichar_isdigit.
7910 2002-04-11 Nick Drochak <ndrochak@gol.com>
7912 * icall.c: Implement a simple Double.ToString().
7914 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7916 * appdomain.h: only io-layer.h is supposed to be included.
7917 * icall.c: explicitly import environ. Fix warning.
7919 2002-04-10 Nick Drochak <ndrochak@gol.com>
7921 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
7922 return true even if it's not Daylight Savings time.
7923 Only return false for the case where the function isn't
7924 implemented for a plaform (read Windows).
7926 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7928 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
7931 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
7933 * mempool.c (mono_mempool_alloc): only use g_malloc when
7934 absolutely necessary.
7936 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
7938 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
7940 * class.c (mono_class_vtable): use domain mempool to allocate vtable
7941 (mono_class_proxy_vtable): use domain mempool
7943 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
7945 * appdomain.h, appdomain.c: split initialization that requires the
7946 execution engine support into mono_runtime_init().
7948 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
7950 * class.c (mono_class_init): don't include vtable inside MonoClass
7951 to save some memory, gather some statistics.
7952 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
7954 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7956 * icall.c: internalcall implementation for ValueType.Equals().
7958 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
7960 * object.c (mono_message_init): moved
7961 (mono_runtime_exec_main): new arch. independent impl.
7962 (mono_runtime_invoke_array): new method - like
7963 mono_runtime_invoke, but you can pass an array of objects.
7964 (mono_remoting_invoke): new arch. independent impl.
7965 (mono_message_invoke): new arch. independent impl.
7966 (mono_runtime_class_init): new arch. independent impl.
7967 (mono_runtime_object_init): new arch. independent impl.
7969 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
7971 * metadata.c, object.c, reflection.c: documented the exported
7974 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7976 * icall.c: simpler code to pass the assembly builder data to corlib.
7977 Implement GetNestedTypes() internalcall.
7979 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
7981 * class.c: warn if a type can't be loaded.
7983 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
7985 * image.h: typedef MonoImageOpenStatus
7986 * types.h: removed unused file
7988 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
7990 * icall.c: Enum_ToObject accepts enum value arguments.
7992 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
7994 * class.c: move initialization of properties, events and nested
7995 classes, so that they happen for interfaces, too.
7997 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
7999 * icall.c: cleanup some ugly casts in Array_SetValue*.
8001 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8003 * icall.c: the values array fro enums is of the correct type, now.
8004 Implement (correctly) getFullName instead of assQualifiedName for
8006 * reflection.h, reflection.c: added mono_type_get_name ().
8008 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8010 * assembly.c, image.h: for each MonoImage, record from wich assembly
8012 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
8013 Make Type.Assembly work.
8015 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
8017 * debug-symfile.h: use char* instead of gpointer to avoid
8020 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
8022 * icall.c (ves_icall_InternalExecute): impl. FielSetter
8023 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
8025 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
8027 * icall.c (mono_message_init): impl. (code cleanup)
8028 (ves_icall_InternalExecute): impl. FieldGetter
8030 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
8031 defined we call all (non-static)methods through the vtable.
8033 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
8035 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
8036 finalizer even though the memory is still referenced (and the chunk of
8037 memory is not freed).
8039 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
8041 * assembly.c: fix brokeness.
8043 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
8045 * class.c: kill some warnings. Check explicit interface method
8046 implementation also without considering the namespace.
8047 Load also literal strings in static class data.
8049 2002-03-29 Miguel de Icaza <miguel@ximian.com>
8051 * assembly.c (default_assembly_name_resolver): Kill memory leak.
8052 (default_assembly_name_resolver): Make the resolver take the
8053 "base" directory where the assembly was originally defined, so we
8054 can load DLLs that are in the same directory as the assembly that
8055 is being referenced.
8057 2002-03-28 Dick Porter <dick@ximian.com>
8063 * unicode.c: Warning cleanups
8065 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
8067 * object.h, reflection.h: use the correct type instead of MonoObject.
8069 2002-03-28 Martin Baulig <martin@gnome.org>
8071 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
8072 (mono_debug_update_symbol_file): Initialize classes if necessary.
8074 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
8076 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
8077 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
8079 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
8081 * assembly.h: fix function prototype.
8082 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
8083 * mono-endian.h: use const cast.
8085 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
8087 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
8089 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
8091 * loader.c: don't assert when a typeref can't be loaded, give
8092 a chance to the runtime to trow an exception instead.
8093 * loader.h: fix warning.
8095 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
8097 * class.c (mono_class_proxy_vtable): added proxy support
8099 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
8101 * icall.c: removed last of PAL calls, added System.Environment
8102 * file-io.h, file-io.c: MonoIO implementation
8103 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
8105 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
8107 * appdomain.c: do not use the byte marker in ldstr table lookup.
8108 * debug-helpers.c: allow two ':' to separate class and method name.
8109 * object.c: allocate arrays bounds with the GC, too.
8110 * verify: add a few more checks.
8112 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
8114 * reflection.c: output also literal strings. Allocate parameter data
8115 with GC_malloc() (thanks, Martin, for catching this!).
8117 2002-03-26 Martin Baulig <martin@gnome.org>
8119 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
8120 include the `this' offset in the `param_offsets'.
8122 2002-03-25 Martin Baulig <martin@gnome.org>
8124 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
8125 mono_debug_get_class() function to get the classes. Added new
8126 relocation types for arrays and strings.
8127 (mono_debug_get_class): New static function to search in all
8128 referenced assemblies for a metadata token.
8130 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
8132 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
8134 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
8135 hold gc-allocated objects. Make the string heap a stream like the
8136 others. Removed duplicated code when writing stream info.
8137 Added asserts to catch possible buffer overflows. Set the sorted map
8138 for tables that need sorting. Added some documentation.
8140 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
8142 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
8143 for interned strings and vtables.
8145 2002-03-24 Martin Baulig <martin@gnome.org>
8147 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
8148 it in the array since it was created with g_slist_prepend().
8150 2002-03-24 Martin Baulig <martin@gnome.org>
8152 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
8153 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
8154 (mono_debug_method_from_token): Renamed to
8155 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
8156 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
8158 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
8161 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
8163 2002-03-24 Martin Baulig <martin@gnome.org>
8165 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
8166 (mono_debug_method_from_token): New func.
8168 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
8169 New interncall, calls mono_debug_local_type_from_signature().
8170 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
8171 calls mono_debug_method_from_token().
8173 2002-03-23 Martin Baulig <martin@gnome.org>
8175 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
8176 specifies the number of bytes to be converted, not the array size.
8177 Return the number of chars, not the number of bytes.
8178 (ves_icall_iconv_get_chars): The `byteCount' argument
8179 specifies the number of bytes to be converted, not the array size.
8181 2002-03-23 Martin Baulig <martin@gnome.org>
8183 * reflection.h (MonoReflectionSigHelper): New type.
8185 * reflection.c (mono_reflection_sighelper_get_signature_local),
8186 (mono_reflection_sighelper_get_signature_local): New functions.
8188 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
8189 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
8192 2002-03-23 Martin Baulig <martin@gnome.org>
8194 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
8195 is_writeable is set.
8196 (mono_raw_buffer_update): New function to write the modified map
8199 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
8201 * debug-symfile.c (mono_debug_update_symbol_file): Call
8202 mono_raw_buffer_update() when done writing.
8204 2002-03-23 Martin Baulig <martin@gnome.org>
8206 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
8208 * debug-symfile.c: Added support for arguments and local variables.
8210 2002-03-23 Dick Porter <dick@ximian.com>
8212 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
8213 protected by ifdefs, hence breaking the w32 build.
8215 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8217 * object.c: implement is_interned() the right way.
8219 2002-03-21 Martin Baulig <martin@gnome.org>
8221 * debug-symfile.[ch]: New files to handle debugging information
8222 files. There's also support to dynamically update these symbol
8223 files to include machine dependent information.
8225 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
8227 * threads.c (mono_thread_create): new function to create thread
8230 2002-03-20 Martin Baulig <martin@gnome.org>
8232 * icall.c (ves_icall_InternalInvoke): Create a new object if the
8233 method is a constructor.
8234 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
8235 points to ves_icall_InternalInvoke().
8237 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
8239 * file-io.c: Flush shouldn't throw exceptions.
8241 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
8243 * file-io.c: FileStream flush support; FileSetLength now
8244 restores file pointer.
8246 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
8248 * class.c: set image for pointer classes.
8250 2002/03/19 Nick Drochak <ndrochak@gol.com>
8252 * sysmath.c: Forgot one.
8254 2002-03-18 Miguel de Icaza <miguel@ximian.com>
8256 * sysmath.c: Avoid redefining existing names.
8258 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
8260 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
8261 handled by runtime as icall rather than dllimport from libm.so
8262 * file-io.c, file-io.h: fixed handle argument type.
8264 2002-03-18 Dick Porter <dick@ximian.com>
8266 * reflection.c (mono_image_get_type_info): rename interface to
8267 iface, because of "#define interface struct" on windows.
8269 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
8271 * class.c, class.h: rename and export mono_ptr_class_get().
8272 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
8273 * reflection.c, reflection.h, icall.c: better/saner type name
8274 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
8277 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
8279 * class.c (mono_class_init): removed hardcoded GHC_SLOT
8281 * icall.c (ves_icall_InternalInvoke): impl.
8283 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
8285 * reflection.c: output the interface map table, too.
8287 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
8289 * class.c (class_compute_field_layout): separate computation of
8292 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
8294 * icall.c: added System.Buffer support.
8295 * file-io.c: moved file icalls from PAL to FileStream.
8297 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
8299 * icall.c (ves_icall_System_Object_GetHashCode): impl.
8301 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
8303 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
8305 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8307 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
8309 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
8311 * debug-helpers.{c,h}: moved here from monograph some useful functions
8312 to locate a method by name/signature in a class or image. Included
8313 also a small and flexible IL disassembler.
8315 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8317 * reflection.c: fixup tokens in methods with small header size, too.
8319 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
8321 * object.c (mono_string_to_utf8): remove assert(!error), instead
8324 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
8326 * icall.c: update to the new mono_Array_class_get interface.
8328 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
8330 * appdomain.c, object.c: Boehm-GC enable.
8331 * icall.c: make get_data_chunk() support split data requests.
8332 Ensure a class is initialized in more cases. Return only the first
8333 property found in GetProperties() or the compiler gets confused.
8334 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
8335 * reflection.h, reflection.c: add fixup mechanism for field and method
8336 tokens. Initialize assembly->typeref in a single place. Output
8337 properties after events. Support custom attributes for events, too.
8338 Typo fix for paramter custom attrs.
8340 2002-03-07 Martin Baulig <martin@gnome.org>
8342 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
8344 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
8346 * class.c (mono_array_class_get): fix. for multi. dim. arrays
8348 2002-03-06 Martin Baulig <martin@gnome.org>
8350 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
8351 non-zero lower bounds. See testcases #F10-#F13.
8353 2002-03-05 Martin Baulig <martin@gnome.org>
8355 * exception.c (mono_get_exception_argument_out_of_range): New exception.
8357 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
8358 ves_icall_System_Array_GetValue(), only calculate the absolute array position
8360 (ves_icall_System_Array_SetValue): Likewise.
8361 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
8362 as argument and does the actual work. This function is used when copying a
8363 multi-dimensional array.
8364 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
8365 now do all the widening conversions of value types.
8366 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
8368 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8370 * class.c: remove some magic numbers and use the smbolic names,
8371 instead. Added init_events() to load event info at class init time.
8372 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
8373 and mono_metadata_methods_from_event().
8374 * reflection.h, reflection.c: added support for writing out the evnets
8375 related information.
8377 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
8379 * reflection.h, icall.c: use a different method (GetInterfaces)
8380 to gather interface info and add isbyref, isprimitive and
8381 ispointer to the ves_icall_get_type_info() return value.
8383 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
8385 * class.h: stared adding support for events.
8386 * icall.c: split find_members implementation. Added debug icall to get
8387 the address of an object.
8388 * reflection.c: handle TypeBuilders in mono_type_get_object().
8390 2002-03-01 Martin Baulig <martin@gnome.org>
8392 * icall.c (ves_icall_System_Array_GetLength): This must throw an
8393 ArgumentOutOfRangeException(), not an ArgumentException().
8394 (ves_icall_System_Array_GetLowerBound): Likewise.
8395 (ves_icall_System_Array_GetValue): Improved argument checking.
8396 (ves_icall_System_Array_SetValue): Improved argument checking.
8398 2002-03-01 Martin Baulig <martin@gnome.org>
8400 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
8401 called with invalid arguments rather than just dying with g_assert().
8402 (ves_icall_System_Array_SetValue): Likewise.
8403 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
8404 raise a NotImplementedException instead.
8405 (ves_icall_System_Array_GetLength): Added argument checking.
8406 (ves_icall_System_Array_GetLowerBound): Added argument checking.
8408 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
8410 * object.h (mono_assert): new macros mono_assert and
8411 mono_assert_not_reached
8413 2002-02-28 Martin Baulig <martin@gnome.org>
8415 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
8416 and "System::String::IsInterned" to "System::String::_IsInterned".
8418 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
8420 * icall.c: remove hacks for typebuilder. Added icall to create a
8421 modified type from a tybebuilder.
8422 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
8423 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
8424 to create a backing MonoClass for a TypeBuilder.
8426 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8428 * class.c, class.h: more refactoring of class init.
8429 Export mono_class_setup_mono_type() and mono_class_setup_parent().
8431 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
8433 * marshal.c, marshal.h: start of marshaling interface.
8435 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
8437 * icall.c: fix order in assembly qualified name icall.
8439 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
8441 * class.c: do not free str, since we store it in the hash table.
8442 * reflection.h: add label field to MonoILExceptionInfo.
8443 * reflection.c: handle references to more than one assembly. Handle
8444 case when there isn't a module created in the assembly.
8446 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
8448 * class.c: Fix typo. Start refactoring of class init code.
8450 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
8452 * appdomain.c: exit with 1 on error.
8453 * class.c: we already have the name in MonoClassField.
8454 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
8455 MonoStreamHeader instead of an offset of image->raw_metadata.
8457 2002-02-26 Miguel de Icaza <miguel@ximian.com>
8459 * appdomain.c (mono_init): Be even more descriptive about the error.
8461 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
8463 * appdomain.c: give the user an informative message when corlib can't
8466 2002-02-26 Martin Baulig <martin@gnome.org>
8468 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
8469 New icall to get the time zone data.
8471 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8473 * reflection.c: set virtual and raw size of section correctly.
8474 * threads.c: transfer domain information to newly created threads.
8476 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
8478 * class.c: when instancing a class in a domain, load the default
8479 vaules for static fields from the constant table. Fix System.Enum to
8481 * icall.c: implement Object::GetType() internalcall. Implemented
8482 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
8483 Fixed checking of binding flags in find_members().
8484 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
8485 * reflection.c: handle enumerations when writing to the constant
8486 table. Use a different object cache for types.
8489 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
8491 * object.c (mono_object_isinst): fix for arrays
8493 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
8495 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
8497 * object.c: don't use mprotect () and fix intern pool hash table
8498 lookup for big endian systems.
8500 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8502 * icall.c: change type_is_subtype_of () signature.
8504 2002-02-21 Mark Crichton <crichton@gimp.org>
8506 * rand.c, rand.h: Added random number generator for
8507 System.Security.Cryptography classes.
8509 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
8511 * icall.c: Added System.Security.Cryptography calls.
8513 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
8515 * class.c, icall.c, metadata.c: better support for pointer types.
8516 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
8517 * reflection.c: Add support for getting custom attrs for properties
8518 and simplify some code.
8520 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
8522 * icall.c: change getToken () and add custom attribute GetBlob()helper
8524 * reflection.h: add custom attrs array to the reflection builder structures.
8525 * reflection.c: encode and emit custom attributes for all the relevant
8526 reflection objects. Cache fieldref and methodref tokens. Change
8527 mono_image_create_token() interface to take a MonoDynamicAssembly.
8528 More complete custom attributes decoder. Load custom attributes for
8529 Assembly, Field, Method and Constructor objects, too. Make the
8530 returned array an Attribute[] one, not object[]. Added
8531 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
8532 custom attribute constructor.
8534 2002-02-20 Dick Porter <dick@ximian.com>
8538 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
8539 problem code out for now).
8541 2002-02-19 Radek Doulik <rodo@ximian.com>
8543 * object.c (mono_ldstr): use hash table to avoid multiple swapping
8545 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
8547 * icall.c: register the GetCustomAttributes method.
8548 * object.c, object.h: add mono_string_new_len ().
8549 * reflection.h, reflection.c: added mono_runtime_invoke(),
8550 mono_install_runtime_invoke(). Added
8551 mono_reflection_get_custom_attrs () to load custom attributes and
8552 create the attribute objects.
8554 2002-02-19 Dick Porter <dick@ximian.com>
8555 * threads-dummy-types.c:
8556 * threads-dummy-types.h:
8559 * threads-pthread-types.c:
8560 * threads-pthread-types.h:
8561 * threads-pthread.c:
8562 * threads-pthread.h: Deleted obsolete files
8564 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
8566 * class.c (mono_class_vtable): runtime init the class when we
8567 allocate static class data.
8569 * icall.c (ves_icall_System_Array_SetValue): check for null values.
8571 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
8572 and String - but we will need generic marshalling support in the
8574 (mono_init): set the domain name in a ms compatible way
8576 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
8579 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
8581 * object.c (mono_array_clone): use alloca() instead of g_malloc
8584 * appdomain.c (mono_domain_unload): impl.
8586 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
8588 * appdomain.c, object.c: fix intern pool implementation.
8589 * class.c: fix alignment code.
8591 2002-02-16 Radek Doulik <rodo@ximian.com>
8593 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
8594 and s2 > s1, just copy lower bytes to be compatible with little
8595 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
8596 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
8598 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
8599 force big_endian to be 1 for big endian machines
8600 (ves_icall_iconv_new_decoder): ditto
8602 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
8604 * socket-io.c (convert_sockopt_level_and_name): If the system
8605 doesn't define SOL_IP or SOL_TCP, get them by hand using
8606 getprotobyname() and caching the values (because this could be a
8608 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
8609 Use the appropriate struct when the system does support it. Ie,
8610 not all systems have struct ip_mreqn so use struct ip_mreq when
8613 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
8615 * reflection.c: handle finally clauses.
8617 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
8619 * socket-io.c: use g_snprintf() instead of snprintf.
8621 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
8623 * reflection.c (mono_param_get_objects): Cast second argument to
8624 mono_method_get_param_names to a const char** to silence the
8627 * appdomain.c (mono_domain_assembly_open): Put parens around the
8628 truth statement in the for-loop.
8630 * unicode.c (iconv_convert): Got rid of a compiler warning about
8631 int i being unused when the system has a new iconv.
8632 (iconv_get_length): Same.
8634 * image.c (load_class_names): Cast the second argument to
8635 g_hash_table_insert() to char* to hush compiler warnings about the
8637 (mono_image_open): Same here.
8639 * socket-io.c: Don't conditionally include sys/filio.h or
8640 sys/sockio.h here anymore since we now get them from
8642 (inet_pton): If the system doesn't support inet_aton, implement
8643 using inet_addr and also #define INADDR_NONE if it isn't defined
8646 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
8648 * metadata.c, metadata.h: added function to get packing and size info
8650 * reflection.h, reflection.c: handle field RVA data. Save info about
8651 the table layout if needed. Assign typedef indexes to all the types
8652 before dumping the info about them to avoid forward reference problems.
8654 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
8656 * socket-io.c (convert_sockopt_level_and_name): ifdef
8657 SO_ACCEPTCONN because it is not defined on my system (old debian)
8659 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
8661 * opcode.c: use stddef.h to get NULL.
8663 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
8665 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
8666 for FIONBIO, FIONREAD and SIOCATMARK.
8667 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
8668 define INADDR_NONE and besides, inet_addr() is deprecated and
8669 should not be used. Use inet_pton() instead - it also has the
8670 added bonus that it can easily handle IPv6 addresses as well.
8671 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
8673 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
8675 * decimal.c: remove _MSC_VER conditional.
8677 2002-02-13 Dick Porter <dick@ximian.com>
8680 * icall.c: Internal calls for Blocking, Select, Shutdown,
8681 GetSocketOption and SetSocketOption
8683 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8685 * assembly.cs: better resolver: use it instead of some kludgy
8688 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
8690 * reflection.c: the best way to speed-up the compiler is to avoid
8693 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
8695 * class.c (mono_class_vtable): changed the object layout
8696 (obj->vtable->class).
8697 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
8699 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
8701 * assembly.c: look for assemblies in the assembly dir, too.
8703 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8705 * class.c: fix thinko in mono_class_from_type().
8707 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
8709 * exception.h, exception.c: added TypeLoadException.
8710 * object.h, object.c: added mono_array_clone ().
8711 * icall.c: handle throwOnError in AssemblyGetType().
8712 Added Array.Clone().
8713 * opcode.h, opcode.c: use a single value for the opcode val.
8714 Compile fix for non-gcc compilers.
8716 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
8718 * opcodes.c, opcodes.h: export interesting info about opcodes.
8720 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
8722 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
8725 * class.c (class_compute_field_layout): set element_class for enums
8726 (mono_class_create_from_typedef): set element_class for normal classes
8728 * icall.c (ves_icall_System_Enum_get_value): impl.
8730 * class.c (mono_class_create_from_typedef): do not set valuetype
8731 flag for System.ValueType and System.Enum
8733 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
8735 * unicode.c (iconv_convert): fix big endian problem.
8737 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
8739 * class.c: add asserts if we are ever going to scribble over memory.
8740 * socket-io.c: not all systems have AF_IRDA defined.
8742 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
8744 * class.c (class_compute_field_layout): do not consider static
8745 fields to compute alignment
8747 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
8749 * appdomain.c (mono_appdomain_get): impl.
8750 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
8752 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
8754 * icall.c: ignore "file://" prefix when loading an assembly.
8756 2002-01-23 Dick Porter <dick@ximian.com>
8760 * Makefile.am: Added socket support
8762 2002-01-23 Miguel de Icaza <miguel@ximian.com>
8764 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
8765 code back. This should return the assemblies that are loaded by
8766 the runtime on behalf of an application domain.
8768 The current implementation is still broken, it just returns every
8769 assembly loaded, but until we get real applications domain this
8772 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
8774 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
8777 2002-01-23 Miguel de Icaza <miguel@ximian.com>
8779 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
8780 the mono_class_from_name lookup.
8781 (ves_icall_get_parameter_info): ditto.
8782 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
8784 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
8786 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
8788 * class.c: load also nested classes on class init.
8789 System.ValueType instance methods gets passed boxed
8790 values, unless methods in derived classed that get a pointer to the
8792 * icall.c: use better name parsing code in GetType().
8793 * image.c, image.h: add mono_image_loaded ().
8794 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
8795 * reflection.c, reflection.h: added mono_reflection_parse_type().
8797 2002-01-22 Veronica De Santis <veron78@interfree.it>
8799 * icall.c : Added mapping of internal calls for Manual and Auto reset events
8800 * threads.c : Added the implementation of internal calls for events
8801 * threads.h : Added prototypes of internal calls for events
8803 2002-01-21 Radek Doulik <rodo@ximian.com>
8805 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
8807 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
8809 * class.c (mono_class_init): set min_align to 1 (instead of 0)
8810 (mono_class_value_size): use min_align
8812 2002-01-20 Dick Porter <dick@ximian.com>
8815 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
8816 so it compiles on w32.
8818 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
8820 * metadata.c (mono_type_stack_size): impl.
8822 * class.c (mono_class_get_field): impl. memberref token
8824 2002-01-16 Veronica De Santis <veron78@@interfree.it>
8826 * icall.h : Added the internal calls mapping for CreateMutex_internal
8827 and ReleaseMutex_internal.
8828 * threads.h : Added the prototype of mutexes internal calls.
8829 * threads.c : Added the implementations of mutexes internal calls.
8831 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
8833 * metaparse.h: removed unused file.
8834 * reflection.c, reflection.h: added stream_data_align () function
8835 to align data in streams and keep stream aligned. Add support for
8836 exception support in method headers.
8838 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
8840 * unicode.c: make iconv_convert () return the number of bytess written
8841 in the output buffer.
8843 2002-01-15 Dick Porter <dick@ximian.com>
8844 * threads.c: Make the runtime's idea of infinite timeouts coincide
8845 with the class library's
8847 Fix a particularly egregious bug in mono_thread_cleanup(). That
8848 code was so utterly bogus it must have been written on a Monday.
8850 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
8852 * reflection.h: add subtypes field to TypeBuilder.
8853 * reflection.c: encode constants for literal fields.
8854 Handle subtypes. Fix user string token (and add a zero byte)
8857 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
8859 * class.c (mono_class_init): bug fix: assign slot numbers for
8862 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
8864 * reflection.c: don't try to output a code RVA for abstract methods.
8865 Small fixes for method header format. Output parameter info to the
8866 ParamDef table. Save method overriding info to MethodImpl table.
8867 Fix property support. Allow typedef.extends to be a type in the
8869 * verify.c: fix off-by-one error.
8871 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
8873 * class.c: fix mono_class_from_mono_type () for szarray types.
8874 Remove unused cache check in mono_class_from_type_spec().
8875 * icall.c: *type_from_name () functions handle simple arrays and byref.
8876 * reflection.c: handle byref and szarray types. Handle methods without
8877 body (gets P/Invoke compilation working). Handle types and fields in
8879 * reflection.h: add rank to MonoTypeInfo.
8881 2002-01-10 Dick Porter <dick@ximian.com>
8883 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
8886 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
8888 * icall.c: initialize class in type_from_handle ().
8889 Loop also in parent classes for get_method ().
8890 * reflection.c: properly encode class and valuetype types.
8891 Start on encoding TypeBuilder types. Handle fieldrefs.
8892 Use correct length when registering a user string.
8893 Handle ConstructorBuilder and MonoMethod in get_token ().
8894 Make mono_type_get_object () aware of cached types.
8895 * object.c: back out change to mono_string_new ().
8897 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
8898 * object.c: mono_string_new should return a NULL when the string
8899 passed in is NULL -- not try to deference it.
8901 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
8903 * icall.c: hack to make IsSubType work for TypeBuilders.
8904 * reflection.c: emit constructors before methods.
8905 Retrieve param names in mono_param_get_objects().
8907 2002/01/05 Nick Drochak <ndrochak@gol.com>
8909 * Makefile.am: fix list of headers and sources so automake 1.5
8910 doesn't complain. Removed \# at end of list.
8912 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
8914 * reflection.c: get token for a method ref. Set return type of
8915 constructor to void.
8916 * loader.c: debug message.
8917 * class.c: typo fix.
8919 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
8921 * icall.c: fix array init with rank > 1. FindMembers
8922 loops in parent class as well.
8923 * image.c: do not insert nested types in name cache.
8924 * reflection.c: warning fix.
8925 * reflection.h: add override method (for interface impl).
8927 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
8929 * metadata.c: fix customattr decoding.
8931 2001-12-21 Miguel de Icaza <miguel@ximian.com>
8933 * rawbuffer.cs: Added native Win32 implementation, avoids using
8934 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
8936 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
8938 * class.c: make the low-level routines handle the cache.
8940 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
8942 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
8944 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
8946 * class.c: fix mono_array_element_size() for objects.
8947 * class.h, class.c: add properties to MonoClass and load them
8949 * icall.c: check with isinst() when assigning a value to an array
8950 instead of requiring the classes to match exactly.
8951 Implemented icall for System.Type::GetType().
8952 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
8953 enums. Handle bindingflags when looking for methods and fields.
8954 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
8955 and mono_metadata_methods_from_property().
8956 * reflection.h, reflection.c: added structures for propreties,
8957 parameters and enums. Implemented mono_property_get_object() and
8958 mono_param_get_objects().
8960 2001-12-18 Dick Porter <dick@ximian.com>
8962 * file-io.c: Use mono_string_to_utf16() instead of
8965 * object.c: Added mono_string_to_utf16(), which copies the non
8966 NULL-terminated MonoString into a new double-null-terminated
8969 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
8971 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
8973 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
8975 * file-io.c: raise exceptions if handle is invalid.
8977 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
8979 * assembly.c: yet another check for mscorlib.
8980 * class.c, class.h: load nesting info for classes.
8981 * icall.c: many new functions to support the Reflection classes.
8982 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
8983 * reflection.h, reflection.c: mono_image_create_token(),
8984 mono_assembly_get_object(), mono_type_get_object(),
8985 mono_method_get_object(), mono_field_get_object(): methods to return
8986 objects that parallel the C representation of assemblies, types,
8989 2001-12-11 Dick Porter <dick@ximian.com>
8992 * file-io.c: Internal calls for file IO.
8994 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
8996 * tabledefs.h: missing FileAttributes.
8997 * verify.h, verify.c: use is_valid_string () to simplify and check for
8998 valid strings more correctly. Fix warnings and speeling.
8999 Check more tables: Filed, File, ModuleRef, StandAloneSig.
9000 Check code: branches, maxstack, method calls.
9002 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
9004 * object.c (mono_object_allocate): removed static, so that the jit
9005 can allocate value types.
9007 * icall.c (ves_icall_System_DateTime_GetNow): impl.
9009 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9011 * class.c: init enum types right away and register the
9012 token->MonoClass map in mono_class_create_from_typedef ().
9013 * verify.h, verify.c: first cut of the verifier.
9014 * pedump.c: add --verify switch to verify metadata tables.
9015 * tabledefs.h: add some missing enums.
9017 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
9019 * class.c (mono_install_runtime_class_init): impl.
9020 (mono_class_init): renamed mono_class_metadata_init to
9021 mono_class_init, also removed the metadata_inited flag
9023 * object.c (mono_object_isinst): use faster algorithm
9025 2001-11-30 Radek Doulik <rodo@ximian.com>
9027 * mono-endian.h: reverted last change
9028 added function prototypes
9030 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
9031 add mono-endian.c back
9033 * mono-endian.c: returned back, as Paolo pointed out, it's needed
9034 for unaligned access, I've mistaked it with endianess. I am
9036 (mono_read16): fix reverted endianess
9037 (mono_read64): ditto
9038 (mono_read32): ditto
9040 2001-11-30 Dick Porter <dick@ximian.com>
9042 * exception.c: Implement mono_exception_from_name()
9044 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9046 * metadata.h, metadata.c: remove params_size and locals_size and their
9047 calculation from the metadata code: they are only usefult to the
9050 2001-11-29 Radek Doulik <rodo@ximian.com>
9052 * object.c (mono_ldstr): swap bytes here, it's probably not the
9053 best place, but works for me now, I'll redo it once I know mono
9054 better, also note that I add PROT_WRITE and don't reset back, also
9055 note that it's only affects big endians, so x86 should be OK
9057 * mono-endian.h (read16): use just glib macros for both endians
9059 * mono-endian.c: removed as glib macros are used in in
9060 mono-endian.h so we don't need to care about endianess for read
9061 macros as glib does that for us already
9063 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
9065 * class.h, class.h: take minimum alignment into consideration so
9066 that the fields of a class remain aligned also when in an array.
9068 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9070 * loader.h, loader.c: add mono_method_get_param_names().
9071 * class.c: 0-init class fields.
9073 2001-11-26 Dick Porter <dick@ximian.com>
9077 * threads.c: New file that handles System.Threading on all platforms
9080 * object.h: Remove the synchronisation struct from MonoObject,
9081 replace it with a pointer that gets initialised on demand
9083 * Makefile.am: Replace all the system-specific threading code with
9084 a single file that uses the new wrapper library
9086 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
9088 * class.c, class.h: add mono_install_trampoline() so that the runtime
9089 can register a function to create a trampoline: removes the ugly
9090 requirement that a runtime needed to export arch_create_jit_trampoline.
9091 * object.h, object.c: added mono_install_handler() so that the runtime
9092 can install an handler for exceptions generated in C code (with
9093 mono_raise_exception()). Added C struct for System.Delegate.
9094 * pedump.c: removed arch_create_jit_trampoline.
9095 * reflection.c: some cleanups to allow registering user strings and
9096 later getting a token for methodrefs and fieldrefs before the assembly
9098 * row-indexes.h: updates and fixes from the new ECMA specs.
9100 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
9102 * class.h, class.c: add enum_basetype field to MonoClass.
9103 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
9104 to get index in the constant table reated to a field, param or
9106 * reflection.h, reflection.c: handle constructors. Set public-key and
9107 version number of the built assembly to 0.
9108 * row-indexes.h: update from new ECMA spec.
9110 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
9112 * class.h, class.c: add a max_interface_id to MonoClass.
9113 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
9114 since it's used to do that. Added mono_type_type_from_obj().
9115 Make GetType() return NULL instead of segfaulting if the type was not
9116 found. Handle simple arrays in assQualifiedName.
9117 * object.h: add a struct to represent an Exception.
9118 * reflection.c: output call convention in method signature.
9119 Add code to support P/Invoke methods and fixed offsets for fields.
9121 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
9123 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
9125 * icall.c: use mono_array_addr instead of array->vector: fixes the
9126 reflection image writing.
9127 * reflection.c: init call convention byte to 0 in method signature.
9128 Encode the property signature. Don't output property-related methods
9129 twice. Really process the properties for a type (don't cast a field to
9130 a property, my mom always told me that).
9131 Fix 64 bit issues in pointer alignment in a different and more
9134 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
9136 * loader.h: Removed type class from MonoDefaults, added monotype
9138 * loader.c: Loaded MonoType, removed loading of Type
9140 * icall.c (my_mono_new_object): Now returns a System.MonoType,
9141 and fills in System.Type._impl with a RuntimeTypeHandle rather
9142 than the actual MonoClass *
9144 (ves_icall_type_from_handle): change from type_class to
9147 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
9150 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
9153 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
9155 (ves_icall_System_Reflection_Assembly_GetType): implemented
9157 (ves_icall_System_MonoType_assQualifiedName): implemented
9159 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
9161 2001-11-09 Miguel de Icaza <miguel@ximian.com>
9163 * assembly.c (mono_assembly_open): Implement a cache for the
9166 (mono_assembly_close): only destroy the assembly when the last
9169 2001-11-09 Dick Porter <dick@ximian.com>
9171 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
9173 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
9175 * class.c (mono_class_metadata_init): bug fix: compute the right slot
9177 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
9179 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
9180 from Martin Weindel.
9181 * object.h: add mono_string_chars ().
9183 2001-11-07 Miguel de Icaza <miguel@ximian.com>
9185 * reflection.c (build_compressed_metadata): Eliminates warnings
9186 and uses 64-bit clean code.
9188 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
9189 (mono_type_equal): Change signature to eliminate warnings.
9191 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
9193 * icall.c, loader.c: remove the internalcall array constructors.
9194 Changes to match the new MonoArray structure.
9195 * object.h, object.c: an array object doesn't allocate an extra
9196 vector. Add mono_array_new_full () to create jagged arrays easily.
9198 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
9200 * metadata.h, metadata.c: add mono_metadata_field_info () to
9201 retreive all the info about a field from vairous tables.
9202 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
9203 * class.h, class.c: augment MonoClassField with more info.
9204 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
9205 policy and load a field's RVA if needed.
9207 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
9209 * class.c (mono_class_metadata_init): create a trampoline for all
9210 virtual functions instead of actually compiling them.
9212 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
9214 * class.h, class.c: include name in MonoClassField.
9215 * class.c: fix fundamental type of System.Object and System.String.
9216 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
9218 * icall.c: remove internalcalls for the Reflection stuff that is now
9220 * loader.c: mono_field_from_memberref () implementation.
9221 * mono-endian.c: thinko (s/struct/union/g).
9222 * object.c, object.h: make the mono_string_* prototypes actually use
9223 MonoString instead of MonoObject.
9224 * reflection.c, reflection.h: updates for changes in the reflection
9225 code in corlib: we use C structures that map to the actual C# classes.
9226 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
9227 fat method header if needed and use the info from the ILGenerator for
9228 methods. Handle fields in types. Misc fixes.
9230 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
9232 * class.c (mono_class_metadata_init): bug fix: always allocate
9233 space for static class data
9235 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
9237 * class.c (mono_compute_relative_numbering): use relative
9238 numbering to support fast runtime type checks.
9240 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
9242 * class.c (mono_class_create_from_typeref): added debugging output
9243 to print class name when MonoDummy is returned instead of real class
9245 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
9247 * class.c (mono_class_metadata_init): interface offset table now
9248 contains pointers into the vtable - this is more efficient for the jit
9250 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
9252 * class.c (mono_class_metadata_init): use a temporary vtable (the
9253 old algorithm only worked for the interpreter, but not for the jit)
9255 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
9257 * loader.c (method_from_memberref): use mono_class_get to get the
9258 class of an array instead of using System.Array directly.
9259 (mono_get_method): also add MEMBERREF methods to the method cache
9260 which usefull for arrays.
9262 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
9264 * pedump.c (arch_compile_method): added to compute vtable entry
9266 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
9267 number of interfaces.
9269 * class.h: merged MonoArrayClass into MonoClass
9271 * class.c (mono_class_create_from_typedef): compute the vtable size and
9272 allocate space to include the vtable inside MonoClass
9273 (mono_class_metadata_init): initialize the vtable
9275 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
9277 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
9278 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
9279 * image.c: endian fixes by Laurent Rioux.
9280 * object.h, object.c: rename MonoStringObject to MonoString and
9281 MonoArrayObject to MonoArray. Change some function names to conform to
9282 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
9283 guint16* as first argument, so don't use char*.
9284 Provide macros to do the interesting things on arrays in a portable way.
9285 * threads-pthread.c: updates for the API changes and #include <sched.h>
9286 (required for sched_yield()).
9287 * icall.c: updates for the API changes above.
9288 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
9289 platforms that need them.
9291 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
9293 * class.c: set the correct type for all the fundamental
9294 type when loading the class.
9296 2001-10-05 Dick Porter <dick@ximian.com>
9298 * threads-pthread.c (pthread_mutex_timedlock): Simple
9299 compatibility version for C libraries that lack this call.
9301 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9303 * class.c: MonoTypes stored in MonoClass are stored as
9304 fundamental MonoTypes when the class represents a
9305 fundamental type (System.Int32, ...).
9306 The TypeHandle return by ldtoken is a MonoType*.
9307 * icall.c: ves_icall_get_data_chunk () write out all the
9308 PE/COFF stuff. Implement ves_icall_define_method (),
9309 ves_icall_set_method_body (), ves_icall_type_from_handle ().
9310 * image.c: properly skip unknown streams.
9311 * loader.h, loader.c: add type_class to mono_defaults.
9312 * metadata.c, metadata.h: export compute_size () as
9313 mono_metadata_compute_size () with a better interface.
9315 * pedump.c: don't try to print the entry point RVA if there is no entry point.
9316 * reflection.c, reflection.h: many cleanups, fixes, output method
9317 signatures and headers, typedef and typeref info, compress the metadata
9318 tables, output all the heap streams, cli header etc.
9319 * row-indexes.h: typo fixes.
9321 2001-10-04 Dick Porter <dick@ximian.com>
9323 * object.h: Add a synchronisation mutex struct to MonoObject
9325 * object.c (mono_new_object): Initialise the object
9326 synchronisation mutexes
9328 * icall.c: System.Threading.Monitor internal calls
9330 * threads-pthread.h:
9331 * threads-pthread.c: System.Threading.Monitor internal calls
9333 * threads-types.h: New file, includes the system-specific thread
9336 * threads-pthread-types.h:
9337 * threads-pthread-types.c: New files, handle pthread-specific
9338 synchronisation types
9340 * threads-dummy-types.h:
9341 * threads-dummy-types.c: New files of dummy support for
9342 thread-specific types
9346 * pedump.c: include mono-endian.h not endian.h
9348 * Makefile.am: More threads files.
9349 Name mono-endian.h not endian.h
9351 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
9353 * Makefile.am, reflection.h, reflection.c: move here the reflection related
9354 stuff and implement a few more bits.
9355 * icall.c: a field needs to be dereferenced twice. Do not use the same
9356 name for two variables in the same scope.
9357 * image.c, image.h: cleanups.
9359 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
9361 * class.c (mono_class_metadata_init): bug fix: compute the right size
9363 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
9365 * icall.c: implemented some of the Reflection internalcalls.
9366 * image.c, image.h: start writing out the PE/COFF image.
9367 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
9368 that does the reverse than decode_blob_size ().
9369 * object.c: use mono_metadata_encode_value (). Move here
9370 temporary implementation of mono_string_to_utf8 ().
9371 * rawbuffer.c: make malloc_map static.
9373 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9375 * metadata.c: fix type comparison for arrays.
9376 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
9377 Added a couple of new classes to monodefaults.
9378 * icall.c: added a couple of Reflection-related internalcalls.
9379 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
9380 Added a byval_arg MonoType to MonoClass.
9382 2001-09-28 Dick Porter <dick@ximian.com>
9385 * threads-pthread.h:
9386 * threads-pthread.c: Implemented internal calls for
9387 LocalDataStoreSlot operations. Applied mutexes around all shared
9388 data. Reworked the thread creation and Start() operations to
9389 avoid a race condition.
9392 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
9394 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
9396 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
9398 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
9400 * class.c, loader.c: warn and return NULL instead of erroring out.
9401 * icall.c: added System.AppDomain::getCurDomain().
9402 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
9404 2001-09-25 Dick Porter <dick@ximian.com>
9406 * threads-pthread.h:
9407 * threads-pthread.c: Implemented timed thread joining and added
9408 System.Threading.Thread::Join_internal internal call
9410 * icall.c: Added System.Threading.Thread::Join_internal internal call
9413 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
9415 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
9417 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
9418 mono_string_intern () to implement the semantics of the ldstr opcode
9419 and the interning of System.Strings.
9420 * icall.c: provide hooks to make String::IsIntern and String::Intern
9423 2001-09-23 Dick Porter <dick@ximian.com>
9426 * threads-dummy.h: New files of dummy threading routines
9428 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
9429 support code based on system specifics
9431 Rename PTHREAD_LIBS to THREAD_LIBS
9433 2001-09-23 Dick Porter <dick@ximian.com>
9435 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
9436 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
9438 (mono_thread_init): Set up a Thread object instance to return when
9439 the main thread calls Thread.CurrentThread
9440 (mono_thread_cleanup): Wait for all subthreads to exit
9442 * icall.c: New internal calls for System.Threading.Thread::Sleep
9443 (including Schedule) and CurrentThread
9445 * threads.h: New file, to insulate thread-specific stuff from the
9448 2001-09-21 Dick Porter <dick@ximian.com>
9450 * threads-pthread.h:
9451 * threads-pthread.c: New file, for handling pthreads-style
9452 threading support. Start() now starts a new thread and executes
9453 the ThreadStart delegate instance.
9455 * icall.c: Added the internalcall for
9456 System.Threading.Thread::Start_internal
9458 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
9460 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
9462 * loader.c: work around the different signatures for delegates
9463 constructors csc generates in compiled code vs the ones compiled in mscorlib.
9465 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
9467 * class.h, class.c: add mono_class_get_field_from_name ().
9468 * *: Fix C comments and other ANSI C issues.
9470 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
9472 * endian.h, assembly.c: fix some endianness issues.
9474 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
9476 * loader.h, load.c: add delegate_class to mono_defaults.
9477 Handle runtime provided methods in mono_get_method ().
9479 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
9481 * loader.c (mono_get_method): use pinvoke for internal call
9483 * icall.c: use pinvoke for internal call
9485 * loader.c (method_from_memberref): set the method name
9487 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
9489 * metadata.c: help the compiler generate better code for
9490 mono_class_from_mono_type ().
9492 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
9494 * class.c (mono_class_metadata_init): delayed computing of the
9495 class size to mono_class_metadata_init ()
9497 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
9499 * class.c, class.h: add an interfaces member to MonoClass.
9500 * image.c, image.h: add assembly_name field to MonoImage
9501 from the assembly table.
9502 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
9504 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
9506 * class.c: Handle Array in mono_class_from_mono_type ().
9507 * metadata.c, pedump.c: some endian fixes.
9509 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
9511 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
9512 * metadata.c: fix small problem introduced with the latest commit.
9514 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
9516 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
9517 We don't need a MonoMetadata pointer anymore to compare signatures in
9518 mono_metadata_signature_equal (), update callers.
9519 Reduced memory usage an number of allocations for MonoMethodHeader and
9520 MonoMethodSignature.
9522 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
9524 * metadata.c: added compare for szarray.
9526 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
9528 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
9529 and add a couple more types to it and mono_defaults. Give an hint on
9530 classes that need implementing in our corlib and are referenced
9533 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
9535 * class.h, class.c: keep track if a class is also an Enum.
9536 * loader.c: Implement a couple more types for use in libffi
9537 marshalling. Gives better diagnostics when failing to dlopen
9538 a library. Set method->klass for P/Invoke methods, too.
9540 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
9542 * class.c, class.h: add a MonoType this_arg to MonoClass that
9543 represents a pointer to an object of the class' type that
9544 can be used by the interpreter and later the type cache.
9545 Add best guess alignment info for valuetype objects.
9547 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
9549 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
9550 into MonoType: one less level of indirection and allocation and
9551 simplifies quite a bit of code. Added cache for MonoTypes that are
9552 used frequently, so that we don't need to allocate them all the time.
9554 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
9556 * class.c (mono_class_create_from_typedef): System.Enum is also a
9557 value type, although it does not derive from System.ValueType
9558 (maybe a bug in the ms compiler?)
9560 * metadata.c (mono_type_size): return the right size for value types
9562 * loader.c (mono_get_method): only initialize method header if not abstract
9564 * class.c (mono_class_from_mono_type): use mono_default values.
9566 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
9568 * *: use MonoClass pointers instead of <type_tokens>
9570 * class.h: new flag: metadata_inited.
9572 * class.c (mono_class_metadata_init): impl.
9573 (mono_class_instance_size): impl.
9574 (mono_class_data_size): impl.
9576 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
9578 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
9579 MonoClass now has the name and name_space fields.
9580 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
9581 mono_get_method () takes and optional MonoClass as argument.
9582 Removed mono_typedef_from_name() and added mono_class_token_from_name()
9583 instead that takes advantage of a map from class names to typedef
9584 tokens in MonoImage.
9586 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
9588 * metadata.c: zero is not a valid alignment boundary.
9589 Merge MONO_TYPE_VOID in default decoding code.
9591 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
9593 * image.h: merged MonoMetadata into MonoImage
9595 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
9596 identify the type of elements.
9598 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
9600 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
9601 * cil-coff.h: split MonoMSDOSHeader and add size info.
9602 * image.c: add some consistency checks.
9603 * metadata.c: fix row size computation: one programmer
9604 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
9605 add explanation for the locator routine.
9606 Fix decoding of size in method header.
9608 2001-08-20 Miguel de Icaza <miguel@ximian.com>
9610 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
9611 (g_concat_dir_and_file): Bring g_concat_dir_and_file
9612 function from gnome-libs. This uses the right path separator
9613 based on the OS, and also works around a bug in some systems where
9614 a double slash is not allowed.
9615 (default_assembly_name_resolver): Use g_concat_dir_and_file
9616 (mono_assembly_open): ditto.
9618 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
9620 * metadata.c (mono_metadata_signature_equal): impl.
9622 * *: void is now a realy MonoType (instead of using NULL)
9624 * metadata.c (do_mono_metadata_parse_type): use
9625 mono_metadata_parse_type to parse void value.
9627 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
9629 * metadata.c, metadata.h: in the signature and method header store
9630 only the space required for holding the loca vars and incoming arguments.
9632 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
9634 * metadata.c (do_mono_metadata_parse_type): treat void like any
9635 other type (instead of assigning NULL);
9637 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
9639 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
9641 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
9643 * image.c (do_mono_image_open): added a cache for arrays.
9645 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
9647 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
9648 decode a single column from a row in a metadata table and changes
9649 to take advantage of it in the typedef locator (gives a nice speed up).
9650 Store offset info for function params.
9652 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
9654 * image.h (MONO_IMAGE_IS_CORLIB): removed
9656 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
9658 * assembly.c: how could mono_assembly_close () had ever worked?
9659 * metadata.c, metadata.h: provide offset info for local vars.
9660 Implement mono_type_size () to take care of alignment as well
9661 as size (it was mono_field_type_size in cli/class.c before).
9663 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
9665 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
9667 * assembly.h (CORLIB_NAME): set to corlib.dll
9669 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
9671 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
9673 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
9674 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
9675 tokentype.h: massive namespace cleanup.
9677 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
9679 * metadata.h, metadata.c: decode exception clauses when parsing method header.
9681 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
9683 * metadata.c (mono_metadata_free_type): added check for type !=
9684 NULL (void) before calling mono_metadata_free_type()
9686 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
9688 * metadata.h, row_indexes.h: added header with enumerations to use
9689 to index in the columns from tables in metadata and to decode coded
9690 tokens: we should start using this instead of embedding magic numbers
9693 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
9695 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
9696 Move metadata_t info from cli_image_info_t to MonoImage, where
9697 it's easily accessible. Changed all the uses accordingly.
9698 Added the method and class caches to MonoImage.
9699 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
9700 and mono_metadata_decode_value () signature to be more consistent
9701 with the other parse functions (and simplify code). Taken advantage
9702 of zero-length array allocation with GCC. Removed reduntant (and
9703 wrong) MonoFieldType struct and use MonoParam instead. Changed
9704 mono_metadata_parse_field_type () to use common code for parsing.
9705 Added mono_metadata_typedef_from_field () and
9706 mono_metadata_typedef_from_method () to lookup a typedef index from a
9707 field or method token.
9708 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
9710 2001-07-23 Miguel de Icaza <miguel@ximian.com>
9712 * metadata.c (mono_metadata_parse_field_type): Implement.
9713 (do_mono_metadata_parse_type): Split engine from
9714 mono_metadata_parse_type, so that we can create smaller structures
9715 for things that just have one pointer to the MonoType (look at
9718 2001-07-20 Miguel de Icaza <miguel@ximian.com>
9720 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
9721 as Jan Gray found out, it is incorrect.
9723 2001-07-18 Miguel de Icaza <miguel@ximian.com>
9725 * assembly.c: Implement asssembly loading. This loads an image
9726 and loads all the referenced assemblies. Come to think of it, we
9727 could always do lazy loading of the assemblies.
9729 * image.c (mono_image_open): Keep loaded images in a hashtable.
9731 * image.h (MonoImage): Add reference count.
9733 2001-07-17 Miguel de Icaza <miguel@ximian.com>
9735 * assembly.c (mono_assembly_open): Keep track of the file name in
9736 case the assembly has no ASSEMBLY table.
9738 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
9741 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
9743 * metadata.c, metadata.h: decode local vars in method header
9744 parse function. Change callers accordingly.
9746 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
9748 * metadata.h, cil-coff.h: protect against multiple inclusion.
9749 Added some new structures to hold information decoded from metadata:
9750 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
9751 and relevant decoding/free functions.
9752 * metadata.c: implement decoding functions. Add warning for out of bounds
9753 index in mono_metadata_locate(). Implement mono_get_method () to retreive
9754 all the info about a method signature and invocation. Remove check on
9755 uninitialized local var in parse_mh() and fix memory leak.
9757 2001-07-12 Miguel de Icaza <miguel@ximian.com>
9759 * metadata.h: More macros.
9761 * tokentype.h: New file.
9763 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
9765 * assembly.c: added a consistency check and initialize
9766 some structures with g_new0().
9767 * metadata.c: fixed a couple more bugs in table size computation
9768 and add other checks for out-of bound access to metadata.
9770 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
9772 * metatada.c: fix bugs computing table sizes. Spew a
9773 warning when index in string heap is out of bounds.
9775 2001-07-04 Miguel de Icaza <miguel@ximian.com>
9777 * metadata.h: Add a couple of macros to manipulate tokens.
9779 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
9781 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
9782 cli_section_tables).
9784 2001-07-01 Miguel de Icaza <miguel@ximian.com>
9786 * metadata.c (mono_metadata_user_string): New function, provides
9787 access to the UserString heap.
9789 2001-06-27 Miguel de Icaza <miguel@ximian.com>
9791 * metadata.c: Add inline documentation.
9793 2001-06-26 Miguel de Icaza <miguel@ximian.com>
9795 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
9798 2001-06-22 Miguel de Icaza <miguel@ximian.com>
9800 * typeattr.h: New file, TypeAttribute flags.
9802 2001-06-21 Miguel de Icaza <miguel@ximian.com>
9804 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
9805 mono_assembly_ensure_section): Section loading code.
9806 (load_section_tables): Load the sections.
9808 * mono/metadata/metadata.c (mono_metadata_locate_token,
9809 mono_metadata_locate): Functions to locate the information
9810 definition given a token or a table and an index.
9811 (mono_metadata_compute_table_bases): New.
9812 (compute_size): New function to compute the sizes of the various
9815 * mono/metadata/metadata.h: Finish listing the different index
9818 * mono/metadata/pedump.c: Improve to dump new information.
9820 2001-06-19 Miguel de Icaza <miguel@ximian.com>
9822 * mono/metadata/metadata.c: Entered all the tables matching
9825 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2