1 2005-09-26 Martin Baulig <martin@ximian.com>
4 (mono_class_from_generic_parameter): Set `klass->generic_container'
5 (mono_class_from_generic_parameter): Likewise.
6 (mono_bounded_array_class_get): We inherit the generic container
7 from the element class.
10 (find_method, find_method_in_class): Take a `MonoGenericContext *'
11 argument rather than computing it here.
12 (method_from_memberref): Correctly set the generic context before
13 parsing the signature. Fixes #75681.
15 2005-09-26 Zoltan Varga <vargaz@gmail.com>
17 * object.c (mono_class_has_special_static_fields): Fix warnings.
19 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21 * assembly.c: Add parse_public_key function, to
22 par the public keys. Also added mono_assembly_name_parse_full,
23 to define it the parsed key should be freed or not.
24 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
25 to parse a long format assembly name.
26 * metadata-internals.h: Keep mono_assembly_name_parse_full as
27 private, since calling it to preserve the key requires
30 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
32 * locales.c : removed HAVE_ICU part.
34 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
36 * object.c (mono_class_create_runtime_vtable): Avoid calling
37 field_is_special_static if the klass has no special static fields.
39 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
40 (MonoCachedClassInfo): Likewise.
42 * object.c (mono_class_has_special_static_fields): New helper function.
44 2005-09-23 Zoltan Varga <vargaz@gmail.com>
46 * class.c (mono_class_create_from_typedef): Don't call
47 interfaces_from_typedef_full for enums.
48 (mono_class_create_from_typedef): Compute the base types of enums directly
49 without calling mono_class_setup_fields ().
50 (mono_class_find_enum_basetype): New helper function.
52 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
53 one place inside the string heap.
55 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
57 * class.c: locking fixes, code cleanups, some docs added.
58 Allocate some data structures in the image mempool.
60 2005-09-23 Zoltan Varga <vargaz@gmail.com>
62 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
65 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
67 * class-internals.h, class.c, reflection.c: reduce memory taken by
70 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
72 * metadata.c, metadata.h, loader.h: documentation updates, code and
75 2005-09-23 Zoltan Varga <vargaz@gmail.com>
77 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
80 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
81 page faults caused by the runtime while reading metadata.
83 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
85 * socket-io.c: the field names were changed 3 months ago and no one
86 realized until bug #76077 got filed!
88 2005-09-20 Martin Baulig <martin@ximian.com>
90 * icall.c (assembly_icalls): Removed some unused debugger icalls.
92 2005-09-20 Martin Baulig <martin@ximian.com>
94 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
95 write the rank into the class entry.
97 2005-09-20 Martin Baulig <martin@ximian.com>
99 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
101 2005-09-19 Zoltan Varga <vargaz@gmail.com>
103 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
105 * icall.c (custom_attrs_defined_internal): New icall.
107 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
109 (mono_custom_attrs_construct_by_type): New helper function.
111 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
113 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
114 terminate the resulting string. Fixes #76123.
116 2005-09-16 Martin Baulig <martin@ximian.com>
119 (mono_debug_add_method): Ignore inflated methods for the moment.
121 2005-09-14 Martin Baulig <martin@ximian.com>
123 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
125 2005-09-13 Zoltan Varga <vargaz@gmail.com>
127 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
128 return a success/failure indication.
129 (mono_metadata_interfaces_from_typedef_full): Ditto.
130 (get_constraints): Ditto.
132 2005-09-12 Zoltan Varga <vargaz@gmail.com>
134 * marshal.c (emit_marshal_array): Fix handling of null arrays.
136 * marshal.c (emit_marshal_array): Add support for returning string
137 arrays from delegates. Fixes #76063.
139 * marshal.c: Use the emit_ldloc/stloc macros where possible.
141 2005-09-11 Zoltan Varga <vargaz@gmail.com>
143 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
146 2005-09-09 Zoltan Varga <vargaz@gmail.com>
148 * reflection.c icall.c: Fix after mono_get_exception_type_load
151 * assembly.c (mono_assembly_get_assemblyref): New helper function.
152 (mono_assembly_load_reference): Use the new helper.
154 * class-internals.h (MonoLoaderError): New structure containing
155 information about type loading errors.
157 * class-internals.h loader.c: Add APIs to store per-thread loader
160 * loader.c class.c: Set the loader error if needed.
162 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
164 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
166 * decimal.c: fixed to handle the broken ARM fp format.
168 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
170 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
173 2005-09-06 Martin Baulig <martin@ximian.com>
175 * domain.c (supported_runtimes): Added v2.0.50727.
177 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
179 * culture-info.h: reduce the size of some structures.
181 2005-09-05 Martin Baulig <martin@ximian.com>
183 Reflect latest API changes in the August CTP.
186 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
187 ("MonoType.HasGenericArguments"): Removed.
188 ("MonoMethod.BindGenericParameters"): Renamed to
190 ("MethodBuilder.BindGenericParameters"): Renamed to
193 2005-09-05 Martin Baulig <martin@ximian.com>
195 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
197 2005-09-05 Martin Baulig <martin@ximian.com>
199 Applying a patch from Michal Moskal <malekith@nemerle.org>.
201 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
202 generic_container is non-NULL.
204 2005-09-05 Martin Baulig <martin@ximian.com>
206 Applying a patch from Michal Moskal <malekith@nemerle.org>.
208 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
210 2005-08-29 Michal Moskal <malekith@nemerle.org>
212 * reflection.c (encode_locals,
213 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
214 for large generic types.
216 2005-09-05 Martin Baulig <martin@ximian.com>
218 Applying a patch from Michal Moskal <malekith@nemerle.org>.
220 * class.c (mono_dup_array_type): New public method.
221 (mono_metadata_signature_deep_dup): New public method.
222 (dup_type): Correctly duplicate array and function types.
224 2005-09-05 Martin Baulig <martin@ximian.com>
226 Applying a patch from Michal Moskal <malekith@nemerle.org>.
228 * reflection.c (get_default_param_value_blobs): Handle generic types
231 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
233 * class.c: Fixed error reporting (method/class were inversed) for
235 * security-manager.c|h: Added the AppDomain when calling the managed
236 System.Security.SecurityManager.InheritanceDemand method.
238 2005-09-01 Raja R Harinath <rharinath@novell.com>
240 * reflection.c (encode_marshal_blob): 'marshaltype' and
241 'marshaltyperef' are alternate sources for the custom marshaler
244 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
246 * class.c: fix creation of array classes with rank == 1
247 (patch by Ankit Jain <jankit@novell.com>).
249 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
251 * object.c: fix check for creating the bound data for arrays vs
254 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
256 * object.c: configuration file name is now based on the executable name,
257 not the image name. Fixes bug #75931.
259 2005-08-29 Zoltan Varga <vargaz@gmail.com>
261 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
262 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
264 2005-08-25 Zoltan Varga <vargaz@gmail.com>
266 * rand.c: Use wincrypt.h instead of WinCrypt.h.
268 2005-08-24 Ankit Jain <jankit@novell.com>
269 Raja R Harinath <rharinath@novell.com>
271 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
272 called by it recursively.
273 (mono_class_init): Remove special case in pending_init handling, since it's
274 superseded by the fix to mono_class_from_typeref.
276 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
278 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
279 BROKEN_THREAD_START stuff.
281 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
283 * class-internals.h object.c: Add a new kind of trampoline called a delegate
286 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
288 * object.c (mono_delegate_ctor): Replace the original function address with
289 a delegate trampoline.
291 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
293 * icall.c: add boolean argument to base64_to_byte_array and
294 InternalFromBase64String to control whether a whitespace-only string
295 is allowed (or should casue a FormatException to be thrown). We need
296 this as the behavior has changed between MS.NET 1.x and 2.0, and we
297 to match the MS behaviour in both profiles.
298 * appdomain.c: Bump corlib version.
300 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
302 This patch implements a big portion of publisher policy
303 support, used to bind assembly versions and redirect
304 one assembly from version A to version B.
307 New GSList loaded_assembly_bindings, for storing the cached
309 (assembly_binding_maps_name): New static function for checking if a
310 assembly binding information maps an assembly name.
311 (mono_assembly_binding_info_free): New function for freeing
312 assembly binding information resources.
313 (get_publisher_policy_info): New static function for retrieving
314 assembly binding information from a MonoImage.
315 (compare_versions): New static function for comparing an assembly
316 binding information data and the version of an assembly name.
317 (check_policy_versions): New static function for checking if an
318 assembly binding info mapping an assembly name is valid for it.
319 (mono_assembly_load_publisher_policy): New static function for
320 loading the 'policy.major.minor.MyAssembly' image for an assembly
321 with an assembly name 'aname'.
322 (mono_assembly_bind_version): New static function for updating
323 assembly redirection.
324 (mono_assembly_apply_binding): New static function for applying
326 (search_binding_loaded): New static function for searching
327 loaded assembly binding infos in the cache domain.
328 (mono_assembly_load_full): Don't apply assembly binding for
329 reflection only assemblies.
331 * metadata-internals.h: Add MonoAssemblyBindingInfo,
332 which contains information about assembly binding. Also
333 declare signature for mono_config_parse_publisher_policy ()
334 function, used to retrieve pub policy info.
337 (publisher_policy_start): New static function used to parse publisher
339 (publisher_policy_parser): New static MonoParseHandler containing
340 the functions used when parsing config files.
341 (mono_config_parse_publisher_policy): New function for parsing
342 publisher policy files.
344 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
346 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
348 * marshal.c (mono_delegate_free_ftnptr): Ditto.
350 * object.c (mono_get_addr_from_ftnptr): New helper function.
352 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
354 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
356 2005-08-19 Dick Porter <dick@ximian.com>
358 * threads.c, threads.h, appdomain.c, appdomain.h,
359 profiler-private.h, monitor.c, object.c, object-internals.h,
360 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
361 store the thread ID, so it can hold a 64 bit value if needed.
363 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
365 * reflection.c (mono_reflection_create_dynamic_method): Store the
366 handle class into the method references as well so ldtoken works in
369 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
372 2005-08-19 Ankit Jain <jankit@novell.com>
375 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
376 here rather than using the method signature of a arbitrary function
377 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
379 Hack done with Harinath.
381 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
383 * threadpool.c: disable printing stack traces when we get a exception
384 in a threadpool thread. I need to do more testing to figure out which
385 cases actually print this. Fixes bug #75828.
387 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
389 * icall.c: there might be ignored whitespace after the last '='. This
390 fixes length computation and bug #75840.
392 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
394 * assembly.c (mono_assembly_load_full): Consider .exe extension as
397 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
400 * reflection.c (create_custom_attr_data): Ditto.
402 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
404 * locales.c, culture-info.h : removed RegionLCIDMap.
405 * culture-info-tables.h : regenerated.
407 2005-08-16 Martin Baulig <martin@ximian.com>
409 * class.c (mono_type_get_name_recurse): Small fix.
411 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
413 * locales.c : indentation fixie.
415 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
417 * object-internals.h,
421 icall.c : added RegionInfo table support.
422 * culture-info-table.h : regenerated for region support.
424 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
426 * reflection.c (resolve_object): handle all kinds of MonoMethod
427 including generic ones
429 2005-08-12 Ankit Jain <jankit@novell.com>
431 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
432 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
434 2005-09-12 Lluis Sanchez <lluis@ximian.com>
436 * process.c: Don't close a thread handle when it's NULL. This is a
437 workaround for bug #75733.
439 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
441 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
443 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
445 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
447 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
449 * threadpool.c: if a work item in the thread pool has a callback that
450 catches a exception, don't propagate it after invoking the callback.
453 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
455 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
457 * class-internals.h (MonoCachedClassInfo): Add some new fields.
459 * class.c (mono_class_init): Load field info lazily in the AOT case.
461 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
463 2005-08-03 Ankit Jain <jankit@novell.com>
466 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
467 PInvoke calling convention is 0.
469 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
471 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
472 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
474 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
476 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
477 to handle threads not started by the GC (patch by Michael Meeks
478 <michael.meeks@novell.com>).
480 2005-07-31 Kamil Skalski <nazgul@omega.pl>
482 * reflection.c: Make buffer used in emitting types larger for some
483 big generic types (patch by Michal Moskal).
485 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
487 * mono-debug.c: Fix some (not all) alignment problems.
489 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
491 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
492 Invoke mono_image_load_from_data_full passing the refonly
496 (mono_assembly_open_from_bundle): Add the refonly argument,
497 in order to pass it to other methods it calls to.
498 (do_mono_assembly_open): Add the refonly argument, in order
499 to pass it to other methods it calls to.
500 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
501 the refonly parameter to it.
503 * image.c: Add loaded_images_refonly_hash and
504 loaded_images_refonly_guid_hash to cache the reflection
506 (mono_images_init): Initialize the hash tables used for
507 caching the reflection only images.
508 (load_modules): Invoke mono_image_open_full passing the refonly
509 parameter to load the modules the correct way.
510 (build_guid_table): Add the refonly argument, to re-build the
512 (do_mono_image_open): Added the refonly argument, in order to
513 define it for the loaded image.
514 (mono_image_loaded_full): New function, which receives an
515 additional parameter to look for the image in the refonly or
517 (mono_image_loaded): Updated, using mono_image_loaded_full.
518 (mono_image_loaded_by_guid_full): The same case that happens
519 with mono_image_loaded_full.
520 (mono_image_loaded_by_guid): Likewise.
521 (register_image): Use the ref_only variable inside MonoImage
522 to decide in which hash table store the current image.
523 (mono_image_open_from_data_full): Rename
524 mono_image_open_from_data to mono_image_open_from_data_full,
525 adding the refonly argument, to define the ref_only variable
527 (mono_image_open_from_data): Return
528 mono_image_open_from_data_full.
529 (mono_image_open_full): Rename mono_image_open to
530 mono_image_open_full, receiving the new refonly argument,
531 to pass it to inner methods.
532 (mono_pe_file_open): Update this function, to open
533 a MonoImage as a non-refonly image.
534 (mono_image_close): Use the refonly variable inside
535 MonoImage to remove the image from the correct caches.
537 * image.h: Add the signatures of mono_image_open_full,
538 mono_image_open_from_data_full, mono_image_loaded_full,
539 mono_image_loaded_by_guid_full.
541 * metadata-internals.h: Add the ref_only field to
544 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
546 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
547 Fix the last behavior, which used to load the assemblies and
548 extract MonoReflectionAssemblyName information, instead of
549 extract it from the metadata tables. Needed for Reflection
552 2005-07-29 Martin Baulig <martin@ximian.com>
554 * mono-debug-debugger.c
555 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
559 (mono_debug_address_from_il_offset): Check whether we have
560 debugging support before attempting to take the lock.
561 (mono_debug_source_location_from_address): Likewise.
562 (mono_debug_source_location_from_il_offset): Likewise.
563 (mono_debug_il_offset_from_address): Likewise.
564 (mono_debug_address_from_il_offset): Likewise.
566 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
568 * class.c (mono_class_from_name_case): Add support for dynamic images.
571 * object.c (mono_class_compute_gc_descriptor): Add a workaround
574 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
576 * reflection.c (mono_method_get_object): Fix warning.
578 2005-07-28 Martin Baulig <martin@ximian.com>
581 (mono_debug_add_wrapper): Also write the wrapper type.
583 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
585 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
587 * class.c (mono_class_init): Avoid reading nested classes if the AOT
588 data indicates the class has none.
590 2005-07-26 Ben Maurer <bmaurer@ximian.com>
592 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
593 loader lock with the debugger lock. Prevents deadlocks for beagle.
595 Beagle can now run on an smp box for a weekend without any
598 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
600 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
601 in a module. Fixes #75629.
603 2005-07-26 Martin Baulig <martin@ximian.com>
605 * mono-debug.c (mono_debug_add_wrapper): New static method.
606 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
607 interncall or a wrapper.
609 * mono-debug.h (MonoDebugWrapperData): New public typedef.
610 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
611 (MONO_DEBUGGER_VERSION): Bump to 51.
613 * mono-debug-debugger.c
614 (mono_debugger_add_type): Removed this empty function.
615 (mono_debugger_add_method): Likewise.
617 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
619 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
620 before accessing method->slot.
622 2005-07-21 Jb Evain <jbevain@gmail.com>
624 * reflection.c (method_encode_clauses/class): Handle filters clauses.
627 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
629 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
632 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
634 * image.h image.c: Add mono_image_get_guid () API function.
636 2005-07-19 Ben Maurer <bmaurer@ximian.com>
638 There were issues when multiple threads tried to load
639 assemblies. A deadlock was created between assemblies_mutex and
640 mono_domain_assemblies_lock. This fixes the issue by making the
641 assembly ref counting be lock free. See bug 75586.
643 * image.c (mono_image_close): The add ref function here was using
644 Interlocked operations while the unref was using a mutex and a
645 --. I don't think this was ever a bug that would be exposed in a
646 non-pendantic way (ie, by an embedder doing a ref on one thread
647 and an unref on another), but for the sake of correctness, this is
650 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
651 (mono_assembly_load_reference): Call mono_assembly_addref rather
652 than touching the refcount ourselves.
653 (mono_assembly_close): Use InterlockedDecrement to unref the
654 assembly. Don't acquire the lock unless it is actually needed.
656 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
658 * class.c (mono_class_layout_fields): Fix calculation of has_references
661 2005-07-12 Martin Baulig <martin@ximian.com>
663 Applying a patch from Michal Moskal <malekith@nemerle.org>.
666 (mono_type_hash): Provide better hashing for generic instances.
667 (mono_generic_inst_hash): Improve hashing.
668 (mono_generic_class_hash): Likewise.
670 * reflection.c (mymono_metadata_type_hash): Improve hashing for
673 2005-07-12 Martin Baulig <martin@ximian.com>
675 * reflection.c (mono_reflection_create_runtime_class): Remove the
676 hack for generic type definitions and non-`Run' assemblies.
677 (mono_reflection_bind_generic_parameters): Also use
678 `klass->wastypebuilder' to check for TypeBuilders.
680 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
682 * class.c (mono_class_layout_fields): Fix calculation of has_references
685 * class.c (inflate_generic_class): Fix a leak.
686 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
689 2005-07-11 Martin Baulig <martin@ximian.com>
691 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
694 2005-07-11 Martin Baulig <martin@ximian.com>
696 * loader.c (find_method): Also lookup in
697 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
699 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
701 * appdomain.c (mono_domain_unload): Don't free the error message
702 before passing it to mono_get_exception_...
704 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
706 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
708 * threads.c: try to better guess an available RT signal (bug #75387).
710 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
712 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
715 2005-07-07 Martin Baulig <martin@ximian.com>
717 * class.c (mono_type_get_name_full): Return NULL for
718 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
721 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
723 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
724 exit the appdomain as well being aborted.
726 * threadpool.c: Create all threadpool threads inside the root appdomain, and
727 change back to the root domain after calling managed code. This enables
728 appdomains using threadpools to be unloaded.
730 2005-07-07 Martin Baulig <martin@ximian.com>
733 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
734 into `MonoDynamicGenericClass' since we only need it for dynamic
737 * reflection.c (mono_class_bind_generic_parameters): We don't need
738 to compute the `parent' here.
740 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
742 * culture-info-table.h : regenerated.
744 2005-07-06 Martin Baulig <martin@ximian.com>
747 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
749 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
751 2005-07-06 Martin Baulig <martin@ximian.com>
753 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
754 we're doing a signature-only comparision; fixes #74945.
756 2005-07-06 Martin Baulig <martin@ximian.com>
758 * class-internals.h (MonoGenericClass): Moved some things out into
759 a new `MonoInflatedGenericClass' type.
760 (MonoInflatedGenericClass): New type; the `klass' of a
761 `MonoGenericClass' is now computed lazyly in
762 mono_get_inflated_generic_class().
764 * class.c (mono_get_inflated_generic_class): New public function.
765 (mono_class_inflate_generic_method): Removed the unused
766 `MonoClass *' argument.
767 (setup_generic_vtable): Don't call mono_get_inflated_method() on
769 (mono_class_create_generic): Make this static and merge it with
770 mono_class_create_generic_2(); we're now called automatically from
771 mono_get_inflated_generic_class().
773 * loader.c (mono_method_signature): Call
774 mono_get_inflated_method() here.
776 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
778 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
779 type of fields with RVA.
781 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
782 for this pseudo class.
783 (my_mono_class_from_generic_parameter): Likewise.
784 (mono_class_init): Allow interfaces to have cctors.
786 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
788 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
789 lazily for AOT methods.
791 2005-07-05 Martin Baulig <martin@ximian.com>
793 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
794 returns FALSE for a successful match, not TRUE.
796 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
798 * loader.c (mono_method_get_index): Optimize this a bit.
800 2005-07-04 Martin Baulig <martin@ximian.com>
803 (class_compute_field_layout): Move the check for generic type
804 definitions into mono_class_layout_fields(). Fixes #74684.
805 (mono_class_from_generic_parameter): Correctly compute
806 `klass->parent'; fixes #75457.
808 * reflection.c (register_assembly, register_module): Make sure
809 `domain->rejobject_hash' is already created.
811 2005-07-02 Martin Baulig <martin@ximian.com>
814 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
815 `MonoDynamicGenericClass'.
817 2005-07-01 Lluis Sanchez <lluis@ximian.com>
819 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
820 returned by a field getter is null, since null is a valid value.
822 2005-07-01 Martin Baulig <martin@ximian.com>
824 * reflection.c (mono_reflection_generic_class_initialize): Update
825 the `dgclass->fields [i].parent' to the correct class.
826 (mono_image_get_fieldref_token): Use the declaring type, not the
829 2005-07-01 Martin Baulig <martin@ximian.com>
831 * loader.c (find_method): Also look in the interfaces; fixes #75429.
833 2005-06-30 Ben Maurer <bmaurer@ximian.com>
835 * threads.c (thread_cleanup): assert that thread != NULL
836 (wait_for_tids_or_state_change): We were using the wrong variable
837 when accessing wait->threads. `i' was always out of the bounds of
840 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
842 * loader.c: map user32 and kernel32 to libMonoSupportW
844 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
846 * appdomain.c (unload_thread_main): Mark this as WINAPI.
848 2005-06-28 Martin Baulig <martin@ximian.com>
850 * loader.c (method_from_methodspec): Fix #75334.
852 2005-06-28 Martin Baulig <martin@ximian.com>
854 Fix #74953 - Arrays now implement the generic IList<T> interface
857 * class-internals.h (MonoDefaults): Added `generic_array_class'.
859 * reflection.c (mono_class_bind_generic_parameters): New public
860 function; similar to mono_reflection_bind_generic_parameters(),
861 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
863 * domain.c (mono_init_internal): Try to initialize.
864 `mono_defaults.generic_array_class' here; this'll only succeed if
865 we're using the 2.0 corlib.
868 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
869 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
870 (mono_lookup_internal_call): Added support for nested classes.
873 (mono_get_method_from_token): Set `result->signature->pinvoke' if
874 we're an interncall and have generic arguments.
877 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
878 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
879 instance of System.Array.InternalArray<T> for arrays, so they
880 implement the generic IList<T> interface.
882 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
884 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
885 (chastamar@yahoo.com). Fixes #75374.
887 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
889 * culture-info-table.h: regenerated.
891 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
893 * icall.c: handle spaces correctly for base64 strings.
895 2005-06-26 Ben Maurer <bmaurer@ximian.com>
897 * *.c: Kill some warnings.
899 2005-06-23 Duncan Mak <duncan@novell.com>
901 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
902 that this builds on Solaris 10 (x86).
904 2005-06-23 Martin Baulig <martin@ximian.com>
907 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
908 generic type definitions.
910 2005-06-23 Martin Baulig <martin@ximian.com>
914 * metadata.c (mono_class_get_overrides): Renamed to
915 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
916 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
917 pass it to mono_get_method_full().
919 2005-06-22 Ben Maurer <bmaurer@ximian.com>
921 * reflection.c (mono_reflection_create_runtime_class): take the
922 mono_domain_lock in this method. Prevents deadlocks
924 2005-06-22 Martin Baulig <martin@ximian.com>
926 * loader.c (method_from_methodspec): Fix #75330.
928 2005-06-22 Martin Baulig <martin@ximian.com>
930 * reflection.c (type_get_qualified_name): Use
931 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
932 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
933 argument; use it if we don't have an assembly name.
935 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
937 * object.c: In mono_message_init, set "copy out" flag for in
938 parameters with the [Out] flag.
940 2005-06-21 Martin Baulig <martin@ximian.com>
943 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
946 2005-06-21 Martin Baulig <martin@ximian.com>
948 * class.c (mono_class_init): Don't initialize `class->fields' for
949 generic instances since they're initialized again in
950 compute_field_layout().
951 (compute_field_layout): Set the field's `generic_info' here; fix
954 2005-06-21 Martin Baulig <martin@ximian.com>
957 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
959 * metadata.c (mono_metadata_generic_method_equal): Also
960 distinguish the `generic_class'; fixes #75334.
962 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
966 * domain-internals.h:
967 * reflection.c: 'domain_assemblies' field is now protected by its own
968 lock. Don't call into managed code to run the AssemblyLoad event if we
969 now there are no registered delegates for it.
971 2005-06-20 Martin Baulig <martin@ximian.com>
973 * class.c (mono_class_is_assignable_from): Use a custom version of
974 mono_class_has_parent() to make things work for generic instances;
977 2005-06-20 Martin Baulig <martin@ximian.com>
979 * loader.c (method_from_methodspec): Apply a patch from
980 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
982 2005-06-20 Martin Baulig <martin@ximian.com>
984 * class.c (mono_class_init): Reverted Zoltan's last change; it
987 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
989 * threads.c (wait_for_tids_or_state_change): Add missing locking.
991 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
993 * socket-io.c: fix the index in the socket array for writable/error
994 sockets. Fixes bug #75306.
996 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
998 * class.c (mono_class_init): Allow interfaces to have static ctors.
1000 2005-06-17 Martin Baulig <martin@ximian.com>
1002 * loader.c (method_from_methodspec): Use `context->container' when
1003 parsing the `gmethod->inst'.
1005 2005-06-17 Martin Baulig <martin@ximian.com>
1007 * class.c (mono_type_get_name_recurse): Don't add the assembly
1008 name for type arguments.
1010 2005-06-15 Martin Baulig <martin@ximian.com>
1012 * reflection.c (mono_image_get_inflated_method_token): Encode
1013 correct klass; fixes #75260.
1015 2005-06-13 Michal Moskal <malekith@nemerle.org>
1017 * icall.c: Make GetCorrespondingMethod/Constructor take
1018 MonoReflectionMethod method not MonoMethod. Removed
1019 MonoType.GetCorrespondingField, and make
1020 MonoGenericType.GetCorrespondingField take name not
1023 2005-06-13 Michal Moskal <malekith@nemerle.org>
1025 * reflection.c (field_encode_signature, encode_locals):
1026 Make sizes of buffers for types larger (for big generic types).
1027 (create_generic_typespec,
1028 mono_reflection_sighelper_get_signature_local,
1029 mono_reflection_sighelper_get_signature_field):
1030 Add asserts for too small buffers.
1032 2005-06-15 Martin Baulig <martin@ximian.com>
1034 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
1035 if our parent is not a dynamic type.
1037 2005-06-15 Martin Baulig <martin@ximian.com>
1039 * class-internals.h (MonoTypeNameFormat): New enum.
1042 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
1043 (mono_type_get_full_name): Removed.
1044 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
1045 argument instead of the boolean's.
1047 * icall.c (ves_icall_System_MonoType_getFullName):
1048 Added `gboolean assembly_qualified'.
1051 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
1053 * reflection.c (mono_reflection_parse_type): Parse the new type
1056 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1058 * icall.c: no need to convert from utf16 to utf8 and then back again
1059 after the call to GetLogicalDrives.
1061 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1063 * icall.c: frombase64. Fix problems exposed by new tests.
1065 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1067 * icall.c: added internal calls for converting char [] and strings in
1068 base64 into byte [].
1070 2005-06-10 Martin Baulig <martin@ximian.com>
1072 * class.c (mono_class_create_generic_2): Read the nested classes
1073 from the metadata rather than from `gklass->nested_classes' since
1074 `gklass' might not be initialized yet.
1076 2005-06-09 Duncan Mak <duncan@novell.com>
1078 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
1079 all public headers. Fixes #74919.
1081 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
1083 * domain.c: The key for proxy_vtable_hash is now a pointer
1084 array. Added new GHashFunc and GCompareFunc functions for this.
1086 * class.h: The list of interfaces in MonoRemoteClass is known in
1087 advance and can't grow (we create a new MonoRemoteClass if needed),
1088 so now the interface array can be allocated together with
1091 * object.c: Added a new method create_remote_class_key.
1092 Fixed mono_remote_class so it does not depend on
1093 mono_upgrade_remote_class.
1094 Removed extend_interface_array.
1095 Added new method clone_remote_class(), which makes a copy of a remote
1096 class and adds a new interface or class to it.
1097 mono_upgrade_remote_class() now creates a new remote class (or gets
1098 it from the cache) if an vtable upgrade is needed. In this way
1099 we make sure that other objects sharing the same remote class
1100 don't get the new vtable with unwanted interfaces.
1102 * object-internals.h:
1103 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
1105 * marshal.c: Track changes in mono_upgrade_remote_class().
1107 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
1108 * icall.c: Add runtime methods for obtaining members of inflated
1109 class, which were created from supplied non-inflated members. It
1110 is used in internal Get{Method,Constructor,Field} methods in
1113 2005-06-09 Martin Baulig <martin@ximian.com>
1116 (mono_reflection_bind_generic_method_parameters): Fix #75169.
1118 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1119 * reflection.c (mono_image_basic_init): Define
1120 Version in MonoDynamicAssembly.
1122 2005-06-08 Martin Baulig <martin@ximian.com>
1127 (mono_method_signature_full): New public method; takes a
1128 `MonoGenericContext *'.
1129 (find_method): Use mono_method_signature_full() and pass the
1130 klass'es context to it.
1132 * class.c (mono_class_is_inflated_method): Use
1133 mono_method_signature_full() and pass the context to it.
1135 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
1137 * object.c: add proper locking in mono_remote_class_vtable(),
1138 fixes possible memory corruption.
1140 2005-06-08 Michael Meeks <michael.meeks@novell.com>
1142 * marshal.c (mono_remoting_marshal_init): set
1143 initialized after initialization.
1145 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
1149 2005-06-06 Michael Meeks <michael.meeks@novell.com>
1151 * object.c (extend_interface_array): fix really silly
1152 memory corrupting / comparison bug.
1154 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1156 * reflection.c: Functions added to support the creation
1157 of CustomAttributeData, which includes Attribute data
1158 used by ReflectionOnly methods.
1160 * reflection.h: mono_reflection_get_custom_attrs_data and
1161 mono_custom_attrs_data_construct added (functions exposed).
1163 * icall.c: Added mono_reflection_get_custom_attrs_data
1166 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
1168 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
1171 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
1173 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
1175 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
1176 dynamic DllImportAttribute.
1178 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
1179 dynamic DllImportAttribute.
1181 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
1184 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1186 * threads.c: avoid segfault when an unstarted thread is aborted.
1188 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
1190 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
1191 Returns the name and version of the runtime for reporting.
1193 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1195 * appdomain.c: bump corlib version.
1196 * object-internals.h: new field in MonoReflectionAssembly.
1198 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1200 * object-internals.h: Carlos forgot to add this field.
1202 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1204 * icall.c: Added create_version to create instances
1205 of Version of MonoReflectionAssemblyName. This change helps
1206 the AssemblyName tests to keep running fine.
1208 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
1210 * object.c (mono_method_return_message_restore): A somehow less
1211 intrusive fix for #75138.
1213 2005-06-03 Raja R Harinath <rharinath@novell.com>
1215 * object.c (mono_method_return_message_restore): Fix computation
1216 of expected number of out args.
1218 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
1220 * reflection.c (mono_image_get_method_info): Fix the case when the
1223 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
1225 * object.c: Added missing null check in
1226 mono_method_return_message_restore.
1228 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
1230 * reflection.c (mono_image_get_method_info): Handle the case when
1233 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
1235 * object.c: When creating the vtable for a proxy, take into account
1236 all inherited interfaces, not only the ones registered in
1237 iclass->interfaces. This fixs bug #74996.
1238 Also, in mono_method_return_message_restore, verify that the array
1239 of out args has the expected lengh.
1241 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1243 * socket-io.c: update the timeout in Poll when the call is interrupte.
1245 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1247 * socket-io.c: support abort/suspend in Select_internal after last
1250 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1252 * threadpool.c: remove warning.
1254 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1257 * socket-io.[ch]: Select_internal uses poll() now when available, thus
1258 removing the 1024 limit from select(). Runtime part of the fix for
1261 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1263 * socket-io.c: when resolving the addresses for the same
1264 host returned by gethostname(), get the local IPs from the interface
1265 list. Loopback addresses are discarded if the are interfaces up with
1266 non-loopback ones. Fixes bug #63265.
1268 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
1270 * appdomain.c, verify.c, object-internals.h, reflection.c:
1271 bumped corlib number to 36, and added new extra_flags field
1272 to ReflectionMethodBuilder and friends. Fixes #75060.
1274 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
1276 * gc.c: register a new weak link only if the object is non-null
1279 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
1281 * culture-info.h : short time pattern too.
1283 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
1285 * culture-info.h : expand long time pattern string length.
1287 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
1289 * culture-info-table.h : update (more French date format; #72788).
1291 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
1293 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
1294 the method is static. Fixes #75029.
1296 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
1298 * reflection.c: Update the table_idx field of method builders after
1299 saving the module, since it can change. This is a workaround for
1302 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
1304 * culture-info-table.h : update (additional French date format).
1306 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
1308 * icall.c (ves_icall_type_Equals): Revert last change.
1310 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
1312 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
1314 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
1316 * class-internals.h: Added executioncontext_class field to
1317 MonoDefaults structure.
1318 * domain.c: Cache System.Threading.ExecutionContext class in
1320 * object.c: Capture the ExecutionContext for asynchroneous calls in
1321 mono_async_result_new.
1322 * object-internals.h: Added execution_context and original_context
1323 fields to MonoAsyncResult. Added execution_context to MonoThread.
1324 * security-manager.c|.h: Added mono_get_context_capture_method to
1325 return the capture method (if required by the security manager or by
1326 the framework version used).
1327 * threadpool.c: Apply capture (if present) ExecutionContext in
1328 mono_async_invoke and revert to original context after it completes.
1330 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
1332 * culture-info-table.h : updated (real hacky solution for zh-CHT).
1334 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
1336 * culture-info-table.h : zh-CHT related workaround.
1338 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
1340 * marshal.c (emit_marshal_custom): Add some error checking and call the
1341 methods in the ICustomMarshaler interface. Fixes #74875.
1343 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
1344 native->managed wrappers.
1346 2005-05-12 Martin Baulig <martin@ximian.com>
1348 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
1349 here and use the loader lock.
1351 * mono-debug.c: Properly lock when the debugger is not attached.
1352 (mono_debug_init): Release the initial lock if we're not running
1355 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
1357 * marshal.c (emit_marshal_custom): Pass through NULL values without
1358 calling the custom marshalling routines.
1360 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
1361 conversion in structures. Fixes #74882.
1363 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
1365 * culture-info-table.h : zh-* cultures were missing.
1367 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
1369 * threads.c: Added a new event background_change_event which is signaled
1370 when a thread changes its background mode.
1371 Moved here several checks previously done in managed code. The checks
1372 require the thread lock, and using the thread lock in managed code
1373 can result in deadlocks.
1374 Merged Start_internal and Thread_internal into a single method. Now
1375 Thread_internal does all work of creating and starting a thread.
1376 Added icalls for setting and getting the state of the object. Moved from
1377 managed code to avoid locking there.
1378 Added wait_for_tids_or_state_change() which is called instad of
1379 wait_for_tids when waiting for non-backround threads to end. This method
1380 will return if one of the threads ends or the background_change_event
1382 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
1383 the background mode. This method signals the background_change_event
1386 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
1387 removed Start_internal.
1389 2005-05-11 Martin Baulig <martin@ximian.com>
1391 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
1392 to order of some fields to get proper alignment on 64-bit machines.
1394 2005-05-11 Martin Baulig <martin@ximian.com>
1396 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
1397 changes as they're broken and completely fuck up the debugger.
1399 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
1401 2005-05-10 Martin Baulig <martin@ximian.com>
1403 * reflection.c (mono_reflection_generic_class_initialize): Don't
1404 call mono_class_setup_parent() here.
1406 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1408 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
1409 send/receive timeout use an integer in milliseconds. We were using a
1412 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1415 (internal_get_cultures): reserve the first slot of the array for the
1416 InvariantCulture, which will be filled in managed code.
1418 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
1420 * reflection.c (mono_image_fill_module_table): Initialize the
1421 GENERATION field as well.
1423 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1425 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
1426 Monitor.Enter on the object.
1428 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
1430 * threads.c: Enable the wait for running threads when exiting.
1431 * icall.c: Suspend all threads before exiting.
1433 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
1435 * assembly.c (mono_assembly_load_reference): Fix warning.
1437 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1439 * threadpool.c: changed the default number of threads per cpu. From now
1440 on, the default will be 20 + (5 * number of cpus) instead of 50.
1442 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
1444 * loader.c (mono_method_get_signature_full): Add locking here.
1446 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
1448 * appdomain.c: Moved methods for parsing and freeing assembly
1449 names to assembly.c.
1450 * assembly.c, domain-internals.h: Created public methods for parsing
1451 assembly names. Fixed mono_assembly_load_with_partial_name:
1452 it now finds the best match, taking into account the version,
1453 token and culture specified in the partial name. Also return
1454 the latest version if no version information is specified.
1456 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
1458 * threadpool.c: replace check for SocketAsyncCall class.
1460 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1462 * threadpool-internals.h:
1463 * Makefile.am: added threadpool-internals.h
1465 * threadpool.c: call mono_unhandled_exception on exceptions not handled
1466 that happen in threadpool threads (tested on MS).
1467 (mono_thread_pool_remove_socket): new function that dispatch any pending
1468 AIO call on a socket that is closing. By now only epoll really needs it,
1469 as select/poll wake up when the socket closes.
1472 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
1474 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
1476 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
1478 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
1480 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
1482 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
1484 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
1485 has an abort request, convert it into a suspend request.
1487 2005-04-30 Ben Maurer <bmaurer@ximian.com>
1489 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
1490 warning for the usage of `UnmanagedFunctionPointerAttribute' which
1491 is not supported yet.
1493 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1495 * image.c: register assemblies loaded from data (bundles) in the loaded
1496 assemblies hash. Fixes bug #74772.
1498 2005-04-29 Martin Baulig <martin@ximian.com>
1500 * class.c (mono_type_get_name_recurse): Update to the new naming
1501 schema from the latest .NET 2.x beta2.
1502 (mono_class_setup_vtable_general): If we're a generic instance,
1503 copy the vtable from our generic type definition and inflate all
1506 * loader.c (find_method): Update to the new naming schema from the
1507 latest .NET 2.x beta2.
1509 2005-04-29 Raja R Harinath <harinath@gmail.com>
1511 * class.c (mono_class_init): Add a mono_loader_unlock to the
1514 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
1516 * icall.c (ves_icall_System_Environment_Exit): Remove the
1517 suspend_all_other_threads () call for the time being, since it can hang.
1519 * threads.c (mono_thread_manage): Similarly, disable the waiting for
1520 the background threads to exit, since it can also hang.
1522 * class.c (mono_class_init): Applied patch from Ankit Jain
1523 (radical@gmail.com). Avoid pending init errors when a field refers
1524 to a nested class using a typeref. Fixes #74734.
1526 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
1527 this for dynamic modules.
1529 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1531 * threads.c: don't wait for threads that are in the process of aborting
1532 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
1533 and waiting for background threads to finish. This makes xsp and
1534 mod-mono-server exit without random length delays and/or hangs.
1536 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1538 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
1540 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
1542 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
1543 dynamic types to prevent infinite loops. Fixes #74727.
1545 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
1546 ..._is_assignable_to.
1548 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
1550 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
1552 2005-04-25 Martin Baulig <martin@ximian.com>
1554 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
1557 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
1559 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
1561 * reflection.c (build_compressed_metadata): Set metadata header
1564 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
1566 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
1567 number into an integral and a decimal part. Fixes #70473.
1569 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
1571 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
1573 * culture-info-table.h : reflected the latest locale-builder output.
1575 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1577 * threadpool.c: check for SuspendRequested too when deciding if
1578 mono_thread_interruption_checkpoint should be called.
1580 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1582 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
1583 * threads.c: remove interruption_mutex and use Interlocked instead. When
1584 suspending all the threads, wait for all the suspended events at once.
1585 If we're shutting down and get an APC that is going to be queued,
1586 call mono_thread_execute_interruption immediately, as the thread might
1587 be sleeping on a pthread condition or mutex.
1589 * icall.c: call mono_runtime_set_shutting_down before suspending the
1592 Fixes bug #74693. And now xsp is happier when exiting.
1594 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
1596 * loader.c (mono_stack_walk): Fix #74690.
1598 2005-04-22 Martin Baulig <martin@ximian.com>
1600 * mono-debug.h (MonoDebugMethodJitInfo): Added
1601 `MonoDebugMethodJitInfo *jit'.
1603 * mono-debug.c (mono_debug_read_method): Cache the
1604 MonoDebugMethodJitInfo in `address->jit'.
1605 (mono_debug_free_method_jit_info): New public method.
1607 2005-04-22 Martin Baulig <martin@ximian.com>
1609 * class.c (mono_class_is_assignable_from): Disallow
1610 type parameter -> interface.
1612 2005-04-21 Dick Porter <dick@ximian.com>
1614 * threads.c (mono_thread_create): Turn an assertion into an error.
1616 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
1618 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
1620 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
1621 Fix some gcc 4.0 warnings.
1623 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
1625 * file-io.c: fix alt dir separator char on unix systems
1626 and cleanup (fixes bug #71214).
1628 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
1630 * marshal.c: Use CALLVIRT instead of CALL when dispatching
1631 a call to a remote domain, since the method may be an
1632 interface method in the client domain. This fixes bug #74192.
1634 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1636 * threadpool.c: recv/send are now performed before going back to managed
1637 code to save one transition.
1639 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1641 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
1643 * metadata/threadpool.c: removed hack to workaround the bug above.
1647 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
1649 * reflection.c reflection.h: Fix handling of parameter defaults in
1650 dynamic methods. Also fixes handling of parameter attributes.
1653 * mono-debug.c (mono_debug_close_image): Fix warning.
1655 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1657 * socket-io.h: replaced old unused field with new 'blocking'.
1658 * threadpool.c: restore socket blocking state on windows(tm).
1660 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
1662 * icall.c: don't return the codebase in the AssemblyName[] returned by
1663 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
1664 * object-internals.h: Removed FIXME (fields were presents) and fixed
1665 versioncompat declaration.
1667 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1669 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
1670 not closed, so don't cleanup when it happens.
1672 2005-04-13 Chris Toshok <toshok@ximian.com>
1674 * mono-debug-debugger.h: change prototype for
1675 mono_debugger_lookup_type.
1677 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
1678 this function, although it should probably be named
1679 mono_debugger_init_type.
1681 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1683 * threadpool.c: fix non-AIO case.
1685 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
1687 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
1688 the built-in profiler to measure just JIT compilation times.
1690 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1692 * threadpool.c: the epollfd might be closed by another thread at
1693 any time, so ignore EBADF at treat it as a "we're closing" sign.
1695 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1697 * threadpool.c: release the semaphores with a count equals to the number
1698 of working threads in both IO and regular pools. Fixed typo that messed
1699 up the count of IO pool threads. Don't initialize the pipe handles if
1702 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1704 * threadpool.c: some systems don't like a NULL when deleting the socket
1707 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1709 * threadpool.c: fix semaphore allocation.
1711 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1713 * threadpool.c: added epoll() based implementation for asynchronous IO
1714 that is used instead of the default poll() when available.
1715 It can be disabled by setting MONO_DISABLE_AIO.
1717 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1719 * threadpool.c: windows needs 'closesocket' and instead of returning
1720 0 when the stream is closed while in select, it returns -1. Fixes bug
1723 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
1725 * class.c (class_compute_field_layout): Fix the regression caused by
1728 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1730 * threadpool.c: separate pool for socket async. IO.
1731 * threadpool.h: mono_max_worker_threads is not a global any more.
1733 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
1735 * class.c (class_compute_field_layout): Fix #74549.
1737 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1739 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
1740 use 2 connected sockets instead.
1742 2005-04-08 Miguel de Icaza <miguel@novell.com>
1744 * mono-config.c: Add new entry point for mkbundle
1745 mono_config_parse_memory.
1747 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1749 * threadpool.c: removed another unused function.
1751 2005-04-08 Ankit Jain <radical@corewars.org>
1753 * reflection.c (get_default_param_value_blobs): Add 'types'
1754 parameter to get the types encoded in the constant table.
1755 (mono_param_get_objects): Use the type from the constant table,
1756 not the type of the parameter, when creating default values.
1757 Handle null default values correctly.
1759 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1766 * socket-io.c: removed dead code for async IO.
1768 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1770 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
1772 * threadpool.c: intercept socket async. calls and pass them to a thread
1773 that is polling and dispatching the job items to the threadpool as
1774 socket become ready. Fixes bugs #71217, #71933.
1776 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
1777 between char and short/ushort arrays.
1779 * socket-io.c: remove dead code.
1781 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
1784 icall.c : removed InternalToUpper_Comp() and
1785 InternalToLower_Comp().
1787 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
1789 * char-conversions.h : The tables were incorrectly generated. Should
1790 be generated against invariant culture.
1792 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
1794 * object.c (mono_runtime_invoke_array): Fix return value when
1795 passing pre-created valuetype objects to ctors.
1797 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
1798 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
1801 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
1803 * domain.c: removed g_assert for runtimesecurityframe_class. This is
1804 only used with --security and hides the wrong corlib version error.
1806 2005-03-30 Joshua Tauberer <tauberer@for.net>
1808 * class.c: Changed mono_class_name_from_token so that types
1809 outside of a namespace don't have an initial period. Improved
1810 the g_warning message used in _mono_class_get when loading
1812 * assembly.c: In mono_assembly_load_reference, when an assembly
1813 can't be found, "No such file or directory" is misleading and
1814 unhelpful because a few paths were checked for the presence of
1815 the assembly. When that happens (ENOENT), display a nicer
1816 message indicating the directories that were searched. In all
1817 cases, the warning is made easier to read for non-hackers.
1819 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
1821 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
1823 * appdomain.h|domain.c: Removed inline from functions.
1824 * appdomain.c: Reduced warnings when compiling on windows.
1825 * icall.c: Fixed output_debug declaration to gunichar2*.
1826 * mono-config.c: Reduced warnings when compiling on windows.
1827 * rand.c: Added missing "windows.h". Added missing return value.
1828 * rawbuffer.c: Added missing winsock2.h for windows.
1829 * sysmath.h: Added mono-compiler.h header to allow/ease
1830 compilation with non-GCC compilers.
1831 * threads.c: Fixed declarations to compile with VS.NET C compiler.
1832 Removed cast warnings.
1834 Adapted from the work of J Lothian (for VC6).
1836 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
1838 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
1841 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
1843 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
1846 2005-03-27 Raja R Harinath <harinath@gmail.com>
1848 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
1849 has to be in $(exec_prefix). $(prefix) is for arch-independent
1850 stuff, and it would probably use $(prefix)/share rather than
1853 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1855 * console-io.c: added 2 includes that might be missing.
1857 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
1859 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
1862 * reflection.c (create_custom_attr): Allocate the params array using
1863 alloca so it gets GC tracking.
1865 2005-03-23 Chris Toshok <toshok@ximian.com>
1867 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
1870 2005-03-24 Raja R Harinath <rharinath@novell.com>
1872 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
1873 changes to pick up any changes in prefix, etc.
1875 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
1877 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
1879 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
1880 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
1882 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
1884 * class-internals.h object-internals.h class.c reflection.c: Extend the
1885 mono_lookup_dynamic_token () function to return the class of the
1888 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
1891 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
1893 * security-manager.c: Skip inheritance checks for intra-corlib
1894 class inheritance and method overrides. This skips a lot of checks
1895 and (anyway) permissions cannot work until corlib is loaded.
1897 2005-03-23 Martin Baulig <martin@ximian.com>
1899 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
1900 MONO_TYPE_GENERICINST.
1902 2005-03-23 Martin Baulig <martin@ximian.com>
1904 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
1906 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
1908 * class.c: added locking comments to some functions.
1909 Cache the interface offsets arrays (saves about 20 KB
1910 of runtime memory in a typical app).
1911 Reduce the time overhead in mono_class_setup_supertypes ().
1913 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
1915 * icall.c: speedup and fix leaks in GetMethodsByName and
1916 GetPropertiesByName.
1918 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
1920 * reflection.c: some locking fixes.
1922 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
1924 * metadata.c: added missing break in case statement.
1926 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
1928 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
1929 typedbyref return values. Fixes #73941.
1931 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
1933 * security-manager.c|h: Added demandunmanaged method and
1934 suppressunmanagedcodesecurity class to MonoSecurityManager.
1935 Renamed aptc class to allowpartiallytrustedcallers.
1937 2005-03-17 Martin Baulig <martin@ximian.com>
1939 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
1941 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1943 * file-io.c: disabled file async. IO using aio_*. It uses the
1944 threadpool now. Workaround for bug #73718.
1946 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
1948 * assembly.h, mono-config.c: added code to deal with bundled configs
1949 for bundled assemblies.
1951 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
1953 * *.c, private.h: cleanup, removing old private.h header file.
1955 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
1957 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
1958 and throw_on_unmappable_char attributes.
1960 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
1962 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
1963 _ProcessName_internal.
1965 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
1967 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
1970 * icall.c threads.c threads-types.h: Remove slothash icalls as they
1973 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
1975 * object.c (compute_class_bitmap): Add support for generics. Fixes
1978 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
1980 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
1982 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1984 * filewatcher.c: commented out the code for windows watcher, as we don't
1985 use it (we use the managed implementation instead).
1987 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
1989 * object-internals.h (MonoThread): Remove 'unused1' field.
1991 * appdomain.c: Bump corlib version.
1993 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
1995 * reflection.c (mono_reflection_create_runtime_class): Remove the
1996 AssemblyBuilder.Save optimization since it causes too many problems.
1998 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
2000 * exception.c|h: Added mono_get_exception_reflection_type_load to
2001 create a ReflectionTypeLoadException object.
2002 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
2003 to return NULL is a InheritanceDemand fails during reflection. Updated
2004 ves_icall_System_Reflection_Assembly_GetTypes to throw a
2005 ReflectionTypeLoadException if an InheritanceDemand fails during
2006 reflection. Added icall mapping for GetLinkDemandSecurity.
2007 * security-manager.c|h: Added ves_icall_System_Security_
2008 SecurityManager_GetLinkDemandSecurity internal call to return the
2009 class and methods permissions set for a LinkDemand. Removed unused
2010 fields in MonoSecurityManager.
2012 2005-03-10 Martin Baulig <martin@ximian.com>
2014 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
2015 it's a generic instance.
2017 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
2019 * reflection.c (mono_get_object_from_blob): Applied patch from
2020 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
2022 * class.c (mono_class_is_assignable_from): Another try at fixing
2023 #73469 without breaking anything.
2025 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
2027 * class.c: (mono_class_is_assignable_from): Revert the last changes
2028 since they don't work with generics.
2030 * class.c (mono_class_is_assignable_from): Fix build bustage.
2032 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
2033 the managed IsAssignableFrom method. Fixes #73469.
2035 * reflection.c (mono_reflection_call_is_assignable_from): New helper
2038 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
2040 * object.c (mono_load_remote_field_new): Fix returning uninitialized
2041 memory when the remoting callback does not sets the out arguments.
2044 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
2047 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
2049 * object-internals.h (MonoStackFrame): Sync with managed object layout.
2051 * appdomain.c: Bump corlib version.
2053 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
2055 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
2058 * threads.c (mono_thread_attach): Detect threads which are not started
2059 by the GC pthread wrappers.
2061 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
2063 * icall.c: Added new icall for RNG.
2064 * rand.c|h: Added new icall to open the RNG. This allows to share a
2065 single handle on Linux to access /dev/urandom and fix #73183.
2067 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
2069 * object.c: setting the new vtable in a transparent proxy object must
2070 not change the GC descriptor.
2072 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2074 * object.c: fixed compilation without GCJ support.
2075 * reflection.c: for runtime-created types ensure klass->has_references
2076 is correct (bug #73215).
2078 2005-03-02 Martin Baulig <martin@ximian.com>
2080 * class.c (mono_class_is_assignable_from): Make this work if
2081 `oklass' is a generic instance; fixes #72831.
2083 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
2085 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
2088 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
2090 * marshal.c: Reorganize native->managed marshalling code to also use
2091 the emit_marshal_... functions.
2093 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2095 * object.c: typed allocs have issues with bitmap sizes > 30,
2096 so check for max_set >= 30.
2098 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
2100 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
2101 managed code. Fixes #73012.
2103 * metadata.h (MonoMarshalSpec): Add elem_mult field.
2105 * metadata.c reflection.c: Load/Emit elem_mult as well.
2107 * metadata.h (MonoMarshalSpec): Add comment.
2109 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
2111 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
2112 num_elem to -1 if not given.
2114 * object-internals.h (MonoReflectionMarshal): Add has_size field.
2116 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
2119 2005-03-01 Marek Safar <marek.safar@seznam.cz>
2121 * null-gc.c (mono_gc_free_fixed): Was not compilable.
2123 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
2125 * reflection.c (encode_marshal_blob): Encode param_num field as well.
2127 * object-internals.h (MonoReflectionMarshal): Add param_num field.
2129 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2131 * object.c: generalized the reference bitmap creation
2132 and added hooks for the new GC.
2133 * class-internals.c: removed the gc_bitmap field from MonoClass.
2135 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2137 * domain.c: help the compiler to produce better code
2138 in mono_jit_info_table_find ().
2140 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2142 * object.c: make all allocations look typed.
2144 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2146 * socket-io.c: load Mono.Posix if it's not loaded already
2149 2005-02-24 Martin Baulig <martin@ximian.com>
2151 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
2152 * reflection.c (dup_type): Likewise.
2154 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
2156 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
2157 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
2159 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2161 * domain.c, threads.c, object-internals.h: make the critical thread
2162 local vars use the fast access mode (even when we're compiled in
2163 a lib). Provide accessors to be used by the jit during codegen.
2165 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2167 * appdomain.c: Changed hook functios behavior to include
2168 support for the reflection only assemblies. Some icalls were changed
2169 to support the mentioned assemblies too. Signatures of static methods
2170 try_assembly_resolve and real_load now have an additional parameter:
2173 * assembly.c: General changes to mono_assembly_ methods to support
2174 reflection only api. Functions mono_assembly_open, mono_assembly_load,
2175 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
2176 suffix, to support an additional gbool parameter to specify whether
2177 the assembli is reflection only or not. Created some new hook functions
2178 to add support for reflection only assemblies. Signatures of static
2179 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
2180 have now an additional parameter: refonly.
2182 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
2183 indicating whether the assembly is reflection only or not.
2185 * exception.c: Add mono_get_exception_invalid_operation.
2187 * icall.c: Throw an InvalidOperationException when trying to invoke
2188 a property/method/event, or trying to set/get the value of a field.
2189 Also add an icall to retrieve the ref_only flag to the
2190 MonoReflectionAssembly.
2192 2005-02-23 Chris Toshok <toshok@ximian.com>
2194 Part of fix for #72827.
2195 * mono-debug.c (mono_debug_add_method): add lexical block data to
2196 the info we write. Kind of a hack at the moment - we copy the
2197 lexical block info from the MonoDebugMethodInfo to the
2198 MonoDebugMethodJitInfo here, before writing it.
2199 (mono_debug_read_method): read the lexical block info.
2201 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
2203 * debug-mono-symfile.h: add lexical block support.
2205 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
2208 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
2210 * loader.c (mono_lookup_pinvoke_call): Fix warning.
2212 * object.c (mono_runtime_free_method): Call mono_free_method () and
2213 put the TODOs there.
2215 * loader.c (mono_free_method): Free up most memory allocated for
2218 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
2220 * reflection.c: properly flag a Type argument to a
2221 named custom attr value (bug #72248).
2223 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2225 * reflection.c: reduce code duplication in named custom
2228 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
2230 * reflection.c: properly encode custom attrs of type object
2233 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
2235 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
2237 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
2239 * socket-io.c: load System.dll if it's not loaded already
2240 (bug #72850 and #70477).
2242 2005-02-21 Martin Baulig <martin@ximian.com>
2244 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
2247 2005-02-21 Martin Baulig <martin@ximian.com>
2249 * reflection.c (mono_image_build_metadata): We also need to
2250 "fixup" the MethodImpl table after we computed the final method
2251 indices. Call fixup_methodimpl() to do that.
2252 (fixup_methodimpl): New private method.
2254 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2256 * assembly.c: special case mscorlib.dll (bug#72536),
2257 patch from Carlos Alberto Cortez.
2259 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
2261 * threads-types.h threads.c: Fix build bustage.
2263 * threads.c: Use a union for long<->double conversions.
2265 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
2266 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
2268 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
2269 containing the checkpoint call with NOT_TAKEN.
2271 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
2272 checkpoint before pushing the arguments, so they won't have to be
2275 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2277 * domain.c, assembly.c, domain-internals.h: make some data
2278 const and relocation-free.
2280 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
2282 * object.c, appdomain.c, class-internals.h: introduce the
2283 MonoClassRuntimeInfo structure to hold the info needed to
2284 use a class at runtime. Made mono_class_vtable() lock-free
2285 for all the appdomains.
2287 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
2289 * metadata-internals.h, image.c: introduce a per-image mempool to
2290 be used for memory that has the same lifetime as the image.
2292 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
2294 * domain.c: In mono_init_internal(), instead of selecting the first
2295 runtime version supported by an executable, get a list of all
2296 supported versions and select the one for which an mscorlib exists
2297 (since even if the runtime supports a given version, it doesn't mean
2298 that the framework for that version is installed).
2299 Modified get_runtimes_from_exe to support this behavior.
2300 In supported_runtimes, added information about additional system
2303 * assembly.c: Added support for more than one system assembly version
2304 per runtime version. Updated the assembly list.
2305 In mono_assembly_remap_version, removed the initial version check,
2306 since we don't know to which version we need to compare until we
2307 get the version set on which the assembly is based.
2308 Moved the code for loading corlib into the new method
2309 mono_assembly_load_corlib(), so it can be used by the initialization
2312 * domain-internals.h: Updated data structures and added declaration
2313 for mono_assembly_load_corlib.
2315 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
2317 * reflection.c (resolve_object): Fix the creation of the signature in
2318 the SignatureHelper case.
2320 * assembly.c (mono_assembly_remap_version): Fix binary search.
2322 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
2324 * class.c: Added inheritance check when a method is overloaded (from a
2325 virtual method or when implementing an interface) and when a class is
2326 inherited. Added functions to set a failure for a class and to
2327 retreive the exception from a failure.
2328 * class-internals.h: Added fields to MonoClass to keep the exception
2329 information status for inheritance (or other exceptions) to be thrown
2330 later (i.e. not at load time).
2331 * object.c: Throw the inheritance SecurityException when a type is to
2332 be created with either class or method inheritance violations.
2333 * reflection.c|h: Fix when getting declsec from a class. Removed
2334 unrequired code for class. Improved sanity in parameter naming.
2335 * security-manager.c|h: Added functions to check for class and method
2338 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
2340 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
2341 and has_finalize in dynamic types as well.
2343 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
2345 * culture-info-table.h : fixed currency format for en-GB (and so on).
2347 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
2349 * gc.c: ensure the GC handles never have 0 as a value.
2351 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
2353 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
2354 a pointer to a struct to unmanaged code. Fixes #72625.
2356 2005-02-16 Martin Baulig <martin@ximian.com>
2358 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
2360 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
2362 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
2364 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
2366 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
2368 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
2369 UnmanagedFunctionPointerAttribute, use it for determining calling convention
2372 * reflection.c (mono_custom_attrs_get_attr): New helper function.
2374 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
2376 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
2378 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
2379 changes to make the current context a field in MonoThread.
2381 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
2383 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
2386 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
2387 extracted from mono_marshal_get_native_wrapper.
2389 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
2390 to create wrappers around native functions.
2392 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
2393 delegates for arbitrary function pointers. Fixes #71472.
2395 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2397 * threads.c: cleaned up the code a little.
2399 2005-02-15 Martin Baulig <martin@ximian.com>
2401 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
2404 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
2405 allocate larger chunks if needed.
2407 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
2409 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
2412 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
2414 * domain.c: keep the domains in an array and ensure the domain ids
2415 are kept small, so they can be used as indexes to domain-specific data
2416 with a small memory overhead.
2418 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
2420 * icall.c: Handle byref types in Type icalls. Fixes #72544.
2422 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
2424 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
2426 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
2428 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
2430 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
2433 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
2435 2005-02-12 Ben Maurer <bmaurer@ximian.com>
2437 * domain-internals.h: add the hashtable here.
2439 * class-internals.h: Remove `info' from MonoMethod
2441 * domain.c: Add a new hashtable, jit_trampoline_hash
2443 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
2445 * object.c: don't set the value of static fields
2448 2005-02-11 Martin Baulig <martin@ximian.com>
2450 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
2451 (mono_debug_add_method): Silently ignore the method if it's too big.
2452 (mono_debug_add_type): Likewise.
2454 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
2456 * threads.c, appdomain.c: remove #ifdefs from the code.
2458 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
2460 * metadata-internals.h: Added flags to MonoAssembly to cache the most
2461 common security informations. This allows us to stay in unmanaged code
2462 when doing LinkDemand and it's special cases (except for the first
2463 time for initialization). The flags a very much used with --security.
2464 * reflection.c|h: Added code to get declarative security attributes
2465 for LinkDemand and InheritanceDemand. This required to refactor the
2466 existing code for Demand.
2467 * security-manager.c|h: Added new method fields for the special cases
2470 2005-02-10 Martin Baulig <martin@ximian.com>
2472 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
2473 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
2475 2005-02-10 Martin Baulig <martin@ximian.com>
2477 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
2478 debugging code; this is almost a complete rewrite.
2480 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
2482 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2484 * domain.c, object.h: expose mono_string_equal () and
2485 mono_string_hash ().
2486 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
2487 it's implemented in managed code.
2489 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2491 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
2492 lo leak objects between appdomains.
2494 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2496 * assembly.c: old compilers compilation fix from
2497 robertj@gmx.net (Robert Jordan).
2499 2005-02-09 Ben Maurer <bmaurer@ximian.com>
2501 * class-internals.h: Little reminder for the future.
2503 * debug-helpers.c: Fix up wrapper_type_names
2505 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2507 * image.c, metadata-internals.h: when loading an image from a file,
2508 mmap all of it and use the same codepaths as when using a
2509 in-memory image: the code is simpler and we use less memory
2510 (both writable and readonly).
2512 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2514 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
2515 API to alloc runtime data structures that need to be tracked by the
2516 GC and contain pointers.
2517 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
2518 make the code more readable and eventually use a different GC.
2520 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
2522 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
2525 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
2527 * object.c: In release_type_locks(), don't release the cctor lock
2528 if it has already been released. This fixes a crash in the
2531 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2533 * gc.c, marshal.c, icall.c: register a delegate for finalization
2534 only when the native function pointer has been allocated for it.
2536 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2538 * object.c: cleaned up some code, allocate objects that are
2539 pointer free with the atomic malloc variant. Allocate memory
2540 for static data from the mempool if it's pointer-free.
2541 Allocate the bounds array at the end of the array data, when needed.
2542 * object-internals.h, object.h: move a private function in a private
2544 * class.c: handle missing case in tracking references in fields.
2546 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2548 * class.c, class-internals.h: keep track if a type has
2549 reference fields in either the instance or static fields.
2551 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
2553 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
2554 and renamed to MonoRuntimeInfo. Added fields to store the expected
2555 framework assembly version. Changed mono_get_framework_version and
2556 mono_get_runtime_version for a single mono_get_runtime_info method.
2558 * assembly.c: Added method to remap system assembly versions to the
2559 current executing runtime version. Removed old mapping code.
2560 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
2562 * icall.c, reflection.c: Track api changes.
2564 2005-02-06 Miguel de Icaza <miguel@novell.com>
2566 * loader.c (method_from_memberref): Improve error reporting,
2567 produce the class name instead of the typeref/typedef index.
2569 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
2571 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
2573 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
2575 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
2576 stdcall and charset name mangling. Reorganize the code and add
2579 2005-02-05 Ben Maurer <bmaurer@ximian.com>
2581 * monodiet.c: More iters!
2583 * marshal.c: Iter usage.
2585 * icall.c: Iter usage.
2587 * object.c: Use iters.
2589 * debug-helpers.c: More iters
2591 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
2593 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
2596 2005-02-05 Ben Maurer <bmaurer@ximian.com>
2598 * mono-debug-debugger.c: use iters
2600 * class.c, class-internals.h: mono_class_setup_events is static
2603 * All callers: use iters
2605 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
2607 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
2608 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
2610 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
2612 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
2614 * marshal.h: Add prototypes for ldfld/stfld_remote.
2616 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
2617 this is called during startup.
2619 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
2621 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
2622 MonoThreadsSync struct private in monitor.c. Changed the way
2623 MonoThreadsSync is allocated so it's faster and there is no
2624 need to keep track of it with a finalizer and it uses less memory.
2625 This also finally allows us to allocate mono objects as ptrfree when
2626 there are no reference fields.
2628 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
2630 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
2631 disappearing link to the GC interface and use them to simplify
2634 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
2636 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
2637 stfld_remote which call mono_load/store_field_new. This allows methods
2638 calling ldfld/stfld wrappers to be AOTed.
2640 * console-io.c: Include sys/filio.h under solaris.
2642 * console-io.c: Include curses.h if needed correctly.
2644 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
2646 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
2647 method->klass as well.
2649 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
2651 * class.c (mono_class_init): Switch on lazy initialization of
2654 * class.c (mono_class_get_finalizer): Handle the case when the
2655 finalizer is inherited.
2657 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2659 * console-io.c: <curses.h> is needed by term.h on solaris.
2661 2005-02-03 Ben Maurer <bmaurer@ximian.com>
2663 * icall.c, class-internals.h, monodiet.c, class.c: Remove
2664 mono_class_setup_properties where possible. Remove this ftn from
2665 the header file, and make it static.
2667 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
2669 * loader.c: Add missing setup_... call.
2671 * class.c: Add missing setup_... calls.
2673 * class.c (mono_class_init): Switch on lazy initialization of
2676 * class.c (mono_class_init): Fix generics broken by the recent changes.
2678 * monodiet.c (handle_type): Add missing setup_... calls.
2680 * class.c: Back out garbage in previous patch.
2682 * class.c: Add missing setup_... calls.
2684 * class.c (mono_class_get_method_from_name_flags): Avoid calling
2685 mono_class_setup_methods () if possible.
2687 * class-internals.h (MonoClass): Add 'has_cctor' flag.
2689 * class-internals.h (MonoCachedClassInfo): New structure.
2691 * class.c: Initialize properties and events fields of MonoClass lazily.
2693 * class.c: Add infrastructure for lazily initializing the methods and
2694 vtable fields of MonoClass. Not yet used.
2696 * class.c (mono_class_get_finalizer): New helper function.
2698 * class.c: Add infrastructure for loading some class related data from
2701 * object.c: Add infrastructure for initializing the vtable from data
2704 * gc.c (run_finalize): Use mono_class_get_finalizer ().
2706 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
2707 appropriate initialization function before accessing parts of the
2708 MonoClass structure.
2710 * marshal.c: Fix warnings.
2712 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
2714 * mono-debug-debugger.c (get_exception_message): Use
2715 mono_class_get_method_from_name_flags ().
2717 2005-02-02 Ben Maurer <bmaurer@ximian.com>
2719 * reflection.c, appdomain.c: Replace a few manual searches that
2720 Zoltan missed. (Paolo approved this part of my initial patch).
2722 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
2724 * profiler.c: disable recording statistical events at report time.
2726 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2728 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
2729 to byteswap arrays of enum values, too (bug #72080).
2731 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
2733 * appdomain.c (set_domain_search_path): Allow this to be called if
2734 domain->setup is not yet set.
2736 * loader.c (mono_method_get_index): New helper function.
2738 * loader.c reflection.c: Use mono_method_get_index ().
2740 * class.c (mono_class_get_method_from_name_flags): New helper method.
2742 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
2745 * class.c (mono_class_get_cctor): New helper method.
2747 * string-icalls.c object.c class.c marshal.c reflection.c: Use
2748 mono_class_get_method () to look up methods.
2750 2005-02-01 Miguel de Icaza <miguel@novell.com>
2752 * console-io.c: Fix the build, this should work on Windows.
2754 2005-01-31 Ben Maurer <bmaurer@ximian.com>
2756 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
2757 be set to null to keep things valid
2759 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2761 * icall.c: added Console 2.0 icalls.
2762 * Makefile.am: added console-io.[ch]
2763 * console-io.[ch]: internal calls for Console 2.0 API.
2765 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2767 * class.c: make sure we consider all the interfaces
2768 when calculating max_interface_id (bug found by
2769 Jeroen Frijters running ikvm).
2771 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
2773 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
2774 valuetype fields to null.
2776 * object.c (set_value): Ditto. Fixes #71669.
2778 2005-01-31 Martin Baulig <martin@ximian.com>
2780 * metadata.c (mono_metadata_has_generic_params): New public
2781 function; checks whether something is a generic method.
2783 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
2785 * appdomain.c: fix infinite recursion when adding assemblies.
2787 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
2789 * object.c: Fix small typo to return all items for Environment.
2792 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2794 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
2795 reflection.c: more domain and assembly-unload related fixes
2796 and memory leaks plugs.
2798 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
2800 * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
2802 2005-01-29 Ben Maurer <bmaurer@ximian.com>
2804 * loader.c (mono_method_signature): Make this method lazy
2805 (mono_get_method_from_token): Don't computate the signature here.
2807 Doing this saves quite a bit of memory. I got 90 kb on starting up
2808 monodoc. It should also save some disk reads on startup.
2810 * *: MonoMethod->signature might be NULL now. You *MUST* use
2811 mono_method_signature.
2813 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
2815 * object.c (mono_runtime_get_main_args): Return an array from the
2816 current domain here. Fixes #71938.
2818 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
2820 * monitor.c: formatting changes to comply with the
2821 mono coding style and remove #ifdefs from the code.
2823 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2825 * metadata.c, private.h: remove some unneeded data
2826 and use a more compact representation for table schemas.
2828 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
2830 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
2831 to get a better distribution in hash tables.
2832 * *.c: use mono_aligned_addr_hash() where appropriate.
2833 * assembly.c: make var static.
2835 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
2837 * domain-internals.h: Put MonoJitInfo on a diet.
2839 * domain.c: Fix a warning.
2841 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2843 * gc.c: rework the gc handles code to reuse handles
2846 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2848 * domain.c: fixed long standing bug in mono_string_equal() which
2849 was brought to light with the ldstr changes.
2851 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
2853 * reflection.c: Remove warning by adding missing include for marshal.h
2855 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2857 * domain.c, object.c: change the ldstr_table to hold
2858 MonoString* as keys: makes the runtime isinterned lookup
2859 faster and simplifies memory management.
2861 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
2863 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
2864 possible to add imperative security checks before calling the icall.
2865 * reflection.c: Return security attributes on the original MonoMethod
2866 (and not the wrapped one). This fix permissions on icalls.
2868 2005-01-25 Dick Porter <dick@ximian.com>
2870 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
2871 the check for mktime() support actually test the mktime() return
2872 value. "Fixes" bug 71682, though the output is still different to
2875 2005-01-25 Martin Baulig <martin@ximian.com>
2877 * class.c (mono_class_is_assignable_from): Make this work for
2880 2005-01-24 Ben Maurer <bmaurer@ximian.com>
2882 * marshal.c (mono_string_utf8_to_builder)
2883 (mono_string_builder_to_utf16): We might not have ownership of the
2884 string. In thise case, we need to create a new buffer.
2886 * object-internals.h (mono_stringbuilder_capacity): sb->str might
2887 be null, in which case, use the default capacity.
2889 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2891 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
2892 GC events to the profiler.
2894 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2896 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
2897 if you don't want the GC to run.
2899 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
2901 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
2902 start providing a GC API and keeping different implementations in
2904 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
2906 2005-01-22 Ben Maurer <bmaurer@ximian.com>
2908 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
2909 mmap rather than allocating a huge buffer.
2910 (mono_debug_close_mono_symbol_file): Free the buffer allocated
2913 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
2915 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
2916 and CheckExecutionRights.
2917 * reflection.c|h: Keep the index of the declarative security to be
2918 used, instead of the pointer, when AOT compiler is used. Also add
2919 class initialization when requesting demands.
2920 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
2921 CheckExecutionRights. Both properties are now FALSE by default, and
2922 unmodifiable, unless the --security option is used.
2924 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2926 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
2927 reflection.c: properly refcount images and assemblies, many leaks fixed.
2929 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2931 * threadpool.c: increase the timeout for threads in the thread pool to
2932 10s. Fixes bug #67159.
2934 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
2936 * class-internals.h: Sun's compiler insists on explicit
2937 signed on bit fields to handle then correctly.
2939 2005-01-19 Miguel de Icaza <miguel@ximian.com>
2941 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
2942 Make the size of the array fit only the number of invalid path
2945 * class.c (_mono_class_get): Improve the error reporting when a
2946 class referenced is not found, to assist debugging.
2948 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
2950 * threads.c: fix off-by-one error.
2951 * domain.c: free data allocated in the domain.
2953 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
2955 * reflection.c (mono_method_body_get_object): Fill out exception info
2958 * object-internals.h: Add MonoReflectionExceptionHandlingClause
2961 2005-01-19 Martin Baulig <martin@ximian.com>
2963 * loader.c (mono_get_method_constrained): Make this work again.
2965 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
2967 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
2968 guint16 to match the managed side.
2970 * reflection.c (mono_reflection_body_get_object): Fill out local
2973 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
2976 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
2977 'local_var_sig_token'.
2979 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
2981 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
2984 * reflection.c (mono_method_body_get_object): Handle abstract and
2987 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
2989 * marshal.c, loader.c, class-internals.h, reflection.c:
2990 store the emthod data for a wrapper in an array instead of a list.
2992 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
2994 * marshal.c: change the code to allocate memory more
2995 conservatively for method wrappers.
2997 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
2999 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
3000 fields from MonoClass to the marshal info structure where they belong.
3002 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3004 * class.c, object.c, class-internals.h, marshal.c: rearrange
3005 some fields and tweak some types to lower memory usage.
3007 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
3009 * threads.c (signal_thread_state_change): Handle the case when the
3010 target thread is the current thread.
3012 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
3014 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
3015 emit_ptr_to_object_conv.
3017 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
3018 marshalling. Fixes #71352.
3020 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3022 * metadata.h, blob.h: move table enum to blob.h so it can be included
3024 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
3025 cut the size of MonoImage/MonoDynamicImage.
3027 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
3029 * profiler.c (mono_profiler_install_simple): Fix default arguments.
3031 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3033 * reflection.c, reflection.h, icall.c: add a function to check
3034 if an attribute type is defined for a metadata object.
3036 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
3038 * object-internals.h: Added some needed fields from StringBuilder class.
3039 * marshal.c: Set the maxCapacity when creating a StringBuilder.
3041 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
3043 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
3044 threads before shutting down the runtime.
3046 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
3048 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3050 * object-internal.h, threads.c: implement stacksize and
3051 parameterized thread start functionality (requires
3052 matching corlib). Marked broken code for later removal.
3054 2005-01-12 Martin Baulig <martin@ximian.com>
3056 * class-internals.h (MonoGenericClass): Moved the `initialized'
3057 flag to MonoDynamicGenericClass, removed `init_pending'.
3058 (MonoGenericInst): Added `is_reference' flag.
3060 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
3062 * reflection.c (mono_image_create_pefile): Only set the pe_offset
3063 inside the MSDOS header. Fixes #71201.
3065 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
3067 (mono_domain_finalize): Ditto.
3069 2005-01-12 Martin Baulig <martin@ximian.com>
3071 * class.c (mono_get_shared_generic_class): Use the cache for
3072 non-dynamic generic classes.
3074 * class-internals.h (mono_class_create_generic_2): Removed
3075 function prototype, this function is now static inside class.c.
3077 * class.c (mono_class_create_generic_2): Made this static, only
3078 call it from mono_class_init() and mono_class_setup_parent().
3079 (collect_implemented_interfaces_aux): Call mono_class_init() on
3080 the interfaces we collect.
3081 (mono_class_setup_vtable): Call mono_class_init (class->parent).
3083 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
3085 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
3086 it a real thread handle.
3088 * domain-internals.h: Move exvar_offset from MonoJitInfo to
3089 MonoJitExceptionInfo, since each catch clause needs its own variable.
3091 2005-01-11 Dick Porter <dick@ximian.com>
3093 * image.c (mono_pe_file_open): New variant on mono_image_open()
3094 that does not set up the CLI metadata; used for FileVersionInfo so
3095 it can get the data for windows binaries too.
3097 * process.c (process_read_string_block): Don't read off the end of
3098 the StringTable block.
3100 These both fix bug 70766.
3102 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
3104 * gc.c: set some fields to NULL at GC cleanup time.
3105 * threads.c: if we quit the main thread, call exit ().
3107 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
3109 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
3111 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
3113 * threads.h, threads.c, object.c: added accessor and settor for
3114 main_thread. Handle it specially when exiting from it: wait
3115 for other foreground threads to exit.
3117 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
3119 * process.c, verify.c: remove some bloat.
3121 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
3123 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
3124 the calling convention to cdecl under win32.
3126 2005-01-08 Ben Maurer <bmaurer@ximian.com>
3128 * object.c (mono_object_get_size): New function to get the size of
3131 * profiler.c (simple_allocation): Use above.
3133 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
3135 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
3136 ves_icall_System_AppDomain_getRootDomain (as it's not required to
3137 get an appdomain by it's id and we can't assume the root's id is 0).
3138 * domain-internals.h: Change the function prototype to match.
3139 * icall.c: Change the icall table for AppDomain.
3141 2005-01-08 Miguel de Icaza <miguel@ximian.com>
3143 * locales.c (string_invariant_compare_char): Only compute
3144 GUnicodeTypes in the case where we need them. Test for ordinality
3145 first and return if so.
3150 * FIXME: here we must use the information from c1type and c2type
3151 * to find out the proper collation, even on the InvariantCulture, the
3152 * sorting is not done by computing the unicode values, but their
3153 * actual sort order.
3156 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3158 * loader.c: for P/Invoke methods, allow the "Internal" shared
3159 library name to refer to the calling process symbol namespace.
3161 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
3163 * Makefile.am: Add the security manager to the build.
3164 * security-manager.c|h: New. Initialization of the security manager.
3166 2005-01-07 Dick Porter <dick@ximian.com>
3169 * monitor.c: Update thread state during Monitor and WaitHandle
3170 waits. Fixes bug 71031.
3172 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
3174 * reflection.c (property_encode_signature): Correctly handle when the
3175 property has no methods.
3177 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
3179 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
3181 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
3182 fields from mb, not rmb. Fixes #71017.
3184 * marshal.c (emit_ptr_to_str_conv): Add support for
3185 ByValTStr -> string conversion. Fixes #71015.
3187 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
3189 * mempool.c (mono_mempool_contains_addr): New helper function.
3191 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
3193 * metadata.c (mono_metadata_compute_size): Fix size calculation of
3194 HasSematics encoded fields.
3196 * metadata.c (mono_type_to_unmanaged): Improve error message for
3197 invalid string marshalling.
3199 * metadata.c: Fix warnings.
3201 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3203 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
3206 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
3208 * domain.c object.c domain-internals.h: Revert part of r38077 since the
3209 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
3212 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
3214 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
3215 so methods containing these can be AOTed.
3217 2005-01-03 Martin Baulig <martin@ximian.com>
3219 * loader.c (find_method): Removed the hack for generic instances.
3220 (method_from_memberref): If our parent is a generic instance, pass
3221 its generic type definition to find_method() and then inflate the
3223 (mono_get_method_constrained): Pass the generic type definition to
3224 find_method() and inflate the method later.
3226 * class-internals.h (MonoStats): Added `generic_class_count'.
3228 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
3229 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
3231 * reflection.c (mono_custom_attrs_from_params): Don't ignore
3232 generic type definitions.
3234 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
3236 * loader.c icall.c: Fix warnings.
3238 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
3240 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
3241 blittable types. Fixes #70864.
3243 2004-12-29 Martin Baulig <martin@ximian.com>
3246 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
3248 * reflection.c (mono_method_get_object): Create a
3249 "System.Reflection.MonoGenericMethod" for inflated methods; don't
3250 call mono_get_inflated_method().
3252 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
3254 2004-12-27 Martin Baulig <martin@ximian.com>
3256 * class-internals.h (MonoMethod): Added `is_inflated' flag.
3257 (MonoMethodInflated): Added `inflated' field.
3259 * class.c (mono_class_inflate_generic_method): Don't really
3260 inflate the method here; just set the `is_inflated' flag in the
3262 (mono_class_get_inflated_method): Actually inflate the method here
3263 if it's not already inflated; we use the MonoMethodInflated's new
3264 `inflated' field as a cache.
3266 2004-12-26 Martin Baulig <martin@ximian.com>
3269 (inflate_generic_class): Moved some code out of inflate_generic_type().
3270 (mono_class_inflate_generic_method): If we're already inflated,
3271 inflate the context and use the declaring method; ie. make sure
3272 the declaring method of an inflated method is always the generic
3274 (mono_class_create_from_typedef): Create
3275 `class->generic_container->context->gclass'.
3277 2004-12-24 Ben Maurer <bmaurer@ximian.com>
3279 * metadata-internals.h, marshal.c, reflection.c: More
3280 MonoGHashTable->GHashTable.
3282 * domain-internals.h, class.c: Change MonoGHashTable's into
3283 GHashTables for some cases where no gc stuff is used
3285 All users: update apis
3287 2004-12-23 Ben Maurer <bmaurer@ximian.com>
3289 * metadata.c (builtin_types): Make this `const'. Makes this get
3290 put into the shareable section.
3291 (mono_metadata_init): Casts to make gcc happy.
3293 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
3295 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
3297 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
3299 * icall.c: Added an internal call to retrieve the position and length
3300 of assembly-level declarative security attributes (RequestMinimum,
3301 RequestOptional and RequestRefuse). This is used by the Assembly class
3302 to re-create the corresponding permission sets.
3304 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
3306 * marshal.c: fix the stelemref wrapper to be type correct
3309 2004-12-20 Ben Maurer <bmaurer@ximian.com>
3311 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
3312 to do key & 0x7fffffff. Hashtable already does this. It just
3313 results in longer code.
3315 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
3317 * appdomain.c: Bump corlib version.
3318 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
3319 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
3320 * reflection.c|h: Add functions to get declarative security infos
3321 (blob position and length) for assemblies, classes and methods.
3323 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
3325 * reflection.c: sort the constant table (bug #70693).
3327 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
3329 * object-internals.h, threads.c, domain.c: add accessors for
3330 the MonoThread and MonoDomain tls keys.
3332 2004-12-18 Martin Baulig <martin@ximian.com>
3334 * class.c (inflate_generic_type): If we're inflating a generic
3335 instance, set `ngclass->context->container = context->container';
3336 ie. the container we inflated into.
3338 * metadata.c (mono_metadata_parse_generic_param): Reflect above
3339 inflate_generic_type() changes.
3341 2004-12-17 Martin Baulig <martin@ximian.com>
3344 (MonoGenericClass): Replaced `MonoType *generic_type' with
3345 `MonoClass *generic_class'. Removed `dynamic_info'; if
3346 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
3347 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
3349 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
3351 * exception.c (mono_exception_from_token): New helper function.
3353 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
3355 * assembly.c (mono_assembly_load_with_partial_name): Call
3356 mono_assembly_loaded before invoking the preload hooks. Fixes
3359 * object-internals.h (MonoThread): Change culture_info and
3360 ui_culture_info into an array.
3362 * threads.c: Cache culture info objects from more than one appdomain.
3364 * threads.c threads-types.h icall.c: Add icalls for manipulating the
3367 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
3369 * threads.h threads.c appdomain.c: Clear the culture_info field of
3370 all threads during unloading if they point to an object in the dying
3373 2004-12-13 Ben Maurer <bmaurer@ximian.com>
3375 * culture-info.h (TextInfoEntry): New struct
3376 * object-internals.h: sync with managed
3377 * locales.c: fill the `text_info_data' field
3378 * culture-info-tables.h: update
3380 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
3382 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
3385 2004-12-12 Ben Maurer <bmaurer@ximian.com>
3387 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
3388 (ves_icall_ModuleBuilder_getMethodToken): Ditto
3390 2004-12-12 Martin Baulig <martin@ximian.com>
3392 * mono-debug-debugger.c (write_type): If we're an enum and the
3393 builtin types have already been initialized, call mono_class_init().
3395 2004-12-11 Martin Baulig <martin@ximian.com>
3397 * metadata.c (mono_metadata_load_generic_params): Added
3398 `MonoGenericContainer *parent_container' argument; automatically
3399 compute `container->is_method'; pass the correct owner to
3402 * reflection.c (compare_genericparam): Sort the GenericParam table
3403 according to increasing owners.
3405 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
3407 * profiler.c: allow disabling the default profiler.
3409 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
3411 * decimal.c, icall.c: allow disabling System.Decimal support.
3413 2004-12-09 Marek Safar <marek.safar@seznam.cz>
3415 * reflection.c: Add support for null attribute arguments.
3417 2004-12-09 Martin Baulig <martin@ximian.com>
3419 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
3420 names to get rid of compiler warnings.
3422 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
3424 * marshal.c (mono_marshal_get_struct_to_ptr): Call
3425 mono_marshal_load_type_info (). Fixes #69625.
3426 (mono_marshal_get_ptr_to_struct): Likewise.
3428 2004-12-08 Martin Baulig <martin@ximian.com>
3430 * mono-debug.h: Bumped version number to 47.
3432 * mono-debug-debugger.c
3433 (mono_debugger_event_handler, mono_debugger_event): Take two
3434 guint64 arguments insteed of a gpointer and a guint32.
3436 2004-12-08 Martin Baulig <martin@ximian.com>
3438 * debug-mono-symfile.h
3439 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
3440 `address' to `native_offset'.
3442 2004-12-08 Martin Baulig <martin@ximian.com>
3444 * class.c (mono_class_create_from_typespec): Only inflate if we
3445 either have `context->gclass' or `context->gmethod'.
3447 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
3449 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
3451 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
3453 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
3455 * reflection.c (mono_assembly_get_object): Remove the workaround put
3458 * appdomain.c: Use the corlib_internal field from MonoAssembly.
3460 * appdomain.c: Bump corlib version.
3462 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
3463 be visible in other appdomains.
3465 2004-12-07 Ben Maurer <bmaurer@ximian.com>
3467 * threads.c: Interlocked inc and dec for longs were messed up,
3468 use a KISS based impl for this. Fixes 70234
3470 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
3472 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
3474 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
3476 * icall.c: fix to follow policy not to allow struct
3477 arguments in icalls.
3479 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3481 * process.c: make the patch that handles spaces in file paths work
3482 on mono/windows too.
3484 2004-12-06 Martin Baulig <martin@ximian.com>
3486 * class.c (mono_class_create_generic): Call
3487 mono_class_setup_supertypes() if we're dynamic.
3488 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
3490 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
3492 * object-internals.h: Add new fields to MonoThread.
3494 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3496 * icall.c threads-types.h threads.c: Add new icalls.
3498 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
3500 * object-internals.h (MonoReflectionAssembly): Sync object layout with
3503 * appdomain.c: Bump corlib version.
3505 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
3506 internal assemblies. Fixes #69181.
3508 2004-12-05 Martin Baulig <martin@ximian.com>
3510 * class.c (mono_class_inflate_generic_signature): Make this a
3511 no-op if `context' is NULL or we don't have any type parameters;
3512 also copy `sentinelpos'.
3514 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
3516 * image.c: Add unbox_wrapper_cache.
3518 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
3520 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
3523 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
3526 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
3528 2004-12-04 Martin Baulig <martin@ximian.com>
3530 * loader.c (mono_method_get_signature_full): New public function;
3531 like mono_method_get_signature(), but with an additional
3532 `MonoGenericContext *' argument.
3534 * class.c (mono_class_inflate_generic_signature): Formerly known
3535 as inflate_generic_signature(); make this public.
3537 2004-12-04 Martin Baulig <martin@ximian.com>
3540 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
3541 instead of a `MonoGenericContainer *'.
3542 (mono_metadata_parse_array_full): Likewise.
3543 (mono_metadata_parse_signature_full): Likewise.
3544 (mono_metadata_parse_method_signature_full): Likewise.
3545 (mono_metadata_parse_generic_inst): Likewise.
3546 (mono_metadata_parse_generic_param): Likewise.
3547 (mono_metadata_parse_mh_full): Likewise.
3548 (mono_type_create_from_typespec_full): Likewise.
3550 2004-12-03 Martin Baulig <martin@ximian.com>
3552 * class-internals.h (MonoGenericContainer): Replaced the
3553 `MonoGenericContext * pointer with a `MonoGenericContext'
3554 structure and made it the first element.
3556 2004-12-03 Martin Baulig <martin@ximian.com>
3559 (inflate_generic_type): Set the `context->container' when creating
3560 a new MonoGenericContext.
3561 (mono_class_inflate_generic_method): Likewise.
3562 (mono_class_create_from_typespec): Just use `context->container'
3563 to get the container.
3565 * loader.c (method_from_methodspec): Set `context->parent' from
3566 `context->container' - and if that's a method container, use its
3567 parent. Also set the `context->container' when creating a new
3569 (mono_get_method_from_token): Use just `context->container' to get
3572 * metadata.c (do_mono_metadata_parse_generic_class): Also set
3573 `gclass->context->container'.
3575 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
3576 the `context->container' when creating a new MonoGenericContext.
3578 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
3580 * reflection.c (compare_genericparam): Sort params with identical
3581 owner by their number. Fixes gen-111 on sparc.
3583 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
3585 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
3586 around the domain changes.
3588 * appdomain.c (mono_domain_unload): Handle the case when the thread
3589 calling Unload is itself being aborted during unloading. Fixes #70022.
3591 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
3593 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
3594 checkpoint_func as an icall so it gets a wrapper.
3595 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
3596 in the cross-appdomain wrappers too.
3598 * threads.c (mono_thread_has_appdomain_ref): Make this public.
3600 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
3602 * reflection.c: Fix some memory leaks.
3604 2004-12-02 Martin Baulig <martin@ximian.com>
3606 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
3608 * metadata.c (generic_class_cache): New static hashtable.
3609 (mono_metadata_lookup_generic_class): New public method.
3611 2004-12-02 Martin Baulig <martin@ximian.com>
3613 * class.c (mono_class_create_from_typedef): Call
3614 mono_class_setup_parent() and mono_class_create_mono_type() before
3615 parsing the interfaces.
3617 2004-12-02 Martin Baulig <martin@ximian.com>
3619 * metadata.c (generic_inst_cache): New static hashtable.
3620 (mono_metadata_lookup_generic_inst): New public function.
3621 (mono_metadata_inflate_generic_inst): New public function.
3622 (mono_metadata_parse_generic_inst): New public function.
3623 (do_mono_metadata_parse_generic_class): Use the new
3624 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
3625 since this'll also use the cache.
3627 * reflection.c (mono_reflection_bind_generic_method_parameters):
3628 Use mono_metadata_lookup_generic_inst() to use the new cache.
3630 * class.c (inflate_mono_type): Use
3631 mono_metadata_inflate_generic_inst() to inflate a generic
3632 instance; this'll also use the new cache.
3634 * loader.c (method_from_methodspec): Use
3635 mono_metadata_parse_generic_inst() and
3636 mono_metadata_inflate_generic_inst() rather than parsing it
3637 manually, so we can use the new cache.
3639 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
3641 * threads.c (wait_for_tids): Do not incorrectly free threads when
3644 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3646 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
3647 iter->args based on whether parameters are passed in registers (i.e.
3648 MONO_ARCH_REGPARMS is defined)
3650 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
3652 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
3653 the exception message. Fixes #70070.
3654 (method_from_methodspec): Fix warnings.
3656 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3658 * process.c: (complete_path) return the path quoted
3660 2004-12-01 Martin Baulig <martin@ximian.com>
3662 * class-internals.h (MonoGenericInst): New structure.
3663 (MonoGenericClass): Replaced `type_argc', `type_argv' and
3664 `is_open' with `MonoGenericInst *inst'.
3665 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
3666 `is_open' with `MonoGenericInst *inst'.
3668 2004-11-30 Martin Baulig <martin@ximian.com>
3670 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
3672 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
3673 to `generic_class_cache'.
3676 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
3677 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
3678 (mono_generic_inst_is_valuetype): Renamed to
3679 mono_generic_class_is_valuetype().
3682 (MonoGenericInst): Renamed to MonoGenericClass.
3683 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
3684 (MonoClass): Renamed `generic_inst' to `generic_class'.
3685 (MonoGenericContext): Renamed `ginst' to `gclass'.
3687 * object-internals.h
3688 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
3690 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
3691 mono_reflection_generic_class_initialize().
3693 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
3694 now known as "System.Reflection.MonoGenericClass".
3695 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
3697 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
3699 * class-internals.h: Added a flag field to MonoClass to cache the
3700 declarative security attributes actions associated with the class.
3701 * domain-internals.h: Added booleans to MonoJitInfo to cache the
3702 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
3703 applicable to the JITted method.
3704 * reflection.c|h: Added functions to extract (as flags) which security
3705 actions are available (declaratively) for a method, class or assembly.
3706 * metadata.c|h: Added functions to search the declarative security
3707 table in the metadata.
3709 2004-11-29 Ben Maurer <bmaurer@ximian.com>
3711 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
3712 EXPORTEDTYPES are already in the class name cache, so there is no
3713 need to add extra code here to look at them. Just removes a bit of
3716 (ves_icall_System_Environment_get_TickCount): No need for #if
3717 WINDOWS. We already have the code in io-layer.
3719 2004-11-28 Martin Baulig <martin@ximian.com>
3722 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
3725 2004-11-27 Miguel de Icaza <miguel@ximian.com>
3727 * assembly.c (do_mono_assembly_open): Instead of having a
3728 conditional WITH_BUNDLE, incorporate support for bundles here, by
3729 having a global `bundles' variable holding a pointer to the actual
3732 (mono_register_bundled_assemblies): New API call used by the
3735 See mkbundle.1 for details.
3737 2004-11-27 Martin Baulig <martin@ximian.com>
3739 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
3740 the vtable for generic methods.
3742 2004-11-26 Martin Baulig <martin@ximian.com>
3745 (mono_metadata_generic_method_hash): New public function.
3746 (mono_metadata_generic_method_equal): Likewise.
3749 (MonoGenericContainer): Added `GHashTable *method_hash'.
3751 * reflection.c (ReflectionMethodBuilder): Added
3752 `MonoGenericContainer *generic_container'.
3753 (reflection_methodbuilder_to_mono_method): Don't create a new
3754 MonoGenericContainer each time we're called.
3755 (mono_reflection_bind_generic_method_parameters): Use
3756 `container->method_hash' to cache the results so we don't create a
3757 different method if we're called several times with the same
3760 * loader.c (method_from_methodspec): Use the new
3761 `container->method_hash' here, too.
3763 2004-11-26 Martin Baulig <martin@ximian.com>
3765 * class.c (inflate_generic_signature): Correctly compute
3766 `res->has_type_parameters'.
3767 (mono_class_vtable): Use the `has_type_parameters' flag to
3768 determine whether we're a generic method.
3770 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
3772 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
3774 * object.c (mono_runtime_run_main): Fix a small memory leak.
3776 2004-11-25 Martin Baulig <martin@ximian.com>
3778 * class.c (set_generic_param_owner): Fixed the loop.
3780 2004-11-25 Martin Baulig <martin@ximian.com>
3782 * object.c (mono_class_vtable): Don't create any JIT wrappers for
3785 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
3787 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
3788 names. Fixes #69787.
3790 2004-11-24 Martin Baulig <martin@ximian.com>
3792 * class.c (mono_class_create_generic_2): If we don't have a
3793 `ginst->parent', inflate `gklass->parent' to get our parent.
3795 2004-11-24 Martin Baulig <martin@ximian.com>
3797 * reflection.c (compare_genericparam): Correctly sort the
3798 GenericParam table; fixes #69779.
3800 2004-11-23 Ben Maurer <bmaurer@ximian.com>
3802 * reflection.c: When writing a PE file, don't create a huge
3803 buffer in memory. Just write the arrays we have to the file.
3804 This reduces memory usage.
3806 * metadata-internals.h: MonoDynamicStream pefile is no longer used
3809 2004-11-17 Martin Baulig <martin@ximian.com>
3811 * class.c (mono_class_init): Don't setup `class->parent' for
3812 dynamic instances; moved this to mono_class_generic_2().
3813 (mono_class_create_generic): Also set `klass->inited' for dynamic
3815 (mono_class_create_generic_2): Don't do anything for dynamic
3816 generic instances. Set `klass->parent' here and also call
3817 mono_class_setup_parent() here.
3819 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
3820 `MonoType *parent' argument; set `ginst->parent' before calling
3821 mono_class_create_generic_2(), so we set the correct parent.
3823 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
3825 * reflection.c: allow getting attributes from ModuleBuilder
3828 2004-11-17 Martin Baulig <martin@ximian.com>
3830 * class.c (mono_class_create_from_typedef): If a type parameter is
3831 inherited from an outer class, set its owner to that class.
3833 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
3835 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
3836 for (int*) written size. This fixes bug #69592.
3838 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
3840 * icall.c: Added IsAuthenticodePresnet internal call.
3841 * image.c|h: New function that check a MonoImage for an Authenticode
3842 signature in the certificate PE data directory.
3843 * security.c|h: New internal call to ask the runtime if an
3844 Authenticode signature seems referenced in the PE header.
3846 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
3848 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
3850 * reflection.c (mono_image_create_pefile): Free the assembly streams
3851 after writing out the assembly file.
3853 * object.c (mono_runtime_run_main): Fix small memory leak.
3855 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
3856 property access modifiers. Fixes #69389.
3858 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
3860 * domain.c, object.c, object-internals.h, domain-internals.h,
3861 object.h, marshal.c: keep dynamic code info per domain.
3863 2004-11-15 Martin Baulig <martin@ximian.com>
3865 * class.c (mono_type_get_name_recurse): Put type arguments in
3866 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
3869 2004-11-15 Martin Baulig <martin@ximian.com>
3871 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
3872 (mono_class_setup_vtable): When computing `the_cname' for a
3873 generic instance, don't include the namespace since we'd otherwise
3876 2004-11-15 Martin Baulig <martin@ximian.com>
3878 * class.c (mono_class_create_generic): Changed return type to void.
3879 (mono_class_create_generic_2): New public function; setup
3880 `class->method', `class->field' and `class->interfaces' here
3881 instead of in mono_class_init().
3883 * class.h (mono_class_create_generic): Moved to class-internals.h.
3885 2004-11-14 Ben Maurer <bmaurer@ximian.com>
3887 * reflection.c (mono_image_create_pefile): take a file HANDLE.
3888 rather than writing to memory, write to this file. Right now,
3889 we are just writting into a buffer, and copying that. However
3890 we can avoid the buffer later.
3892 (mono_dynamic_stream_reset): new function
3894 * icall.c, object-internals.h: update for the above.
3896 2004-11-13 Ben Maurer <bmaurer@ximian.com>
3898 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
3899 have been using gc'd memory. First it is slower, unlikely
3900 the comment in the source code said, secondly, it increases
3901 our footprint to do it in the gc.
3903 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
3904 the method so that it does not have to copy to managed code.
3906 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
3908 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
3910 2004-11-12 Martin Baulig <martin@localhost>
3912 * reflection.c (mono_image_create_token): Allow generic method
3913 definitions here, since they may appear in an `.override'; see
3914 gen-98/gen-99 for an example.
3916 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
3918 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
3921 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
3924 2004-11-11 Martin Baulig <martin@ximian.com>
3926 * class.c (mono_class_setup_vtable): In an explicit interface
3927 implementation, the method name now includes the arity.
3929 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
3931 * object.c (mono_array_full_copy): Fix warning.
3933 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
3935 * appdomain.c: Removed look_for_method_by_name(). Use the new method
3936 mono_class_get_method_from_name() instead.
3938 * class-internals.h: Added two new types of wrappers.
3939 Added MonoRemotingTarget enum. Added new trampoline function type, which
3940 takes an additional MonoRemotingTarget value as parameter, so it is
3941 possible to request a trampoline for a specific target.
3943 * class.c: Added new mono_class_get_method_from_name() method.
3945 * class.h: In MonoRemoteClass, we can have now to vtables, one for
3946 general remoting sinks and one specific for cross domain calls.
3948 * debug-helpers.c: Added new wrapper names.
3950 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
3953 * image.c: Porperly delete value objects form the remoting invoke hashtable.
3955 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
3956 with several other methods (mono_marshal_get_xappdomain_dispatch,
3957 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
3958 and others) can generate a fast remoting wrapper for cross domain calls.
3959 More information can be found in docs/remoting.
3960 Other changes: Removed mono_find_method_by_name, and used
3961 mono_class_get_method_from_name instead.
3962 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
3963 is stored in the remoting invoke hashtable.
3965 * marshal.h: published the new method for getting the xdomain wrapper,
3966 and also added a method for getting the adequate wrapper for a given
3969 * object-internals.h, object.c: Added a couple of methods for capying and
3971 Modified mono_install_remoting_trampoline, which takes the new remoting
3972 trampoline that has a remoting target as parameter.
3973 mono_class_proxy_vtable now also takes a remoting target as parameter, and
3974 will return the most suitable vtable for the target.
3975 Added mono_remote_class_vtable, which returns the vtable of a remote class
3976 (which can be the normal remoting vtable or the xdomain vtable).
3978 * threads.c: the xdomain invoke and dispatch wrappers must also be
3979 protected against interruptions.
3981 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3983 * icall.c: use memmove in BlockCopyInternal when the source and
3984 destination arrays are the same.
3986 2004-11-09 Martin Baulig <martin@ximian.com>
3988 * class-internals.h (MonoGenericContainer): Removed `method' and
3989 `signature', replaced them with `is_method' and `is_signature'
3990 flags. Added `context'.
3992 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
3993 instead of a `MonoGenericContainer *'.
3995 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
3996 for dynamic type parameters.
3997 (mono_metadata_load_generic_params): Setup `container->context'.
3999 * reflection.c (mono_reflection_setup_generic_class): Setup
4000 `tb->generic_container->context'.
4001 (do_mono_reflection_bind_generic_parameters): Use
4002 mono_class_inflate_generic_type() to correctly inflate types,
4003 rather than using our own hack just for MONO_TYPE_VAR.
4005 2004-11-09 Martin Baulig <martin@ximian.com>
4007 * class.c (mono_class_inflate_generic_method): Small fix; don't
4011 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
4012 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
4013 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
4014 (ves_icall_Type_BindGenericParameters): Likewise.
4015 (ves_icall_Type_get_IsGenericInstance): Likewise.
4016 (ves_icall_Type_GetGenericParameterPosition): Likewise.
4017 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
4018 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4019 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4021 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
4023 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
4024 assembly versions and public key tokens. Fixes #69113.
4026 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
4028 * metadata.c: fix bug introduced with the type cache changes
4031 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
4033 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
4034 the MonoClass pointer instead of the token in exception clauses.
4035 * reflection.c: updates for the above and make the code not depend
4036 on the structure of MonoExceptionClause.
4038 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
4040 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4041 Add support for dynamic assemblies. Fixes #69114.
4043 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
4045 2004-11-07 Ben Maurer <bmaurer@ximian.com>
4047 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
4048 since most only those methods use it. the code member of
4049 MonoMethodPInvoke was dead, so that can be removed too. Also,
4050 remove inline_count (again, not used), and move slot so that it
4051 can share bits with some other flags. This saves 8 bytes in the
4052 structure and gives us about 50 kb back for mcs helloworld.cs
4054 * *.[ch]: Do naming changes for the above.
4056 * loader.c (mono_method_get_header): Lazily init the header
4058 (mono_get_method_from_token): don't init the header here
4059 (mono_free_method): the header may never be allocated
4061 Overall, this saves 150 kb of unmanaged allocations
4062 for mcs helloworld.cs. That accounts for 10% of the unmanaged
4065 * loader.c, loader.h (mono_method_get_header): new accessor.
4067 * *.[ch]: use the above method. Prepares us to lazily load
4070 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
4071 three warnings, which are actual bugs (see 69206).
4073 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
4074 unused. Saves a cool 4 bytes / method.
4076 2004-11-06 Ben Maurer <bmaurer@ximian.com>
4078 * metadata.c (builtin_types): Add types for System.Object here.
4079 (mono_metadata_parse_type_full): Cache MonoType*'s that are
4080 for a class or valuetype from klass->this_arg or klass->byval_arg.
4082 On mcs for a hello world, this gets us down from 21836 MonoType's
4085 (mono_metadata_free_type): Account for the above change.
4087 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
4089 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
4090 exception instead of asserting if name is null.
4091 (ves_icall_System_AppDomain_GetData): Ditto.
4093 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
4095 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
4098 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
4099 Return NULL when the domain does not have entry_assembly set.
4101 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
4102 Add a 'resource_modules' argument.
4103 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
4105 * reflection.c (mono_reflection_create_runtime_class): Move setting
4106 of wastypebuilder here, so mono_get_type_object () returns a MonoType
4109 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
4110 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
4111 Throw an ArgumentNullException if 'ptr' is null.
4113 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
4114 assemblies here. Fixes #69020.
4116 2004-11-05 Geoff Norton <gnorton@customerdna.com>
4118 * reflection.c (build_compressed_metadata): Fix the previous patch for
4119 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
4122 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
4124 * assembly.c (mono_assembly_names_equal): Allow a match if one of
4125 the cultures is false. Fixes #69090.
4127 * reflection.c (build_compressed_metadata): Fix invalid memory read
4128 detected by valgrind.
4130 * reflection.c (mono_reflection_get_type): Avoid triggering a
4131 TypeResolve multiple times for the same type. Fixes #65577.
4133 2004-11-04 Ben Maurer <bmaurer@ximian.com>
4135 * marshal.c: Avoid using ldftn to call managed functions. It is
4136 much slower than just a call.
4138 * reflection.c (mono_module_get_object): free the basename we
4139 allocate here from glib.
4141 * reflection.c (ensure_runtime_vtable): make sure to free
4142 overrides. Also, we were allocating an array of MonoMethod not an
4143 array of MonoMethod*.
4145 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
4147 * image.c (mono_image_close): free image->guid here.
4149 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
4151 * reflection.c: Fix some spec conformance issues with the PE file
4152 structures so mcs compiled apps run on the Net 2.0 beta.
4154 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
4156 * string-icalls.c (ves_icall_System_String_ctor_encoding):
4157 Implement this. Fixes #67264.
4159 * debug-helpers.h debug-helpers.c marshal.c: Move
4160 mono_find_method_by_name to debug-helpers.c.
4162 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
4164 * object.c (mono_release_type_locks): type_initialization_hash is
4167 * reflection.c object.c object-internals.h: Fix warnings.
4169 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
4170 without accessors. Fixes #61561.
4172 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
4173 application base from the root domain if not set. Fixes #65641.
4174 (mono_runtime_init): Fix warning.
4176 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4178 * appdomain.c: call mono_thread_pool_init.
4179 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
4180 of worker threads based on the number of CPUs and the environment
4181 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
4182 for non-windows (windows) systems.
4184 2004-10-27 Chris Toshok <toshok@ximian.com>
4186 * mono-debug-debugger.c (write_class): don't call mono_class_init
4187 here, as even with the check for (!klass->init_pending), we get
4188 into a situation where we're hitting cycles in class
4189 initialization. Fixes #68816.
4191 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
4193 * image.c: Avoid overwriting values in the loaded_images_hash when an
4194 assembly is loaded multiple times. Fixes #61152.
4196 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
4197 so multiple satellite assemblies for the same name can be loaded.
4200 * mono_domain_assembly_preload: Actually return the loaded assembly,
4203 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
4204 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
4206 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
4207 pending finalizers are not invoked after the appdomain has been
4208 unloaded. Fixes #67862.
4210 2004-10-22 Martin Baulig <martin@ximian.com>
4212 * mono-debug-debugger.c
4213 (mono_debugger_runtime_invoke): Don't box valuetypes.
4215 2004-10-22 Chris Toshok <toshok@ximian.com>
4217 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
4218 don't hide private methods.
4220 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
4222 * icall.c: Allows the runtime to "share" (when known) the public key
4223 token of an assembly. This avoid the need to recalculate the token
4224 (from the public key) in managed code.
4226 2004-10-21 Chris Toshok <toshok@ximian.com>
4228 * debug-helpers.c (append_class_name): argh, revert last patch.
4230 2004-10-21 Chris Toshok <toshok@ximian.com>
4232 * debug-helpers.c (append_class_name): use '+' as the delimiter,
4233 not '/', so that it matches what the debugger uses to look up
4236 2004-10-21 Martin Baulig <martin@ximian.com>
4238 * mono-debug-debugger.c (mono_debugger_throw_exception): New
4239 public method; this is called each time an exception is thrown and
4240 allows the debugger to use exception catch points.
4242 2004-10-21 Martin Baulig <martin@ximian.com>
4244 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
4245 the stack pointer and the exception object in some struct and pass
4246 that to the debugger.
4248 2004-10-21 Chris Toshok <toshok@ximian.com>
4250 * mono-debug-debugger.c (do_write_class): add instance/static
4251 event support. We don't expose "raise" or "other" yet.
4252 (event_is_static): new method.
4254 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
4256 * mono-debug-debugger.c
4257 (mono_debugger_handle_exception): Remove
4258 bogus return value for fussy compilers.
4260 2004-10-20 Martin Baulig <martin@ximian.com>
4262 * mono-debug-debugger.c
4263 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
4264 (mono_debugger_handled_exception): Likewise.
4266 2004-10-20 Martin Baulig <martin@ximian.com>
4268 * mono-debug-debugger.h (MonoDebuggerEvent): Added
4269 MONO_DEBUGGER_EVENT_EXCEPTION.
4271 * mono-debug-debugger.c (mono_debugger_handle_exception): New
4272 public function to send the debugger a notification for an
4273 exception and inform it about a catch/finally clause.
4275 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
4277 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
4278 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
4281 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
4283 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
4285 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
4286 marshalled as [In,Out]. Fixes #58325.
4288 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
4290 * reflection.c (mono_method_body_get_object): Implement some fields.
4292 2004-10-12 Martin Baulig <martin@ximian.com>
4294 * reflection.c (mono_reflection_bind_generic_parameters): Small
4295 fix, correctly retrieve our parent from a generic instance.
4297 2004-10-12 Martin Baulig <martin@ximian.com>
4299 * metadata.c (mono_metadata_generic_param_equal): We always have
4303 (mono_class_from_generic_parameter): We need to have an owner.
4304 (my_mono_class_from_generic_parameter): Likewise.
4306 * reflection.c (mono_reflection_setup_generic_class): Renamed to
4307 mono_reflection_create_generic_class() and added a new
4308 mono_reflection_setup_generic_class().
4309 (mono_reflection_initialize_generic_param): If we're a nested
4310 generic type and inherited from the containing class, set our
4311 owner to the outer class.
4313 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
4315 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
4317 * reflection.c (mono_method_body_get_object): New function to create
4318 a MethodBody object.
4320 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
4322 2004-10-11 Martin Baulig <martin@ximian.com>
4324 * metadata.c (_mono_metadata_type_equal): Renamed to
4325 do_mono_metadata_type_equal() and made static.
4327 2004-10-11 Martin Baulig <martin@ximian.com>
4329 * appdomain.c: Bump corlib version number to 28.
4331 2004-10-10 Martin Baulig <martin@ximian.com>
4334 (MonoGenericInst): Added `MonoGenericContainer *container'.
4335 (MonoGenericMethod): Likewise.
4336 (MonoGenericContext): Likewise.
4337 (MonoGenericParam): Added `MonoGenericContainer *owner'.
4340 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
4341 (do_mono_metadata_parse_generic_inst): Likewise.
4342 (mono_metadata_parse_type_full): New public method. This is the actual
4343 mono_metadata_parse_type() implementation - with an additional
4344 `MonoGenericContainer *' argument.
4345 (mono_metadata_parse_array_full): Likewise.
4346 (mono_metadata_parse_signature_full): Likewise.
4347 (mono_metadata_parse_method_signature_full): Likewise.
4348 (mono_metadata_parse_mh_full): Likewise.
4349 (mono_type_create_from_typespec): Likewise.
4350 (mono_metadata_interfaces_from_typedef_full): New public method;
4351 this is similar to the other _full() methods, but we take a
4352 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
4353 (mono_metadata_parse_generic_param): Take an additional
4354 `MonoGenericContainer *' argument and lookup the MonoGenericParam
4355 from that container.
4356 (mono_metadata_generic_param_equal): New static method to compare
4357 two type parameters.
4358 (_mono_metadata_type_equal): New static method; takes an
4359 additional `gboolean signature_only' argument - if true, we don't
4360 compare the owners of generic parameters.
4361 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
4362 with a TRUE argument - do a signature-only comparision.
4364 * loader.c: Use the new _full() methods and pass the
4365 MonoGenericContainer to them.
4367 * object-internals.h (MonoReflectionTypeBuilder): Added
4368 `MonoGenericContainer *generic_container' field.
4369 (MonoReflectionMethodBuilder): Likewise.
4371 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
4373 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
4374 case initial images of dynamic assemblies.
4376 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
4378 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
4380 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
4381 length of event->other array.
4382 (typebuilder_setup_events): Ditto.
4384 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
4385 'assembly_by_name' and add an 'assemblies' list.
4387 * assembly.h assembly.c: Add a new search hook for determining whenever
4388 an assembly is already loaded. Use this instead of searching in the
4389 loaded_assemblies list.
4391 * domain.c appdomain.c: Implement the new search hook so loaded
4392 assemblies are now scoped by appdomain. Fixes #67727.
4394 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
4396 * threads.c (mono_thread_attach): Initialize synch_lock field so
4397 mono_thread_detach works again.
4399 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
4400 'lib' too. Fixes #63130.
4402 2004-10-06 Jackson Harper <jackson@ximian.com>
4404 * culture-info-tables.h: regenerated.
4406 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
4408 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
4409 implemented by other interfaces in the result. Fixes #65764.
4411 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4412 Handle unloadable modules without crashing.
4414 * image.c (load_modules): Revert the previous patch since modules must
4415 have a fixed index inside the array.
4417 * image.c (load_modules): Don't include native modules in the modules
4420 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
4422 * reflection.h: Add param_defaults field.
4424 * reflection.c: Add support for parameter defaults in dynamic methods.
4427 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
4428 an empty string when a type has no namespace. Fixes #64230.
4430 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
4432 * tabledefs.h: Added "internal" security actions to support non-CAS
4433 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
4434 Note: they do not seems to be used anymore in 2.0 (new metadata format)
4436 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
4438 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
4439 constructor of abstract class. Fixes #61689.
4441 2004-10-04 Martin Baulig <martin@ximian.com>
4443 * class-internals.h (MonoGenericContainer): New type.
4444 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
4445 `MonoGenericContainer *generic_container'.
4446 (MonoClass): Replaced `gen_params' and `num_gen_params' with
4447 `MonoGenericContainer *generic_container'.
4449 * metadata.c (mono_metadata_load_generic_params): Return a
4450 `MonoGenericContainer *' instead of a `MonoGenericParam *';
4451 removed the `num' argument.
4453 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
4455 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
4458 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
4461 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
4463 * reflection.c: Save pe_kind and machine values into the generated
4466 * appdomain.c: Bump corlib version number.
4468 * object-internals.h: Reorganize layout of LocalBuilder.
4470 * class-internals.h class.c (mono_class_get_implemented_interfaces):
4471 New helper function.
4473 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
4474 created MonoType for dynamic types. Fixes #66180.
4476 2004-10-02 Ben Maurer <bmaurer@ximian.com>
4478 * threadpool.c: the ares hashtable needs a critical section around it.
4479 this prevents some nasty segfaults
4481 2004-10-02 Massimiliano Mantione <massi@ximian.com>
4483 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
4484 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
4487 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
4489 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
4491 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
4493 * image.c: Always canonicalize image file names, to avoid loading
4494 the same assembly twice when referenced using a relative path.
4496 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
4498 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
4500 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
4502 * marshal.c: Fix warnings.
4504 2004-09-29 Geoff Norton <gnorton@customerdna.com>
4506 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
4507 attempting to marshal the delegate_trampoline as the method_addr.
4508 This patch has a static hashtable of marshalled delegates so that
4509 we can map delegate_trampoline addresses back to delegates. This
4510 allows a delegate passed to managed code to be passed back into native
4513 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
4515 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
4517 * reflection.c (method_encode_code): Align method headers properly.
4520 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
4522 * marshal.c: In the runtime invoke wrapper, reset the abort
4523 exception if it is cached. This avoids the automatic rethrowal of
4524 the exception after the catch of the wrapper. Also check for pending
4525 interruptions before calling the managed method. This is done using
4526 the new method emit_thread_force_interrupt_checkpoint, since the
4527 normal checkpoint method is ignored when running the invoke wrapper.
4528 * object.c: If the abort exception is rethrown, set the abort_exc
4529 field of the thread, so it will be rethrown aftere every catch.
4530 * threadpool.c: Only run an interruption checkpoint if what has been
4531 requested is a stop of the thread (aborts will be ignored).
4532 * threads.c: By default, a thread will now never be interrumped while
4533 running the runtime invoke wrapper (this ensures that runtime_invoke
4534 will always return to the caller if an exception pointer is provided).
4535 There is a new special method mono_thread_force_interruption_checkpoint()
4536 to force an interruption checkpoint even if running a protected
4537 wrapper, which is used by the same runtime invoke wrapper to do a check
4540 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
4542 * object.c, object-internals.h: Implemented mono_release_type_locks,
4543 which releases the cctor locks held by a thread.
4544 * threads.c, threads.h: In thread_cleanup, release cctor locks held
4545 by a thread. Added mono_thread_exit() method to be used to safely stop
4548 2004-09-28 Raja R Harinath <rharinath@novell.com>
4550 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4551 Move null check before dereference. Avoid indexing beyond the end
4552 of the 'modules' array.
4554 2004-09-28 Raja R Harinath <rharinath@novell.com>
4556 * metadata-internals.h (MonoImage): Add module_count field.
4557 * image.c (load_modules): Set image->module_count.
4558 (mono_image_load_file_for_image): Use image->module_count.
4559 * reflection.c (mono_image_load_module): Append to image->modules array
4560 of dynamic assembly.
4561 (mono_module_get_object): Fix loop to actually increment index.
4562 Use image->module_count.
4563 * assembly.c (mono_assembly_load_references): Use image->module_count.
4564 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4567 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
4569 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
4570 Avoid assert on generic types.
4572 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
4574 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
4576 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
4578 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
4579 function to convert a MarshalSpec structure to its managed counterpart.
4581 * reflection.c: Fix warnings.
4583 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
4586 * icall.c (mono_create_icall_signature): Fix build.
4588 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
4590 * icall.c: Add MakePointType icall.
4592 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
4595 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4597 * threadpool.c: reuse allocated slots in the queue.
4599 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
4601 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
4603 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
4605 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
4608 * tabledefs.h: Add constants for pinvoke attributes BestFit and
4609 ThrowOnUnmappableChar.
4611 * icall.c (ves_icall_Type_GetPacking): New icall.
4613 2004-09-24 Martin Baulig <martin@ximian.com>
4615 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
4617 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4620 (mono_domain_set): allow setting a domain that is being unloaded.
4621 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
4624 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
4626 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
4627 the GetCustomAttributes icall.
4629 2004-09-23 Martin Baulig <martin@ximian.com>
4631 * object-internals.h (MonoReflectionGenericParam): Replaced
4632 'has_ctor_constraint', `has_reference_type' and `has_value_type'
4633 with `guint32 attrs'.
4635 2004-09-23 Martin Baulig <martin@ximian.com>
4637 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
4639 2004-09-23 Martin Baulig <martin@ximian.com>
4641 * object-internals.h (GenericParameterAttributes): New enum.
4643 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
4645 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
4647 * class.c (init_events): Fill out event->other field.
4649 * class.c: Fix warnings.
4651 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
4653 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
4655 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
4656 walk which doesn't supply the IL offset.
4658 2004-09-22 Martin Baulig <martin@ximian.com>
4660 * reflection.c (mono_reflection_setup_internal_class): If we're
4661 System.ValueType, System.Object or System.Enum, set
4662 `klass->instance_size' and create the vtable.
4663 (mono_reflection_create_internal_class): If we're an enum type,
4664 get the base class from our current corlib.
4666 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
4668 * reflection.h (MonoResolveTokenError): New type.
4670 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
4673 * icall.c: Add an 'error' argument to the ResolveToken icalls.
4675 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
4677 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
4678 Support also calling constructors, but only for already allocated objects.
4680 2004-09-17 Geoff Norton <gnorton@customerdna.com>
4682 * reflection.c (type_get_qualified_name): If the klass is null
4683 return the typename to avoid a NullRefEx.
4684 (encode_cattr_value): Get the qualified name of the boxed type,
4685 not the underlying enumtype. Fixes #62984.
4687 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
4689 * marshal.c: Fix problems with previous checkin.
4691 2004-09-21 <vargaz@freemail.hu>
4693 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
4694 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
4696 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
4698 2004-09-21 Geoff Norton <gnorton@customerdna.com>
4700 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
4701 should only return a type for pointers, arrays, and passbyref types.
4704 2004-09-21 Martin Baulig <martin@ximian.com>
4706 * domain.c (mono_debugger_check_runtime_version): New public
4709 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
4711 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
4713 * reflection.c: Added missing sort to the declarative security
4714 attributes table. MS implementation stops seeing the attributes if the
4715 token number regress in the table (as shown by ildasm and permview).
4717 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
4719 * object-internals.h (MonoReflectionModule): Add 'token' field.
4721 * reflection.c (mono_reflection_get_token): Add support for Module
4723 (mono_module_get_object): Set 'token' field.
4724 (mono_module_file_get_object): Set 'token' field.
4726 * icall.c: Add new Assembly and Module icalls.
4728 * appdomain.c: Bump corlib version.
4730 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
4732 * loader.h loader.c class.h class.c: Add helper functions for obtaining
4733 tokens of metadata objects.
4735 * reflection.h reflection.c (mono_reflection_get_token): New function
4736 to obtain the token of a metadata object.
4738 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
4740 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
4742 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
4744 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
4746 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
4748 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
4749 * object-internals.h: Added 3 MonoArray* members to MonoReflection
4750 AssemblyBuilder to access the permissions set in the class lib.
4751 * reflection.c: Added security attributes encoding step in
4752 mono_image_build_metadata.
4753 * tabledefs.h: Added new security actions defined in 2.0:
4754 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
4756 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
4758 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
4761 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
4763 * locales.c: nullify the ICU_collator member of CompareInfo when it is
4764 finalized. There where random SIGSEVs at program termination, when
4765 an object being finalized was trying to do a string comparison and
4766 the current culture was already finalized.
4768 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4770 * threads.c: call thread_cleanup before finishing the thread if we get
4773 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
4775 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
4776 assemblies from the parent. Fixes #65665.
4778 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
4780 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
4783 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
4785 * reflection.h: add prototype for mono_get_dbnull_object
4786 * reflection.c: add prototypes for get_default_param_value_blobs
4787 and mono_get_object_from_blob for fussier compilers
4789 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
4791 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
4792 false deadlock checks in class initialization.
4794 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
4796 * image.c (mono_image_addref): Fix comment.
4798 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
4801 2004-09-12 Jambunathan K <kjambunathan@novell.com>
4803 * reflection.c (mono_param_get_objects): Modified to return
4804 ParameterInfo.DefaultValue object.
4806 (get_default_param_value_blobs):
4807 (mono_get_object_from_blob):
4808 (mono_get_dbnull_object): New helper routines.
4810 * object.c (mono_get_constant_value_from_blob): New helper routine
4811 carved out from get_default_field_value ()
4813 * object-internals.h (mono_get_constant_value_from_blob): Added
4814 function declaration.
4816 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
4818 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
4819 referenced assemblies. Fixes #62135.
4821 * exception.h exception.c (mono_get_exception_file_not_found2): New
4824 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
4826 * class.h class.c: Add mono_type_get_underlying_type ().
4828 2004-09-09 Geoff Norton <gnorton@customerndna.com>
4830 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
4831 Fix GetTypes() to support dynamically created assemblies.
4833 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
4835 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
4837 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
4840 * reflection.h reflection.c loader.c: Allow dynamic construction of
4841 pinvoke methods. Fixes #65571.
4843 * reflection.c (mono_reflection_get_type): Revert previous change since
4844 it causes regressions.
4846 2004-09-08 Martin Baulig <martin@ximian.com>
4848 * class.c (class_compute_field_layout): Don't call
4849 mono_class_layout_fields() for open generic instances.
4851 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
4852 * threads.c appdomain.c: fix typo in GC macro
4854 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4856 * threads.c: don't call mono_thread_detach() in start_wrapper(),
4857 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
4859 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
4861 * image.c (mono_image_close): Applied patch from
4862 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
4863 assembly is loaded multiple times from data.
4865 * image.c (mono_image_open): Fix warning.
4867 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
4869 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
4872 * reflection.c (mono_reflection_create_runtime_class): Initialize
4873 klass->nested_classes. Fixes #61224.
4875 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
4877 * threads.c: sched_yield() on exit, to allow threads to quit.
4879 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
4881 * object.c (mono_unhandled_exception): Remove leftover debug code.
4883 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
4885 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
4887 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
4889 * marshal.c (emit_marshal_array): Really null terminate string arrays.
4891 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
4893 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
4895 * marshal.c (emit_marshal_array): Null terminate string arrays.
4897 * marshal.c (raise_auto_layout_exception): Fix warning.
4899 * reflection.c (mono_param_get_objects): Initialize the default value
4900 with DBNull.Value, not null. Fixes #62123.
4902 2004-09-01 Miguel de Icaza <miguel@ximian.com>
4904 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
4905 throw an exception with a cute explanation.
4907 2004-09-06 Dick Porter <dick@ximian.com>
4909 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
4910 Close the new process's thread handle, as we don't use it. The
4911 handle stays around forever otherwise.
4913 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
4915 * object.c (arith_overflow): Fix warning.
4917 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
4918 calling conventions in method refs. Fixes #65352.
4920 * reflection.c: Fix warnings.
4922 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
4924 * icall.c: Add a new icall for Array.Clear
4926 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
4928 * object.c: When allocating an array, we have to throw
4929 an overflow exception if any of the lengths are < 0.
4931 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
4933 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
4934 properly. Also move implementation of string array marshalling to
4935 managed code. Fixes #42316.
4937 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4939 * assembly.c: provide more information when loading an assembly fails.
4941 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4943 * filewatcher.c: don't expect the development fam package to be
4946 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
4948 * marshal.c: Make a copy of the signature cookie since it will be
4949 freed by the caller.
4951 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
4953 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
4955 * metadata.c (mono_metadata_free_marshal_spec): New function to free
4958 * marshal.c: More refactoring.
4960 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
4963 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
4965 * object.c: In mono_message_invoke, fill the output parameter array after
4966 calling the managed method (it was done before the call). This fixes
4969 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
4971 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
4974 2004-09-02 Martin Baulig <martin@ximian.com>
4976 * class.c (mono_class_instance_size): Don't allow generic type
4977 definitions or open generic instances.
4978 (mono_class_array_element_size): If we're a value type, call
4979 mono_class_instance_size() on the original class.
4981 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
4982 handle generic instances.
4984 * mono-debug-debugger.c (write_type): Handle generic instances
4987 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
4989 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
4990 the allocation request fails. Fixes #65089.
4992 * object.c (mono_runtime_free_method): Do not call mono_free_method.
4994 * object.c (mono_runtime_free_method): New function to free a dynamic
4997 * marshal.c (mono_delegate_free_ftnptr): New function to free the
4998 delegate trampoline.
5000 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
5001 with hasthis as dynamic,
5003 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
5005 * domain.c (mono_jit_info_table_remove): New function to remove an
5006 entry from the jit info table.
5008 * class-internals.h (MonoMethod): Add 'dynamic' field.
5010 * loader.c: Fix warnings.
5012 2004-09-01 Martin Baulig <martin@ximian.com>
5014 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
5015 instead of mono_debugger_lock() because the latter one is a no-op
5016 unless running in the debugger.
5018 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
5020 * class.c (class_compute_field_layout): Classes with auto-layout or
5021 reference fields are not blittable.
5023 2004-09-01 Dick Porter <dick@ximian.com>
5025 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
5026 mono_image_get_filename() to get the assembly location.
5029 * metadata.h: Fix compile warnings
5031 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
5033 * class.c (class_compute_field_layout): System.Object is blittable.
5035 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
5036 as in/out. Fixes #59909.
5038 2004-09-01 Martin Baulig <martin@ximian.com>
5040 * metadata.h (MONO_TYPE_ISREFERENCE): Call
5041 mono_metadata_generic_inst_is_valuetype() if we're a generic
5042 instance to check whether our underlying type is a reference type.
5044 2004-09-01 Martin Baulig <martin@ximian.com>
5046 * metadata.c (mono_type_size): If we're a generic instance, call
5047 mono_class_value_size() for value types.
5049 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
5051 * marshal.c: Implement more custom marshalling functionality. Fixes
5054 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5056 * mono-debug.c, debug-mono-symfile.c: add some locking love.
5058 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
5060 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
5062 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
5064 * icall.c: Fix some warnings.
5066 * threads.c (abort_appdomain_thread): Fix unref errors.
5067 (mono_thread_current): Fix THREAD_DEBUG define.
5069 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
5071 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
5073 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
5075 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
5077 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
5080 2004-08-28 Martin Baulig <martin@ximian.com>
5083 (mono_metadata_generic_inst_is_valuetype): New public function.
5085 * metadata.h (MONO_TYPE_ISSTRUCT): Call
5086 mono_metadata_generic_inst_is_valuetype() if we're a generic
5087 instance to check whether our underlying type is a valuetype.
5089 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
5091 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
5094 2004-08-25 Martin Baulig <martin@ximian.com>
5096 * loader.c (mono_get_method_from_token): Abstract methods can also
5097 be generic and thus have type parameters.
5099 * metadata-internals.h
5100 (MonoDynamicImage): Added `GPtrArray *gen_params'.
5102 * reflection.c (mono_image_get_generic_param_info): Don't create a
5103 metadata row, just add an entry to the `gen_params' array.
5104 (build_compressed_metadata): Sort the `gen_params' array and then
5105 actually create the metadata.
5107 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5109 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
5111 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
5113 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
5115 2004-08-24 Martin Baulig <martin@ximian.com>
5117 * class.cs (mono_class_is_subclass_of): Like an interface, a
5118 generic instance also derives from System.Object.
5120 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
5122 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
5123 custom modifiers to be in any order. Fixes #61990.
5125 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
5127 * object.c: Register mono_object_new_fast icall.
5129 * object.c (mono_class_get_allocation_ftn): Return to calling
5130 mono_object_new_fast, since it seems faster to compute the object
5131 size in unmanaged code than passing it as a parameter.
5133 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
5135 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
5136 this function with Boehm as the oom handler, so we don't have to check
5137 the result of GC_malloc.
5139 * object.c: Remove checks for oom.
5141 * object.h object.c (mono_class_get_allocation_ftn): New function to
5142 return the icall which can be used to allocate an instance of a given
5145 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
5147 * class-internals.h: Add 'enabled' field.
5149 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
5151 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
5153 2004-08-18 Jambunathan K <kjambunathan@novell.com>
5154 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
5157 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
5159 * appdomain.c: use the Tls function for appdomain too,
5160 at Zoltan's request. Actually return in mono_context_get
5162 * appdomain.c, profiler.c, threads.c: use __thread
5164 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
5166 * appdomain.c threads.c: Call GC_CreateThread on windows.
5168 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
5169 multiple libraries since this don't work on windows.
5171 2004-08-18 Martin Baulig <martin@ximian.com>
5174 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
5177 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
5178 MonoMethodNormal since we also need it for abstract and interface
5182 (build_compressed_metadata): Sort the GenericParam table.
5183 (mono_image_create_token): Added `gboolean create_methodspec'
5184 argument; this is false when generating a MethodImpl token.
5185 (reflection_methodbuilder_to_mono_method): Abstract and interface
5186 methods may also have generic parameters.
5188 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
5190 * appdomain.c: thread local alloc
5192 2004-08-17 Martin Baulig <martin@ximian.com>
5194 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
5197 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
5200 * class.c (mono_type_get_full_name): New public function.
5201 (mono_type_get_name): Don't include the type arguments.
5203 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
5205 * Makefile.am: Build static versions of libmetadata and libmonoruntime
5206 for inclusion into the mono executable.
5208 2004-08-16 Martin Baulig <martin@ximian.com>
5210 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
5211 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
5213 2004-08-14 Martin Baulig <martin@ximian.com>
5215 * class.c (dup_type): Also copy the `byref' field.
5217 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
5219 * reflection.c (create_dynamic_mono_image): Revert the last change
5220 since it breaks bootstrap.
5222 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
5224 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
5226 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
5227 not free them with g_free.
5229 2004-08-11 Martin Baulig <martin@ximian.com>
5231 * reflection.c (mono_reflection_setup_internal_class): Also call
5232 mono_class_setup_mono_type() if we already have a `tb->type.type'.
5234 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
5236 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
5237 called during default (first) AppDomain creation. Keep track of
5238 Evidence when loading assemblies.
5240 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5242 * opcodes.c, opcodes.h: reduce runtime relocations.
5244 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
5246 * culture-info.h, locales.c: fixes and chages to sue the new
5247 optimized format of the locale data.
5248 * culture-info-tables.h: regenerated.
5250 2004-08-06 Geoff Norton <gnorton@customerdna.com>
5252 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
5254 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
5256 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
5257 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
5258 * domain-internals.h: icall declaration.
5259 * icall.c: icall registration.
5260 * object-internals.h: New fields in MonoAssembly for CAS.
5262 2004-08-05 Duncan Mak <duncan@ximian.com>
5264 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
5267 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5269 * reflection.c: fix to deal with object[] arrays in custom ctors
5272 2004-08-05 Martin Baulig <martin@ximian.com>
5274 * class.c (mono_class_array_element_size): Added support for
5275 generic instances and correctly handle "recursive" types.
5277 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
5279 * assembly.c: Fix warnings.
5281 2004-08-04 Martin Baulig <martin@ximian.com>
5284 (mono_type_get_name_recurse): Added `gboolean include_arity'
5285 argument specifying whether or not we should include the generic
5286 arity in the type name.
5287 (_mono_type_get_name): New static function.
5288 (mono_class_setup_vtable): If we're a generic instance, don't
5289 include the generic arity in the names of explicit method
5292 2004-08-03 Martin Baulig <martin@ximian.com>
5294 * class.c (mono_type_get_name_recurse): Enclose the generic type
5295 arguments in `<', '>'.
5297 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5299 * gc.c: make GC warning messages use the trace API, they are just
5300 noise to most of the users.
5302 2004-08-03 Martin Baulig <martin@ximian.com>
5304 * debug-mono-symfile.c (read_string): Correctly read the string.
5306 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
5308 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
5310 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
5312 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
5314 2004-07-30 Martin Baulig <martin@ximian.com>
5316 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
5317 Reflect latest symbol writer changes.
5319 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5321 * object.c: always create an object if null is passed
5322 to Invoke() where a valuetype is expected.
5324 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
5326 * marshal.c (mono_marshal_init): make managed
5327 signatures match native ones better for 64bits.
5329 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5331 * appdomain.c: hack to build correctly the private bin path on windows.
5334 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
5336 * assembly.c: Load mscorlib from the correct framework directory
5337 (mono/<version>/mscorlib.dll).
5338 * appdomain.h: Added prototypes for new functions.
5339 * internals.h: Added some prototypes.
5340 * domain.c: When initializing the runtime, get from the executable and
5341 the configuration files the runtime version that the app supports.
5342 Added support methods for reading app.exe.config. Added list of versions
5343 supported by the JIT. Added two new methods: mono_init_from_assembly,
5344 which initializes the runtime and determines the required version from
5345 the provided exe file, and mono_init_version, which initializes
5346 the runtime using the provided version.
5347 * icall.c: Get machine.config from version-specific directory.
5348 * reflection.c: When generating an image, embed the version number
5349 of the current runtime.
5351 2004-07-28 Dick Porter <dick@ximian.com>
5354 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
5355 returned sockaddr size before creating the remote address object.
5356 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
5359 2004-07-28 Dick Porter <dick@ximian.com>
5361 * locales.c (string_invariant_compare_char): Fix invariant char
5362 compares between upper and lower cases. Fixes bug 61458.
5364 2004-07-27 Ben Maurer <bmaurer@ximain.com>
5366 * marshal.c: actually cache stelem.ref wrappers.
5368 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
5370 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
5371 sections and remove the mono_cli_rva_map () function.
5373 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5375 * debug-mono-symfile.c: fix one more endianess issue, from a patch
5376 by Geoff Norton (<gnorton@customerdna.com>).
5378 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5380 * class.c: fix class loads for pointer types (typeof(int) !=
5383 2004-07-27 Martin Baulig <martin@ximian.com>
5385 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
5386 reading the debugging information from an external ".mdb" file.
5388 2004-07-24 Martin Baulig <martin@ximian.com>
5390 * reflection.c (mono_image_get_type_info): Only write a class
5391 layout entry if we actually have a size or a packing size.
5393 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
5395 * reflection.c (type_get_fully_qualified_name):
5396 insert cast to get type checking of ?: with non-gcc compilers
5398 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
5400 * rand.c: use g_getenv for both lookups of
5403 2004-07-17 Martin Baulig <martin@ximian.com>
5405 * reflection.c (mono_reflection_bind_generic_method_parameters):
5406 Set `gmethod->reflection_info'.
5408 2004-07-17 Martin Baulig <martin@ximian.com>
5410 * class.c (mono_class_create_from_typedef): Insert the newly
5411 created class into the hash table before computing the interfaces
5412 since we could be called recursively.
5414 2004-07-16 Ben Maurer <bmaurer@ximain.com>
5416 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
5417 function to implement stelem.ref in managed code
5418 * class-internals.h, debug-helpers.c: a new wrapper type
5421 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5423 * gc.c: allow GC handles to work even when no GC is compiled in.
5424 Fix part of bug #61134 (GetAddrOfPinnedObject).
5426 2004-07-13 Peter Williams <peter@newton.cx>
5428 * process.c (complete_path): Make sure we don't attempt to execute
5431 2004-07-12 Geoff Norton <gnorton@customerdna.com>
5433 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
5434 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
5435 and will add/subtract the hour if needed
5437 2004-07-12 Martin Baulig <martin@ximian.com>
5439 * reflection.c (mono_field_get_object): If we have
5440 `field->generic_info', take the attributes from
5441 `field->generic_info->generic_type'.
5443 2004-07-12 Martin Baulig <martin@ximian.com>
5445 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
5446 This function must be called before initializing the runtime.
5447 (mono_debug_init_1): New function; call this after initializing
5448 the runtime, but before loading the assembly. It tells the
5449 debugger to load corlib and the builtin types.
5451 * mono-debug-debugger.c: Did some larger changes in the debugging
5452 code; support recursive class declarations, make sure we actually
5455 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5457 * debug-helpers.c: undo my previous patch and fixed the real issue in
5458 ../mini/exceptions-x86.c
5460 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5462 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
5463 when no HOME env. variable was set and a NullRef was thrown in a .cctor
5464 called from other .cctors.
5466 2004-07-09 Miguel de Icaza <miguel@ximian.com>
5468 * loader.c: Removed the mono_loader_wine_init hack now that we are
5469 doing a managed version of Windows.Forms.
5471 2004-07-09 Ben Maurer <bmaurer@ximian.com>
5473 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
5474 threadpool.c, threads.c: remove static data from rootset.
5476 2004-07-09 Dick Porter <dick@ximian.com>
5478 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
5479 Don't do any more processing if the matched length was 0. It was
5480 increasing the size of the string before. Fixes bug 61167.
5482 2004-07-09 Dick Porter <dick@ximian.com>
5486 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
5487 Add support for SO_PEERCRED if its available.
5489 2004-07-09 Peter Bartok <pbartok@novell.com>
5490 * loader.c: winelib.exe.so error message is now only displayed if
5491 MONO_DEBUG is set. To help us avoid questions when people are trying
5492 out the new Managed.Windows.Forms.
5494 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
5496 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
5497 for isinst and castclass wrappers.
5499 * class-internals.h icall.c: Move registration and lookup of JIT icalls
5500 to libmetadata from the JIT, so they could be used by the marshalling
5501 code and the interpreter.
5503 * marshal.c: Register marshalling related JIT icalls here instead of
5504 in mini.c. Use CEE_MONO_ICALL instead of the family of
5505 CEE_MONO_PROC<x> opcodes to call marshalling functions.
5507 * metadata.h: Remove unneeded marshalling conversions.
5509 * opcodes.c: Update for new opcodes.
5511 2004-07-08 Martin Baulig <martin@ximian.com>
5513 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
5514 (mono_debug_get_domain_data): Make this function static.
5516 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5518 * gc.c, object.h: add nice GC handle API for embedders.
5520 2004-07-06 Ben Maurer <bmaurer@ximian.com>
5522 * reflection.c: more changes for the new api
5524 * object.c: When we reflect on a field w/ a constant value, it
5525 will not have a memory location, so we must access metadata. Also,
5526 allow easier reading of strings so that we can read them from
5529 * class.c (mono_class_layout_fields): no need for literal fields here.
5531 * class-internals.h: api changes for const fields
5533 * icall.c (ves_icall_get_enum_info): use new apis for const fields
5535 2004-07-06 Martin Baulig <martin@ximian.com>
5537 * mono-debug.h: Increment version number to 44.
5539 * mono-debug.c (mono_debug_add_wrapper): The second argument is
5540 now a gpointer, rewrote this whole method.
5542 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
5543 function. Add information about the wrapper in a new "misc table".
5545 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
5546 for the new misc table.
5548 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
5550 * metadata-internals.h image.c: Add a cache for helper signatures.
5552 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
5554 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
5556 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
5557 delegates from a delegate. Fixes #61033.
5559 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
5560 marshalling of stringbuilder arrays. Fixes #59900.
5562 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
5564 * icall.c: Add EnumBuilder:setup_enum_type icall.
5566 2004-06-30 Ben Maurer <bmaurer@ximian.com>
5568 * icall.c: Added a new icall for the property version of
5571 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
5573 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
5574 it has a constant size across platforms.
5576 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
5579 2004-06-29 Martin Baulig <martin@ximian.com>
5581 * mono-debug.c (mono_debug_add_method): Protect the whole function
5582 in mono_debugger_lock(), not just parts of it.
5584 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
5586 * reflection.c: make sure padding bytes in heaps are zeroed.
5588 2004-06-24 David Waite <mass@akuma.org>
5590 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
5591 image.c, loader.c, locales.c, marshal.c, metadata.c,
5592 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
5593 string-icalls.c, threads.c: change to C90-style comments from C99 /
5596 2004-06-24 Dick Porter <dick@ximian.com>
5599 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
5600 return createdNew. Fixes bug 60412.
5603 * icall.c: Add createdNew parameter to CreateMutex icall
5605 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5607 * reflection.c, object-internals.h: save default value in params.
5609 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5611 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
5612 no need to build a new path combining that with the application base.
5615 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
5617 * reflection.c: fixed minor standard compliance issues.
5619 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5621 * reflection.c: fixed issue with encoding some custom attributes
5622 (arrays in properties and fields, bug #60411).
5624 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5626 * reflection.c: fix start address when copying the public key token.
5628 2004-06-23 Martin Baulig <martin@ximian.com>
5630 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
5631 the `exc' object in a static object to put it into the GC's root set.
5633 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
5635 * reflection.c: make mono_reflection_setup_internal_class ()
5636 callable a second time to setup a new parent class.
5638 2004-06-23 Dick Porter <dick@ximian.com>
5640 * threads.c: Check for WAIT_IO_COMPLETION return values.
5642 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
5644 * appdomain.c: Removed the g_free on the public key token. Now copy
5645 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
5646 * assembly.c: Added public key token string value when loading
5647 assemblies. Fix bug #60439.
5648 * icall.c: Added missing informations (like public key) in
5649 GetReferencedAssemblies. Fix #60519.
5650 * image.h: Changed definition for public key token from const char*
5651 public_tok_value to guchar public_key_token [17];
5652 * reflection.c: Updated for changes to public key token.
5654 2004-06-22 Lluis Sanchez Gual
5656 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
5657 for the field in base classes.
5659 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5661 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
5662 mark headers as not supported, they are installed only for use by the
5665 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
5667 * *.c, *.h: avoid namespace pollution in public headers.
5669 2004-06-21 Martin Baulig <martin@ximian.com>
5671 * exception.c (mono_get_exception_security): It's in
5672 "System.Security", not in "System".
5674 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
5675 the exception classes.
5677 2004-06-21 Martin Baulig <martin@ximian.com>
5679 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
5680 Protect the exception object from being finalized.
5682 2004-06-21 Martin Baulig <martin@ximian.com>
5684 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
5687 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
5689 * reflection.c: Load the assembly in mono_reflection_type_from_name,
5690 if it was not loaded before. Fix parts of #60439.
5692 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
5694 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
5695 code that was broken since Ben's change: wrappers are now
5696 dependent on the method signature only again.
5698 2004-06-21 Martin Baulig <martin@ximian.com>
5700 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
5701 added interface support.
5703 2004-06-21 Martin Baulig <martin@ximian.com>
5705 * class.c (mono_vtable_get_static_field_data): New public method.
5707 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
5709 * filewatcher.c : Windows build fix to be compliant with API changes.
5711 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5713 * class.h, class.c: more accessors.
5714 * metadata.h, metadata.c: prepare for hiding MonoType and
5715 MonoMethodSignature: people should use the accessors from now on
5716 outside of the tree.
5718 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5720 * *.c, *.h: more API cleanups.
5722 2004-06-18 Jackson Harper <jackson@ximian.com>
5724 * assembly.c: Trace loading assemblies.
5725 * loader.c: Trace loading native libraries.
5726 * mono-config.c: Trace loading config files.
5728 2004-06-18 Dick Porter <dick@ximian.com>
5730 * locales.c: Tell ICU the lengths of strings, it can cope with
5731 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
5733 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
5735 * image.c: swapped name/filename;
5737 2004-06-18 Martin Baulig <martin@ximian.com>
5739 * mono-debug-debugger.c (write_class): Write the parent class at
5740 the end of the header.
5742 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5744 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
5746 2004-06-17 Raja R Harinath <rharinath@novell.com>
5748 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
5749 (bundle_obj): New conditional define.
5750 (BUILT_SOURCES): Remove.
5751 ($(bundle_srcs)): Make parallel-make safe.
5752 (libmonoruntime_la_LIBADD): Make unconditional.
5753 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
5754 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
5756 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
5758 * culture-info-tables.h: It was inconsistent with the latest
5761 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
5763 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
5766 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
5769 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5771 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
5772 cleaned up public header threads.h.
5774 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5776 * Makefile.am, *.c, *.h: more API cleanups.
5778 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
5780 * Makefile.am: removed monosn from compilation.
5781 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
5782 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
5783 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
5784 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
5785 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
5786 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
5788 2004-06-15 Jackson Harper <jackson@ximian.com>
5790 * assembly.c: Make locales lower case when searching the GAC for
5791 assemblies. gacutil will always make locales lowercase when
5792 installing so this effectively makes them case insensitive.
5794 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
5796 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
5797 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
5798 parameter which allows to choose whether the wait can be interrupted or
5799 not. Also added the method mono_monitor_enter(), which locks the monitor
5800 using an infinite wait and without allowing interruption.
5801 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
5803 * object.h: Added new fields in MonoThread. suspend_event holds the event
5804 used to susped/resume the thread. synch_lock is the lock object to use for
5805 modifying the thread state.
5806 * threads.c: Use the new synch_lock object for locking, instead of "this",
5807 which can generate deadlocks.
5808 Moved thread state change in Thread.Sleep and Thread.Join from managed
5809 to unmanaged code. This avoids a deadlock when the thread was suspended
5810 just after acquiring the thread lock.
5811 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
5812 Implemented Thread.Suspend using an event instead of ThreadSuspend,
5813 which is not fully implemented in the io-layer.
5814 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
5816 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
5818 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
5819 threads-types.h: more API cleanups.
5821 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5823 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
5824 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
5825 threadpool.c, threads.c: first pass at the exported API cleanup.
5827 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
5829 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
5831 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5833 * icall.c: added internalGetHome.
5835 2004-06-14 Dick Porter <dick@ximian.com>
5837 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
5838 possible to return successfully when '.' or '..' were the only
5839 entries in a directory, but were skipped. The MonoIOStat was not
5840 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
5843 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5845 * reflection.c: make binaries run on .Net 1.1 by default.
5847 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
5849 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
5851 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
5853 * marshal.c: keep track of struct size with explicit layout
5856 2004-06-12 Martin Baulig <martin@ximian.com>
5858 * mono-debug-debugger.c: Comment out a debugging g_message().
5860 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5862 * reflection.c, reflection.h: do not free custom attrs that are cached.
5863 * icall.c: use braces to make code clearer.
5865 2004-06-11 Martin Baulig <martin@ximian.com>
5867 * class.h (MonoInflatedField): New type.
5868 (MonoClassField): Replaced `MonoType *generic_type' with
5869 `MonoInflatedField *generic_info'.
5872 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
5874 2004-06-11 Martin Baulig <martin@ximian.com>
5876 * reflection.c (mono_image_create_method_token): Correctly encode
5879 2004-06-11 Martin Baulig <martin@ximian.com>
5881 * metadata.c (mono_metadata_parse_method_signature): When parsing
5882 a MethodDef which has VarArgs, also set sentinelpos if we don't
5883 have any parameters.
5885 2004-06-11 Martin Baulig <martin@ximian.com>
5887 * verify.c (mono_method_verify): In CEE_CALL, use
5888 mono_method_get_signature() to get the method's signature, unless
5889 we're a PInvoke method.
5891 2004-06-10 Jackson Harper <jackson@ximian.com>
5893 * assembly.c: Use <path>/lib/mono/gac for the extra paths
5894 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
5895 logical name as the supplied path is just a prefix to the gac not
5896 the direct path to it.
5898 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
5900 * reflection.c: make the token for a created method match
5901 the token of the MethodBuilder it was created from
5902 (IKVM requires this behaviour now).
5904 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
5906 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
5907 reflection.c, socket-io.c: leak fixes.
5909 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
5911 * icall.c: handle sentinel pos in vararg methods in position different
5914 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5916 * culture-info-tables.h: freshly generated.
5918 2004-06-09 Martin Baulig <martin@ximian.com>
5920 * loader.c (mono_get_method_constrained): Call `mono_class_init
5921 (constrained_class)'.
5923 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
5925 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
5926 any methods. Fixes #59629.
5928 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
5930 * culture-info-tables.h: reflecting locale-builder updates.
5932 2004-06-08 Dick Porter <dick@ximian.com>
5935 * locales.c: Fixed compile warnings, including a real bug in
5936 CompareInfo_internal_compare.
5938 2004-06-08 Dick Porter <dick@ximian.com>
5941 (ves_icall_System_Globalization_CompareInfo_internal_index):
5942 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5943 Double-check the resuls of usearches, because ICU currently
5944 ignores most of the collator settings here. Fixes bug 59720.
5946 2004-06-08 Dick Porter <dick@ximian.com>
5949 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5950 Fix memory leak and segfault-causing typo. No idea how this one
5951 lasted so long without being noticed.
5953 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
5955 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
5956 any methods. Fixes #59629.
5958 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5961 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
5962 own the critical section before). Removed dead code (that's done
5963 in the preload hook).
5965 (mono_assembly_load_with_partial_name): call the preload hook.
5967 2004-06-08 Martin Baulig <martin@ximian.com>
5969 * metadata.c (mono_metadata_signature_alloc): Default
5970 `sentinelpos' to -1.
5972 * reflection.c (mono_image_get_array_token): Likewise.
5974 2004-06-08 Martin Baulig <martin@ximian.com>
5976 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
5978 * metadata.c (mono_metadata_parse_method_signature): When parsing
5979 a MethodDef which has VarArgs, set sentinelpos.
5981 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
5982 `gint16' since we're using -1 for non-varargs methods.
5985 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
5986 (method_encode_signature): Added varargs support.
5987 (method_builder_encode_signature): Likewise.
5988 (mono_image_get_varargs_method_token): New static method.
5989 (mono_image_create_method_token): New public method; this is
5990 called via an icall instead of mono_image_create_token() when
5991 calling a varargs method.
5993 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
5995 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
5997 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
5999 * culture-info-tables.h : Reflecting the latest locale-builder that
6000 fixed empty array representation ({} to {0}).
6002 2004-06-07 Jackson Harper <jackson@ximian.com>
6004 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
6005 looking up extra gac paths. This allows MONO_GAC_PATH to act
6006 exactly like a prefix.
6008 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
6010 * reflection.c (mono_reflection_type_from_name): Make a copy of the
6011 type name before modifying it. Fixes #59405.
6013 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
6015 * culture-info.h: added fields for "all datetime patterns".
6016 * locales.c: ( ves_icall_System_Globalization_CultureInfo
6017 _construct_datetime_format ()): fill xxx_patterns fields.
6018 * object.h: added fields for "all datetime patterns" to
6019 MonoDateTimeFormatInfo.
6020 * culture-info-tables.h: reflecting locale-builder updates.
6022 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
6024 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
6025 the event has no add and remove methods. Fixes #59629.
6027 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
6029 * object.c: Fixed possible integer overflow when allocating large
6032 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
6034 * culture-info-tables.h: reflecting locale-builder updates.
6036 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
6038 * culture-info-tables.h: reflecting locale-builder updates.
6040 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
6042 * culture-info-tables.h: reflecting locale-builder updates.
6044 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
6046 * threads.c: Made Thread.Sleep abortable.
6048 2004-06-02 Martin Baulig <martin@ximian.com>
6050 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
6052 * debug-mono-symfile.h: Bumped symbol file version number to 37.
6054 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
6056 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
6058 2004-05-30 Jackson Harper <jackson@ximian.com>
6060 * reflection.c: Do not hardcode assembly versions or public key
6061 tokens anymore. All of this except the corlib section was dead
6064 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
6066 * object.c (mono_runtime_invoke_array): Automatically create boxed
6067 objects for byref valuetypes if needed. Fixes #59300.
6069 * object.c (mono_method_return_message_restore): Handle
6070 MONO_TYPE_OBJECT as well.
6072 2004-05-28 Jackson Harper <jackson@ximian.com>
6074 * reflection.c: The modified type encoding was causing build
6075 problems. Reverted for now.
6077 2004-05-28 Jackson Harper <jackson@ximian.com>
6079 * reflection.c/h: Take an assembly ref so that we dont create
6080 fully qualified names when encoding types in the same assembly as
6081 the custom attribute being emitted.
6082 * appdomain.c: Increment version number.
6084 2004-05-26 Duncan Mak <duncan@ximian.com>
6087 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6088 Set the full version number (major, minor, build, revision).
6090 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
6092 * marshal.c (emit_struct_conv): increment src/dst after blit
6093 (mono_marshal_get_managed_wrapper,
6094 mono_marshal_get_native_wrapper): make sure we have marshalling
6095 info before marshalling params (info computation affects
6098 * class.c (class_compute_field_layout): correctly deal with
6100 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
6101 value types (as per what windows dows by default)
6102 (mono_class_setup_mono_type): System.ValueType is blittable
6103 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
6106 * marshal.c (mono_marshal_load_type_info): flag types as
6107 non-blittable if the native layout doesn't match the managed
6110 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6112 * appdomain.c: don't add stuff in the private search path that is
6113 above the application base. If application base is not set, there's
6114 no private search path.
6116 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
6118 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
6119 byref struct arguments in native->managed marshalling.
6121 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
6123 * marshal.c (mono_marshal_get_runtime_invoke): correctly
6124 cache methods using signature (special case for methods
6125 that are value type or string class)
6127 * image.c (mono_image_close): clean up allocated GSList's
6128 in runtime_invoke_cache.
6130 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6132 * mono-config.c: set the correct path for mono_cfg_dir on windows when
6133 there's no MONO_CFG_DIR environment variable defined.
6135 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6137 * threads.c: windows version must be >= 0x0500 to include OpenThread.
6139 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
6141 * threadpool.c: Really wait for 500ms after the async call, even if the wait
6143 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
6144 before waiting for it, and call CloseHandle after the wait to unref it.
6145 This will make sure that handles are not disposed too early.
6147 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6152 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
6155 * object.c: se the application_base only for the domain that runs
6156 Main. Fixes bug #59216,
6158 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6161 * object.c: only the domain in which Main is run have
6162 SetupInformation.ConfigurationFile set, so moved a few lines from
6163 appdomain.c to object.c.
6165 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6167 * appdomain.c: we tried to load [name].(dll|exe), but according
6168 to bug #57710, we must also try [culture]/[name].(dll|exe) and
6169 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
6170 There's a test case attached to bug #58922.
6172 2004-05-27 Dick Porter <dick@ximian.com>
6175 * file-io.c: Implemented icalls for locking and unlocking regions
6177 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
6178 FALSE on error (fixes both compiler warning and real bug.)
6180 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
6182 * culture-info-tables.h: reflecting locale-builder updates.
6184 (Added missing ChangeLog entry for 05/26)
6186 2004-05-27 Jackson Harper <jackson@ximian.com>
6188 * locales.c: Fix some cut and paste errors.
6190 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6192 * mono-config.c: set the correct path for config. directory on windows.
6194 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
6196 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
6199 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
6201 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
6202 from pinvoke functions.
6204 * marshal.c (mono_ftnptr_to_delegate): Implement this.
6206 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
6208 * culture-info-tables.h: reflecting locale-builder updates.
6210 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
6212 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
6215 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
6217 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
6218 * icall.c: Modified icalls for RNG.
6219 * rand.c|h: Changed RNG interface to allow thread-safe usage under
6220 Windows (CryptoAPI).
6222 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
6224 * locales.c: Fix build.
6226 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
6228 * culture-info-tables.h: reflecting locale-builder updates.
6230 2004-05-25 Jackson Harper <jackson@ximian.com>
6232 * locales.c: When creating the current culture use the $LANGs
6233 specific culture. So DateTimeFormat and NumberFormat entries are created.
6235 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
6237 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
6238 a char array as parameter.
6240 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
6242 * image.c: In mono_image_open(), always use an absolute path name to
6243 look for already loaded images.
6245 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
6247 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
6248 missing in the windows build (like older cygwin include files).
6250 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
6252 * icall.c: Fixed check for possible integer overflow in Buffer_
6253 BlockCopy icall. Replaced comments style // by /* */.
6255 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
6257 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
6259 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
6260 check after MONO_VTADDR. Fixes pinvoke2.exe.
6262 * marshal.h marshal.c metadata.h: Add beginnings of support for
6263 ftnptr -> delegate marshalling.
6265 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
6267 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
6268 * threads.c: Fix warnings.
6270 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
6272 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
6273 * icall.c: Registered icalls for Suspend and Resume.
6274 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
6276 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
6277 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
6278 * process.c: Use WaitForSingleObjectEx.
6279 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
6281 * threads.c, threads.h: Make use of new Ex wait methods. Improved
6282 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
6283 for Suspend and Resume. Added new mono_thread_stop, used for stoping
6284 background threads. Added basic support for Abort in Windows.
6285 Start new threads using a managed delegate invoke wrapper. This wrapper
6286 has an interruption checkpoint that is needed since an interruption
6287 can be requested before the thread leaves the unmanaged code that starts
6289 * marshal.c: Added interruption checkpoint after every native call, and
6290 also before managed calls for wrappers called from unmanaged code to
6291 go into managed code.
6292 * object.h: Added new field in MonoThread to keep track of interruption
6295 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
6297 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
6300 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6307 * rand.c: getenv -> g_getenv (windows!)
6309 * process.c: complete_path is also used on non-windows platforms.
6311 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6313 * icall.c: new signature for Process_Start.
6315 * process.[ch]: new signature for Process_Start. If we're on windows
6316 and UseShellExecute is false, we have to search for the program by
6317 ourselves if we don't get a full path.
6319 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
6321 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
6322 marshalling and call CleanUpNativeData if needed. Fixes #58646.
6324 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6326 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
6329 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6331 * process.c: use double quotes to quote program name and arguments on
6332 windows. Fixes bug #58575.
6334 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6336 * file-io.c: don't return "." and ".." when using windows Find*File.
6338 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
6340 * marshal.c: Don't pass wrappers to message init because method
6341 addressed used to lookup metadata. part of remoting[2|3] fix.
6343 2004-05-15 Jackson Harper <jackson@ximian.com>
6345 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
6346 path is essentially the same as MONO_PATH except that it points to
6347 GACs instead of lib directories.
6348 * loader.h: The user gac is gone so we dont need function to
6350 * mono-config.c: user gac option is now gone.
6352 2004-05-15 Jackson Harper <jackson@ximian.com>
6354 * culture-info.h: Make defines more consistent, add calendar data
6355 to the culture info table.
6356 * culture-info-tables.h: Add basic calendar data. Basically
6357 everyone gets default gregorian until all the data is
6359 * locales.c: Use the new consistent defines. Set calendar data for
6360 culture info objects.
6361 * object.h: add a field for calendar data to CultureInfo
6363 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
6365 * image.c: image->runtime_invoke_cache is keyed on signatures now.
6366 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
6368 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
6369 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
6370 an extra param that is the pointer of the method to invoke. The IL for
6371 the invoke method is no longer specific to the method, but to the
6372 signature of the method. Thus, we can share the same code for multiple
6373 methods. This reduces the number of methods that have to be compiled.
6375 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
6377 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
6379 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6381 * icall.c: Optimize Buffer.BlockCopy.
6383 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6385 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
6386 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
6387 quote). Changed them to "MMMM yyyy".
6389 2004-05-12 Miguel de Icaza <miguel@ximian.com>
6392 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
6394 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
6396 * reflection.h: Updated after changes to managed structures.
6398 * appdomain.c: Bump corlib version.
6400 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6402 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
6405 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6407 * Makefile.am: link to ../os/libmonoos.la on windows.
6410 -If MONO_DEBUG, warn about non-existing directories in
6412 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
6413 compile time variable.
6414 -Removed init_default_path and call mono_set_rootdir from
6415 libmonoos.a instead (windows only).
6417 * assembly.h: declare mono_assembly_getrootdir().
6420 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
6422 * loader.c: s/getenv/g_getenv/
6424 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
6426 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
6428 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
6430 * metadata.h: Add new marshalling conversions.
6432 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
6435 * reflection.c (mono_reflection_get_type): Lookup the type in all
6436 modules of a multi-module assembly. Fixes #58291.
6438 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
6440 * threads.c: Before aborting a background, set the StopRequested
6441 state. This avoids throwing the Abort exception.
6442 In mono_thread_manage, don't continue with the shutdown until all
6443 aborted threads have actually stopped.
6445 2004-05-10 Jackson Harper <jackson@ximian.com>
6447 * locales.c: Remove the modifier from culture names.
6449 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6451 * Makefile.am: monosn is not installed any more. It has been deprecated
6454 2004-05-07 Jackson Harper <jackson@ximian.com>
6457 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
6458 Fix array construction, add bailout if the length is 0.
6460 2004-05-07 Dick Porter <dick@ximian.com>
6462 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
6463 machine doesn't have a DNS entry. Patch by Urs Muff
6464 (umuff@quark.com), fixes bug 57928.
6466 2004-05-06 Jackson Harper <jackson@ximian.com>
6468 * reflection.c: Handle null PublicTokens properly. alloc mem for
6469 assembly names culture so we dont crash when freeing it.
6471 2004-05-06 Jackson Harper <jackson@ximian.com>
6473 * assembly.c: Check the usergac when loading with partial names.
6475 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
6477 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
6478 does nothing for now (not required for Linux/Windows) but the class
6479 library can call it (and a newer or modified runtime could need it).
6480 * icall.c: Registred icall.
6482 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6484 * loader.c: prints a message on module loading error we set MONO_DEBUG
6485 environment variable.
6487 2004-05-05 Jackson Harper <jackson@ximian.com>
6489 * appdomain.c: Handle PublicKeyToken=null properly.
6491 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
6493 * environment.c|h: Added icall ves_icall_System_Environment_
6494 GetOSVersionString to get the current OS version as a string.
6495 * icall.c: Registred icall.
6497 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
6499 * object.c: in mono_object_get_virtual_method(), take into account that
6500 non-virtual methods don't have a slot in the vtable. Check needed when
6501 the object is a proxy.
6503 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
6505 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
6506 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
6508 * object.c (mono_class_compute_gc_descriptor): Fix warning.
6510 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
6511 passed when a valuetype is expected.
6513 * object.c (mono_unhandled_exception): Only set the exit code if the
6514 exception happens in the main thread. Fixes thread5.exe.
6516 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
6517 invalid names. Fixes #58047.
6519 2004-05-03 Jackson Harper <jackson@ximian.com>
6521 * assembly.c: This line was committed accidently and is unneeded.
6523 2004-05-03 Jackson Harper <jackson@ximian.com>
6525 * icall.c: Add new icall for Assembly::LoadWithPartialName
6526 * assembly.c/.h: new function that probes the GAC to load partial
6527 assembly names by Paolo Molaro.
6529 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6531 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
6532 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
6533 (type_get_fully_qualified_name): Added PublicKeyToken when building a
6536 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6538 * appdomain.c: fixed check for 'neutral' culture and removed warning.
6539 * reflection.c: fix bug when parsing a full type name and Version is not
6540 the last thing in the string.
6542 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
6544 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
6545 crashes when it is freed.
6547 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6549 * assembly.c: print the compat warning to stderr.
6551 2004-05-01 Miguel de Icaza <miguel@ximian.com>
6553 * assembly.c (mono_assembly_load_references): Add a compatibility
6554 hack to run old applications that might be still referencing the
6555 3300-based assemblies, only do this for System.xxx.
6557 2004-05-01 Jackson Harper <jackson@ximian.com>
6559 * appdomain.c: If the culture is neutral we set it to "".
6561 2004-04-29 Jackson Harper <jackson@ximian.com>
6563 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
6565 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
6567 * string-icalls.c: added low overhead function for copying chars
6568 * icall.c: added needed icall for the above function
6570 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6572 * icall.c: fix return value of get_global_assembly_cache. Implemented
6573 Environment.GetLogicalDrives.
6575 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
6577 * rand.c: try and talk to egd or prngd
6578 for random bytes if opening devices fail.
6580 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
6582 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
6583 alignment for the type using the native alignment of its members
6584 instead of using klass->min_align.
6586 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
6588 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6591 * socket-io.c: added check for sys/aio.h.
6593 2004-04-28 Dick Porter <dick@ximian.com>
6595 * threads.c: Don't abort a thread thats already aborting, when
6596 terminating everything.
6598 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6600 * icall.c: added 2 new async calls for Socket.
6602 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
6605 * threadpool.c: removed unused variable.
6607 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
6609 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
6611 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6613 * locales.c: put back string_invariant_tolower () and
6614 string_invariant_toupper ().
6616 2004-04-26 David Waite <mass@akuma.org>
6621 * unicode.h: remove comma from end of enumeration declarations
6623 2004-04-26 David Waite <mass@akuma.org>
6625 * debug-mono-symfile.h:
6628 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
6631 2004-04-26 Jackson Harper <jackson@ximian.com>
6633 * appdomain.c: Increment version number.
6635 2004-04-26 Jackson Harper <jackson@ximian.com>
6637 * appdomain.c: Set assembly references public token value when
6638 PublicKeyToken is specified, not the hash_value. Free public token
6639 values when free assembly name data. Previously the public key
6640 token was hex decoded, however we are using hex encoded public key
6641 tokens, so this is not neccasary.
6642 * assembly.c: Lookup assemblies in the gac if their public token
6643 value is set. Add function to allow enabling user gac
6644 lookups. Specify whether or not the assembly was loaded from the
6645 GAC. Compare full assembly names when checking the cache for
6646 assemblies (Temporarily disabled see comment in code). Remove
6647 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
6648 specifies trace-loader they get extra info to stdout on the
6649 loading of assemblies.
6650 * image.h: Add a field for an assembly references public token
6651 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
6652 whether an assembly has been loaded from the GAC.
6653 * image.c: Remove a corlib -> mscorlib name mapping.
6654 * loader.h: Add function to enable/disable the user gac.
6655 * mono-config.c: Check if the usergac is enabled in the config
6657 * icall.c: New icall to determine whether or not an assembly has
6658 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
6659 * tabldefs.h: Add constant for assemblyref flag that specifies a
6660 full public key is used instead of a public token.
6661 * reflection.c: Remove mscorlib -> corlib mappings. Set
6662 PublicTokenValue instead of hash value. This value is a hex
6663 string so it does not need to be expanded.
6665 2004-04-26 Martin Baulig <martin@ximian.com>
6667 * mono-debug-debugger.c (mono_debugger_initialize): Set
6668 `mono_debugger_initialized' before calling mono_debug_lock().
6670 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
6672 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
6673 InternalToUpper/InternalToLower.
6674 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
6675 removed invariant culture shortcut. This is now done in managed code.
6676 * locales.c: (string_invariant_toupper/tolower) removed.
6678 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6680 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
6681 Added Poll internal call.
6683 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
6684 call for Poll. Select was too heavy for polling a single socket.
6686 * threadpool.[ch]: added mono_threadpool_cleanup.
6687 * threads.c: use it. Don't use Thread_Abort on windows.
6689 2004-04-23 Martin Baulig <martin@ximian.com>
6691 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
6693 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
6695 * icall.c: Registred new icalls for key pair protection and added an
6696 icall for Environment.GetFolderPath on Windows.
6697 * security.c|h: Added new icalls for key pair protection.
6699 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6701 * socket-io.c: don't display the non-supported family warning for known
6702 families. Now this is not displayed on windows when checking support
6705 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6707 * class.c: don't display the layout warning for static fields.
6709 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
6711 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
6712 * locales.c, locales.h: Added new icalls for culture-specific
6713 Char.ToLower and Char.ToUpper.
6715 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6717 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
6720 2004-04-20 Martin Baulig <martin@ximian.com>
6722 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
6723 of the type name before passing it to mono_reflection_type_from_name().
6725 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
6727 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
6728 encodings here. Fixes #56965.
6730 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
6732 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6733 fix test on strstr result not that I can see anything that
6734 relies on the result.
6736 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
6738 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
6741 * marshal.c (mono_marshal_get_string_encoding): New helper function.
6743 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
6744 function to determine which marshalling to use for strings. Fixes
6747 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
6749 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
6751 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
6753 * icall.c: #include mono-config.h
6755 2004-04-15 Jackson Harper <jackson@ximian.com>
6757 * culture-info-tables.h: Fix date formats for en-US culture.
6759 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
6761 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
6762 ThreadPool.SetMinThreads.
6763 * threadpool.c: Implemented ThreadPool.GetMinThreads and
6764 ThreadPool.SetMinThreads.
6766 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
6768 * mono-config.c: also load the .config file in the directory
6769 where the assembly was found.
6771 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
6773 * assembly.c: load per-assembly config files.
6774 * icall.c: decrapified code to get the config dir and moved to
6776 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
6777 per-assembly config files. When doing a dll map lookup give precedence
6778 to the per-assembly data.
6780 2004-04-14 Martin Baulig <martin@ximian.com>
6782 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
6783 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
6784 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
6786 * mono-debugger-debugger.c: While the debugger is locked, remember
6787 whether the symbol tables have changes and send one single
6788 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
6790 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
6792 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
6794 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
6797 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
6798 account when marshalling string arrays. Fixes #56965.
6800 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
6802 * icall.c: Add new icalls mapping for security.
6803 * security.c|h: Add internal calls for WindowsIdentity,
6804 WindowsImpersonationContext and WindowsPrincipal.
6806 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
6808 * class.c: Added comment to ensure the System.MonoDummy class
6809 is removed when no longer necessary
6811 2004-04-13 Miguel de Icaza <miguel@ximian.com>
6813 * appdomain.c: Pass arguments to the bootstraping exceptions to
6814 minimize JITed methods at boot
6816 * metadata.c (mono_exception_from_name_two_strings): Allow for the
6817 second string to be null.
6819 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6820 Change the protocol to minimize the JIT methods at startup. Now
6821 it Returns the internal codepage, if the value of "int_code_page"
6822 is 1 at entry, and we can not compute a suitable code page
6823 number, returns the code page as a string.
6825 2004-04-13 Jackson Harper <jackson@ximian.com>
6827 * culture-info-tables.h: Fix number of decimal digits for all
6830 2004-04-13 Jackson Harper <jackson@ximian.com>
6832 * icall.c: Clairfy out of sync error message. It is not always
6833 your corlib that is out of sync.
6835 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
6837 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
6838 properties when only the set accessor is overriden. Fixes #55874.
6840 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
6842 * assembly.c (mono_assembly_load_references): Make this thread safe.
6845 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
6847 * monosn.c: Add missing initialization calls.
6849 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
6852 ves_icall_System_Globalization_CultureInfo_construct_number_format
6853 Fix g_assert so it compiles on fussier compilers re int/ptr
6856 2004-04-08 Dick Porter <dick@ximian.com>
6859 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
6860 53992. Also rearrange the code so that the internal calls return
6861 an error value and exceptions are thrown from managed code.
6863 * icall.c: Add type info to the socket icalls.
6865 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6867 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
6870 2004-04-07 Martin Baulig <martin@ximian.com>
6872 * class.c (mono_class_from_generic_parameter): Don't default
6873 `klass->parent' to `mono_defaults.object_type'.
6875 2004-04-07 Martin Baulig <martin@ximian.com>
6877 * reflection.c (mono_reflection_initialize_generic_parameter): Set
6878 `param->pklass->reflection_info'.
6880 2004-04-07 Jackson Harper <jackson@ximian.com>
6882 * culture-info-tables.h: Fix date separator symbol.
6884 2004-04-07 Martin Baulig <martin@ximian.com>
6886 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
6887 from System.Type to System.MonoType.
6889 2004-04-07 Martin Baulig <martin@ximian.com>
6892 (MonoReflectionGenericParam): Added `has_reference_type' and
6893 `has_value_type' fields.
6895 * reflection.c (mono_image_get_generic_param_info): Encode the
6896 correct flags if we have the `class' or `struct' constraint.
6898 2004-04-07 Martin Baulig <martin@ximian.com>
6901 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
6903 2004-04-07 Jackson Harper <jackson@ximian.com>
6905 * appdomain.c: Revert extra patches, just wanted to bump the
6908 2004-04-07 Jackson Harper <jackson@ximian.com>
6910 * Makefile.am: Add culture-info private headers.
6911 * icall.c: Add new icalls for contructing locales.
6912 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
6913 * locales.h: Declare new culture info construction methods.
6914 * object.h: Add new fields used to avoid the CultureMap to
6916 * culture-info.h: Definition of structs used in the culture info
6918 * culture-info-tables.h: Autogenerated tables that contain culture
6919 info data. This file was generated with the locale-builder tool.
6920 * appdomain.c: Incement corlib version number.
6922 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
6924 * appdomain.c: (mono_runtime_init) move mono_thread_init
6925 to before mono_object_new calls so critical sections
6926 are initialized before use.
6928 2004-04-07 Martin Baulig <martin@ximian.com>
6931 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
6932 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
6933 (ves_icall_MonoGenericParam_initialize): Removed.
6934 (monogenericparam_icalls): Removed.
6935 (generictypeparambuilder_icalls): Added new table for
6936 System.Reflection.Emit.GenericTypeParameterBuilder.
6939 (mono_reflection_define_generic_parameter): Removed.
6940 (mono_reflection_initialize_generic_parameter): This is now called
6941 from GenericTypeParameterBuilder's .ctor.
6943 2004-04-06 Martin Baulig <martin@ximian.com>
6945 * class.c (mono_class_init): Don't inflate nested classes in a
6947 (mono_type_get_name_recurse): Include the generic arguments for
6948 generic instances and generic type declarations.
6949 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
6950 (_mono_class_get_instantiation_name): Removed.
6951 (mono_class_create_generic): Always use `gklass->name' as our name.
6953 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
6955 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
6956 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
6957 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
6958 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
6959 closed generic methods here.
6962 (mono_reflection_generic_inst_get_nested_types): Removed.
6963 (inflate_mono_method): Copy the generic parameters from the
6964 MonoMethodHeader into out MonoGenericMethod.
6966 2004-04-06 Martin Baulig <martin@ximian.com>
6969 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
6971 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
6973 * reflection.c (build_compressed_metadata): If we have any entries
6974 in the GenericParam, MethodSpec or GenericParamConstraint tables,
6975 set the header version to 1.1.
6977 2004-04-06 Martin Baulig <martin@ximian.com>
6979 * class.c (mono_class_init): If we're a generic instance,
6980 initialize our nested classes, too.
6981 (_mono_class_get_instantiation_name): Deal with the new `!%d'
6984 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6986 * process.c: quote the argument passed to the shell on windows.
6988 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
6990 * threads.c (mono_alloc_special_static_data): Allow this to be
6991 called during startup.
6993 2004-04-02 Martin Baulig <martin@ximian.com>
6996 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
6998 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
7000 * icall.c: Fix build.
7002 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
7004 * Makefile.am: Added security.c|h.
7005 * icall.c: Added icall for get_UserName;
7006 * security.c: New file for security related icalls. Added function
7007 get_UserName for System.Environment (fix #56144).
7008 * security.h: New. Header file for security.c
7010 2004-04-02 Dick Porter <dick@ximian.com>
7012 * icall.c: Deleted the icalls that were obsoleted some time ago
7013 by the ICU string code, and which were mixed into the icall
7014 rearranging. Fixes bug 55969.
7017 * string-icalls.c: Deleted the code that those icalls reference.
7019 2004-04-01 Martin Baulig <martin@ximian.com>
7021 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
7023 * class.c (mono_class_from_generic_parameter): Don't set
7024 TYPE_ATTRIBUTE_INTERFACE.
7025 (my_mono_class_from_generic_parameter): Likewise.
7027 2004-04-01 Martin Baulig <martin@ximian.com>
7029 * loader.c (find_method): Added an optional `MonoClass *ic'
7030 argument to search in a specific interface.
7031 (mono_get_method_constrained): New public function.
7033 2004-04-01 Martin Baulig <martin@ximian.com>
7035 * reflection.c (mono_image_get_generic_field_token): Use the
7036 `handleref' cache here.
7038 2004-04-01 Martin Baulig <martin@ximian.com>
7040 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
7042 * reflection.c (create_generic_typespec): Use the `typespec' hash
7043 here, not the `typeref' one.
7045 2004-04-01 Martin Baulig <martin@ximian.com>
7047 * class.c (mono_class_inflate_generic_type): Moved the
7048 functionality into a new static inflate_generic_type() which
7049 returns NULL if it didn't do anything. Only increment the
7050 `mono_stats.inflated_type_count' if we actually inflated
7052 (mono_class_get_full): Check the classes type to see whether we
7053 need to inflate it; also inflate MONO_TYPE_(M)VAR.
7055 2004-04-01 Jackson Harper <jackson@ximian.com>
7057 * reflection.c: Set culture for assembly references.
7059 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
7061 * reflection.[ch], icall.[ch], Fix support for pinning variables.
7063 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7066 (do_mono_assembly_open): the critical section also covers
7067 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
7069 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7072 (mono_manage_threads): abort the background threads when finishing.
7075 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7077 * gc.c: only close the done_event handle if there was no timeout.
7080 2004-03-30 Martin Baulig <martin@ximian.com>
7082 * icall.c (icall_entries): It's called "System.Activator", not
7083 "System.Activation".
7085 2004-03-30 Martin Baulig <martin@ximian.com>
7087 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
7088 (mono_class_create_from_typespec): Likewise.
7090 2004-03-30 Martin Baulig <martin@ximian.com>
7092 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
7093 `has_ctor_constraint' and `initialized'.
7095 2004-03-30 Martin Baulig <martin@ximian.com>
7097 * reflection.c (encode_new_constraint): New static function to add
7098 the constructor constraint attribute to a type parameter.
7099 (encode_constraints): Call encode_new_constraint() if necessary.
7102 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
7104 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
7106 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
7108 * reflection.c, icall.c: add support for pinning variables.
7110 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
7112 * marshal.c (mono_marshal_get_managed_wrapper):
7113 init bool local with zero rather than null.
7115 2004-03-29 Martin Baulig <martin@ximian.com>
7117 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
7118 the "official" behavior here.
7119 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
7121 2004-03-29 Martin Baulig <martin@ximian.com>
7123 * icall.c: Reflect latest API changes.
7125 2004-03-29 Martin Baulig <martin@ximian.com>
7127 * loader.c (mono_get_method_from_token): Also call
7128 mono_metadata_load_generic_params () for abstract and interface
7129 methods; replace the type arguments in the method signature with
7130 the ones which are loaded from the metadata.
7132 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
7134 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
7135 of the lock is not the current thread. MS.NET don't do it, in spite of
7136 what the documentation says. See bug #56157.
7138 2004-03-28 Martin Baulig <martin@ximian.com>
7140 * class.c (mono_class_init): Don't call init_properties() and
7141 init_events() for generic instances; set `prop->parent' when
7142 inflating properties.
7144 * reflection.c (mono_generic_inst_get_object): Call
7145 `mono_class_init (ginst->klass)'.
7146 (mono_type_get_object): Only create a MonoGenericInst if your
7147 generic type is a TypeBuilder.
7148 (do_mono_reflection_bind_generic_parameters): Only set
7149 `ginst->is_dynamic' if our generic type is a TypeBuilder.
7151 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
7153 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
7156 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7158 * icall.c: added Kill_internal icall.
7159 * process.[ch]: added Kill_internal icall.
7161 2004-03-25 Martin Baulig <martin@ximian.com>
7163 * class.h (MonoStats): Added `generic_instance_count',
7164 `inflated_method_count', `inflated_type_count' and
7165 `generics_metadata_size'.
7167 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7169 * reflection.c: no warnings now.
7171 2004-03-25 Martin Baulig <martin@ximian.com>
7173 * class.c (mono_class_get_full): New public function; does a
7174 mono_class_get(), but also takes a `MonoGenericContext *'.
7176 * loader.c (mono_field_from_memberref): Renamed to
7177 `field_from_memberref', made static and added `MonoGenericContext *'
7179 (mono_field_from_token): Added `MonoGenericInst *' argument.
7180 (method_from_memberef): Likewise.
7181 (mono_get_method_from_token): Likewise.
7182 (mono_get_method_full): New public function; does a
7183 mono_get_method(), but also takes a `MonoGenericContext *'.
7185 * verify.c (mono_method_verify): Get the method's generic context
7186 and pass it to mono_field_from_token(), mono_get_method_full() and
7187 mono_class_get_full().
7189 2004-03-25 Martin Baulig <martin@ximian.com>
7191 * class.c (mono_class_inflate_generic_type): Take a
7192 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
7193 `MonoGenericMethod *'.
7195 2004-03-25 Martin Baulig <martin@ximian.com>
7197 * loader.h (MonoMethodInflated): Store the MonoGenericContext
7198 instead of the MonoGenericMethod here.
7200 2004-03-25 Martin Baulig <martin@ximian.com>
7202 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
7203 each time we create a new MonoGenericInst, we also create a new
7204 context which points back to us.
7206 * class.c (inflate_method): Use `ginst->context' instead of
7207 creating a new context.
7209 * loader.c (method_from_memberref): Use
7210 `klass->generic_inst->context' instead of creating a new context.
7212 2004-03-25 Martin Baulig <martin@ximian.com>
7214 * class.h (MonoGenericContext): New struct.
7215 (MonoGenericMethod): Removed `generic_inst'.
7217 * class.c (mono_class_inflate_generic_method): Take a
7218 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
7220 2004-03-25 Martin Baulig <martin@ximian.com>
7222 * loader.h (MonoMethodInflated): New typedef.
7224 * metadata.h (MonoMethodSignature): Removed `gen_method', make
7225 `generic_param_count' consume just 30 bits, added `is_inflated'
7226 and `has_type_parameters' flags (one bit each).
7228 * class.c (mono_class_inflate_generic_method): Create a
7229 MonoMethodInflated instead of a MonoMethodNormal and set
7230 `is_inflated' in the method signature.
7232 * class.h (MonoGenericMethod): Removed `generic_method'.
7234 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
7236 * image.c: Make sure the name of a MonoImage is always an absolute path.
7237 This fixes bug #54415.
7239 2004-03-24 Martin Baulig <martin@ximian.com>
7241 * class.c (mono_class_setup_vtable): If we're a generic instance,
7242 use our generic type's vtable size.
7244 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
7246 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
7247 MONO_NO_UNLOAD env var as a temporary workaround for unloading
7250 2004-03-23 Martin Baulig <martin@ximian.com>
7252 * class.h (MonoDynamicGenericInst): Added `int count_events' and
7253 `MonoEvent *events'.
7255 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
7256 (typebuilder_icalls): Added "get_event_info"; calls
7257 mono_reflection_event_builder_get_event_info().
7259 * reflection.c (mono_reflection_generic_inst_initialize): Added
7260 `MonoArray *events'.
7261 (mono_reflection_event_builder_get_event_info): New function.
7263 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
7265 * object.h: add mono_type_initialization_init
7267 * object.c (mono_runtime_class_init):
7268 implement class constructor synchronization rules
7269 to cope with threading issues.
7270 add mono_type_initialization_init
7272 * appdomain.c (mono_runtime_init): call
7273 mono_type_initialization_init
7275 * class.h: removing initializing field from MonoVTable
7277 2004-03-23 Martin Baulig <martin@ximian.com>
7279 * class.c (my_mono_class_from_generic_parameter): Use
7280 `param->name' if it's not NULL.
7282 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
7284 * class.c: do not insert non-virtual methods in the vtable.
7285 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
7286 that means the method is non-virtual. This never would have
7289 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
7291 * profiler.c: Added lock for accessing coverage_hash.
7293 2004-03-22 Martin Baulig <martin@ximian.com>
7295 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
7296 `method->method->signature->generic_param_count != 0' to make it
7297 work for interface methods.
7299 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7301 * process.c: quote the string passed to the shell using g_shell_quote.
7303 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7306 (mono_threads_manage): don't remove the finalizer thread and self
7307 from the threads hash table so that mono_thread_manage can be called
7310 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7312 * process.c: quote the arguments when UseShellExecute is true. Fixes
7315 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7317 * threads.c: set mono_thread_detach as a cleanup routine for every
7318 thread. This way it's always executed upon thread termination, either
7319 aborted or finished normally. No more xsp hangs!
7321 2004-03-17 Martin Baulig <martin@ximian.com>
7323 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
7324 `int count_nested' and a `MonoType **nested'.
7326 * reflection.c (mono_reflection_bind_generic_parameters): Moved
7327 most of the functionality into a new static
7328 do_mono_reflection_bind_generic_parameters() and don't take a
7329 `MonoType *nested_in' argument any more. Don't compute nested
7331 (mono_reflection_generic_inst_get_nested_types): New public method
7332 to get nested types.
7334 * class.c (mono_class_create_generic): Set `klass->nested_in' if
7335 we're a nested class.
7337 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
7338 mono_reflection_generic_inst_get_nested_types() to compute the
7341 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
7343 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
7344 descriptive error message under windows.
7346 2004-03-17 Martin Baulig <martin@ximian.com>
7348 * class.c (dup_type): Added `const MonoType *original' argument;
7349 copy the attrs from the original type.
7351 2004-03-17 Martin Baulig <martin@ximian.com>
7353 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
7354 `m->generic_inst_cache' here.
7356 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
7358 * exception.h exception.c: Add stack_overflow_exception.
7360 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7363 (overlapped_callback): call SetEvent *after* invoking the callback.
7364 No need to call CloseHandle.
7366 2004-03-16 Martin Baulig <martin@ximian.com>
7368 * reflection.c (mono_image_get_fieldref_token): Take a
7369 `MonoReflectionField *' instead of a `MonoClassField *' and a
7370 `MonoClass *'; store the `MonoReflectionField *' in the hash.
7372 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7374 * appdomain.c: don't add the culture to the filename we're looking for
7375 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
7377 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7379 * locales.c: don't ignore symbols when doing case insensitive compares.
7380 Thanks Dick! Fixes bug #54046.
7382 * threads.c: surround 'threads' usage with enter/leave in
7385 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
7387 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
7388 implicitly marshalled as [Out]. Fixes #55450.
7390 (mono_marshal_get_runtime_invoke): Zero out the result if there is
7393 2004-03-16 Martin Baulig <martin@ximian.com>
7395 * class.c (mono_class_from_generic_parameter): Use the actual
7398 2004-03-16 Martin Baulig <martin@ximian.com>
7400 * reflection.c (type_get_signature_size): New static function.
7401 Compues the size of the type in a method signature.
7402 (method_get_signature_size): New static function; calls
7403 type_get_signature_size() to compute the actual size of the
7405 (method_encode_signature): Use method_get_signature_size() to get
7406 the signature's size rather than using `nparams * 10'.
7408 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7410 * file-io.h: define here WapiOverlapped on windows. I don't want the
7411 regular OVERLAPPED one.
7414 * threadpool.c: somehow, BindIoCompletionCallback is not found.
7415 Disabling AIO on windows.
7417 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7419 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
7422 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7424 * appdomain.c: upgraded corlib version.
7426 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
7427 and BeginWrite. Allow opening files for asynchrnous operations.
7429 * file-io.h: new struct that maps FileStreamAsyncResult.
7430 * icall.c: added new icalls.
7431 * process.[ch]: support setting child process environment variables
7432 and use the SHELL or COMSPEC when UseShellExecute is true.
7434 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
7435 callback for async. IO is here and also BindHandle.
7437 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
7440 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
7442 * reflection.c (create_custom_attr): Allow len == 0.
7444 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
7445 computation on big-endian machines.
7447 2004-03-13 Martin Baulig <martin@ximian.com>
7449 * class.h (MonoGenericInst): Added `int count_ifaces'.
7451 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
7452 `ginst->count_ifaces' instead `klass->interface_count' since we
7453 may get called before the vtable is created.
7455 * loader.c (mono_method_get_param_names): If we're a generic
7456 instance, return and don't initialize the class.
7458 * reflection.c (mono_reflection_setup_generic_class): Don't call
7459 ensure_runtime_vtable().
7460 (mono_reflection_bind_generic_parameters): Set
7461 `ginst->count_ifaces'.
7463 2004-03-11 Jackson Harper <jackson@ximian.com>
7467 * unicode.h: Remove unused System.Char icalls.
7469 2004-03-11 Miguel de Icaza <miguel@ximian.com>
7471 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
7472 code when we P/Invoke the first library in Windows.Forms, instead
7473 of when we first open the assembly.
7475 * assembly.c: Drop the lookup from here.
7477 2004-03-10 Martin Baulig <martin@ximian.com>
7479 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
7480 class for properties, fields and events. Finally fixes #54945.
7482 2004-03-10 Martin Baulig <martin@ximian.com>
7484 * metadata.c (mono_metadata_class_equal): New static function;
7485 checks whether two generic instances or two generic parameters are
7487 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
7490 2004-03-10 Martin Baulig <martin@ximian.com>
7492 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
7494 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
7495 argument and write it into the `reflection_info' field.
7498 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
7499 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
7501 2004-03-09 Jackson Harper <jackson@ximian.com>
7503 * char-conversions.h: use 8 bits for numeric data its all we need
7504 * icall.c: numeric data is only 8 bits now.
7506 2004-03-09 Martin Baulig <martin@ximian.com>
7508 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
7510 * class.c (init_properties, init_events): Initialize the new
7513 * reflection.c (typebuilder_setup_properties): Likewise.
7514 (typebuilder_setup_events): Likewise.
7516 * reflection.h (MonoEventInfo): Replaced `parent with
7517 `declaring_type' and `reflected_type'.
7519 * icall.c (ves_icall_get_property_info): Distinguish between
7520 declaring and reflected type.
7521 (ves_icall_get_event_info): Likewise.
7523 2004-03-09 Martin Baulig <martin@ximian.com>
7525 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
7526 (ves_icall_Type_GetField): Correctly set field->klass.
7528 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
7530 * loader.h: Fix warning.
7532 2004-03-08 Miguel de Icaza <miguel@ximian.com>
7534 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
7535 library routine if present. Notice that it will still continue
7536 executing even if its missing, for those working on the Gtk#
7537 edition of Windows.Forms.
7539 * assembly.c (do_mono_assembly_open): If loading the
7540 System.Windows.Forms call mono_loader_wini_init.
7542 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
7544 * class.h: Added MonoRemoteClass struct.
7545 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
7546 function for MonoStrings.
7547 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
7548 Added internal call for getting the proxy type.
7549 * marshal.c: Get the type of transparent proxies from its remote_class.
7550 Added methods that generate the IL for type checks and casts:
7551 mono_marshal_get_isinst, mono_marshal_get_castclass,
7552 mono_marshal_get_proxy_cancast.
7553 * marshal.h: Declaration of the previous new methods.
7554 * object.c: Added new moethods for creating and updating MonoRemoteClass
7555 instances: mono_remote_class, mono_upgrade_remote_class,
7556 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
7557 * verify.c: FIx transparent_proxy_fields layout.
7558 * appdomain.c: Bump corlib version.
7560 2004-03-04 Jackson Harper <jackson@ximian.com>
7562 * icall.c: Add icall to access char conversion tables.
7563 * char-conversions.h: Character conversion tables.
7564 * Makefile.am: Add char-conversions.h private header file.
7566 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
7568 * appdomain.c (unload_thread_main): Increase unloading timeout to
7569 10 sec as a temporary workaround for Nant problems.
7571 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
7573 * gc.c: Add checks for GC_enable and GC_disable.
7575 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
7576 (jaak@zd.com.pl). Fix memory corruption in String.Replace
7579 2004-02-27 Martin Baulig <martin@ximian.com>
7581 * reflection.c (mono_reflection_bind_generic_parameters): Take a
7582 `MonoReflectionType *' instead of a `MonoType *'.
7584 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
7586 * gc.c (run_finalize): Avoid finalizing the object representing the
7588 (finalizer_thread): Fix warning.
7590 2004-02-25 Martin Baulig <martin@ximian.com>
7592 * class.c (_mono_class_get_instantiation_name): Added `int offset'
7593 argument for nested types.
7594 (mono_class_create_generic): Added support for nested generictypes.
7596 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
7599 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
7601 * reflection.c (method_encode_signature): Increase the minimum
7602 value of `size' from 10 to 11.
7603 (mono_reflection_bind_generic_parameters): Take `int type_argc'
7604 and `MonoType **types' arguments instead of the `MonoArray
7605 *types'; added `MonoType *nested_in'. Recursively instantiate
7608 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
7610 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
7611 stack_overflow_ex members which are used by exception handling.
7613 * appdomain.c (mono_runtime_init): Initialize the new members.
7615 * gc.c (mono_gc_enable): New helper function.
7616 * gc.c (mono_gc_disable): New helper function.
7618 2004-02-23 Martin Baulig <martin@ximian.com>
7620 * icall.c: I must have been really stupid - make it actually work
7623 2004-02-23 Martin Baulig <martin@ximian.com>
7625 * loader.c (method_from_memberref): Only inflate the method if
7626 it's in another klass.
7628 2004-02-23 Martin Baulig <martin@ximian.com>
7630 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
7631 (mono_class_init): If we're a generic instance and an interface,
7632 compute `class->interface_id'; also create `class->interfaces'
7633 here and inflate them.
7635 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
7637 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
7639 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
7641 2004-02-15 Miguel de Icaza <miguel@ximian.com>
7643 * reflection.c (method_encode_code): Improved the error message
7644 generated by the exception.
7646 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7648 * icall.c: Martin did not do what he said in the ChangeLog for
7649 2004-02-18, but put back the changes for properties and events.
7650 Commenting those changes out again and adding comment to bug #54518.
7652 * process.c: removed warning.
7654 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
7656 * marshal.c (emit_struct_conv): Print an error message instead of
7657 asserting when a type does not have the StructLayout attribute.
7659 2004-02-20 Martin Baulig <martin@ximian.com>
7661 * reflection.c (mono_type_get_object): Also use the cache for
7663 (mono_reflection_bind_generic_parameters): Always compute
7666 2004-02-20 Martin Baulig <martin@ximian.com>
7668 * class.h (MonoGenericMethod): Removed `klass'.
7670 * class.c (mono_class_inflate_generic_method): Added `MonoClass
7673 2004-02-20 Martin Baulig <martin@ximian.com>
7675 * reflection.c (method_encode_methodspec): Actually use the
7676 uninflated signature for the memberref.
7678 2004-02-20 Martin Baulig <martin@ximian.com>
7680 * class.h (MonoGenericMethod): Removed `declaring'.
7682 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
7683 is NULL, compute it here.
7685 2004-02-20 Martin Baulig <martin@ximian.com>
7687 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
7689 * metadata.c (mono_metadata_generic_inst_hash): New method.
7690 (mono_metadata_generic_inst_equal): New method.
7692 * reflection.c (mono_reflection_bind_generic_parameters): Use the
7693 `klass->image->generic_inst_cache' cache to avoid creating
7694 duplicate MonoGenericInst's.
7696 * class.c (mono_class_inflate_generic_type): Use the cache.
7698 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7700 * object.c: fixed gc descriptor calculation for embedded valuetypes.
7702 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7704 * icall.c: added Socket.WSAIoctl icall.
7706 * socket-io.[ch]: implemented
7707 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
7709 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
7711 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
7713 2004-02-18 Urs C Muff <umuff@quark.com>
7715 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
7716 this work on PPC and other big-endian architectures.
7718 * debug-mono-symfile.h: Prepended the names of all the `guint32'
7719 fields with an underscore to make sure they're only accessed by
7722 2004-02-18 Martin Baulig <martin@ximian.com>
7724 * icall.c: Put the klass->refclass changes back for methods and
7725 fields, but not for properties and events. We're currently not
7726 distinguishing between DeclaringType and ReflectedType for
7727 properties and events, that's what caused the regressions.
7729 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7732 (mono_async_result_new): the handle can be NULL.
7734 * threadpool.c: Use an event instead of a semaphore, don't initialize
7735 it until needed. This saves quite a few semaphores from being created
7736 when using the threadpool.
7738 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
7740 * object.c (mono_string_is_interned_lookup): Fix interning of long
7741 strings. Fixes #54473.
7743 * domain.c (ldstr_equal): Optimize if the two strings are equal.
7745 * icall.c: Revert the klass->refclass changes since they introduce
7746 regressions (bug #54518).
7748 2004-02-18 Martin Baulig <martin@ximian.com>
7750 * class.c (mono_class_init): If we're a generic instance and don't
7751 come from a TypeBuilder, inflate our members here.
7752 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
7753 (mono_class_create_generic): New public method.
7754 (mono_class_initialize_generic): Removed.
7755 (get_instantiation_name): Renamed to
7756 _mono_class_get_instantiation_name() and made it public.
7758 2004-02-18 Martin Baulig <martin@ximian.com>
7760 * class.c (mono_class_inflate_generic_type): Clear the new
7761 instance's `nginst->klass' when inflating a generic instance.
7762 (mono_class_is_subclass_of): Added (basic) support for generic
7765 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
7767 * appdomain.h, domain.c: use a MonoCodeManager instead of a
7768 MonoMempool to hold compiled native code.
7770 2004-02-17 Martin Baulig <martin@ximian.com>
7772 * class.h (MonoDynamicGenericInst): Added `count_properties' and
7775 * reflection.c (mono_reflection_generic_inst_initialize): Added
7776 `MonoArray *properties' argument.
7778 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
7780 2004-02-17 Martin Baulig <martin@ximian.com>
7782 * icall.c (ves_icall_Type_GetFields): Renamed to
7783 ves_icall_Type_GetFields_internal() and added a
7784 `MonoReflectionType *rtype' argument; pass it to
7785 mono_field_get_object() to set the field's "reflected" type.
7786 (ves_icall_Type_GetConstructors): Likewise.
7787 (ves_icall_Type_GetEvents): Likewise.
7788 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
7789 argument; pass it to mono_method_get_object() to set the method's
7792 2004-02-17 Martin Baulig <martin@ximian.com>
7794 * class.h (MonoDynamicGenericInst): New type.
7795 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
7797 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
7798 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
7799 (ves_icall_MonoGenericInst_GetFields): New interncall.
7801 * class.c (mono_class_from_generic): Don't call
7802 mono_class_initialize_generic() if this is a dynamic instance;
7803 ie. it's being created from a TypeBuilder.
7804 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
7805 `class->byval_arg.type'.
7807 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
7808 to `inflate_method' and made static.
7809 (mono_reflection_inflate_field): Removed.
7810 (mono_reflection_generic_inst_initialize): New public method.
7812 * reflection.h (MonoReflectionGenericInst): Removed `methods',
7813 `ctors' and `fields'; added `initialized'.
7815 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
7817 * debug-helpers.c (mono_method_full_name): Fix output for empty
7820 2004-02-12 Martin Baulig <martin@ximian.com>
7822 * class.h (MonoClassField): Added `MonoType *generic_type'.
7824 * reflection.c (mono_image_get_fieldref_token): Added support for
7825 instantiated generic types.
7826 (field_encode_inflated_field): Removed.
7827 (mono_image_get_inflated_field_token): Removed.
7828 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
7830 * reflection.h (MonoReflectionInflatedField): Removed.
7832 2004-02-12 Martin Baulig <martin@ximian.com>
7834 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
7835 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
7837 * reflection.c (mono_image_get_methodspec_token): Take a
7838 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
7839 (mono_image_create_token): Check whether we have a
7840 `method->signature->gen_method' and call
7841 mono_image_get_methodspec_token() if appropriate.
7842 (inflated_method_get_object): Removed.
7843 (mono_reflection_bind_generic_method_parameters): Return a
7844 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
7845 (mono_reflection_inflate_method_or_ctor): Likewise.
7847 * reflection.h (MonoReflectionInflatedMethod): Removed.
7849 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
7851 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
7852 for custom valuetype marshalling.
7854 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
7856 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7858 * icall.c: fixed WSAGetLastError_internal name.
7860 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
7862 * threads.c (mono_thread_attach): Allow this to be called multiple
7865 * threads.c (build_wait_tids): Do not wait for ourselves.
7867 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
7868 appdomain list is empty.
7870 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
7871 memory returned by mono_string_builder_to_utf16, since it points into
7872 managed memory. Thanks to Bernie Solomon for noticing this.
7874 * icall.c: Add AppDomainSetup icalls.
7876 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
7878 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
7881 * reflection.c (reflection_methodbuilder_to_mono_method): Save
7882 custom attributes to the method_aux struct. Also fix array indexes etc.
7884 * loader.c (mono_method_get_param_names): Make dynamic case work again.
7886 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
7888 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
7889 (both static and runtime) and reduce startup time.
7891 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
7893 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
7894 AsAny marshalling conversion instead of crashing.
7896 * marshal.c: Fix warnings.
7898 2004-02-09 Martin Baulig <martin@ximian.com>
7900 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
7902 * reflection.h (MonoReflectionInflatedMethod): Removed the
7903 `declaring' field, it's now in the unmanaged MonoGenericMethod.
7905 * reflection.c (method_encode_methodspec): Removed the `method'
7906 argument; we get it from `gmethod->declaring'.
7907 (inflated_method_get_object): Removed the `declaring' argument.
7909 2004-02-09 Martin Baulig <martin@ximian.com>
7911 * class.h (MonoGenericMethod): New type.
7912 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
7915 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
7916 a `MonoGenericMethod *gen_method' one.
7918 * class.c (mono_class_inflate_generic_type): Take an additional
7919 `MonoGenericMethod * argument. This is only non-NULL if we're
7920 inflating types for a generic method.
7921 (mono_class_inflate_generic_signature): Renamed to
7922 inflate_generic_signature() and made static; take a
7923 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7924 (inflate_generic_header): Take a `MonoGenericMethod *' argument
7925 instead of a `MonoGenericInst *' one.
7926 (mono_class_inflate_generic_method): Likewise.
7928 * reflection.c (encode_generic_method_sig): Take a
7929 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7930 (method_encode_methodspec): Likewise.
7931 (inflated_method_get_object): Likewise.
7933 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
7934 field with a `MonoGenericMethod *gmethod' one.
7936 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
7938 * class.h (mono_class_has_parent): add parens to expansion
7941 2004-02-08 Martin Baulig <martin@ximian.com>
7943 * image.h (MonoImage): Removed `generics_cache'.
7945 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
7946 instead of a `MonoType *' argument; removed the `inflate_methods'
7947 argument. Don't inflate methods here.
7949 * loader.c (find_method): If it's a generic instance, call
7950 mono_class_init() on the `sclass->generic_inst->generic_type'.
7952 * metadata.c (mono_type_size): Make this work on uninitialized
7953 generic instances; call it on the `ginst->generic_type's class.
7955 * reflection.c (mono_reflection_bind_generic_parameters): Call
7956 mono_class_from_generic() to create the `ginst->klass'.
7958 2004-02-08 Martin Baulig <martin@ximian.com>
7960 * class.h (MonoClass): Changed type of `generic_inst' from
7961 `MonoType *' to `MonoGenericInst *'.
7963 2004-02-08 Martin Baulig <martin@ximian.com>
7965 * icall.c (ves_icall_Type_BindGenericParameters): Just call
7966 mono_type_get_object(), this is now creating a `MonoGenericInst'
7967 for MONO_TYPE_GENERICINST.
7968 (ves_icall_MonoGenericInst_GetParentType): Likewise.
7969 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
7971 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
7972 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
7973 (inflated_method_get_object): Added `MonoClass *refclass' argument.
7974 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
7977 * reflection.h (MonoReflectionInflatedMethod): Removed
7978 `declaring_type' and `reflected_type'.
7980 2004-02-08 Martin Baulig <martin@ximian.com>
7982 * class.h (MonoGenericInst): Added `MonoType *parent' and
7983 `MonoType **ifaces'.
7985 * reflection.h (MonoReflectionGenericInst): Removed `klass',
7986 `parent' and `interfaces'.
7988 * reflection.c (mono_reflection_bind_generic_parameters): Take a
7989 `MonoType *' argument and return a `MonoType *'.
7992 (ves_icall_MonoGenericInst_GetParentType): New interncall.
7993 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
7995 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
7997 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
7998 valuetype marshalling.
8000 2004-02-06 Martin Baulig <martin@ximian.com>
8003 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
8004 (my_mono_class_from_generic_parameter): Likewise.
8006 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
8008 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
8009 contents of the symbol files lazily.
8011 * object.h (MonoThread): Add 'name' and 'name_len' fields.
8013 * threads.h threads.c icall.c: New icalls for getting and setting the
8016 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
8018 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
8019 Raise an exception when the domain is not found.
8021 2004-02-03 Martin Baulig <martin@ximian.com>
8023 * reflection.c (mono_image_get_methodspec_token): Use the
8024 uninflated signature; fixes gen-33.
8026 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
8028 * gc.c threads.c: Make the finalizer thread a normal managed thread so
8029 the finalizer code can use thread functionality.
8031 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
8032 the finalizer thread.
8034 * threads.c: Make some functions more robust.
8036 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
8038 * metadata.h: Add new marshalling conventions.
8040 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
8041 stringbuilder marshalling. Fixes #53700.
8043 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
8045 * reflection.c (mono_image_get_type_info): Save declarative security
8048 * reflection.c (mono_image_get_field_info): Handle uninitialized
8049 unmanaged fields as well.
8051 * appdomain.c: Bump corlib version.
8053 2004-02-01 Martin Baulig <martin@ximian.com>
8055 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
8056 method type arguments.
8058 2004-01-30 Duncan Mak <duncan@ximian.com>
8060 * marshal.h: Add prototype for
8061 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
8063 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
8066 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
8068 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
8069 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
8071 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
8073 * marshal.c (mono_marshal_get_native_wrapper): Add support for
8074 custom marshalling of valuetypes.
8076 * marshal.c: Fix some warnings.
8078 2004-01-29 Martin Baulig <martin@ximian.com>
8080 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
8081 for generic method parameters.
8083 * reflection.c (method_encode_methodspec): Write the uninflated
8084 signature into the methodspec table.
8085 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
8086 is always the uninflated method.
8087 (reflection_methodbuilder_to_mono_method): Copy the generic
8088 parameters from the MethodBuilder into `header->gen_params'.
8090 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
8092 * class.c (mono_class_from_generic_parameter): Fix warning.
8094 2004-01-27 Martin Baulig <martin@ximian.com>
8096 * class.c (mono_class_from_generic_parameter): Don't create
8097 `klass->methods' here.
8099 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
8101 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
8102 extension since it does not work with libraries named lib<FOO>.dll.so.
8104 2004-01-25 Martin Baulig <martin@ximian.com>
8106 * class.c (mono_class_inflate_generic_type): Added support for
8107 MONO_TYPE_GENERICINST.
8109 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
8110 inflate methods on open constructed types.
8112 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8114 * object.c: fire ProcessExit event in the root AppDomain after running
8115 Main. Fixes bug #53299.
8117 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
8119 * socket-io.c: include the new socket-wrappers.h header.
8120 Use the wrappers instead of the unix socket functions to make the code
8123 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
8125 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
8127 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8130 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
8132 * reflection.c (mono_image_create_pefile): Handle the case when the
8133 entry point is not a MethodBuilder.
8135 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8136 field to ReflectionMethod since it is not allways a builder.
8138 * reflection.c (type_get_fully_qualified_name): New helper function to
8139 return the fully qualified name of a type.
8141 * reflection.c (encode_marshal_blob): Always emit the fully qualified
8142 type name for custom marshallers.
8144 * reflection.c (mono_marshal_spec_from_builder): Ditto.
8146 * class.c (mono_class_setup_vtable): If a parent class already
8147 implements an interface, use the implementing methods from that class.
8150 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8152 * threadpool.c: just return instead of ExitThread to allow for thread
8155 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
8157 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
8158 when closing resource modules.
8160 * reflection.c (mono_image_create_pefile): Handle the case when the
8161 entry point is not a MethodBuilder.
8163 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8164 field to ReflectionMethod since it is not allways a builder.
8166 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
8168 * marshal.c (mono_marshal_get_managed_wrapper):
8169 mono_marshal_alloc takes native int so CONV_I
8172 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
8174 * reflection.c (fixup_cattrs): New function to fixup the methoddef
8175 tokens in the cattr table. Fixes #53108.
8177 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8179 * loader.c: don't trim ".dll" before looking up in the config file.
8180 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
8182 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
8184 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
8185 Return the module which contains the resource as well.
8186 (ves_icall_System_Reflection_Module_Close): New icall.
8188 * appdomain.c: Bump corlib version number.
8190 * image.c (mono_image_addref): New public function.
8192 * assembly.c: Call mono_image_addref.
8194 * reflection.c (mono_module_get_object): Increase reference count of
8197 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8200 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
8201 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
8202 proper exceptions on DllImport problems.
8204 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
8206 * class.c, metadata.c: eliminate CSIZE macro.
8208 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
8210 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
8211 * object.h: Added async_callback field in MonoAsyncResult.
8212 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
8213 * verify.c: Added async_callback in MonoAsyncResult layout.
8215 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
8217 * reflection.c (mono_reflection_get_custom_attrs): Add support
8220 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
8222 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
8224 (mono_marshal_method_from_wrapper): Add null pointer check.
8226 2004-01-16 Martin Baulig <martin@ximian.com>
8228 * debug-mono-symfile.h: Set version number to 36 and reflect
8229 latest symbol writer changes.
8231 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
8233 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
8234 multi-dimensional arrays.
8235 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
8236 (mono_class_from_mono_type): Use bounded_array_class_get.
8238 * class.c (mono_bounded_array_class_get): New function which takes
8239 a 'bounded' bool argument to distinguish vectors from one dimensional
8242 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
8243 bounded_array_class_get if the array has bounds.
8245 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
8246 Search modules loaded using AssemblyBuilder:AddModule as well.
8248 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8250 * appdomain.c: increased corlib version.
8251 * filewatcher.c: removed g_print.
8253 (get_property_info): only allocate what is actually requested.
8254 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
8256 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8258 * Makefile.am: added filewatcher.[ch]
8259 * filewatcher.[ch]: FileSystemWatcher runtime support.
8260 * icall.c: added new FSW icalls.
8262 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
8264 * string-icalls.c: fix stringbuilder regression as suggested by
8265 Iain McCoy <iain@mccoy.id.au>.
8267 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
8269 * process.c (process_read_stringtable_block): Recognize '007f' as
8270 a language neutral stringtable block.
8272 2004-01-12 Patrik Torstensson
8274 * object.h (MonoStringBuilder) : Changed layout to support our
8275 new stringbuilder class.
8276 * marshal.c: Change marshalling to support the new layout of
8278 * appdomain.c: increased version number because new layout of
8281 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
8283 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
8284 assembly name as an string instead of an AssemblyName, since it is
8285 easier to extract info from it.
8287 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
8288 the culture subdirectories too. Fixes #52231.
8290 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8292 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
8293 It takes 2 new parameters with an optional name for the method to look
8294 for and case ignoring info.
8296 * threadpool.c: removed unused variable.
8298 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8300 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
8301 It takes 2 new parameters with an optional name for the property to look
8302 for and case ignoring info.
8305 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
8307 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
8310 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8313 * assembly.c: escape the uri before passing it to g_filename_from_uri.
8316 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
8318 * reflection.c: Add support for more than one unmanaged resource.
8320 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
8321 in field->def_value, as done in all other cases.
8323 * reflection.c (mono_reflection_get_custom_attrs): Add support for
8326 * reflection.c (mono_reflection_create_runtime_class): Remove
8327 errorneous assignment to klass->element_class, since it is already
8328 done in mono_reflection_setup_internal_class.
8330 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8332 * gc.c: added missing LeaveCriticalSection.
8333 * icall.c: indented a couple of lines.
8334 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
8335 if we call EndInvoke inside a callback. Fixes bug #52601.
8337 2004-01-07 Martin Baulig <martin@ximian.com>
8339 * mono-debug-debugger.h
8340 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
8342 2004-01-06 Miguel de Icaza <miguel@ximian.com>
8344 * appdomain.c: Use messages in NotImplementedException.
8346 * exception.c (mono_get_exception_not_implemented): Now this takes
8349 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
8350 exception instead of g_asserting an aborting when something is not
8353 Add some inline docs.
8355 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
8357 * reflection.h: Update after changes to object layout.
8359 * reflection.c: Implement saving of unmanaged aka win32 resources.
8361 * appdomain.c: Bump version number.
8363 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
8364 Handle missing domains gracefully.
8366 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
8368 * file-io.c : On Windows, there are much more invalid_path_chars.
8370 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
8372 * class.h, object.c: prepare for GetType () speedup.
8374 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
8376 * profiler.c: workaround for --profile null reference exception on
8377 cygwin. Patch by Patrik Torstensson.
8379 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
8381 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
8382 make work for unaligned access.
8384 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
8386 * class.c: small cleanup (class->fields [i] -> field).
8387 * image.c: check address of metadata is valid.
8389 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
8391 * assembly.h assembly.c (mono_assembly_loaded): New public function to
8392 search the list of loaded assemblies.
8394 * reflection.c (mono_reflection_type_from_name): Use
8395 mono_assembly_loaded instead of mono_image_loaded.
8397 * reflection.c: Fix warnings.
8399 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
8401 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
8402 is dynamic. This is needed since an assembly can contain both dynamic and
8405 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
8408 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
8410 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
8411 to store modules loaded using AddModule.
8413 * reflection.c (mono_image_fill_file_table): Generalize this so it works
8416 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
8418 * reflection.c (mono_image_fill_export_table_from_module): New function to
8419 fill out the EXPORTEDTYPES table from a module.
8421 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
8422 into a separate function. Also handle loaded non-dynamic modules.
8424 * reflection.c (mono_image_basic_init): Fix memory allocation.
8426 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8428 * assembly.c (mono_assembly_load_references): Make this public.
8430 2003-12-19 Martin Baulig <martin@ximian.com>
8432 * class.c (mono_class_initialize_generic): Made this static, take
8433 a `MonoGenericInst *' instead of a `MonoClass *'.
8434 (mono_class_from_generic): Call mono_class_initialize_generic()
8435 unless we're already initialized or being called from
8436 do_mono_metadata_parse_generic_inst().
8438 * class.h (MonoGenericInst): Added `initialized' and
8439 `init_pending' flags.
8441 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
8442 `mono_class_init (gklass)' or mono_class_initialize_generic()
8443 here; set `generic_inst->init_pending' while parsing the
8446 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
8448 * locales.c: include string.h for memxxx prototypes
8450 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
8452 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
8453 constructor when accessing literal fields.
8455 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
8457 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8459 * reflection.c (assembly_add_resource_manifest): New function to fill
8460 the MANIFESTRESOURCE table.
8462 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
8464 * reflection.h: Update to changes in class layout.
8466 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
8467 Reenable call to mono_runtime_is_shutting_down ().
8469 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
8470 determine if the runtime is shutting down.
8472 2003-12-16 Jackson Harper <jackson@ximian.com>
8474 * icall.c: comment out call to mono_runtime_is_shutting_down to
8477 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
8479 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
8480 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
8482 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
8484 * reflection.c: move definition of swap_with_size
8485 to before its first call
8487 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
8489 * appdomain.c (mono_runtime_is_shutting_down): New public function.
8491 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
8494 * object.c: Fix warnings.
8496 * icall.c (ves_icall_Type_Get...): Only consider inherited static
8497 members if FlattenHierarchy is set.
8499 * reflection.c (mono_image_add_decl_security): New function to emit
8500 declarative security.
8502 * reflection.h reflection.c: Add support for declarative security.
8504 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8506 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
8508 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8510 * appdomain.c verify.c: Moved corlib version checking into its own
8511 function in appdomain.c since it needs to create vtables etc.
8513 2003-12-13 Patrik Torstensson <p@rxc.se>
8515 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
8516 instead of unwrapped server.
8518 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
8520 * verify.c (check_corlib): Fix field index.
8522 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
8524 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
8527 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
8529 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
8530 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
8531 cope with sizeof(size_t) != sizeof(guint32).
8533 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8535 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
8538 2003-12-10 Mark Crichton <crichton@gimp.org>
8540 * icall.c: removed the GetNonZeroBytes. We now handle this case
8543 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
8545 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
8547 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
8550 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
8552 * verify.c (check_corlib): Handle the case when the version field is
8553 initialized by a static constructor.
8555 2003-12-08 Patrik Torstensson <p@rxc.se>
8557 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
8559 2003-12-08 Martin Baulig <martin@ximian.com>
8561 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
8562 a MonoReflectionGenericParameter, also take the parameter index
8563 and name as arguments.
8564 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
8565 (ves_icall_MonoGenericParam_initialize): New interncall.
8566 (ves_icall_Type_make_byref_type): New interncall.
8568 * reflection.h (MonoReflectionGenericParam): Derive from
8569 MonoReflectionType, not just from MonoObject. Added `refobj' and
8572 * reflection.c (mono_reflection_define_generic_parameter): Create
8573 and return a new MonoReflectionGenericParam; don't initialize the
8575 (mono_reflection_initialize_generic_parameter): New public method;
8576 initializes the constraints and creates the `param->pklass'.
8578 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
8580 * reflection.h reflection.c: Use the new fields 'num_types',
8581 'num_fields' and 'num_methods' to track the number of types etc.
8583 * verify.c (check_corlib): Check corlib version number.
8585 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
8587 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
8588 function works on all methods.
8590 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
8592 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
8593 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
8594 the custom_type_info flag of the transparent proxy.
8595 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
8596 objects that supports IRemotingTypeInfo.
8597 * object.h: Added custom_type_info field in transparent proxy.
8599 2003-12-06 Martin Baulig <martin@ximian.com>
8601 * class.c (mono_class_create_from_generic): Removed.
8602 (mono_class_from_generic): Check `ginst->klass' before doing
8603 anything else. This is important to fully support "recursive"
8606 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
8607 empty `generic_inst->klass' before doing anything else.
8609 2003-12-06 Dick Porter <dick@ximian.com>
8614 * locales.c: Use C structs to access class fields. Don't do a
8615 conversion between MonoString and UChar because both are
8616 platform-endian UTF-16. Compare now takes startindex and count
8617 parameters. Add a char overload for IndexOf. Speed up the
8618 invariant string IndexOf.
8620 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
8622 * Makefile.am (monosn_LDADD): Fix parallel build.
8624 2003-12-04 Martin Baulig <martin@ximian.com>
8627 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
8628 (ves_icall_Type_make_array_type): New interncall.
8630 2003-12-04 Martin Baulig <martin@ximian.com>
8632 * locales.c: also change it in the !HAVE_ICU case.
8634 2003-12-04 Dick Porter <dick@ximian.com>
8637 * locales.c: construct_compareinfo is now in CompareInfo, not
8640 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
8642 * image.c (mono_image_load_file_for_image): Cache loaded images in the
8645 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
8648 * assembly.c (mono_assembly_load_references): Only load references
8651 * class.c (mono_class_from_name): Avoid linear search of the
8654 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
8656 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
8658 * image.h (MonoImage): Add 'field_cache' field.
8660 * loader.c (mono_field_from_token): Cache field lookups.
8662 * reflection.c (mono_module_get_object): Fix name property.
8664 * icall.c (ves_icall_get_enum_info): Update after changes to
8665 mono_metadata_get_constant_index ().
8667 * icall.c: Get rid of get_type_info icall, use a separate icall for
8668 each type property to avoid needless memory allocations. Fixes #51514.
8670 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
8671 to avoid needless binary searches.
8673 * class.c (class_compute_field_layout): Move the initialization of
8674 field->def_value to mono_class_vtable ().
8676 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
8679 * object.c (mono_object_allocate): Make it inline.
8681 * object.c (mono_object_allocate_spec): Make it inline.
8683 2003-12-02 Dick Porter <dick@ximian.com>
8685 * locales.c (create_NumberFormat): NumberFormatInfo construction.
8686 Patch by Mohammad DAMT (mdamt@cdl2000.com).
8688 2003-12-01 Dick Porter <dick@ximian.com>
8690 * threads.c: Fix signature and call in CreateMutex and
8693 2003-12-01 Dick Porter <dick@ximian.com>
8696 * locales.c: Implement string compares and searching
8698 * object.h: Add extra Thread field
8700 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
8702 * reflection.c (fixup_method): Add support for MonoCMethod.
8704 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
8706 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
8708 * reflection.c (assembly_name_to_aname): Allow extra characters in
8709 assembly names. Fixes #51468.
8711 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
8713 * exception.c (mono_exception_from_name_domain): New helper function.
8715 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
8716 exception object in the correct domain.
8718 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
8719 formatting + make a copy a the input data.
8721 * loader.c (mono_get_method_from_token): Methods which contain
8722 native code do not have entries in the ImplMap.
8724 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
8725 Thanks to Gonzalo for spotting this.
8727 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
8728 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
8730 * assembly.h (mono_assembly_load_from): Split the second part of
8731 assembly loading into a new public function.
8733 * exception.h (mono_get_exception_bad_image_format): New function.
8735 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
8737 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
8738 Enumerate all modules inside a dynamic assembly. Fixes #51293.
8740 * icall.c: Add new icall for creating dynamic methods.
8742 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
8744 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
8746 * reflection.c (mono_reflection_create_dynamic_method): New icall to
8747 create a dynamic method.
8749 * reflection.c (resolve_object): New helper function.
8751 * reflection.c: Generalize ReflectionMethodBuilder and the functions
8752 which manipulate it so they can also work on dynamic methods.
8754 * reflection.c (reflection_method_builder_to_mono_method): Avoid
8755 creating the MonoReflectionMethodAux structure if it is not needed.
8757 * reflection.h verify.c: Update after changes to object layout.
8759 * reflection.c (method_builder_encode_signature): Fix compilation on
8762 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
8764 * appdomain.h: Added support for context static fields. Added static_data
8765 field to MonoAppContext and renamed thread_static_fields to a more
8766 generic special_static_fields in MonoAppDomain, since it can now contain
8767 context static fields.
8768 * domain.c: Updated hashtable name.
8769 * object.c: Replaced field_is_thread_static() for a more generic
8770 field_is_special_static() which also checks for context static attribute.
8771 In mono_class_vtable(), added support for static context fields.
8772 * threads.c: Changed methods that manage thread static fields to more
8773 generic methods so they can be reused both for thread and context static
8775 * threads.h: Declared some new methods.
8777 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
8779 * reflection.h: Update after changes to the managed types.
8781 * reflection.c (encode_custom_modifiers): New helper function.
8783 * reflection.c (method_encode_signature): Emit custom modifiers.
8785 * reflection.c (field_encode_signature): Emit custom modifiers.
8787 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
8789 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
8791 * icall.c (ves_icall_System_ValueType_Equals): New optimized
8794 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
8797 * object.c (mono_field_get_value_object): New function.
8799 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
8802 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
8804 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
8805 return a preallocated out-of-memory exception instance.
8807 * object.c (out_of_memory): Use the new function.
8809 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
8810 flag is before the custom modifiers. Fixes #49802.
8812 2003-11-16 Martin Baulig <martin@ximian.com>
8814 * class.c (mono_class_is_open_constructed_type): Implemented the
8815 MONO_TYPE_GENERICINST case.
8817 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
8819 * assembly.c (mono_assembly_fill_assembly_name): New function to
8820 fill out the MonoAssemblyName structure.
8821 (mono_assembly_open): Use the new function.
8823 * icall.c (fill_reflection_assembly_name): New helper function.
8825 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
8828 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
8830 2003-11-15 Martin Baulig <martin@ximian.com>
8832 * class.c (mono_class_is_open_constructed_type): New public
8833 function; checks whether a type is an open constructed type,
8834 ie. whether it still contains type parameters.
8835 (mono_class_inflate_generic_type): If we're a type parameter and
8836 the inflated type is also a MONO_TYPE_(M)VAR, return the original
8839 * class.h (MonoGenericInst): Added `guint32 is_open'.
8841 * loader.c (method_from_methodspec): Check whether we're an open
8842 or closed constructed type and set `ginst->is_open'.
8844 * reflection.c (mono_reflection_bind_generic_parameters): Check
8845 whether we're an open or closed constructed type and set
8847 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
8848 from open constructed types.
8850 2003-11-15 Martin Baulig <martin@ximian.com>
8852 * reflection.c (mono_reflection_bind_generic_parameters): If we're
8853 a generic instance (instead of a generic type declaration) with
8854 unbound generic parameters, bind them to our actual types.
8856 2003-11-14 Martin Baulig <martin@ximian.com>
8858 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
8860 * reflection.c (mono_reflection_bind_generic_parameters): If we're
8861 an interface type, populate `res->interfaces' with instantiated
8862 versions of all the interfaces we inherit.
8864 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
8866 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
8867 when MONO_PATH is set but doesn't contain the install dir.
8869 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8872 (ves_icall_Type_GetInterfaces): don't return an interface twice when
8873 it's also implemented in base classes. Fixes bug #50927.
8875 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
8877 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
8878 if this method is called from a finalizer. Fixes #50913.
8880 2003-11-12 Miguel de Icaza <miguel@ximian.com>
8882 * threads.c: Implement VolatileRead/VolatileWrite
8884 * icall.c: Add new icalls for VolatileRead/VolatileWrite
8886 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
8888 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
8889 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
8892 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
8893 from Peter Ross (pro@missioncriticalit.com).
8895 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
8897 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
8899 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
8901 * assembly.c (mono_assembly_load_references): Disable check because it
8902 triggers on older corlibs which lots of people have.
8904 2003-11-12 Jackson Harper <jackson@ximian.com>
8906 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
8907 load corlib.dll if mscorlib.dll is not found.
8908 * assembly.h: Remove corlib name define.
8911 * image.c: Change corlib name to mscorlib.
8913 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
8915 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
8917 2003-11-11 Miguel de Icaza <miguel@ximian.com>
8919 * appdomain.h: Added loader_optimization here to sync with the C#
8920 code, and add disallow_binding_redirects field.
8922 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
8924 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
8926 * reflection.c (mono_image_build_metadata): Fix crash on modules
8929 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
8931 * icall.c (ves_icall_get_method_info): Return callingConvention as
8934 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
8935 namespaces from the EXPORTEDTYPE table as well.
8937 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
8938 from all modules inside the assembly.
8940 2003-11-11 Martin Baulig <martin@ximian.com>
8942 * reflection.c (mono_reflection_bind_generic_parameters): Make
8943 this work for interfaces.
8945 2003-11-11 Martin Baulig <martin@ximian.com>
8947 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
8949 2003-11-11 Martin Baulig <martin@ximian.com>
8951 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
8952 "MonoInflatedMethod" and "MonoInflatedCtor".
8954 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
8956 * reflection.c (resolution_scope_from_image): Use the assembly table
8957 from the manifest module, since other modules don't have it.
8959 * debug-helpers.c (mono_type_full_name): New helper function.
8961 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
8963 * image.c (mono_image_load_file_for_image): New public function which
8964 is a replacement for the load_file_for_image in class.c.
8966 * assembly.c (mono_assembly_load_module): A wrapper for the function
8967 above which does assembly association and reference loading too.
8969 * class.c (mono_class_from_name): Call mono_assembly_load_module.
8971 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8973 * appdomain.c: not all of the attributes for the full assembly name
8974 are required and the order doesn't matter. Fixes bug #50787.
8976 2003-11-10 Dick Porter <dick@ximian.com>
8978 * locales.c: Use platform-endian UTF16
8980 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
8982 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8984 2003-11-10 Martin Baulig <martin@ximian.com>
8987 (mono_metadata_load_generic_params): Make this actually work.
8989 * reflection.c (mono_reflection_bind_generic_parameters): If our
8990 parent is a generic instance, pass all the `types' to it, no
8991 matter whether it has the same number of type parameters or not.
8993 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
8995 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8997 * assembly.c (mono_assembly_load_references): Move the image<->assembly
8998 assignment code to this function so it gets called recursively for all
9001 * image.c (load_modules): Remove the assembly assignment since it is
9002 now done by mono_assembly_load_references.
9004 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
9005 Add 'module' argument.
9006 (mono_module_get_types): New helper function.
9007 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
9009 2003-11-08 Martin Baulig <martin@ximian.com>
9011 * class.c (mono_class_inflate_generic_method): Interface method
9012 don't have a header.
9014 * reflection.c (mono_image_get_methodspec_token): Take an
9015 additional `MonoGenericInst *' argument instead of reading it from
9016 the header; this is necessary to support interfaces.
9017 (mono_image_create_token): Pass the `MonoGenericInst *' from the
9018 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
9019 (inflated_method_get_object): Take an additional `MonoGenericInst *'
9022 * reflection.h (MonoReflectionInflatedMethod): Added
9023 `MonoGenericInst *ginst'.
9025 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
9027 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
9029 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
9031 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
9033 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
9036 (reflection_methodbuilder_from_method_builder):
9037 (reflection_methodbuilder_from_ctor_builder): New helper functions to
9038 initialize a ReflectionMethodBuilder structure.
9039 (mono_image_get_methodbuilder_token):
9040 (mono_image_get_ctorbuilder_token): New functions to emit memberref
9041 tokens which point to types in another module inside the same assembly.
9043 * reflection.c: Use the new helper functions.
9045 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
9047 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
9048 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
9050 * reflection.c (resolution_scope_from_image): Emit a moduleref if
9053 * reflection.c (mono_image_build_metadata): Emit metadata only for the
9054 current module. Emit the manifest only for the main module.
9056 * reflection.c (mono_image_create_token): Add assertion when a
9057 memberref needs to be created.
9059 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
9061 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
9062 larger buffer for the custom attribute blob. Fixes #50637.
9064 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9066 * threadpool.c: notify listener on async processing handles after
9067 invoking the async callback. Thanks to Zoltan.
9069 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
9071 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
9072 avoid code duplication.
9074 * reflection.h (MonoDynamicImage): New type which is currently unused,
9075 but will be used through the ref.emit code in place of
9076 MonoDynamicAssembly.
9078 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9081 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
9082 a MonoDynamicImage instead of just a MonoImage.
9084 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
9085 icalls to ModuleBuilder but keep their semantics, so they will work
9086 with moduleb->assemblyb. This will change later.
9088 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
9090 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9093 * reflection.c (mono_image_build_metadata): Avoid creation of a default
9094 main module, since it is now done by the managed code.
9096 2003-11-03 Martin Baulig <martin@ximian.com>
9098 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
9099 `ginst->klass' here.
9100 (method_encode_methodspec): Don't use the `ginst->generic_method's
9101 klass if it's a generic instance, use `ginst->klass' in this case.
9103 2003-11-03 Martin Baulig <martin@ximian.com>
9105 * reflection.c (mono_image_get_generic_method_param_info):
9106 Removed, use mono_image_get_generic_param_info() instead.
9107 (mono_image_get_type_info): Write the GenericParam table before
9108 the Method table. This is neccessary because in the GenericParam
9109 table, type parameters of the class (ie. '!0' etc.) must come
9110 before the ones from its generic methods (ie. '!!0' etc).
9112 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
9114 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
9116 2003-11-02 Martin Baulig <martin@ximian.com>
9118 * reflection.c (create_generic_typespec): Take a
9119 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
9120 the generic parameters from it.
9122 2003-11-02 Martin Baulig <martin@ximian.com>
9124 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
9125 instead of a `MonoClassField *' since we just need the type.
9126 (create_generic_typespec): New static function. Creates a
9127 TypeSpec token for a generic type declaration.
9128 (mono_image_get_generic_field_token): New static function.
9129 (mono_image_create_token): If we're a FieldBuilder in a generic
9130 type declaration, call mono_image_get_generic_field_token() to get
9133 2003-11-02 Martin Baulig <martin@ximian.com>
9136 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
9137 `MonoReflectionGenericInst *declaring_type' and
9138 `MonoReflectionGenericInst *reflected_type' fields.
9140 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
9141 `MonoReflectionGenericInst *declaring_type' and a
9142 `MonoReflectionGenericInst *reflected_type' argument instead of a
9143 single `MonoReflectionGenericInst *type' one. Set
9144 `res->declaring_type' and `res->reflected_type' from them.
9145 (mono_reflection_inflate_field): Likewise.
9147 2003-11-02 Martin Baulig <martin@ximian.com>
9149 * class.c (mono_class_setup_vtable): Don't store generic methods
9152 2003-11-02 Martin Baulig <martin@ximian.com>
9154 * reflection.h (MonoReflectionGenericInst): Added
9155 `MonoReflectionType *declaring_type'.
9157 * reflection.c (mono_reflection_bind_generic_parameters): Use
9158 `if (tb->parent)' instead of `klass->parent'.
9160 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
9162 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
9163 with an empty ASSEMBLY table.
9165 * reflection.c (mono_image_build_metadata): Avoid using the same loop
9166 variable in the inner and outer loops.
9168 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
9170 * metadata.h (mono_metadata_make_token): Put parentheses around macro
9173 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
9175 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
9176 icalls. Instead, do everything in managed code. This is needed since
9177 it is hard to restore the original domain etc. in unmanaged code in the
9178 presence of undeniable exceptions.
9180 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
9181 New icalls to push and pop appdomain refs.
9183 2003-10-31 Martin Baulig <martin@ximian.com>
9185 * class.c (inflate_generic_type): Renamed to
9186 mono_class_inflate_generic_type() and made it public.
9188 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
9191 * loader.c (mono_field_from_memberref): Also set the retklass for
9194 * fielder.c (mono_image_get_inflated_field_token): New static
9195 method; creates a metadata token for an inflated field.
9196 (mono_image_create_token, fixup_method): Added support for
9197 "MonoInflatedField".
9198 (fieldbuilder_to_mono_class_field): New static function.
9199 (mono_reflection_inflate_field): New public function.
9202 (MonoReflectionGenericInst): Added `MonoArray *fields'.
9203 (MonoReflectionInflatedField): New typedef.
9205 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
9207 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
9208 for Solaris and other platforms without s6_addr16
9210 2003-10-30 Martin Baulig <martin@ximian.com>
9212 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
9213 argument instead of two.
9214 (mono_class_inflate_generic_signature): Likewise.
9215 (inflate_generic_header): Likewise.
9216 (mono_class_inflate_generic_method): Likewise. In addition, if
9217 `ginst->klass' is set, it becomes the new `method->klass'.
9219 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
9222 * reflection.c (encode_generic_method_sig): Write a 0xa as the
9224 (method_encode_methodspec): If we have generic parameters, create
9225 a MethodSpec instead of a MethodRef.
9226 (fixup_method): Added support for "MonoInflatedMethod" and
9228 (mono_image_create_token): Added support for "MonoInflatedMethod"
9229 and "MonoInflatedCtor".
9230 (inflated_method_get_object): New static function; returns a
9231 managed "System.Reflection.MonoInflatedMethod" object.
9232 (mono_reflection_bind_generic_method_parameters): Return a
9233 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
9234 (mono_reflection_inflate_method_or_ctor): Likewise.
9235 (mono_image_get_generic_method_param_info): Initialize unused
9237 (mono_image_get_generic_param_info): Likewise.
9239 * reflection.h (MonoReflectionInflatedMethod): New public
9240 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
9241 "S.R.MonoInflatedCtor" classes.
9243 * loader.c (method_from_memberref): If we're a TypeSpec and it
9244 resolves to a generic instance, inflate the method.
9246 2003-10-28 Dick Porter <dick@ximian.com>
9248 * object.c (mono_runtime_run_main): Convert command-line arguments
9249 into utf8, falling back to the user's locale encoding to do so.
9251 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
9253 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
9256 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
9258 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
9259 up icalls at method definition time. Partially fixes #33569.
9261 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
9263 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
9264 marshalling of arrays. Fixes #50116.
9266 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
9268 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
9269 points to a vtable in the dying appdomain.
9271 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
9272 listeners into unmanaged code inside the lock.
9274 * object.c (mono_class_vtable): Turn off typed allocation in non-root
9275 domains and add some comments.
9277 2003-10-25 Martin Baulig <martin@ximian.com>
9279 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
9281 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
9283 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
9284 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
9285 currently parsing. Create the generic class and store it in
9286 `generic_inst->klass' before parsing the type arguments. This is
9287 required to support "recursive" definitions; see mcs/tests/gen-23.cs
9289 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
9290 to support recursive typespec entries.
9292 * class.c (mono_class_setup_parent): If our parent is a generic
9293 instance, we may get called before it has its name set.
9294 (mono_class_from_generic): Splitted into
9295 mono_class_create_from_generic() and mono_class_initialize_generic().
9297 2003-10-25 Martin Baulig <martin@ximian.com>
9299 * icall.c (ves_icall_Type_BindGenericParameters): Return a
9300 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
9301 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
9302 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
9304 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
9305 (create_typespec): Likewise.
9306 (mono_reflection_bind_generic_parameters): Return a
9307 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
9308 (mono_reflection_inflate_method_or_ctor): New public function.
9310 * reflection.h (MonoReflectionGenericInst): New typedef.
9312 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
9314 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
9315 inside the domain lock. Fixes #49993.
9317 * object.c (mono_class_vtable): When typed allocation is used,
9318 allocate vtables in the GC heap instead of in the mempool, since the
9319 vtables contain GC descriptors which are used by the collector even
9320 after the domain owning the mempool is unloaded.
9322 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
9324 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
9325 reflect what it does. Also invalidate mempools instead of freeing
9326 them if a define is set.
9328 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
9331 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
9332 hold the finalizable objects in this domain.
9334 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
9337 * appdomain.c (mono_domain_set): New function to set the current
9338 appdomain, but only if it is not being unloaded.
9340 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
9341 appdomain which is being unloaded.
9343 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
9344 unloading of the root appdomain.
9346 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
9347 icall to execute a method in another appdomain. Intended as a
9348 replacement for InternalSetDomain, which can confuse the code
9349 generation in the JIT.
9351 * appdomain.c (mono_domain_is_unloading): New function to determine
9352 whenever an appdomain is unloading.
9354 * appdomain.c (mono_domain_unload): New function to correctly unload
9357 * assembly.c (mono_assembly_load_references): Check that an assembly
9358 does not references itself.
9360 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
9361 domain manually, it asks the finalizer thread to do it, then waits for
9362 the result. Also added a timeout.
9364 * icall.c: Register the new icalls.
9366 * threads.h threads.c: Export the mono_gc_stop_world and
9367 mono_gc_start_world functions.
9369 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
9370 function to fill out the mempool with 0x2a.
9372 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
9374 * reflection.h (MonoReflectionMethodAux): New structure to store
9375 information which is rarely used, thus is not in the MonoMethod
9378 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
9381 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
9382 and marshalling info into the aux structure.
9384 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
9385 from the aux structure.
9387 * loader.c (mono_method_get_param_names): Retrieve the param names from
9390 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
9392 * exception.h exception.c: Add AppDomainUnloadedException && fix
9395 2003-10-21 Dick Porter <dick@ximian.com>
9398 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
9399 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
9401 2003-10-21 Martin Baulig <martin@ximian.com>
9403 * reflection.c (mono_reflection_bind_generic_parameters):
9404 `klass->parent' is NULL for interfaces.
9406 2003-10-21 Martin Baulig <martin@ximian.com>
9408 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9410 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
9412 * exception.c (mono_exception_from_name_msg): New helper function for
9413 creating exceptions and initializing their message field.
9415 * exception.c: Simplify functions using the new helper.
9417 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
9420 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
9421 mono_raise_exception, since otherwise gcc doesn't generate the function
9422 epilog for raise_exception, confusing the stack unwinding in the JIT.
9425 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
9426 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
9429 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9431 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
9434 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
9436 * icall.c: Removed GetUninitializedObject method because
9437 AllocateUninitializedClassInstance does the same.
9439 2003-10-18 Martin Baulig <martin@ximian.com>
9441 * class.c (inflate_generic_signature): Renamed to
9442 mono_class_inflate_generic_signature() and made it public.
9443 (my_mono_class_from_generic_parameter): New static function; if we
9444 don't already have the generic parameter's MonoClass, create a
9445 very simple one which is just used internally in the runtime and
9446 not passed back to managed code.
9448 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
9450 * metadata.h (MonoMethodSignature): Moved the
9451 `MonoGenericParam *gen_params' to the MonoMethodHeader.
9452 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
9454 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
9455 ves_icall_MonoMethod_GetGenericArguments(); this is now an
9456 interncall on the MonoMethod class, not on MethodInfo.
9457 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
9458 calling mono_reflection_bind_generic_method_parameters() directly.
9460 * loader.c (mono_method_get_signature): If this is a MethodSpec;
9461 return the already computed `method->signature'.
9462 (method_from_methodspec): New static function to load a method
9463 from a MethodSpec entry.
9464 (mono_get_method_from_token): Call the new method_from_methodspec()
9465 for MethodSpec tokens.
9466 (mono_get_method_from_token): If we're a generic method, load the
9469 * reflection.c (mono_image_get_memberref_token): Allow
9470 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
9472 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
9473 (mono_image_create_token): First check whether it's a generic
9474 method (so we'd need to create a MethodSpec), then do the other
9476 (mono_reflection_bind_generic_method_parameters): Return a
9477 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
9478 called directly from the interncall.
9480 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
9482 * reflection.c (load_public_key): Move loading of the public key
9485 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
9487 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
9490 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
9491 culture, hash_alg and public_key. Fixes #49555.
9493 2003-10-17 Martin Baulig <martin@ximian.com>
9495 * class.h (MonoGenericInst): Moved this declaration here and added
9496 `MonoMethod *generic_method'.
9499 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
9500 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
9502 * metadata.c (mono_metadata_type_equal): Two types of
9503 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
9504 index; ie. don't compare the address of the `MonoGenericParam'
9506 (mono_metadata_load_generic_params): Removed the `MonoMethod
9509 * metadata.h (MonoGenericInst): Moved declaration to class.h.
9510 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
9512 * reflection.c (method_encode_signature): Encode the number of
9514 (encode_generic_method_sig): New static function.
9515 (method_encode_methodspec): New static function; creates an entry
9516 in the MethodSpec table for a generic method.
9517 (mono_image_get_methodspec_token): New static function.
9518 (mono_image_create_token): Call mono_image_get_methodspec_token()
9519 for generic methods.
9520 (mono_reflection_bind_generic_method_parameters): New public
9521 function. Instantiates a generic method.
9523 2003-10-16 Martin Baulig <martin@ximian.com>
9525 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
9526 *gen_params' here from MonoMethodHeader.
9528 * metadata.c (mono_metadata_parse_method_signature): If we have
9529 generic parameters, initialize `method->gen_params' and then set
9530 the correct `type->data.generic_param' in all the parameters.
9532 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
9534 * threads.c (mono_threads_get_default_stacksize): New function to
9535 return the default stacksize.
9537 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
9538 termination of the finalizer thread, since the previous method had
9539 race conditions. Fixes #49628.
9541 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
9542 as for the other managed threads.
9544 2003-10-16 Martin Baulig <martin@ximian.com>
9546 * class.c (inflate_generic_signature): Copy `generic_param_count'
9549 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
9552 * metadata.c (mono_metadata_parse_method_signature): Actually set
9553 the `method->generic_param_count' here.
9554 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
9556 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
9558 * object.h: Add a new field to TypedRef to simplify the implementation
9559 of the REFANY opcodes in the JIT.
9561 * icall.c: Make use of the new field.
9563 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
9566 2003-10-15 Martin Baulig <martin@ximian.com>
9568 * class.c (mono_class_from_gen_param): Renamed to
9569 mono_class_from_generic_parameter() and moved most of the
9570 functionality from mono_reflection_define_generic_parameter()
9571 here; ie. we create a "real" class here.
9572 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
9573 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
9574 previously been called.
9576 * class.h (MonoGenericParam): Moved the declaration of this struct
9577 here from metadata.h and added `MonoMethod *method'.
9579 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
9582 * loader.c (mono_get_method_from_token): If we have any generic
9583 parameters, call mono_metadata_load_generic_params() to read them
9584 from the MONO_TABLE_GENERICPAR.
9586 * metadata.c (mono_metadata_load_generic_params): Added
9587 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
9589 * metadata.h (MonoMethodSignature): Replaced
9590 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
9591 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
9593 * reflection.c (mono_reflection_define_generic_parameter): Moved
9594 most of the functionality into the new
9595 mono_class_from_generic_parameter(); set the `method' field if
9596 we're a method parameter.
9598 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
9600 * marshal.c (emit_struct_conv): if native size is 0
9603 2003-10-14 Martin Baulig <martin@ximian.com>
9605 * icall.c: The generics API has changed in the spec since it was
9606 added to System.Type; these modifications make it match the spec
9608 (ves_icall_Type_GetGenericParameters): Renamed to
9609 `ves_icall_Type_GetGenericArguments'.
9610 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
9611 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
9612 `ves_icall_MonoType_get_HasGenericArguments'.
9613 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
9614 `ves_icall_MonoType_get_IsGenericParameter'.
9615 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
9616 this is no interncall anymore.
9617 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
9618 `ves_icall_TypeBuilder_get_IsGenericParameter'.
9620 2003-10-14 Martin Baulig <martin@ximian.com>
9622 * reflection.c (mono_reflection_bind_generic_parameters): Also
9623 inflate generic methods if we're reading the class from IL.
9625 2003-10-13 Martin Baulig <martin@ximian.com>
9627 * reflection.c (mono_reflection_define_generic_parameter): This
9628 method isn't called directly from the icall anymore; take a
9629 `MonoReflectionAssemblyBuilder *' so we can use this for type and
9630 method generic parameters.
9631 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
9632 (method_builder_encode_signature): Encode generic parameters.
9633 (mono_image_get_method_info): Write generic params to the
9634 MONO_TABLE_GENERICPARAM table.
9636 * reflection.h (MonoReflectionMethodBuilder): Added
9637 `MonoArray *generic_params'.
9639 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
9641 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
9642 wrapper for mono_reflection_define_generic_parameter().
9643 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
9645 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
9647 * marshal.h: Add missing function to fix build.
9649 * marshal.c (mono_marshal_get_native_wrapper): Add support for
9650 the SetLastError pinvoke attribute.
9652 * marshal.c (mono_marshal_set_last_error): New helper function called
9653 by the generated code.
9655 * marshal.c (mono_mb_emit_branch): New helper function.
9657 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
9659 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9660 classes as parameters and return values of delegates. Fixes #29256.
9662 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
9664 * locales.c: use gint32 in non HAVE_ICU case
9666 2003-10-11 Martin Baulig <martin@ximian.com>
9668 * mono-debug.c (mono_debug_add_method): Added a workaround for
9671 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
9673 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
9674 delegates passed to native code must use the STDCALL calling
9675 convention. Fixes #35987.
9677 2003-10-10 Martin Baulig <martin@ximian.com>
9679 * class.c (inflate_generic_type): If we're inflating for a generic
9680 type instance (and not for a generic method), return
9681 MONO_TYPE_MVAR unchanged.
9683 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9685 * string-icalls.c: Join ignores null strings in the source array.
9686 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
9687 * threads.c: GetAvailableTheads is slightly more accurate.
9689 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
9691 * threads.h threads.c : add mono_threads_set_default_stacksize
9692 and pass default to CreateThread calls.
9694 2003-10-09 Dick Porter <dick@ximian.com>
9698 * locales.c: Internal calls for constructing CultureInfo and
9699 related objects from libicu (if its available.)
9701 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
9703 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
9705 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9707 * threadpool.c: added an argument to async_invoke_thread that is the
9708 item to process, pass the MonoAsyncResult to the thread start function
9709 when creating a new thread. This way we don't need to acquire any lock
9710 when we're creating a new thread. Readded a semaphore for faster
9711 response times (instead of that Sleep i added).
9713 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
9715 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
9716 get daylight change dates better on Windows, fix handling
9717 of platforms without tm_gmtoff.
9719 2003-10-06 Martin Baulig <martin@ximian.com>
9721 * class.c (inflate_generic_method): Renamed to
9722 mono_class_inflate_generic_method() and made public.
9723 (mono_class_init): Don't inflate the generic methods here.
9724 (mono_class_from_generic): Added `gboolean inflate_methods'
9725 argument. Inflate the methods here.
9727 * loader.c (mono_method_get_param_names): Ignore instances of
9728 generic types for the moment.
9730 * reflection.c (fixup_method): Added support for inflated methods.
9731 (mono_image_create_token): Use mono_image_get_methodref_token()
9732 for inflated methods.
9733 (mono_custom_attrs_from_param): Ignore instances of generic types
9735 (mono_reflection_bind_generic_parameters): New public function.
9736 Moved all the functionality from
9737 ves_icall_Type_BindGenericParameters() here and added support for
9739 (mono_reflection_define_generic_parameter): Initialize
9740 `klass->methods' here.
9742 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
9743 functionality into mono_reflection_define_generic_parameter().
9744 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
9745 TypeBuilder, return that TypeBuilder.
9747 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9749 * appdomain.c: removed mono_delegate_semaphore.
9752 (mono_thread_pool_add): moved hash table creation inside and the thread
9753 creation outside of the critical region.
9754 (mono_thread_pool_finish): removed obsolete code.
9755 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
9756 continue or exit the thread depending on the queue.
9758 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
9760 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
9761 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
9762 handle more bool marshalling options
9764 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
9766 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
9767 arrays of structs. Also add a more descriptive error message when
9768 a structure member is marshalled as LPArray.
9770 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
9772 * marshal.c (mono_marshal_get_native_wrapper): Add support for
9773 marshalling arrays of complex types. Fixes #29098. Also remove an
9774 usused and incomplete function.
9776 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
9778 * gc.c: report heap_size - free_bytes as total memory allocated
9781 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
9783 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
9784 fix timezone handling problems on Windows.
9786 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
9787 asserts when the year is outside the range handled by ms the functions.
9789 * class.c (setup_interface_offsets): If the class is an interface,
9790 fill out its interface_offsets slot.
9792 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9794 * threadpool.c: mark threadpool threads as background.
9796 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
9798 * decimal.c - define DECINLINE to nothing if not using GCC
9800 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
9802 * assembly.c: More refcount fixes.
9804 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9806 * string-icalls.c: if we're not trimming, return the same string.
9807 When not splitting, don't create a new string.
9809 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9812 (mono_image_open): increment the ref_count inside the critical section.
9814 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
9816 * image.c (mono_image_open): Fix reference counting bug.
9818 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
9820 * marshal.c (mono_marshal_type_size) struct alignment changed for
9821 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
9822 64bits. Avoid leak in mono_marshal_get_native_wrapper when
9823 mono_lookup_pinvoke_call throws.
9825 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
9827 * reflection.c (mono_reflection_parse_type): Fix #49114.
9829 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
9830 temporary workaround for cygwin header problem.
9832 * object.c (mono_object_isinst): Synchronize this with the code
9833 generated by the JIT for casts.
9835 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
9837 * reflection.c (encode_type): Fix #38332.
9839 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
9841 * marshal.c (mono_marshal_method_from_wrapper): New function to return
9842 the original method from the wrapper method.
9844 2003-09-25 Martin Baulig <martin@ximian.com>
9846 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
9847 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
9848 (ves_icall_Type_get_IsGenericInstance): New interncall.
9850 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
9852 * object.c: fix cast warning in big endian code.
9854 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
9856 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
9858 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9860 * assembly.c: don't call check_env from mono_assembly_load. It's
9861 already done once in mono_assemblies_init and may cause headaches when
9862 multiple threads are loading assemblies.
9864 2003-09-19 Martin Baulig <martin@ximian.com>
9866 * reflection.c (mono_reflection_define_generic_parameter): Don't
9867 allocate `klass->methods', set `klass->flags' to
9868 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
9870 2003-09-18 Martin Baulig <martin@ximian.com>
9872 * class.c (mono_class_init): Don't create `class->methods' if it's
9873 already initialized.
9875 * metadata.c (mono_metadata_load_generic_params): Make this
9878 * reflection.c (mono_reflection_define_generic_parameter): Set
9879 parent class and interfaces from the constraints.
9881 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
9882 to keep this struct in sync with the declaration in TypeBuilder.cs.
9884 2003-09-17 Martin Baulig <martin@ximian.com>
9886 * metadata.h (MonoType): Replaced the data's `int type_param'
9887 field with `MonoGenericParam *generic_param'.
9888 (MonoGenericParam): Added `MonoClass *klass'.
9890 * class.c (mono_class_from_gen_param): Removed the
9891 `MonoImage *image' and `int type_num' arguments.
9893 * metadata.c (mono_metadata_parse_generic_param): New static
9894 method; creates a MonoGenericParam which just contains the index.
9895 (do_mono_metadata_parse_type): Call
9896 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
9899 * reflection.c (mono_image_typedef_or_ref): Generic type
9900 parameters may be in the same assembly, but never use a typedef
9902 (mono_reflection_define_generic_parameter): We're now creating a
9903 "real" class for the type parameter; it's now safe to call
9904 mono_class_from_mono_type() on the class'es type, it'll do the
9907 2003-09-16 Martin Baulig <martin@ximian.com>
9909 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
9910 `symfile->range_entry_size' and `symfile->class_entry_size' here;
9911 the `symfile' data structure must be fully initialized before it
9912 gets added to the table.
9914 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
9916 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
9918 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
9919 class init trampolines.
9921 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
9923 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
9924 to the built-in profiler to turn off time and allocation profiling
9927 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
9929 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
9932 * debug-helpers.c (mono_method_full_name): Print the wrapper type
9933 in human readable form.
9935 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
9937 * reflection.c icall.c: Fixed warnings.
9939 * image.c (load_class_names): Use a temporary hash table to hold the
9940 namespaces in order to avoid doing many string comparisons.
9942 * image.h: Fix typo.
9944 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
9945 Pass NULL instead of g_direct_equal to the GHashTable constructor
9946 since the NULL case is short-circuited inside g_hash_table_lookup,
9947 leading to better performance.
9949 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
9950 obtain the first custom attribute for a given index. Depends on the
9951 CustomAttribute table being sorted by the parent field.
9953 * reflection.c (mono_custom_attrs_from_index): Use the new function
9954 for better performance.
9956 2003-09-07 Martin Baulig <martin@ximian.com>
9958 * class.c (mono_class_init): If we're a generic instance, inflate
9959 all our methods instead of loading them from the image.
9960 (mono_class_from_generic): Set `class->methods = gklass->methods'.
9962 2003-09-07 Martin Baulig <martin@ximian.com>
9964 * mono-debug-debugger.c: Added support for constructors.
9966 2003-09-06 Martin Baulig <martin@ximian.com>
9968 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
9971 * reflection.c (mono_reflection_setup_generic_class): Call
9972 ensure_runtime_vtable() to create the vtable.
9974 2003-09-05 Martin Baulig <martin@ximian.com>
9976 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
9979 2003-09-04 Martin Baulig <martin@ximian.com>
9981 * reflection.c (mono_reflection_define_generic_parameter): Generic
9982 parameters start with zero.
9984 2003-09-04 Martin Baulig <martin@ximian.com>
9986 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9988 * reflection.h (MonoReflectionGenericParam): New typedef.
9989 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
9990 the generic parameters from the managed TypeBuilder.
9992 * reflection.c (mono_reflection_define_generic_parameter): New function.
9993 (mono_reflection_create_runtime_class): Encode generic parameters.
9994 (mono_reflection_setup_generic_class): New function; this is
9995 called after adding adding all generic params to the TypeBuilder.
9996 (encode_type): Added MONO_TYPE_VAR.
9998 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
10000 * class.h class.c (mono_class_needs_cctor_run): Moved this method
10003 * assembly.h assembly.c: Moved the AOT loading code into an assembly
10006 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
10008 * reflection.h reflection.c class.h class.c: Delete duplicate
10009 definition of mono_type_get_name () from reflection.c and export the
10012 * class.c: Class loading fixes from Bernie Solomon
10013 (bernard@ugsolutions.com).
10015 * reflection.c: Endianness fixes from Bernie Solomon
10016 (bernard@ugsolutions.com).
10018 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
10020 * assembly.h assembly.c: Define a file format version for AOT
10023 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
10025 * appdomain.h (MonoJitInfo): New field to determine whenever the
10026 code is domain neutral.
10028 2003-08-31 Miguel de Icaza <miguel@ximian.com>
10030 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
10032 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
10034 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
10035 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
10036 Avoid caching the result since strings must be domain specific. Fixes
10039 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
10041 * marshal.c (mono_marshal_init): Make this callable multiple times
10042 since it is hard to find a correct place to call it.
10044 * object.c (mono_runtime_class_init): Execute static constructors in
10045 the correct appdomain.
10047 * image.c (build_guid_table): Handle the case when multiple images have
10050 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10052 * icall.c: added a couple of icalls for System.Web.
10054 2003-08-28 Martin Baulig <martin@ximian.com>
10056 * icall.c (ves_icall_Type_BindGenericParameters): Use
10057 `klass->generic_inst' instead of `&klass->byval_arg' in the
10058 mono_type_get_object() call. The returned type must be
10059 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
10061 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
10065 * object.c (mono_class_proxy_vtable): Make it thread safe.
10067 * pedump.c: Fix warning.
10069 * object.c appdomain.h: Get rid of metadata_section.
10070 It is no longer needed and it was causing deadlocks with domain->lock.
10072 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
10074 2003-08-26 Martin Baulig <martin@ximian.com>
10076 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
10078 2003-08-26 Martin Baulig <martin@ximian.com>
10080 * pedump.c (main): Call mono_metadata_init(),
10081 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
10082 and mono_loader_init().
10084 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
10086 * loader.h: Add missing include to fix build.
10088 * image.h: mono_image_load_references is no more.
10090 * assembly.c: Reworked assembly loading to make it really thread safe.
10091 After these changes, the assembly returned by mono_assembly_open is
10092 fully initialized, i.e. all its references assemblies are loaded.
10094 * assembly.c (mono_image_load_references): Renamed to
10095 mono_assembly_load_references, and made private, since clients no
10096 longer need to call it.
10098 * class.c: Removed calls to mono_assembly_load_references, since it was
10099 a source of deadlocks.
10101 * loader.h loader.c class.h class.c: Protect data structures using a
10102 new lock, the loader lock.
10104 * class.c (mono_class_setup_vtable): Create temporary hash tables and
10105 GPtrArrays only when needed.
10107 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
10108 into empty structures by mcs. Fixes pinvoke7.cs.
10110 * domain.c (mono_init): Call a new initialization function.
10112 * appdomain.c (mono_runtime_init): Call the new initializer function
10113 of the marshal module.
10115 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
10116 inserted into empty structures by mcs. Fixes pinvoke7.cs.
10118 * marshal.h marshal.c: Added locks around the wrapper caches to make
10119 this module thread safe.
10121 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
10122 this argument. Fixes pinvoke1.exe.
10124 2003-08-25 Lluis Sanchez <lluis@ximian.com>
10126 * object.h: Added call_type field to MonoMethodMessage and the corresponding
10127 enumeration of values. Removed fields to store remote call output values in
10128 MonoAsyncResult. Not needed any more.
10129 * object.c: Initialize call_type and async_result fields in mono_message_init.
10130 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
10131 dispatching the message.
10132 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
10133 async call to finish. To do it use a message with EndInvoke call type.
10135 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
10137 * loader.h loader.c (mono_method_hash_marhal_info): New function which
10138 determines whenever a method has marshalling info.
10140 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10142 * assembly.c: fix the build on windows.
10144 2003-08-22 Lluis Sanchez <lluis@ximian.com>
10146 * object.cs: Fixed bug #47785.
10148 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
10150 * string-icalls.c (StringReplace): If their are no occurances of
10151 the old string found return a reference to the supplied
10152 string. This saves some memory and matches MS behavoir.
10154 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10156 * socket-io.c: fixed compilation for systems that define AF_INET6
10157 and don't define SOL_IP/SOL_IPV6.
10159 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
10161 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
10162 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
10164 * rawbuffer.c rawbuffer.h: Make this module thread safe.
10166 * domain.c: Make this module thread safe.
10168 * domain.c (mono_init): Call new initialization function.
10170 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
10171 reference types too. Fixes #38812.
10173 * image.c (mono_image_init): Fixed warnings.
10175 * class.c (mono_class_from_typeref): Handle assembly load failure
10178 * appdomain.c (add_assemblies_to_domain): Handle the case when
10179 the references of an assembly are not yet loaded.
10181 * metadata.c image.c assembly.c: Moved initialization of global
10182 variables to a separate function called at startup since lazy
10183 initialization of these variables is not thread safe.
10185 * image.c assembly.c: Made this module thread safe by adding locks in
10186 the appropriate places.
10188 * domain.c (mono_init): Call the new initialization functions of the
10191 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
10193 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
10194 make a direct call. It is proxy's work to make the call asynchronous.
10195 mono_delegate_end_invoke(): If the targe is a proxy, just collect
10197 * object.cs: mono_method_call_message_new(): read AsyncResult and
10198 state object from parameters list, if this info is requested.
10199 * object.h: Added fields to store remote call output values in
10200 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
10202 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10204 * object.h: add needed fields to MonoThread.
10205 * threads.c, threads.h: allow registering a function to cleanup data
10206 allocated per thread by the JIT.
10208 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10210 * loader.h: portability fix by Bernie Solomon
10211 * <bernard@ugsolutions.com>.
10213 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
10215 * reflection.h reflection.c (mono_param_get_objects): Changed this to
10216 return a MonoArray. This simplifies the code and also ensures that
10217 the cache allways contains an object reference as a value.
10219 * icall.c (ves_icall_get_parameter_info): Simplified using the new
10222 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10224 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
10225 fixes a problem with byte ordering when getting the address family for
10228 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
10230 * .cvsignore: Added monosn.
10232 * reflection.h reflection.c loader.c: Added support for parameter
10233 marshalling to dynamically created types. Fixes #47295.
10235 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
10237 * rand.c: remove useless warnings.
10239 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10241 * class.c: implemented ldtoken for methods and fieldrefs.
10243 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10245 * threadpool.c: when mono_async_invoke was called, no one took care of
10246 monitoring the queue. So if the method invoked took some time and we
10247 got new async invoke requests after 500 ms (the thread created waited
10248 that long in WaitForSingleObject), the new async invoke was not called
10249 until the previous one finished.
10251 This is fixed now. Thanks to Totte for helping with it.
10253 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10255 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
10257 2003-08-11 Martin Baulig <martin@ximian.com>
10259 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
10261 2003-08-06 Martin Baulig <martin@ximian.com>
10263 * mono-debug-debugger.c: Added support for static fields,
10264 properties and methods.
10266 2003-08-06 Martin Baulig <martin@ximian.com>
10268 * mono-debug-debugger.c: Don't store the MonoString's vtable to
10269 make this work for applications with multiple application domains.
10271 2003-08-04 Martin Baulig <martin@ximian.com>
10273 * mono-debug-debugger.c: Completely reworked the type support; the
10274 most important thing is that we're now just using one single
10275 `MonoType' instance per type.
10277 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
10279 * mono-endian.h, mono-endian.c, icall.c: Added icall
10280 ves_icall_System_Double_AssertEndianity to assert double word endianity
10281 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
10283 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10285 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
10286 support, icalls and fixes.
10288 2003-07-31 Miguel de Icaza <miguel@ximian.com>
10290 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
10291 classes that are a punctuation character in .NET is not the same a
10294 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10296 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
10298 2003-07-29 Miguel de Icaza <miguel@ximian.com>
10300 * icall.c: Add new MemCopy internalcall.
10301 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10302 Simplified code; It is not necessary to handle all the cases here,
10303 as the C# code takes care of it. Only handle the case of the name
10304 resource embedded into the assembly.
10306 Changed signature to return the data pointer and the size of the
10309 2003-07-26 Miguel de Icaza <miguel@ximian.com>
10311 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
10312 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
10314 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
10316 * socket-io.c: ignore EINTR error in select.
10318 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
10320 * class.h, class.c: removed unused subclasses field in MonoClass.
10322 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
10324 * icall.c: improve fix of get_base_definition(). If the parent class
10325 doesn't have the mehod, look at the parent of the parent.
10326 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
10327 to check if a parameter is an in or out parameter
10328 (PARAM_ATTRIBUTE_IN is not set by default).
10329 mono_method_return_message_restore(): Use mono_class_value_size to
10330 get the size of a value type. mono_type_stack_size (parameterType)
10331 does not return the correct value if parameterType is byRef.
10332 mono_load_remote_field(), mono_load_remote_field_new(),
10333 mono_store_remote_field(), mono_store_remote_field_new():
10334 raise exception if the remote call returns an exception.
10336 2003-07-28 Martin Baulig <martin@ximian.com>
10338 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
10339 method. This is a wrapper around mono_runtime_invoke() which
10340 boxes the instance object if neccessary.
10342 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10344 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
10345 metadata.h, row-indexes.h, verify.c: first cut of generics support.
10347 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10349 * icall.c: disable mcs bug workaround.
10351 2003-07-21 Miguel de Icaza <miguel@ximian.com>
10353 * object.c (mono_runtime_class_init): Take the metadata_section
10354 mutex before obtaining the domain mutex.
10356 * appdomain.h: Added definition of metadata_section mutex here.
10358 * object.c: define metadata_mutex here.
10360 2003-07-24 Ravi Pratap <ravi@ximian.com>
10362 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
10365 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
10367 * reflection.c: Fix bug #46669
10369 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10374 * object.h: fill in the type name for TypeLoadException.
10376 2003-07-23 Ravi Pratap <ravi@ximian.com>
10378 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
10379 relationship between TypeBuilders while compiling corlib) and bug
10380 45993 (Array types returned from the runtime while compiling
10381 corlib were from the loaded corlib).
10383 2003-07-22 Martin Baulig <martin@ximian.com>
10385 * mono-debug-debugger.c: Reworked the type support a bit more;
10386 distinguish between types and classes.
10388 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
10390 * icall.c: add IsArrayImpl icall.
10392 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
10394 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
10395 initializing real_size only once. Also fix bug #46602.
10397 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
10399 * object.c: Renamed mono_metadata_section to metadata_section.
10401 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
10403 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
10404 empty array if the type is an array. Fixed.
10405 ves_icall_MonoMethod_get_base_definition: if the base method
10406 is abstract, get the MethodInfo from the list of methods of
10408 * reflection.c: ParameterInfo.PositionImpl should be zero-based
10409 and it was 1-based. Fixed in mono_param_get_objects.
10411 2003-07-20 Martin Baulig <martin@ximian.com>
10413 * mono-debug.h: Set version number to 31.
10414 (mono_debug_init): Added `MonoDomain *' argument.
10416 * mono-debug-debugger.c: Reworked the type support; explicitly
10417 tell the debugger about builtin types; pass the `klass' address to
10420 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
10422 * image.c: Allow new metadata tables to be loaded without a
10423 warning. Also update the warning message to give the new constant value.
10425 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
10427 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
10428 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
10429 array type representation changes.
10431 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10433 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
10434 on Environment.Exit () call.
10436 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10438 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
10439 requires a matching corlib.
10441 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
10443 * Changelog: My editor decided to add a CR to each line. Sorry about that.
10444 Committed again without the CRs.
10446 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
10448 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
10449 getting it from the "this" socket instance. Did not work
10450 if the socket is a subclass of Socket.
10451 Also fixed bug #35371.
10453 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10455 * metadata.c: fixed size for TypedByRef.
10456 * loader.c: when searching for a method, consider the vararg amrker.
10457 * unicode.c, decimal.c: constify some arrays.
10459 2003-07-15 Dick Porter <dick@ximian.com>
10461 * socket-io.c: Fixed compilation for gcc < 3.2.
10463 Fixed compilation for machines that don't have AF_INET6 (thanks to
10464 Bernie Solomon <bernard@ugsolutions.com> for that part.)
10466 Fixed compile warnings.
10468 Fixed formatting and line endings.
10470 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
10473 * socket-io.c: Added IPv6 support.
10475 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
10477 * class.c (mono_class_is_assignable_from): New function to implement
10478 the is_assignable_from logic. Used by mono_object_isinst,
10479 Type::IsAssignableFrom () and the interpreter.
10481 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
10482 Object, even interfaces.
10484 * object.c (mono_object_isinst): Implement in terms of
10485 is_assignable_from.
10487 * icall.c (ves_icall_type_is_assignable_from): New icall.
10489 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
10491 * domain.c (foreach_domain): fix compiler warning.
10493 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
10495 * image.c (load_metadata_ptrs): use g_strndup because strndup is
10496 not available on all plattforms
10498 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
10500 * image.h image.c: Store the metadata version string in MonoImage.
10501 * icall.c: New icall to retrieve the image version.
10502 * reflection.c (create_dynamic_image): Fill in the image version field
10503 * reflection.c (build_compressed_metadata): Use the image version
10504 from the image structure.
10506 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10508 * appdomain.c: modified comment.
10509 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
10510 That will be its last iteration when mono_gc_cleanup is called from
10511 mono_runtime_cleanup and before the domain is unloaded.
10515 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
10517 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
10520 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10522 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
10523 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
10524 Bernie Solomon <bernard@ugsolutions.com>.
10526 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10528 * object.c, object.h: provide mono_object_new_fast() for faster
10529 allocation in some special cases.
10531 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10533 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
10534 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
10536 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
10538 * threadpool.c: fix leaks.
10540 2003-07-01 Dick Porter <dick@ximian.com>
10542 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
10543 using MonoGHashTables. Fixes threadpool bug posted to list.
10545 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
10547 * image.h, image.c: added support to load an assembly from a byte array.
10548 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
10549 assembly bundle support.
10551 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
10553 * threadpool.c (mono_thread_pool_add): keep a reference to the
10554 AsyncResult to prevent GC
10556 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
10558 * class.c: leak fix.
10560 2003-06-25 Dick Porter <dick@ximian.com>
10562 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
10563 for the async object, the WaitHandle object will close the handle.
10566 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10568 * class.c: in mono_array_class_get (), lookup from the hash with the
10569 same type we insert: this works around a bug in
10570 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
10571 lluis. The real fix will have to wait for after the release.
10573 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10575 * icall.c: fix memory leak when getting type members.
10577 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10579 * reflection.c: added more pubtoken special cases.
10581 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
10583 * class.c: handle field offset correctly when class size
10584 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
10586 2003-06-20 Martin Baulig <martin@ximian.com>
10588 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
10591 2003-06-20 Martin Baulig <martin@ximian.com>
10593 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
10595 2003-06-20 Martin Baulig <martin@ximian.com>
10597 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
10598 just distinguish between variables in registers and variables at
10599 an offset relative to a register.
10601 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10603 * icall.c: #ifdef out latest changes until mcs is fixed.
10605 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10607 * icall.c: return members in metadata order.
10609 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10611 * icall.c: avoid infinite loop in GetTimeZoneData.
10613 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
10615 * icall.c: added Marshal.Prelink/All icalls.
10617 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10619 * object.c, object.h: fix warnings and do some overflow checking
10620 when creating arrays.
10622 2003-06-17 Dick Porter <dick@ximian.com>
10625 * file-io.c: File attributes need to be tweaked slightly when
10626 passed from the managed to the w32 world.
10628 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
10629 * profiler.h profiler-private.h profiler.c: Rework last patch
10630 based on suggestion by Paolo.
10632 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
10634 * profiler.h profiler-private.h profiler.c: Added infrastructure for
10635 instruction level coverage data collection.
10636 * profiler.h profiler.c (: Added new callback function which can be
10637 used by the profiler to limit which functions should have coverage
10639 * profiler.c (mono_profiler_load): Call g_module_build_path to
10640 generate the file name of the profiler library.
10642 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10644 * profiler.c, profiler.h, profiler-private.h: added basic block
10645 coverage profiling API.
10647 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
10649 * reflection.c (mono_reflection_create_runtime_class): Add support
10650 for events in dynamically generated code.
10652 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
10655 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10657 * icall.c: when getting timezone info, return reasonable values if we
10658 can't get the actual data.
10660 2003-06-14 Dick Porter <dick@ximian.com>
10662 * threads.c (start_wrapper): Remove the reference to the thread
10663 object in the TLS data, so the thread object can be finalized.
10664 This won't be reached if the thread threw an uncaught exception,
10665 so those thread handles will stay referenced :-( (This is due to
10666 missing support for scanning thread-specific data in the Boehm GC
10667 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
10669 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
10671 * reflection.c: ensure streams and tables are first allocated with
10672 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
10674 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10676 * icall.c: fixed GetElementType for byrefs (bug# 44792).
10678 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
10680 * reflection.c (mono_reflection_create_runtime_class): Add support for
10681 properties to dynamically created classes.
10682 * reflection.c: Fix a few places where non-MonoObjects were inserted
10683 into the tokens hashtable.
10685 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10687 * object.c: some support to handle out of memory exceptions.
10689 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
10691 * marshal.c (mono_marshal_get_native_wrapper): support reference
10694 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10696 * object.h, object.c: more portability stuff from Bernie Solomon.
10697 Unexport mono_object_allocate(). Added mono_object_unbox ().
10698 Set exitcode when an unhandled exception is thrown.
10700 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
10702 * marshal.c (mono_marshal_get_native_wrapper): use custom
10703 marshaler for return types.
10705 2003-06-10 Dick Porter <dick@ximian.com>
10707 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
10708 ip_mreq is available
10710 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
10712 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
10713 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
10714 by Bernie Solomon <bernard@ugsolutions.com>.
10716 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
10718 * gc.c (mono_gc_init): Avoid error message on shutdown when
10719 GC_DONT_GC=1 is used.
10721 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
10722 New icall to return the GUID of a module.
10724 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10726 * class.c: ensure instance size always includes the parent's size
10727 even whem class size is set explicitly (fixes bug#44294).
10729 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10731 * profiler.h, profiler.c: made the simple profiler thread-safe,
10732 get more accurate timing info. Allow the loading of an
10733 externally-developed profiler module.
10735 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
10737 * marshal.c (mono_marshal_get_native_wrapper): improved
10738 class/byref arguments.
10739 (mono_marshal_get_native_wrapper): better string marshaling support.
10741 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
10743 * class.c: ensure .pack and .size are handled correctly and
10744 simplified layout of static fields.
10746 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
10749 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
10751 * loader.c (mono_lookup_pinvoke_call): look for modules in the
10752 current directory (fix bug 44008)
10754 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
10756 * marshal.c (mono_marshal_get_native_wrapper): started support for
10758 (mono_delegate_to_ftnptr): consider marshalling specifications
10760 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
10762 * reflection.c, reflection.h: emit custom marshal info.
10764 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10766 * object.c: free the GError.
10767 * icall.c: added CloseEvent_internal.
10769 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
10772 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
10774 * loader.c (mono_method_get_signature): Add support for dynamic
10777 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
10779 * reflection.c: fixed bug #43905.
10781 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10783 * class.c, domain.c, icall.c, metadata.h, object.h: support for
10784 handling TypedReference and ArgIterator.
10785 * loader.c, loader.h: added function to get signature at call site.
10787 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10789 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
10790 data readonly. Buglets and warning fixes. Some MethodSpec support.
10792 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10794 * class.h, class.c, object.c: remove relative numbering support.
10796 2003-05-26 Miguel de Icaza <miguel@ximian.com>
10798 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
10799 free the string, until we get a chance to fix Gtk#
10801 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10803 * marshal.c: revert last patch.
10805 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
10807 * icall.c: updates for new mono_class_vtable() not calling
10808 the type constructor anymore.
10810 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
10812 * object.h, object.c: separate vtable creation from type
10813 initialization. Make running the .cctor thread safe.
10815 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
10817 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
10819 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
10821 * loader.c (mono_get_method): consider calling convention
10823 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
10825 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
10826 to return the invisible global type for a module.
10828 * reflection.c (mono_image_build_metadata): Emit global fields too.
10830 2003-05-20 Peter Williams <peterw@ximian.com>
10832 * loader.c (mono_lookup_internal_call): Add a few newlines.
10834 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
10836 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
10839 * appdomain.c (set_domain_search_path): Recalculate search path when
10840 AppDomainSetup.PrivateBinPath changes.
10842 * object.c (mono_class_compute_gc_descriptor): It turns out some
10843 parts of the class libs (like System.Thread) holds pointers to
10844 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
10845 to treat native int a pointer type here.
10847 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
10849 * appdomain.h, domain.c: add hashtable for jump target resolution.
10851 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
10853 * reflection.h reflection.c icall.c: Added new icalls
10854 GetManifestResourceInfoInternal, GetModulesInternal and support
10857 2003-05-16 Dick Porter <dick@ximian.com>
10861 * file-io.c: Implement System.IO.MonoIO::GetTempPath
10863 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
10865 * object.c: mono_store_remote_field: little fix to previous patch.
10867 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10869 * class.c: add constructors to array classes.
10870 * icall.c: special case array construction for InternalInvoke (),
10872 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
10874 * class.h class.c reflection.c object.c: Added support for field
10875 defaults in dynamically generated classes.
10877 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
10879 * reflection.c: properly encode charset for ddlimport.
10881 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
10883 * threads.c: allow compiling without GC.
10885 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10887 * appdomain.h, object.c, object.h, threads.c, threads.h: added
10888 handling of thread static data.
10890 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10892 * reflection.h, reflection.c: added mono_custom_attrs_free ().
10894 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
10896 * class.c (mono_array_class_get): always set the serializable flags
10897 (mono_array_class_get): always set the SEALED attribute for array types
10899 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
10901 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
10902 attributes (fix for bug 42021).
10904 2003-05-12 Dick Porter <dick@ximian.com>
10906 * gc.c: Don't run finalizers when the finalizer thread is
10907 finishing up, because the default domain has already been
10910 2003-05-11 Miguel de Icaza <miguel@ximian.com>
10912 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
10913 value is null, we should throw an exception. This is slightly
10914 different than the other conventions used for the constructor.
10916 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10918 * socket-io.c: fixed windows build.
10920 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10922 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
10924 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
10926 * object.c (mono_string_new_wrapper): Compatibility fix for MS
10929 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
10931 * class.c (mono_class_layout_fields): Add experimental GC aware
10932 auto layout facility. Requires class library changes to work correctly.
10934 (mono_class_setup_vtable): Avoid overriding explicit interface
10935 method implementations. Fixes iface3.exe test.
10937 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
10939 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
10940 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
10942 * metadata.h: Add new type classification macro which determines
10943 whenever the type holds an object reference.
10945 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
10947 * marshal.c (mono_marshal_get_native_wrapper): cleanups
10949 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
10951 * gc.c (finalizer_thread): Work around a GC bug.
10953 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
10955 * marshal.c (emit_struct_conv): allow unions
10957 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
10959 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
10961 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
10963 2003-05-06 Martin Baulig <martin@ximian.com>
10965 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
10967 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10970 (Select_internal): allow NULLs, don't create arrays if not needed.
10971 Coupled with Socket.cs changes.
10974 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
10975 register a finalizer for it that will close the semaphore handle. This
10976 fixes the leak and make Lupus' test run with > 4080 loops.
10978 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
10980 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
10981 Jerome Laban (bug #42287)
10983 2003-05-02 Martin Baulig <martin@ximian.com>
10985 * debug-mono-symfile.h
10986 (MonoSymbolFile): Moved declaration into mono-debug.h.
10987 (MonoDebugMethodJitInfo): Likewise.
10988 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
10990 (_mono_debug_address_from_il_offset): Take a
10991 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
10994 (MonoDebugDomainData): New struct.
10995 (mono_debug_get_domain_data): New function.
10996 (mono_debug_add_method): Take an additional `MonoDomain *'
10998 (mono_debug_source_location_from_address): Likewise.
10999 (mono_debug_il_offset_from_address): Likewise.
11000 (mono_debug_address_from_il_offset): Likewise.
11002 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
11004 * reflection.c: one more check for null type in custom attrs.
11006 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11008 * reflection.c: avoid warning (comparison is always false due to limited
11009 range of data type).
11011 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11013 * icall.c: throw an exception in Type.GetField if the argument 'name'
11016 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
11018 * reflection.c: fixed handling of enums in named arguments to custom
11019 attributes (bug #42123).
11021 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
11023 * reflection.c: use the right array element type and handle
11024 a null for a Type argument, too.
11026 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
11028 * reflection.c: handle arrays as arguments to custom attributes.
11030 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11032 * reflection.c: handle a string value in a custom attr
11033 ctor that takes an object.
11035 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
11037 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
11040 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
11042 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
11044 2003-04-27 Martin Baulig <martin@ximian.com>
11046 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
11047 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
11048 MONO_DEBUGGER_EVENT_BREAKPOINT.
11049 (mono_breakpoint_trampoline_code): Removed.
11050 (mono_debugger_event_handler): The last argument is now a
11052 (mono_debugger_insert_breakpoint_full): Removed the
11053 `use_trampoline' argument.
11054 (mono_debugger_method_has_breakpoint): Likewise.
11055 (mono_debugger_trampoline_breakpoint_callback): Renamed to
11056 mono_debugger_breakpoint_callback(); take the method and
11057 breakpoint number as arguments.
11059 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11061 * metadata.c: fix off by one when loading parameters attributes.
11063 2003-04-24 Martin Baulig <martin@ximian.com>
11065 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
11067 2003-04-24 Martin Baulig <martin@ximian.com>
11069 * mono-debug-debugger.c: Moved all code which interacts with the
11070 Mono Debugger here.
11072 * debug-mono-symfile.c: This code now just deals with the symbol
11073 file itself, the debugger code is now in mono-debug-debugger.c.
11075 2003-04-23 Martin Baulig <martin@ximian.com>
11077 * mono-debug.c (mono_debug_source_location_from_il_offset):
11078 New method; like mono_debug_source_location_from_address(), but
11079 takes an IL offset instead of a machine address.
11081 2003-04-23 Martin Baulig <martin@ximian.com>
11083 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
11084 `line' field; this is now computed by the debugger.
11086 2003-04-23 Martin Baulig <martin@ximian.com>
11088 * mono-debug.[ch]: New files. This is the new debugging interface.
11090 * mono-debug-debugger.[ch]: New files. Moved all code which
11091 interacts with the Mono Debugger here.
11093 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
11095 * domain.c (mono_init): initialize mono_defaults.monitor_class
11097 2003-04-21 Miguel de Icaza <miguel@ximian.com>
11099 * reflection.c (method_encode_code): Add a spicy exception to help
11100 future compiler authors.
11102 2003-04-21 Martin Baulig <martin@ximian.com>
11105 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11106 Make this work with relative pathnames; g_filename_to_uri() needs
11107 an absolute filename.
11109 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
11111 * icall.c: Track name changes in Object and ValueType.
11113 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
11115 * metadata.c (mono_type_stack_size): size should be a multiple of
11118 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11121 (internal_domain_finalize): moved into mono_domain_finalize. No need
11122 to create another thread because the finalizers will be run in the
11125 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
11126 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
11127 to be run (MS does this too).
11129 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
11131 * object.c (mono_class_compute_gc_descriptor): Update comment.
11133 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
11135 * image.h: Add synchronized wrapper cache.
11137 * image.c (do_mono_image_open): Initialize cache.
11139 * reflection.c (create_dynamic_mono_image): Initialize cache.
11141 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11143 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
11144 ves_icall_System_Buffer_ByteLengthInternal.
11146 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11148 * reflection.c: setup klass->nested_in earlier. Allow
11149 a dash in the assembly name.
11151 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
11153 * metadata.c (mono_type_to_unmanaged): dont access
11154 type->data.klass for MONO_TYPE_OBJECT
11155 (mono_type_to_unmanaged): consider System.Delegate class
11157 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
11159 * class.c: just setup supertypes in the proper place instead of
11160 initializing the full element class for arrays.
11162 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11164 * class.c: ensure the element class of arrays is initialized.
11165 Setup the supertype info for array classes, too.
11167 2003-04-14 Miguel de Icaza <miguel@ximian.com>
11169 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
11171 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11173 * Makefile.am: re-added -m option when running cygpath. This way,
11174 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
11176 * mono-config.c: same codepath for locating mono config file for WIN32
11178 * assembly.c: if mono_assembly_setrootdir is called, don't override
11181 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11183 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
11184 MONO_ASSEMBLIES variable.
11186 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
11188 * icall.c: added Assembly::GetNamespaces() icall.
11190 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11192 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
11194 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
11196 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
11197 * object.c: fixed bug in the construction of vtable for proxies
11199 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
11201 * object.c (mono_array_new): Mark mono_array_new as an icall.
11203 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11205 * class.c: fixed test for public method when overriding interfaces.
11208 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11210 * appdomain.h, domain.c: added mono_domain_foreach() to
11211 be able to access the currently loaded appdomains.
11212 * object.c: make string interning work across sppdomains.
11213 Mark some functions for use as icalls.
11215 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
11217 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
11219 * reflection.h reflection.c: Allocate long living data using
11220 GC_MALLOC_ATOMIC so the collector does not need to scan it.
11222 * reflection.c: Double the allocation size in streams instead of
11223 increasing it, to prevent unneccesary copying on large assemblies.
11225 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
11226 creation if the assembly does not have the Run flag set.
11228 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11230 * class.h: avoid the C++ keywords in header files (Jerome Laban
11231 spotted and fixed this).
11233 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11236 (mono_unhandled_exception): fill in the arguments for the
11237 UnhandledException event. Only trigger that event for the default
11238 domain (as MS does).
11240 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
11242 * object.c: Improve typed allocation stuff based on suggestions from
11243 Paolo. Also turn it on if the GC library supports it.
11245 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
11247 * object.c object.h class.h: Added experimental typed allocation
11248 facility using the interfaces in gc_gcj.h.
11250 * os/gc_wrapper.h: Added new include files.
11252 2003-04-03 Martin Baulig <martin@ximian.com>
11254 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
11255 which is not yet enabled by default.
11257 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
11259 (mono_gc_lock, mono_gc_unlock): New static functions.
11261 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
11262 functions; stop/start the world for the garbage collector. This
11263 is using the windows API; we need to complete the SuspendThread()/
11264 ResumeThread() implementation in the io-layer to make this work on Unix.
11265 (mono_gc_push_all_stacks): New public function; tells the garbage
11266 collector about the stack pointers from all managed threads.
11268 2003-04-03 Martin Baulig <martin@ximian.com>
11270 * object.h (MonoThread): Added `gpointer stack_ptr'.
11272 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
11274 2003-04-03 Martin Baulig <martin@ximian.com>
11276 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
11278 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
11280 * reflection.c (typebuilder_setup_fields): Initialize field.first and
11283 2003-04-02 Miguel de Icaza <miguel@ximian.com>
11285 * loader.c (mono_lookup_internal_call): Report the corlib that is
11288 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
11290 * icall.c (ves_icall_type_GetTypeCode): fixed check for
11291 System.DBNull (it's class not valuetype).
11293 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11295 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
11296 if the array method was already assigned a token (fixes bug#40646).
11298 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
11300 * reflection.c (mono_reflection_get_type): Attempt type resolve even
11301 if no assembly is given.
11303 2003-04-01 Miguel de Icaza <miguel@ximian.com>
11305 * metadata.h: Added the new tables.
11307 * row-indexes.h: Added definitions for new tables.
11309 * metadata.c: Add schemas for new tables, and add support for
11310 computing the sizes of them.
11312 * class.c: Update for handling the new type cases.
11314 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
11316 * metadata.h (MONO_TYPE_IS_VOID): new macro
11318 2003-03-31 Martin Baulig <martin@ximian.com>
11320 * threads.h (MonoThreadCallbacks): Added `thread_created'.
11322 * threads.c (mono_thread_new_init): Call `thread_created' in the
11323 mono_thread_callbacks.
11325 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
11327 * loader.h: added marshalbyrefobject_class to mono_defaults
11328 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
11329 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
11330 generation of output parameters.
11331 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
11332 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
11333 contextbound and the target object belongs to the context of the caller.
11334 * object.h: added context and unwrapped_server variables in MonoRealProxy.
11335 * object.c: Implemented support for interfaces and abstract classes
11336 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
11337 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
11339 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
11341 * class.h class.c (mono_class_is_subclass_of): New function.
11343 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
11344 routines for most common case (calls from ArrayList::ToArray).
11346 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
11347 routine so programs which call Environment::Exit() can be profiled.
11349 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
11350 Added MONO_ARCH_SAVE_REGS.
11352 * icall.c (ves_icall_type_is_subtype_of): Use new function.
11354 2003-03-29 Miguel de Icaza <miguel@ximian.com>
11356 * blob.h: Add a couple of new MonoType types definitions.
11358 * tabledefs.h: Add a couple of new call convs.
11360 2003-03-27 Zoltan Varga <vargaz@freemail.h>
11362 * reflection.h (MonoReflectionDynamicAssembly): track changes in
11363 the layout of the class.
11365 * reflection.c (alloc_table): double the size on overflow to avoid
11366 unnecessary copying.
11368 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
11369 avoid filling out metadata tables and blobs. Also set mb->ilgen to
11370 null so it can be garbage collected.
11372 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
11374 * reflection.c (mono_reflection_get_type): Return the resolved type
11375 only if it is in the assembly we searched.
11377 * reflection.c (ensure_runtime_vtable): Initialize method slots.
11379 * class.c (mono_class_setup_vtable): Set the slot of the overriding
11382 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11385 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
11386 the right one is 'file:///blah', but MS allows it.
11388 (mono_assembly_open): allow 'file://blah'
11390 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
11392 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
11394 * socket-io.c: fixes bug #40310.
11396 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
11398 * reflection.c (mono_reflection_parse_type): handle deeply nested
11401 * reflection.c (mono_image_create_token): Use unique token values
11402 since they will be put into a hash table.
11404 * class.c (mono_class_setup_vtable): If a method occurs in more than
11405 one place in the vtable, and it gets overriden, then change the
11406 other occurances too.
11408 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11409 object as return type.
11411 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
11413 * icall.c: Deleted "ToString" implementation for double and float
11414 because they are full implemented in managed code.
11416 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11418 * reflection.c, reflection.h: implemented and exported functions
11419 to retrieve info about custom attributes.
11421 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11423 * appdomain.c: moved Uri handling to assembly.c
11424 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
11425 work when using a file Uri in *nix and windows.
11427 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
11428 GetReferencedAssemblies.
11430 2003-03-18 Dick Porter <dick@ximian.com>
11432 * icall.c: Rename a couple of internal calls
11434 * threads.c: Set the thread state to Stopped when a thread exits.
11437 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
11439 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
11442 * object.c (mono_class_vtable): fix warning.
11444 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
11446 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
11448 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
11450 (method_encode_clauses): Create exception info structures in the right
11452 (mono_reflection_setup_internal_class): Initialize supertypes field.
11454 * class.c object.c: Handle interfaces which implement other interfaces
11457 * class.h class.c: Move the supertypes array initialization code into
11458 a separate function so it can be used for dynamic types too. Also call
11459 it earlier, in mono_class_init(), since it can be used before the
11460 type is initialized.
11462 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11466 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
11471 * object.c: remove warnings.
11473 2003-03-13 Martin Baulig <martin@ximian.com>
11475 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
11476 (MonoDebugLexicalBlockEntry): New types.
11478 * debug-mono-symfile.c
11479 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
11481 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11483 * process.c: ret can be any non-zero value accroding to MS doc.
11485 2003-03-07 Miguel de Icaza <miguel@ximian.com>
11487 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
11488 fixing a warning for a miss-used prototype, would have cause
11489 random memory corruption.
11491 2003-03-07 Martin Baulig <martin@ximian.com>
11493 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
11494 getting really annoying ....
11496 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
11498 * reflection.c (fixup_method): added support for array methods.
11500 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11502 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
11503 (pointed out by Michael Adams).
11505 2003-03-04 Dick Porter <dick@ximian.com>
11507 * icall.c: Temporarily reverted the Double and Single ToString()
11508 change, because it broke nunit.
11510 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
11512 * object.h, threads.h: make include files compatible with C++
11513 (patch by Jerome Laban <jlaban@wanadoo.fr>).
11515 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
11517 * icall.c: Erased ToString helper functions for Double and Single.
11518 Now, that implementations ar all in managed code (Double and Single
11521 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
11523 * appdomain.c: Added method for initializing the default context of
11524 a domain. Added internal call for getting the default context.
11525 * appdomain.h: Added context variable in MonoDomain struct.
11526 * domain.c: mono_domain_set also sets the default context of the domain
11527 * icall.c: Mapped internal method InternalGetDefaultContext.
11528 * object.c: mono_object_get_virtual_method returns always a remoting
11529 wrapper if the object is a transparent proxy.
11530 mono_runtime_invoke_array: when creating an object by calling the
11531 constructor, if the created object is a proxy, then the constructor should
11532 be called using the a remoting wrapper.
11534 2003-03-03 Dick Porter <dick@ximian.com>
11536 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
11537 variable so it compiles on solaris. Problem spotted by
11538 Christopher Taylor <ct@cs.clemson.edu>
11540 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11543 (get_info_from_assembly_name): don't leak value.
11546 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
11549 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
11551 * assembly.c: export mono_image_load_references ().
11552 * class.c: handle function pointers. mono_class_from_name() now
11553 supports nested type names directly.
11555 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
11557 * reflection.h reflection.c: Encode already created dynamic methods
11558 and fields correctly as a DEF instead of a REF.
11560 * reflection.c: Get rid of the force_ref argument to
11561 mono_image_typedef_or_ref since it was wrong in the first place.
11563 * string-icalls.c: add error checking to string constructors according
11566 * reflection.c: Emit types in the order their TypeBuilders were
11567 created. Previously, a new table index was assigned to each type before
11568 the tables were emitted. This was wrong because the signature blob
11569 might already refer to a type by its original table index.
11571 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
11573 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
11576 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11578 * Makefile.am: make assemblies dir have \ instead of / on windows.
11580 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
11582 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
11583 iterate over the NESTEDCLASS table using a linear search since the
11584 table is not guaranteed to be sorted by the secondary key.
11586 * class.c (mono_class_create_from_typedef): fixed up call to
11587 mono_metadata_nesting_typedef.
11589 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
11591 * marshal.c (mono_string_to_byvalstr): clear the memory as
11592 suggested by Jerome Laban <jlaban@wanadoo.fr>
11594 2003-02-26 Dick Porter <dick@ximian.com>
11596 * process.c: Cope with padding in .rsrc blocks
11598 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
11600 * metadata.h: reverted the filter_len change, it breaks reflection
11602 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
11604 * metadata.h: added a new field to store the filter_len
11607 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11609 * reflection.c: handle custom attributes for types and members
11610 created with Reflection.Emit (bug#38422).
11612 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
11614 * reflection.c: define RTSpecialName automatically for constructors for
11615 compatibility with MS.NET.
11617 * reflection.c (mono_reflection_create_runtime_class): initialize
11618 nested_in field of dynamically created classes.
11620 2003-02-22 Martin Baulig <martin@ximian.com>
11622 * debug-mono-symfile.h: Incremented version number.
11624 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
11626 * object.h icall.c process.c: fix warnings.
11628 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
11630 * appdomain.h appdomain.c:
11631 (mono_domain_try_type_resolve): split the
11632 name_or_tb argument into a name and a tb argument.
11633 (mono_domain_has_type_resolve): new function to check whenever the
11634 application has registered a TypeResolve event handler.
11636 * icall.c reflection.h reflection.c: move the type resolve logic into
11637 mono_reflection_get_type () so it will be invoked when
11638 Assembly::GetType () is called.
11641 (mono_reflection_get_type): renamed to get_type_internal.
11642 (mono_reflection_get_type): fixed type name generation so it works
11643 for nested types too.
11644 (mono_reflection_get_type): call has_type_resolve () to avoid the
11645 costly type name generation if there is no resolve event handler.
11647 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11649 * class.c, image.c: load exported types from file references.
11651 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
11653 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
11654 used to cache the managed methods used to create proxies and make
11655 remote invocation of methods.
11656 * class.h: Added in MonoVTable a flag to indicate that a class needs
11657 to be remotely created.
11658 * object.c: Modified the method mono_class_vtable(). It now initializes
11659 the remote flag of the vtable. Modified mono_object_new_specific(),
11660 so now it checks the remote flag.
11661 * icall.c: Added a couple of internal methods, one for enabling instance
11662 creation interception for a type, and one for creating objects bypassing
11665 2003-02-18 Martin Baulig <martin@ximian.com>
11667 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
11668 New interncall to get a method's metadata token.
11670 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
11671 New interncall for the debugger.
11673 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
11675 * class.c (mono_class_setup_vtable): allocate supertype array
11677 2003-02-18 Martin Baulig <martin@ximian.com>
11679 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
11681 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11684 (assembly_name_to_aname): jump over unknown properties (i've found
11685 something like: 'type, assembly, version=xxx, custom=null, public...',
11686 so now will ignore custom=null and still get the rest of the values).
11688 2003-02-17 Dick Porter <dick@ximian.com>
11690 * threads.c: Have Thread.Start() wait for a semaphore to signal
11691 that the thread has set up all its local data. This fixes bug
11692 34323, where Abort() raced the new thread's TLS data.
11694 Also removes the handle_store() call from start_wrapper, because
11695 threads are now always created suspended and there is no longer a
11696 race between the parent and child threads to store the info.
11698 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
11700 * image.c: explain the #- heap issue in a message, hopefully
11701 avoiding FAQs on mono-list.
11703 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11706 (GetEntryAssembly): if the domain has not invoked
11707 AppDomain.ExecuteAssembly yet, return the assembly of the default
11710 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
11712 * class.c (mono_ldtoken): make it work in dynamic assemblies.
11714 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
11716 * metadata.c, reflection.c: simple speedup to type hash
11719 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
11721 * image.c, image.h, class.c, assembly.c: move module loading
11722 to MonoImage. When loading metadata, consider alignemnet from
11723 the start of metadata, not from the metadata address in memory.
11725 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
11727 * reflection.c (mono_reflection_get_custom_attrs): Added support for
11728 AssemblyBuilder objects. Factored out custom attribute creation into
11729 a separate function.
11730 (create_custom_attr): new function to create custom attributes.
11732 2003-02-12 Miguel de Icaza <miguel@ximian.com>
11734 * Makefile.am: Got tired of typing the full pathname to pedump.
11735 Until there is another option, am installing this.
11737 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
11739 * class.c (class_compute_field_layout): always set field->parent
11740 (mono_ldtoken): use mono_defaults.fieldhandle_class;
11742 2003-02-11 Dick Porter <dick@ximian.com>
11745 * monitor.c: Rewrote Monitor, making lock much faster and
11746 Pulse/Wait work as specified. Also uses much fewer handles, and only
11747 creates them as needed.
11749 * exception.c: Added SynchronizationLockException
11751 * threads.c: Deleted old Monitor implementation. The new one is
11754 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11756 * class.c: handled TypedReference type code. Set the correct size for
11757 class data. Setup interface_offsets for interface classes, too.
11759 2003-02-09 Martin Baulig <martin@ximian.com>
11761 * debug-mono-symfile.h: Reflect latest symbol writer changes.
11763 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
11765 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
11766 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
11767 * object.c: fixed mono_object_get_virtual_method () for interfaces.
11768 * verify.c: check for code that runs after the end of the method.
11770 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
11772 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
11773 "System.Math::Round2".
11774 * sysmath.h: Added Floor, Round and Round2 definitions.
11775 * sysmath.c: Modified certain functions that were not 100% compliant
11776 with MS.NET (math precision) and added the implementation of Floor,
11779 2003-02-07 Martin Baulig <martin@ximian.com>
11781 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
11783 2003-02-07 Martin Baulig <martin@ximian.com>
11785 * debug-mono-symfile.c: Reflected latest symwriter changes.
11786 (mono_debug_create_mono_symbol_file): Removed.
11787 (mono_debug_open_mono_symbol_file): Take an argument which
11788 specifies whether to create a dynamic symbol file.
11790 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
11792 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
11794 2003-02-05 Martin Baulig <martin@ximian.com>
11796 * reflection.c (mono_image_build_metadata): Make this public,
11797 protect it against being called multiple times, don't create
11798 resources and don't build the compressed metadata here.
11799 (mono_image_create_pefile): Do this here.
11802 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
11804 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11806 * socket-io.c: fixed bug #36322.
11808 2003-02-06 Piers Haken <piersh@friskit.com>
11812 * debug-mono-symfile.c:
11818 * socket-io.c: warning cleanups
11820 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
11822 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
11823 function. works like remoting invoke, but does a check for the Proxy first.
11825 2003-02-05 Miguel de Icaza <miguel@ximian.com>
11827 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
11829 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
11831 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
11833 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
11834 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
11836 * object.c (mono_store_remote_field_new): used by the new jit
11837 instead of mono_store_remote_field
11838 (mono_load_remote_field_new): used by the new jit
11839 instead of mono_load_remote_field
11841 2003-02-05 Patrik Torstensson
11843 * appdomain.c: changed unload to take the domain id instead
11846 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
11849 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11851 * appdomain.c: don't look for assemblies in ApplicationBase if
11852 PrivateBinPathProbe is set.
11854 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11856 * object.c: make the first argument in main_args contain the absolute
11857 path to the assembly. Fixes bug #37511.
11859 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11861 * icall.c: get correct UTC offset for countries not using daylight
11862 time saving. Fixes bug #30030.
11864 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11866 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
11867 and 1 are the family).
11869 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
11871 * icall.c (ves_icall_InternalExecute): removed wrong assertion
11873 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
11875 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
11877 * reflection.c: added support for SignatureHelper tokens, which is
11878 needed by the Calli opcode.
11880 * reflection.h: track changes to SignatureHelper class.
11882 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
11884 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11886 * appdomain.c: fixed loading assemblies from PrivateBinPath.
11888 2003-02-03 Patrik Torstensson
11889 * appdomain.[c|h], domain.c :
11890 - Added support for getting a domain via domain id
11891 - Support for setting and getting domain from System.AppDomain
11892 (used in cross appdomain channel)
11893 - Added support for get/set for a MonoAppContext on a thread
11894 (Context class in System.Runtime.Remoting.Contexts),
11895 - Removed hack in Get/SetData and ExecuteAssembly.
11897 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
11898 the managed world to get control when a proxy is created.
11900 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
11902 2003-02-03 Miguel de Icaza <miguel@ximian.com>
11905 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11906 Populate the codebase field as well.
11908 2003-02-02 Martin Baulig <martin@ximian.com>
11910 * debug-mono-symfile.c
11911 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
11912 (mono_debug_symfile_add_method): Allow interncalls.
11914 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11916 * icall.c: throw parse exception if strtod fails or the string is empty.
11918 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
11920 * marshal.c: handle object type separately from defined
11923 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
11925 * marshal.c: handle NATIVE_LPSTR for strings when it's
11926 explicitly specified.
11928 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
11930 * reflection.c, reflection.h, icall.c: setup the reflection
11931 handle cache for ModuleBuilders and AssemblyBuilders.
11933 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
11935 * reflection.c (reflection_methodbuilder_to_mono_method): set
11938 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11940 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
11942 2003-01-29 Dick Porter <dick@ximian.com>
11944 * threads.c: No need for the fake_thread kludge now that Thread
11945 doesn't run a class constructor
11947 2003-01-29 Dick Porter <dick@ximian.com>
11949 * threads.c: Use g_direct_hash instead of the rather bogus
11952 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
11954 * marshal.c (mono_marshal_get_native_wrapper): add check for null
11955 (fix pinvoke12.exe)
11956 (mono_marshal_get_struct_to_ptr): generate valid IL code
11957 (mono_marshal_get_ptr_to_struct): generate valid IL code
11958 (*): correctly set sig->pinvoke, we need to memdup the signature
11961 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11963 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
11964 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
11966 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
11968 * profiler.c: provide more callers information.
11970 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
11972 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
11974 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
11976 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
11978 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
11980 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
11981 exception instead of going into an infinite loop on dates which it
11984 * string-icalls.c (ves_icall_System_String_get_Chars): raise
11985 out-of-range exception if needed.
11987 * class.c (mono_class_setup_vtable): allow a virtual method to provide
11988 an implementation for an interface method and to override an inherited
11989 method at the same time.
11990 Imagine a scenario when a virtual method is used to override a
11991 virtual abstract method in a parent class, and this same method
11992 provides an implementation for an method inherited from an interface.
11993 In this case, the interface resolution code will set im->slot, which
11994 means that the virtual method override pass will skip this method
11995 which means a pointer to the abstract method inherited from the parent
11996 will remain in the vtable of this non-abstract class.
11998 * class.c: (mono_class_setup_vtable): continue search for a real
11999 method if only an abstract method is found.
12001 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
12003 * reflection.c: add size to encoding for ByValStr and ByValArray
12004 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
12006 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12008 * class.c (mono_class_setup_vtable): pass the override info as an
12011 * class.c (mono_class_setup_vtable): set the slot of overriding methods
12014 * reflection.c (ensure_runtime_vtable); add support for method
12017 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12019 * reflection.c (resolution_scope_from_image): Hack to work to work with
12020 dynamic assemblies.
12022 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
12023 added a 'force_ref' argument to force this function to allways return
12024 a TypeRef. This is needed by mono_image_get_memberref_token ().
12026 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12028 * reflection.c (mono_image_get_type_info): interfaces really don't have
12031 * reflection.c (mono_image_basic_init): fill out missing fields of
12034 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
12035 dynamic assemblies. This is required so dynamic assemblies show up in
12036 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
12037 Type::GetType() etc. This is consistent with MS behaviour.
12039 * image.c image.h reflection.c: add newly created classes to the name
12040 cache so mono_class_get () will find them.
12042 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
12044 First part of changes to get IKVM.NET running under mono.
12046 * appdomain.h, appdomain.c: added new function
12047 mono_domain_try_type_resolve() which will emit TypeResolve events.
12048 This function will call AppDomain::DoTypeResolve to do the actual work.
12050 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
12051 moved existing code dealing with dynamic tokens to a new function
12052 called mono_reflection_lookup_dynamic_token (). This function will
12053 raise TypeResolve events when appropriate. Since reflection.c is not
12054 part of libmetadata, a new hook function called
12055 mono_lookup_dynamic_token() is added to class.c which will call this.
12057 * assembly.h assembly.c: make the invoke_load_hook function public,
12058 so it can be called for dynamic assemblies.
12060 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
12062 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
12065 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
12066 MonoGHashTable, since it contains pointers to objects which the GC
12069 * assembly.c (search_loaded): remove unused variable.
12071 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
12073 * object.c: fixed issue exposed by gcc-generated IL programs
12074 that use RVA data for pointers.
12076 2003-01-25 Martin Baulig <martin@ximian.com>
12078 * threads.c (start_wrapper): Moved the initialization of
12079 `start_func' above the mono_new_thread_init() call to which we
12080 pass it as argument.
12082 2003-01-24 Martin Baulig <martin@ximian.com>
12084 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
12085 the MonoThread pointer.
12087 2003-01-21 Miguel de Icaza <miguel@ximian.com>
12089 * icall.c: Rename `PowImpl' to Pow.
12091 2003-01-23 Dick Porter <dick@ximian.com>
12093 * threads.c (start_wrapper): Create a Thread object if needed, so
12094 the Main() thread can do the class initialisation in a subthread
12095 that has been set up to allow managed code execution.
12097 Pass the thread ID instead of the MonoThread pointer to the thread
12098 start and attach callbacks. This change is required, because the
12099 jit thread start callback must be called _before_ the Thread
12100 object can be created.
12102 (mono_thread_init): Removed much object creation code that is no
12103 longer needed. No managed code is called from here now.
12105 * object.c (mono_runtime_exec_managed_code): Create a subthread
12106 for Main, and call back to the runtime to use it.
12107 Set the exit code when Main exits.
12109 * gc.c: Make sure domain finalisation happens in a subthread.
12110 Re-enable threaded GC, fixing bug 31333 (again).
12112 * environment.c: System.Environment internall calls (so far just
12113 ExitCode is here, the others are still in icall.c)
12115 * appdomain.c (mono_runtime_cleanup): All threads running managed
12116 code should have finished before mono_runtime_cleanup() is
12117 reached, so no need to clean up threads.
12119 2003-01-22 Martin Baulig <martin@ximian.com>
12121 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
12122 `gpointer func' arguments.
12123 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
12124 but added `MonoThread *thread' argument.
12125 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
12127 * threads.c (mono_new_thread_init): Added `gpointer func' argument
12128 and pass it to the mono_thread_start_cb callback.
12129 (mono_install_thread_callbacks): New public function to install a
12130 set of callbacks which are set by the debugger.
12131 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
12133 2003-01-22 Martin Baulig <martin@ximian.com>
12135 * Makefile.am: Install debug-mono-symfile.h.
12137 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
12139 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
12141 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
12143 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
12144 * class.c (mono_ptr_class_get): correctly set access levels of pointers
12145 (mono_array_class_get): correctly set access levels of arrays
12147 2003-01-20 Patrik Torstensson
12148 * image.h (MonoAssemblyName): changed major, minor, build, revision
12149 from signed to unsigned.
12151 2003-01-20 sean kasun <skasun@azstarnet.com>
12153 * reflection.c (load_cattr_value): Now this handles
12154 MONO_TYPE_SZARRAY. Fixes bug #35629
12156 2003-01-20 Miguel de Icaza <miguel@ximian.com>
12158 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
12161 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12163 * decimal.c: fixed bug #26056.
12165 2003-01-17 Martin Baulig <martin@ximian.com>
12167 * gc.c: Raise an ExecutionEngineException instead of using g_error().
12169 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12172 (mono_get_exception_type_initialization): new function.
12174 * object.c: throw a TypeInitializationException when an exception is
12175 thrown invoking the class constructor.
12177 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12179 * reflection.c: fixed attribute reading.
12181 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12184 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
12185 provided, look for the type in the calling assembly and then in
12186 mscorlib; if the assembly name is provided, only try that one.
12188 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12190 * object.c: register the vtable before there is a chance it's
12191 queried again recursively.
12193 2003-01-13 Duncan Mak <duncan@ximian.com>
12195 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
12198 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
12200 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
12202 2003-01-11 Martin Baulig <martin@ximian.com>
12204 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
12205 this to 20 for the release.
12207 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
12209 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
12211 * loader.c (mono_method_get_marshal_info): bug fix
12213 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
12214 structures with explicit layout
12216 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12218 * profiler.c: made the output more readable (and sorted).
12219 Added caller information for the allocation profiler.
12221 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
12223 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
12225 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12227 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
12228 to get value types.
12230 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
12232 * object.c, profiler.h, profiler.c, profiler-private.h:
12233 Added object allocation profiler.
12235 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
12237 * reflection.h, reflection.c: handle global methods.
12238 Compress blob entries.
12240 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
12242 * marshal.c: fix compilation.
12244 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
12246 * loader.c (mono_method_get_marshal_info): impl.
12248 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
12250 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12252 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
12253 for reference types.
12255 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
12257 * loader.c: fixed off by one error in loaded parameter names.
12259 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
12261 * marshal.c (mono_marshal_get_icall_wrapper): like
12262 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
12263 instead of a MonoMethod.
12265 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12267 * decimal.c: fixed bug #36537.
12269 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
12271 * marshal.c: throw a missing method exception if a
12272 P/Invoke method is not found.
12274 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12276 * icall.c: allow a null this for constructors.
12278 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12280 * icall.c: raise the proper exceptions if the arguments to the
12281 internal Invoke are incorrect.
12283 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
12285 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
12287 2003-01-03 Martin Baulig <martin@ximian.com>
12289 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12291 2002-12-31 Martin Baulig <martin@ximian.com>
12293 * debug-mono-symfile.c: Completely rewrote the type section.
12294 Instead of using individual malloc()ed fields, we use one big
12295 continuous memory area and offsets into this area.
12296 See the comments in the source code for details.
12298 2002-12-30 Martin Baulig <martin@ximian.com>
12300 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
12302 2002-12-30 Martin Baulig <martin@ximian.com>
12304 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
12305 line number table in this data blob instead of using an external
12308 2002-12-28 Martin Baulig <martin@ximian.com>
12310 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12312 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
12314 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
12315 as a boxed return type.
12317 2002-12-21 Miguel de Icaza <miguel@ximian.com>
12320 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
12321 g_build_filename to properly get separators on the filename created.
12323 * object.h: Small change, introduce MonoMarshalByRefObject to
12324 track the layout of that structure in the C# universe as we make
12327 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
12329 * object.c: removed assert to allow static fields on interfaces.
12330 * loader.c: a TypeSpec may be used for any type, not just arrays.
12332 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12334 * class.c, class.h: added mono_class_array_element_size ().
12335 Ignore static methods in interfaces.
12337 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12339 * threads.c: fixed the build under cygwin.
12341 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
12343 * reflection.c: handle nullref constants. Allocate keys for
12344 reflection handles with the GC.
12346 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12348 * threads.c, threads.h: added mono_thread_get_abort_signal()
12349 to get a suitable signal for thread abort.
12351 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12353 * metadata.c: fix handling of ExportedType table.
12355 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12357 * icall.c: added WriteWindowsDebugString internal call.
12359 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12361 * reflection.h: added fields to match C# implementation.
12363 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12365 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
12367 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
12369 * gc.h, gc-internal.h: Rename header for GC internal calls to
12370 gc-internal.h from gc.h as to not clash with Boehm GC having its
12371 header installed as <gc.h> in outside include paths.
12372 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
12373 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
12375 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12377 * icall.c: assign minor, build and revision in FillName.
12379 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
12381 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
12382 Added support for running code generated by Reflection.Emit.
12384 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12386 * appdomain.c: check for NULL argument in LoadFrom.
12388 2002-12-10 Dick Porter <dick@ximian.com>
12390 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
12392 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12394 * appdomain.c: fix buglet when building exe file name. Handle full
12395 assembly name (needed after latest changes to AssemblyName).
12397 (mono_image_close): free some hashtables.
12399 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
12401 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
12402 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
12403 on some systems (redhat 7.3)
12405 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
12407 * threads.c: delete the critical section of a sync block,
12408 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
12410 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
12412 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
12414 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12416 * appdomain.[ch]: handle the assembly preload event to try loading the
12417 assemblies using the paths we have in the current domain.
12419 * assembly.[ch]: created an assembly preload hook that is called to try
12420 loading the assembly by other means that the ones provided here.
12422 * domain.c: initialize the domain search path.
12424 From now on, assemblies (TODO: except corlib and System) are loaded
12425 according to these rules when using mono_assembly_load ():
12427 1. It tries to load the assembly from the ApplicationBase
12428 of the current domain appending .dll and .exe (TODO: have to
12429 try loading from name/name.dll and name/name.exe).
12431 2. It tries the search path specified in PrivateBinPath for the
12432 current domain (if any).
12434 3. Previous behavior.
12436 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
12438 * icall.c: implemented GetInterfaceMap() related icall.
12439 * domain.c, loader.h: load MethodInfo in mono_defaults.
12441 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12443 * gc.c: disable the finalizer thread for now, untill all the issues
12444 with it are resolved.
12446 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12448 * string-icalls.c: handle embedded nulls in string ctor when the
12449 length is specified.
12451 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
12453 * class.c: look for explicit interface implementation in parent
12456 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
12458 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
12460 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
12462 * gc.c: protect handles with a critical section.
12464 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12467 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
12468 parameters. If no assembly specified, try getting the type from all
12469 the assemblies in the current domain, else, load the assembly and get
12472 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12474 * marshal.c: applied patch from Aleksey Demakov that fixes
12475 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
12477 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12479 * icall.c: fixed get_location.
12481 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
12483 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
12484 declarations to make it work with older gcc.
12486 * loader.c (mono_get_method): set signature->pinvoke for native calls
12488 2002-11-20 Dick Porter <dick@ximian.com>
12490 * threads.c (mono_thread_init): Set the main thread's handle
12492 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
12494 * gc.c: allow compilation without GC support. Changed to match the
12497 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12499 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
12501 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
12503 * reflection.c: set a public key token on the core assemblies.
12505 2002-11-18 Dick Porter <dick@ximian.com>
12507 * threads.c: Split out some thread initialisation so that other
12508 files can set the start callback function.
12510 * gc.c: Run finalisers in a separate thread, to avoid stack
12511 overflow. Fixes bug 31333.
12513 * appdomain.c: Set up GC finalisation thread.
12517 * domain.c: Use gc.h macros for GC_malloc
12519 2002-11-15 Dick Porter <dick@ximian.com>
12523 * appdomain.c: Removed mono_runtime_init_with_attach(),
12524 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
12525 merging the extra parameter with the existing function. Removed
12526 unneeded code in mono_thread_attach().
12528 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
12530 * image.c (mono_image_loaded_by_guid): a method to get loaded
12532 (load_metadata_ptrs): we store the guid as string.
12534 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
12536 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
12538 * metadata.c (mono_guid_to_string): imported method form Zoltan
12539 Varga (slightly modified)
12541 * assembly.c (mono_assembly_open): load precompiled code
12543 * loader.h (MonoMethod): we store the method token for use in the
12546 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12548 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
12549 the hook function called when an assembly is loaded.
12551 * domain.c: Modified file.
12552 (mono_domain_assembly_load): removed hash table insertion of assemblies.
12556 2002-11-07 Miguel de Icaza <miguel@ximian.com>
12558 * reflection.c: Map PEFileKind to the value expected by the WinNT
12561 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12563 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
12564 Read until the buffer is filled completely.
12566 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12568 * icall.c: implemented MonoType.InternalGetEvent ().
12570 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12572 * appdomain.c: implemented InitAppDomainSetup. Delayed
12573 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
12574 the entry_assembly.
12576 * assembly.c: base_dir is now an absolute path ending with
12579 * icall.c: modified get_location according to the above changes.
12581 * object.c: init AppDomain.SetupInformation for the default domain after
12582 we have the entry assembly.
12584 * domain.c: when unloading a domain, setup = NULL.
12586 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
12588 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
12590 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
12592 * object.h, object.c: introduced mono_object_get_virtual_method ()
12593 to lookup the method invoked on an object when a callvirt is done on
12595 * icall.c: make MethodInfo::Invoke() always do a virtual call.
12597 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12599 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
12600 current domain when loaded an assembly and failed to load it.
12602 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
12604 2002-10-31 Dick Porter <dick@ximian.com>
12608 * file-io.c: Return the error status in a parameter, as the
12609 GetLastError() value has long since been blown away if we try and
12610 look it up in a subsequent internal call invocation. Delete the
12611 GetLastError() internal call, because it's useless.
12613 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
12615 * class.[ch]: added cast_class to fix bug 29517
12617 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
12619 * marshal.c: create valid IL code in the filter clause:
12620 the new JIT is less forgiving:-)
12622 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12624 * icall.c: removed get_property internal call.
12626 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
12628 * appdomain.h domain.c: Added an ID to appdomains.
12630 * threads.c threads.h icall.c: Implement icall
12631 Thread:GetDomainID(), and remove unused icall
12632 CurrentThreadDomain_internal.
12634 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12636 * icall.c: Don't recurse through the base types in GetConstructor.
12639 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
12641 * mempool.h, mempool.c: added mono_mempool_empty() and
12642 mono_mempool_stats().
12644 2002-10-23 Dick Porter <dick@ximian.com>
12648 * icall.c: Added MonoIO.GetFileType internal call
12650 2002-10-17 Dick Porter <dick@ximian.com>
12652 * appdomain.c (mono_runtime_cleanup): Don't signal the async
12653 delegate semaphore before waiting for all threads to finish,
12654 because new threads can also call async delegates. Fixes bug
12657 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
12658 of 3 seconds, in case another async job is queued. (This part is
12659 needed because the bug fix reintroduced the 3s exit lag.) This
12660 makes the mono_runtime_shutdown flag superfluous.
12662 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12664 * reflection.c: include ehader size in method section headers.
12665 Really check for suplicated modules entries.
12667 2002-10-17 Martin Baulig <martin@gnome.org>
12669 * debug-mono-symfile.c: Added back support for locals.
12671 2002-10-14 Martin Baulig <martin@gnome.org>
12673 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
12676 2002-10-14 Martin Baulig <martin@gnome.org>
12678 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
12679 mono_class_get() instead of looking in the class cache.
12681 2002-10-13 Martin Baulig <martin@gnome.org>
12683 * debug-mono-symfile.c: Set version number to 28, include the
12684 signature in method names.
12686 2002-10-13 Martin Baulig <martin@gnome.org>
12688 * debug-mono-symfile.h: Set version number to 27.
12690 2002-10-11 Martin Baulig <martin@gnome.org>
12692 * gc.c: Don't register/unregister NULL pointers as disappearing links.
12694 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12696 * metadata.c, metadata.h: added helper function to allocate signatures.
12698 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12700 * icall.c: added internal call to get the location of machine.config.
12702 2002-10-08 Martin Baulig <martin@gnome.org>
12704 * debug-mono-symfile.c: Ignore classes with a pending init for the
12707 2002-10-03 Dick Porter <dick@ximian.com>
12709 * threads.c: Freebsd pthread_t is a pointer
12711 2002-10-03 Dick Porter <dick@ximian.com>
12713 * socket-io.c: Implemented GetHostName_internal
12715 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12718 (mono_config_parse_file): don't leak the text.
12720 2002-10-02 Martin Baulig <martin@gnome.org>
12722 * debug-mono-symfile.c: Added support for methods.
12724 2002-10-01 Martin Baulig <martin@gnome.org>
12726 * debug-mono-symfile.c: Don't emit methods and line numbers for
12727 the dynamic symbol file, just write the type table. We can easily
12728 have an external helper program which creates a symbol file for an
12731 2002-10-01 Dick Porter <dick@ximian.com>
12733 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
12734 Only add the handle to the cleanup array when we're about to
12735 launch the thread. Bug 31425 deadlocked when the test was run on
12738 2002-10-01 Martin Baulig <martin@gnome.org>
12740 * debug-mono-symfile.c: Added support for properties.
12742 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12744 * reflection.c: unaligned store fix from Mark Crichton
12745 <crichton@gimp.org>.
12747 2002-09-27 Martin Baulig <martin@gnome.org>
12749 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
12752 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12754 * assembly.h, assembly.c: use a sane API to hook into the assembly
12755 loading process instead of a useless special-purpouse hack
12756 (ngen needs a hook, too, for example).
12758 2002-09-27 Dick Porter <dick@ximian.com>
12760 * threads.c (mono_thread_init): Call GetCurrentProcess() so
12761 io-layer can set up some process handle info. Not needed on w32,
12762 but doesn't hurt either.
12764 * process.c: Pass the program name in the second parameter to
12765 CreateProcess, so the path is searched. Include the working
12766 directory. Implemented process name, process enumeration, and some
12767 process detail internal calls.
12769 * icall.c: Added internal calls for process lookup, and some
12772 2002-09-26 Martin Baulig <martin@gnome.org>
12774 * assembly.c (mono_install_open_assembly_hook): New global
12775 function to install a function to be invoked each time a new
12776 assembly is loaded.
12777 (mono_assembly_open): Run this callback function if set.
12779 * debug-mono-symfile.c: Put back line numbers for the dynamic
12780 symbol file and also record the .il file as source file. This
12781 allows us to install the temporary symbol file as `file.dbg' just
12782 like a compiler-generated one.
12784 2002-09-26 Nick Zigarovich <nick@chemlab.org>
12786 * Corrected typo in gc.c (BOHEM vs BOEHM).
12788 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12790 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
12791 GetProperties. Also avoid calling g_slist_length in GetProperties and
12794 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
12796 * reflection.c: avoid unaligned stores (bug spotted by
12797 Mark Crichton <crichton@gimp.org>).
12799 2002-09-25 Martin Baulig <martin@gnome.org>
12801 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
12802 instead of guint64 for addresses and added prologue/epilogue info.
12804 2002-09-25 Martin Baulig <martin@gnome.org>
12806 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
12807 store line number info. For the dynamic symbol file, we only need
12808 to provide the JIT generated dynamic line number info for the dynamic
12811 2002-09-25 Martin Baulig <martin@gnome.org>
12813 * debug-mono-symfile.h: Incremented version number.
12815 2002-09-24 Martin Baulig <martin@gnome.org>
12817 * class.c (mono_debugger_class_init_func): New global function
12819 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
12822 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
12823 function. This is called via the mono_debugger_class_init_func
12824 hook to add all types to the dynamic type table.
12825 (ves_icall_MonoDebugger_GetType): New interncall to get a class
12826 from its metadata token.
12828 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
12829 New interncall for the debugger.
12831 2002-09-24 Nick Drochak <ndrochak@gol.com>
12833 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
12834 before using it in case it is null.
12836 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12838 * metadata.c: allow custom modifiers in local var signatures
12839 (bug spotted by Zoltan Varga).
12841 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12843 * class.c: deal with the <Module> class that may have a NULL vtable.
12844 Eliminate warnings.
12846 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12848 * image.c, image.h: more strong name helpers.
12849 * monosn.c: more work: convert pem keys to cryptoapi format.
12851 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
12853 * string-icalls.c: speedup IndexOf.
12855 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12857 * icall.c: updates from Zoltan.2.Varga@nokia.com.
12859 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
12861 * icall.c: cleanup: use mono_object_domain ().
12863 2002-09-23 Martin Baulig <martin@gnome.org>
12865 * debug-mono-symfile.c: Improved type support.
12867 2002-09-22 Martin Baulig <martin@gnome.org>
12869 * debug-mono-symfile.c: Added support for reference types and strings.
12871 2002-09-22 Martin Baulig <martin@gnome.org>
12873 * debug-mono-symfile.c: Started to work on the type table.
12875 2002-09-21 Martin Baulig <martin@gnome.org>
12877 * debug-mono-symfile.c: Largely reworked the symbol table format.
12878 The symbol table is now incrementally updated each time a new
12879 method is added. We're now also using our own magic and version
12880 so that you don't need to recompile all your classes if the
12881 dynamic table changes.
12882 (mono_debug_update_mono_symbol_file): Removed.
12883 (mono_debug_symfile_add_method): New function to add a method.
12885 2002-09-21 Martin Baulig <martin@gnome.org>
12888 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
12891 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
12892 New interncall to get a method from its metadata token.
12894 2002-09-21 Martin Baulig <martin@gnome.org>
12896 * debug-mono-symfile.c: Create type table.
12898 2002-09-20 Martin Baulig <martin@gnome.org>
12900 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
12902 2002-09-20 Martin Baulig <martin@gnome.org>
12904 * debug-mono-symfile.c: Provide information about params and locals.
12906 2002-09-20 Martin Baulig <martin@gnome.org>
12908 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
12911 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
12912 interncall to get a method from its metadata token.
12914 2002-09-20 Martin Baulig <martin@gnome.org>
12916 * debug-mono-symfile.c: Added a few checks for method->header
12917 being non-NULL. This should never happen, but for the moment
12918 let's use a g_warning() rather than a g_assert().
12920 2002-09-19 Mark Crichton <crichton@gimp.org>
12922 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
12923 even if support for it isn't present. Added an #ifdef to fix this.
12925 * socket-io.c: Added checks back for Solaris support.
12927 2002-09-19 Martin Baulig <martin@gnome.org>
12929 * debug-mono-symfile.c (read_string, write_string): Reflect latest
12930 changes in the symbol file format.
12932 2002-09-18 Martin Baulig <martin@gnome.org>
12934 * debug-mono-symfile.c: Set version number to 21.
12936 2002-09-18 Dick Porter <dick@ximian.com>
12938 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
12939 on netbsd. Fixes bug 30051.
12941 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12944 (set_version_from_string): little fix.
12946 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12948 * monosn.c, Makefile.am: added strong name utility.
12949 * reflection.h, reflection.c: implemented delayed signing,
12950 locale, version and hash id assembly attributes.
12952 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
12954 * loader.c, metadata.c: load param attributes in signatures.
12956 2002-09-16 Martin Baulig <martin@gnome.org>
12958 * debug-mono-symfile.c: Added string table with all method names.
12960 2002-09-14 Martin Baulig <martin@gnome.org>
12962 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
12963 fast method lookup.
12965 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
12967 * reflection.c: record the public key token of referenced assemblies.
12969 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
12971 * image.c, image.h: added functions to get the strong name and the
12972 public key of an assembly.
12973 * pedump.c: use them.
12975 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
12977 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
12979 2002-09-12 Miguel de Icaza <miguel@ximian.com>
12981 * marshal.c (mono_marshal_get_managed_wrapper): Added
12984 2002-09-11 Martin Baulig <martin@gnome.org>
12986 * gc.c: Call GC_unregister_disappearing_link() on all links when
12987 finalizing them, this is necessary to aviod a crash in boehm's
12990 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12992 * gc.c: handle GetTarget for finalized objects spotted and fixed by
12995 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
12997 * icall.c: implemented MonoType::Module.
12998 * reflection.c, reflection.h: mono_module_get_object () from
12999 Tomi Pakarinen <tomi.pakarinen@welho.com>.
13001 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
13003 * icall.c: ignore overridden methods in GetMethods ().
13004 Fix for FieldInfo::SetValue().
13005 * object.c: handle float/double in runtime invoke.
13007 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13009 * object.c: allow a constructor to be called again on an object.
13011 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13013 * class.h, class.c: move field layout code to it's own function and
13014 export it. Get an interface id earlier. Move fields in MonoClass
13015 so they are more cache friendly and align the bitfields.
13016 * loader.c: temporary handle get_param_names() for a runtime method.
13017 * reflection.c, reflection.h: more code to handle runtime creation of
13020 2002-09-09 Martin Baulig <martin@gnome.org>
13022 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
13023 signature with the pinvoke field being set for the actual call.
13025 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13027 * icall.c: removed some unused icalls. Start of map of glib charsets
13028 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
13030 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13032 * debug-helpers.c: break infinite loop (found and fixed by
13033 Holger Arnold <harnold@gmx.de>).
13035 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13037 * icall.c: target may be null in create_delegate.
13039 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13041 * marshal.c: handle a boolean return type.
13043 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13045 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
13047 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13049 * gc.c: fix weakreferences.
13051 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13053 * icall.c: added icall to get default codepage.
13055 2002-09-03 Dick Porter <dick@ximian.com>
13058 * threads.c: Use MonoThread instead of MonoObject where
13061 Store running thread objects in a hash table, so that we have all
13062 the info to hand when waiting for them to finish
13063 (means we don't need OpenThread() any more, so mingw builds should
13064 be fully functional again.)
13067 * object.h: Added thread ID to MonoThread
13069 2002-09-03 Martin Baulig <martin@gnome.org>
13071 * icall.c (System.Reflection.Assembly::get_location): New interncall.
13073 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13075 * icall.c: fixed leak in get_temp_path. Thanks lupus.
13077 2002-09-03 Martin Baulig <martin@gnome.org>
13079 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
13080 argument to store the end address of the disassembled instruction.
13082 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
13083 here from debug-symfile.h.
13084 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
13085 JIT into this struct.
13086 (MonoSymbolFile): Added `char *image_file' field.
13087 (MonoDebugGetMethodFunc): Removed.
13088 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
13089 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
13090 (mono_debug_find_method): New method.
13092 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
13093 create a full symbol file.
13094 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
13095 and static symbol files.
13096 (mono_debug_find_method): The symbol file keeps an internal method hash,
13097 call this to get a MonoDebugMethodInfo from a MonoMethod.
13099 * debug-symfile.[ch]: Removed.
13101 2002-08-29 Miguel de Icaza <miguel@ximian.com>
13103 * image.c (do_mono_image_open): Remove linker version check.
13105 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
13107 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
13108 wrappers for instance methods.
13110 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13112 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
13114 2002-08-28 Dick Porter <dick@ximian.com>
13116 * Makefile.am: Export HOST_CC for w32 builds
13118 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13120 * file-io.c process.c: MonoString are null terminated, no
13121 need for mono_string_to_utf16() anymore.
13123 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13125 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
13127 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
13129 * icall.c, reflection.h: speedup System.MonoType.
13131 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13133 * reflection.c: allow null as the value of a string argument in
13134 custom attributes constructors.
13136 2002-08-27 Martin Baulig <martin@gnome.org>
13138 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
13139 `trampoline_address' field.
13141 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
13143 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
13144 check (fixes bug #29486)
13146 2002-08-27 Martin Baulig <martin@gnome.org>
13148 * debug-mono-symfile.c: Changed the file format in a way that allows us
13149 open it read-only and to use a specially malloced area for all the
13150 dynamic data. We can now also generate a symbol file on-the-fly if we're
13151 debugging IL code and there is no MCS generated symbol file for it.
13153 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
13155 * object.c: added a define for a good string and array
13156 creation speedup (not enabled by default because we need to deal with
13159 2002-08-26 Martin Baulig <martin@gnome.org>
13161 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
13162 function to create a dynamic symbol file. This is used by the
13163 debugger to create a symbol file for IL code on-the-fly.
13165 2002-08-26 Martin Baulig <martin@gnome.org>
13167 * loader.c (mono_lookup_pinvoke_call): Include the error message
13168 from g_module_error() in the error message.
13170 2002-08-24 Martin Baulig <martin@gnome.org>
13172 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
13173 function to update the symbol file. The symbol file is mmap()ed
13174 writable, but private. This allows us to install the symbol file
13175 together with the assembly.
13177 2002-08-24 Martin Baulig <martin@gnome.org>
13179 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
13180 but they can read the new symbol file format which mcs is now creating.
13182 * debug-symfile.c (mono_debug_find_source_location): Moved to
13183 debug-mono-symfile.c; this is now operating on the new symbol file.
13185 2002-08-23 Martin Baulig <martin@gnome.org>
13187 * debug-helpers.c (mono_method_desc_from_method): New function to get
13188 a MonoMethodDesc from a MonoMethod.
13190 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13192 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
13193 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
13195 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13197 * string-icalls.[ch]: make helper methods static.
13199 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13201 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
13202 types to it and to SetValueInternal.
13204 * object.c: Moved handle_enum label to its proper place. This was the
13207 This time i compiled mcs and gtk-sharp and they both work.
13209 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13211 * icall.c: reverted partially my previous patch until
13212 object.c:set_value handles enums correcly.
13214 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13217 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
13218 (ves_icall_System_Environment_get_MachineName): removed warning when
13219 compiling under cygwin.
13221 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13223 * object.c: fixed field_get_value() for reference types.
13225 2002-08-22 Dick Porter <dick@ximian.com>
13227 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
13228 Don't free a buffer while it's still needed. Patch from Jonathan
13229 Liger <Jonathan.liger@wanadoo.fr>
13231 2002-08-21 Miguel de Icaza <miguel@ximian.com>
13233 * icall.c (ves_icall_System_Environment_get_Platform): Add new
13236 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
13238 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
13239 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
13241 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
13242 we call unmanaged code which throws exceptions.
13244 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13246 * appdomain.h: added per-domain entry_assembly.
13247 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
13249 * icall.c: Assembly::GetEntryAssembly icall.
13250 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
13251 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
13253 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13255 * appdomain.h, gc.c: added mono_domain_finalize ().
13257 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13260 (mono_print_unhandled_exception): changed g_warning by g_printerr
13261 because g_log has a 1024 characters limit (yeah, i got a big stack
13262 trace). Don't print exception name, that should be in ToString
13265 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13267 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
13268 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
13270 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13273 (mono_print_unhandled_exception): after previous commit, i realized
13274 that MS calls ToString on the exception. I changed this function to
13275 do that. This way we get stack_trace for free.
13277 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13280 (mono_print_unhandled_exception): invoke Message property instead of
13281 getting 'message' field from Exception. Don't allocate memory for
13282 'trace' and 'message' if not needed.
13284 2002-08-18 Dick Porter <dick@ximian.com>
13286 * unicode.c: Fix asserts to match Encoder.cs checks
13288 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13290 * marshal.c: fix unaligned store issue and a few wrong
13291 opcode argument types.
13293 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13295 * icall.c: added GetUninitializedObjectInternal internal call.
13297 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
13299 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
13300 to the right domain.
13302 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
13304 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
13306 * class.c (class_compute_field_layout): set blittable to false for Strings
13308 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
13310 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13312 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
13313 first chunk of code to create types at runtime. Code to
13314 handle ReflectedType/DeclaringType. Make reflection handles
13317 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
13319 * class.c: set correct name in arrays.
13321 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
13323 * appdomain.c (mono_domain_transfer_object): make it work with
13324 valuetypes. bug fixes.
13326 2002-08-12 Dick Porter <dick@ximian.com>
13328 * object.h: Rename some parameters to avoid c++ keywords (Patch
13329 from Joseph Wenninger <kde@jowenn.at>)
13331 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
13333 * icall.c: added icall to implement Assembly.GetFile*.
13335 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13337 * reflection.h, reflection.c: code to embed managed resources.
13339 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13341 * class.c: move all the type size stuff into
13342 class_compute_field_layout().
13344 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13346 * class.c: ensure enums have always the correct instance size.
13347 * unicode.c: remove wrong assert.
13349 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13351 * assembly.c: fix mem corruption issue.
13352 * image.h, image.c: added mono_image_get_resource () to access
13354 * icall.c: implemented Assembly.EntryPoint property and some
13355 Managed Resources related internalcalls.
13358 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13360 * image.c, image.h: impemented mono_image_get_entry_point ().
13361 * appdomain.c: use mono_image_get_entry_point.
13363 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13365 * reflection.c: support the object type argument when loading
13368 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
13370 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
13371 String as return type.
13373 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
13375 * reflection.c: fix encoding of named args for custom attrs to match
13376 the ms implementation. Read them back when instantiating custom
13379 2002-08-02 Radek Doulik <rodo@ximian.com>
13381 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
13382 by Dietmar as quick fix
13383 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
13384 16 as stack size, used on more places as quick fix before Dietmar
13385 will fix it properly
13387 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13389 * object.h, object.c: added accessors for fields and properties.
13391 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13393 * class.c, class.h: made mono_class_get_field_from_name ()
13394 loop on parent types.
13395 Added mono_class_get_property_from_name ().
13397 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13399 * class.c, class.h: move the code to setup the type vtable in its own
13400 function so that it can be reused also for types created at runtime.
13401 Eliminate the "class" identifier from the header file.
13402 * reflection.c: setup the vtable for enums so that we can create
13403 objects for use in SetConstant ().
13405 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
13407 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
13408 instead of the delegate itself as this pointer (bug #28383)
13410 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
13412 * marshal.c (mono_marshal_get_managed_wrapper): added return type
13415 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13417 * loader.c: don't set the pinvoke bit on icalls.
13419 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
13421 * debug-helpers.c (mono_method_full_name): only print a number to
13422 indicate wrapper type (so that the output is more readable in traces).
13424 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
13426 * class.c (mono_class_init): include method override patch from Paolo
13428 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
13430 * icall.c: fixed GetTypeCode().
13432 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
13434 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
13435 use real delegate invoke function to make it work with multicast
13436 delegates (fix bug# 28291).
13438 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13440 * object.c: load constant strings.
13442 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13444 * reflection.c: no magic numbers.
13445 * tabledefs.h: security action enum.
13447 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13449 * assembly.c: fix possible memory corruption.
13451 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13453 * reflection.h, reflection.c: added support for linking resources.
13454 * verify.c: check we have an updated corlib.
13456 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
13458 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
13460 (mono_marshal_string_array): null terminate unmanaged string arrays.
13461 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
13463 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13465 * icall.c: Type.GetType () can now return also types from the
13468 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13470 * loader.h, loader.c: stack walking support.
13471 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
13472 GetCallingAssembly.
13474 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
13476 * marshal.c: added optimisations for blittable types
13478 * class.c (mono_array_class_get): do not set blittable attribute on arrays
13479 (mono_class_setup_mono_type): set blittable attribute for single
13482 * marshal.c (mono_string_utf8_to_builder): impl.
13483 (mono_string_builder_to_utf8): impl.
13484 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
13486 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
13488 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
13489 (mono_marshal_get_managed_wrapper): impl. byref types
13491 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13494 (search_method): don't display debug message.
13496 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
13498 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
13500 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13502 * appdomain.c: set the missing filename when throwing exception.
13504 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
13506 * metadata.c (mono_type_size): code cleanup
13507 (mono_type_stack_size): removed some test code
13509 2002-07-21 Miguel de Icaza <miguel@ximian.com>
13511 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
13512 mono_get_exception_file_not_found now.
13514 * exception.c (mono_exception_from_name_two_strings): New version
13515 that will call a constructor with two string arguments.
13516 (mono_get_exception_file_not_found): New helper routine, used to
13517 report file-not-found errors.
13519 2002-07-20 Dick Porter <dick@ximian.com>
13522 * process.c: Pass file handles to CreateProcess
13526 * file-io.c: Implemented CreatePipe
13528 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
13530 * metadata.c (mono_get_param_info): set alignment for value types
13532 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13534 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
13535 Constify mono_domain_assembly_open().
13536 * loader.c: handle null namespace in icalls.
13538 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
13540 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
13541 (emit_str_to_ptr_conv): marshal object as structs
13543 * metadata.c (mono_type_to_unmanaged): marshal object as structs
13545 * marshal.c (mono_marshal_get_runtime_invoke): support value types
13547 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
13549 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
13550 (mono_marshal_get_native_wrapper): we an now return value types
13552 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13554 * verify.c: more checks implemented.
13556 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
13558 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
13560 (mono_marshal_get_native_wrapper): allow byref arguments
13561 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
13562 impl. PtrToStringXXX methods
13563 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
13564 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
13565 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
13566 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
13567 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
13569 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13571 * reflection.c: fix buglet in parsing an assembly name.
13573 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
13575 * marshal.c (emit_ptr_to_str_conv): first impl.
13577 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13579 * object.c, class.h: cache the vtable in the class as suggested by
13580 vargaz@freemail.hu (Zoltan Varga).
13582 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13584 * class.h, loader.c: added mono_field_from_token().
13585 * verify.c: first cut of type checking code.
13587 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
13589 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
13591 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
13593 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
13595 (mono_marshal_get_remoting_invoke): impl.
13596 (mono_delegate_begin_invoke): impl.
13597 (mono_mb_emit_save_args): impl.
13598 (mono_delegate_end_invoke): impl.
13599 (mono_marshal_get_delegate_begin_invoke):
13600 (mono_marshal_get_delegate_end_invoke):
13601 (mono_marshal_get_delegate_invoke): generate a special name for
13602 those methods (including the signature) and associate them whith
13603 the delegate class.
13605 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
13608 (mono_reflection_type_from_name): now it has a MonoImage parameter
13609 which is used as the default image to search the type in. If the image
13610 is NULL or getting the type from it fails, it defaults to corlib.
13612 * icall.c: changed 1 call to mono_reflection_type_from_name to match
13615 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13617 * reflection.c: update the parameter table index.
13619 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13621 * domain.c: don't include the mark byte in the string hash.
13623 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13625 * icall.cs: icall for Type.GetTypeCode ().
13626 * verify: a couple of fixes and disabled local initialization checks.
13628 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
13630 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
13632 * debug-helpers.c (mono_method_full_name): print the type of the
13635 * metadata.c (mono_signature_hash): a hash function for signatures
13636 (mono_signature_hash): better hash algorithm
13638 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
13640 * debug-helpers.c (mono_method_full_name): this can now generate
13641 method names with signatures
13643 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
13644 method dont have this pointers.
13646 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
13648 * reflection.c: fixup typebuilder tokens.
13649 * image.c: fix buglet.
13650 * marshal.h: remove whitespace.
13651 * metadata.h, metadata.c: reinstate code that was removed.
13652 * verify.c: handle catch directives and fix another couple of bugs.
13654 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
13656 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
13657 (mono_marshal_get_native_wrapper): make it comp. with the old code
13658 (mono_marshal_get_native_wrapper): support boolean
13659 (mono_marshal_get_managed_wrapper): support more types
13661 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
13663 * class.c (class_compute_field_layout): compute class->blittable attribute.
13665 2002-07-09 Dick Porter <dick@ximian.com>
13667 * threads.c: Make the thread cleaning up cope with threads that
13670 2002-07-08 Radek Doulik <rodo@ximian.com>
13672 * reflection.c (method_encode_code): use non-translated values to
13673 compute finally_start, this fixes exception handling on ppc, yay!
13675 * decimal.h (struct signscale): fix endianess
13677 2002-07-07 Radek Doulik <rodo@ximian.com>
13679 * reflection.c: swap box_val and not val
13681 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
13683 * reflection.c, reflection.h: handle full assembly info in type name.
13684 Handle Type arguments when loading custom attributes.
13685 * icall.c: updated to use new mono_reflection_type_from_name () method.
13687 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13690 (method_from_memberref): also print assembly name when method not found.
13692 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13695 (ves_icall_TypeGetProperties): fixed bug #27473.
13697 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13699 * reflection.c: display image name and token when cannot find the
13700 .ctor for an attribute.
13702 2002-07-05 Martin Baulig <martin@gnome.org>
13704 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13706 2002-07-04 Dick Porter <dick@ximian.com>
13708 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
13709 compile on mingw. This will cause mingw builds to not wait for
13710 subthreads to terminate after the main thread does. I've lodged a
13711 bug with the mingw developers for them to wrap OpenThread().
13713 2002-07-03 Dick Porter <dick@ximian.com>
13715 * threads.c: Store thread IDs instead of handles, because
13716 GetCurrentThread() returns a pseudohandle and therefore stores
13717 useless values. mono_thread_cleanup() continues checking the
13718 array of threads until it is empty, to cope with subthreads
13719 spawning new threads after the main thread has finished.
13723 * profiler-private.h: Pass the thread ID to thread profiler
13724 functions, instead of a handle
13726 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13728 * verify.c: fixes to make it more usable.
13729 * pedump.c: added --verify code to verify IL code in an assembly.
13731 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13733 * reflection.c: turn errors into warnings to allow compiling corlib.
13735 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
13737 * reflection.c: add special cases to compile corlib.
13739 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13741 * reflection.c: handle properties with only a set method.
13743 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13745 * opcodes.h: add enum with opcodes in opval order.
13747 2002-07-01 Dick Porter <dick@ximian.com>
13750 * object.c (mono_runtime_run_main): Removed unneeded argument
13752 2002-06-28 Martin Baulig <martin@gnome.org>
13754 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13756 2002-06-27 Dick Porter <dick@ximian.com>
13758 * threads.c: Store the handle in both the parent thread and in the
13759 subthread, to minimise the time between starting a new thread and
13762 2002-06-26 Dick Porter <dick@ximian.com>
13764 * appdomain.c (mono_runtime_cleanup): Close the socket library
13765 after all the threads have finished, not before
13767 2002-06-26 Martin Baulig <martin@gnome.org>
13769 * debug-symfile.c (mono_debug_find_source_location): Added
13770 `guint32 *line_number' argument. If it's not NULL, store the line number
13771 there and return the file name without the line number.
13773 2002-06-25 Dick Porter <dick@ximian.com>
13777 * process.c: Process forking and other support functions
13779 2002-06-25 Dick Porter <dick@ximian.com>
13781 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
13782 things dont happen when the image is closed.
13783 (mono_image_lookup_resource): Walk the resource section looking
13784 for a particular entry
13786 * cil-coff.h: PE resource section decoding
13788 2002-06-25 Dick Porter <dick@ximian.com>
13792 (mono_assembly_foreach): Accessor functions to walk the list of
13794 (mono_assembly_set_main):
13795 (mono_assembly_get_main): Process methods need to know which
13796 assembly is the "main" one
13798 * object.c (mono_runtime_run_main): Record the main assembly
13800 * debug-helpers.c: Fix typo
13802 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
13804 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
13805 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
13807 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13809 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
13811 2002-06-21 Miguel de Icaza <miguel@ximian.com>
13813 * image.c (do_mono_image_open): Initialize reference count,
13814 otherwise we leak the MonoImage.
13816 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13818 * reflection.c: small tweak to handle self-hosting.
13820 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13822 * reflection.c: fix type name parse code.
13824 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13826 * reflection.c: break out of the loop.
13827 * image.c: special case corlib.
13829 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13831 * reflection.c: add all the custom attrs at the end to ensure the
13832 ctors have been properly initialized when the attributes are defined
13833 in the current assembly.
13835 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13837 * reflection.c: handle correctly multiple-nested types.
13839 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
13841 * row-indexes.h: fix typos.
13842 * reflection.c: adjust for typos and fix method_def_or_ref
13843 encoding in MethodImpl table.
13845 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13847 * reflection.c: fix entry point patching (thanks Serge!).
13849 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
13851 * verify.c: add check for System.Exception
13853 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13855 * image.c, class.c: minifix for code just c&p'ed.
13856 * reflection.c: warning fix.
13857 * object.h, loader.h, domain.c: load also StringBuilder.
13859 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13861 * marshal.h, marshal.c: some support code to handle complex marshaling.
13863 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13865 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
13866 Better signatures with vtable error dump.
13868 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
13870 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
13872 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
13874 * icall.c (ves_icall_Type_GetField): impl.
13876 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13878 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
13879 to retrieve a marshal description blob for a field or param.
13881 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13883 * reflection.h, reflection.c: change order of nested type emission
13884 to avoid table corruption. The NestedTypes table is sorted.
13885 * icall.c: change order of GetConstructor results to workaround mcs bug.
13887 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13889 * reflection.h, reflection.c: handle field and param marshal
13892 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13894 * icall.c, marshal.c marshal.h: more Marshal class implementation.
13896 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13898 * reflection.c: fix call convention.
13900 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13902 * reflection.h, reflection.c: mono_image_get_memberref_token()
13903 takes a type instead of a class, now. Added
13904 mono_image_get_array_token() to create tokens for the special
13905 multi-dim array methods.
13907 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13909 * assembly.c: handle modules (no assembly table). Split
13910 loading references in its own function.
13911 * class.c: handle moduleref resolution scope.
13912 * image.c, image.h: cache module name in image.
13914 2002-06-07 Martin Baulig <martin@gnome.org>
13916 * reflection.c (mono_image_get_type_info): Only add a class layout entry
13917 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
13919 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13921 * icall.c: more signature fixes that used uint instead of int.
13923 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13925 * reflection.c: fixed signature of field refs.
13927 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13929 * class.c, reflection.c: handle typerefs of nested types
13930 (both on read and when writing files).
13932 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13934 * icall.c: fix method signatures that tried to workaround the previous
13937 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13939 * debug-helpers.c: fix typo.
13941 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13943 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
13944 rewrote the PE/COFF writing code (our programs are understood by the
13947 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13949 * gc.c, gc.h, icall.c: weakreference support.
13951 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13953 * Makefile.am, mono-config.c: use $(sysconfdir).
13955 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13957 * icall.c: changed default precision of Double.ToString() to 15.
13958 Fixed memory leak. Unified with Single.ToString.
13960 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13962 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
13964 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13966 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
13967 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
13968 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
13971 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13973 * debug-symfile.c, sysmath.c: yet more compilation fixes.
13975 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13977 * reflection.c, socket-io.c: more compilation fixes.
13979 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13981 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
13982 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
13983 unicode.c: warning and compiler compatibility fixes.
13985 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13987 * class.h, metadata.c: fixed warnings/compilation errors.
13989 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13991 * Makefile.am, mono-config.c, mono-config.h: configuration file
13993 * loader.c, loader.h: make Dll mapping configurable at runtime in the
13994 config file. Export methods to insert and lookup mappings.
13996 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13998 * reflection.c: handle types and boxed objects in custom attr
14001 2002-05-30 Martin Baulig <martin@gnome.org>
14004 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
14006 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
14008 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
14009 to lookup the implmap row for a P/Invoke method.
14010 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
14011 P/Invoke method from the runtime on an as needed basis.
14013 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
14015 * metadata.c (mono_metadata_parse_signature): impl.
14017 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14019 * class.c: handle .pack directive.
14021 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14023 * object.c: initialize static fields with RVA data.
14025 2002-05-25 Martin Baulig <martin@gnome.org>
14028 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
14030 2002-05-24 Martin Baulig <martin@gnome.org>
14033 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
14034 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
14035 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
14037 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14039 * object.c: special case string ctros in invoke.
14040 * gc.c: silly whitespace changes.
14042 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
14044 * threadpool.[ch]: impl. a threadpool that can
14045 be used by mint and mono.
14047 2002-05-22 Martin Baulig <martin@gnome.org>
14049 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
14050 The first argument is now a `MonoReflectionModuleBuilder *', the return
14051 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
14052 `methods' field to get the method builder. The `token' argument is the
14055 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
14056 invalid characters instead of g_assert_not_reached()ing. This seems
14057 to be the behaviour of mscorlib.
14059 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
14061 * object.c (mono_runtime_invoke_array): applied patch from Rachel
14062 Hestilow to fix bug #25104
14064 2002-05-21 Martin Baulig <martin@gnome.org>
14066 * debug-symfile.c (mono_debug_find_source_location): New function.
14067 Looks up an IL offset in the line number table and returns the source
14068 location as a string.
14070 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14073 (mono_double_ToStringImpl): changed %f by %g until we have something
14076 2002-05-21 Nick Drochak <ndrochak@gol.com>
14078 * icall.c : Use different name for Math.Pow's icall. Needed to check
14079 parameters first in C#.
14081 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14083 * icall.c, reflection.h: added icall to get info about an event.
14085 2002-05-20 Radek Doulik <rodo@ximian.com>
14087 * object.c (mono_value_box): don't use memcpy for boxing on BIG
14089 (mono_value_box): don't use memcpy for small sizes on
14090 architectures with unaligned access
14092 2002-05-20 Martin Baulig <martin@gnome.org>
14094 * reflection.c (mono_reflection_setup_internal_class): Don't crash
14095 if `tb->parent == NULL'.
14096 (mono_reflection_create_internal_class): New function. This is
14097 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
14100 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
14103 2002-05-19 Martin Baulig <martin@gnome.org>
14105 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
14106 argument to get the length, don't default to the array length.
14108 2002-05-18 Miguel de Icaza <miguel@ximian.com>
14110 * assembly.c (mono_assembly_setrootdir): New function used to
14111 override the MONO_ASSEMBLIES directory.
14113 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14115 * icall.c: ValueType_GetHashCode() initialize local var.
14117 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14119 * reflection.c: sort custom attributes table.
14121 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14123 * reflection.c: support named args in custom attributes (write support).
14125 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
14127 * reflection.c: fix finally position calculation.
14129 2002-05-15 Radek Doulik <rodo@ximian.com>
14131 * reflection.c: fixed endianess at many places
14133 * icall.c (ves_icall_InitializeArray): comment out debug msg
14135 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
14137 * object.c (mono_unhandled_exception): new function to handle
14138 unhandled exceptions.
14139 (mono_unhandled_exception): call the UnhandledException event.
14140 (mono_runtime_delegate_invoke): impl.
14142 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
14144 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
14145 returns the RVA, not the direct pointer to the data. Handle the case
14146 when the class size is fixed.
14148 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14150 * reflection.c: fix some endianess issues.
14152 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
14154 * object.c (mono_runtime_invoke): is now able to catch exceptions.
14156 * threads.c (mono_thread_init): added a callback which is invoked
14159 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
14161 * icall.c: make GetHashCode return non-negative values.
14163 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
14165 * object.c, icall.c, gc.c: revert to address-based hashcode.
14167 2002-05-13 Miguel de Icaza <miguel@ximian.com>
14169 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
14171 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14173 * icall.c, class.c: special case <Module>.
14175 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
14177 * icall.c: fix bug in GetNow().
14179 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
14181 * object.c (mono_runtime_class_init): make sure that we call all
14182 static class constructors.
14184 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14186 * reflection.c: sort methodsemantics table.
14188 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14190 * reflection.h, reflection.c: honour init locals setting.
14192 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
14194 * icall.c: copied Double ToStringImpl for Single ToStringImpl
14196 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14198 * reflection.c: support ContructorBuilders in attribute blob creation.
14200 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14202 * reflection.c: some changes to build a binary that can be run
14203 directly in windows.
14205 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14207 * loader.c: print a big message when an icall can't be found.
14209 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14211 * string-icalls.c: fix bug 24248.
14213 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14215 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
14216 icall.c, reflection.h: separate assembly loading by pathname and by
14217 assembly name. Use the MONO_PATH env var to search for assemblies.
14219 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14221 * assembly.c, image.h: add some support for assemblies
14222 with multiple modules.
14223 * class.c, class.h: export mono_class_from_typeref().
14224 * loader.c: remove duplicated code and use mono_class_from_typeref(),
14227 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14229 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
14230 documentation says (the ECMA one is correct).
14232 2002-05-02 Dick Porter <dick@ximian.com>
14234 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
14235 Don't name the synchronisation mutex.
14237 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
14240 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
14241 Make the prototypes match.
14242 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
14246 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
14247 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
14248 all systems have tm.tm_zone, so use strftime() with %Z to print
14249 the timezone abreviation into a temp string.
14251 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
14252 rather than mono_array_addr() on a MonoString on Big Endian
14255 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
14257 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
14260 2002-04-30 Dick Porter <dick@ximian.com>
14262 * socket-io.c: Cope with SOCKET being an integer rather than a
14265 * threads.c: Added Thread_free_internal, to deal with thread
14266 handle cleanup. Moved calls to handle_store() and handle_remove()
14267 to start_wrapper(), so each can only be called once. Allocate
14268 synchronisation blocks with GC_malloc(), and use GC finalisation
14269 to close the handles.
14271 * icall.c: added System.Threading.Thread::Thread_free_internal
14273 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14275 * icall.c: support Environment.Exit, CommandLineArgs().
14277 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14279 * object.c, object.h: added mono_runtime_run_main () and
14280 mono_runtime_get_main_args () for use in System.Environment.
14282 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14284 * gc.c: fix thinko, enable actual finalization since the jit is now
14287 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14289 * gc.c, object.c: take into account that an object may be offset wrt the address
14290 returned by GC_malloc().
14292 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14294 * image.c: handle files without entries in the assembly table (modules).
14296 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
14298 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
14299 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
14300 allowed to be null when it's System.Object class setup.
14302 2002-04-27 Martin Baulig <martin@gnome.org>
14304 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
14305 if `tb->parent == NULL' rather than crashing.
14307 2002-04-28 Nick Drochak <ndrochak@gol.com>
14309 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
14310 calling acos() where asin() should have been called.
14312 2002-04-26 Martin Baulig <martin@gnome.org>
14314 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
14315 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
14316 there's a subdirectory called `System', but we don't want to read that
14317 subdirectory as an assembly.
14319 2002-04-25 Martin Baulig <martin@gnome.org>
14321 * debug-symfile.c: Reflect latest MonoString changes.
14323 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14325 * rand.c, rand.h: instance method icalls need to have an explicit
14326 this pointer as first argument in the C implementation.
14328 2002-04-25 Nick Drochak <ndrochak@gol.com>
14330 * icall.c: Fix typo in map for GetNonZeroBytes
14332 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
14334 * string-icalls.c : String does now passes unit tests without any
14335 errors, the following changes has been made:
14337 Implemented replace methods.
14338 Renaming of methods to (try) follow the standard.
14339 Fixed compare ordinal
14340 Made all memory allocated directly to function instead of via icall function.
14341 Small performance fix in is_in_array function
14343 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
14345 c (mono_string_Internal_ctor_charp_int_int):
14346 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
14347 sindex < 0, throw ArgumentOutOfRangeException instead of
14348 ArgumentNullException.
14350 Added new check for length == 0, however
14351 I need to make it return String.Empty from the C code.
14353 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
14354 that calculate the length for us here.
14356 (mono_string_Internal_ctor_sbytep_int_int): Replaced
14357 mono_string_new_utf16 with mono_string_new, since value is utf8.
14359 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14361 * object.c: register the object for finalization if needed.
14362 Allocate one more char in the string for the terminating 0 char.
14364 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14366 * class.c, class.h, image.c: check if a type implemenst a destructor.
14367 Use the proper key for array class lookups.
14368 * icall.c: register the icalls in the System.GC class.
14369 * gc.c, gc.h: GC-related functions and icalls.
14371 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14375 * unicode.c: free some strings gotten from mono_string_to_utf8 and
14376 changed a couple of free () by g_free ().
14378 * decimal.c: one-liner in the comments for decimal2string ().
14380 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
14382 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
14384 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
14386 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
14387 * object.c (mono_runtime_invoke_array) : handle null in params
14389 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
14391 * string-icalls.c: fixed bug in split (one off bug)
14393 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
14395 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
14396 * icalls.c: added String::Equals as internal method
14398 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
14400 * threads.c: fixed bug in the double interlocked functions
14402 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
14404 * threads.c: implemented all of the new interlocked icalls.
14405 * string-icalls.c: fix a bug in insert.
14406 * icalls.c: added the icalls for interlocked, removed old string functions.
14408 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14410 * loader.c: fix off-by-one error when reading argument names.
14412 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14414 * profiler.c: win32 counter implementation (untested).
14415 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
14416 (the latter needs testing and more complete impl. from win32 folks).
14418 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
14420 * object.c: mono_array_new_full workaround mono_array_class_get
14423 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14425 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
14426 * object.h (mono_string_chars): Changed casting type.
14428 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14430 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
14431 method signatures to use gunichar2 instead of gint16.
14433 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
14435 * object.h, object.c: domain-specific versions of mono_object_new and
14438 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
14440 * object.c: changed String layout
14442 * string-icalls.c (mono_string_Internal_ctor_chara): added
14443 internal string constructors.
14445 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
14447 * threads.c: pass 'this' to the thread start routine.
14449 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14451 * string-icalls.c: fix IndexOf and LastIndexOf. Now
14452 InternalCompareStr don't call twice mono_string_cmp_char for the last
14453 character. Improved performance in mono_string_cmp_char.
14455 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14457 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
14458 code into its own library: libmonoruntime.
14460 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
14462 * object.h, object.c: changed array format so that szarrays do not
14463 require a bounds structure.
14464 * icall.c, appdomain.c: support for new szarray format.
14466 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14468 * metadata.c: compare also the retuns type when comparing signatures:
14469 we didn't do this as an optimization since really overloaded methods
14470 must differ also in the arguments, but this doesn't work with
14471 low-level IL code (or when using explicit conversion operators: see
14472 bug#23498 for an example).
14474 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14476 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
14478 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14480 * icall.c: make MonoType::GetElementType its own icall.
14482 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14484 * icall.c: remove MonoMethod_get_Name().
14485 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
14488 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14490 * string-icalls.c: optimized a few methods.
14492 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14494 * icall.c: added all new string internal calls
14495 * string-icalls.c: added, new string internal call implementation.
14496 * object.c: added mono_string_new_size for allocating a string a size
14498 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
14500 * object.c (mono_object_isinst): use the same code as in the
14501 optimized x86 version.
14503 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14505 * profiler.c: TSC-based timer code (faster and more accurate).
14506 Not hooked up in configure, yet (set USE_X86TSC to 1).
14508 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
14510 * profiler.c, profiler.h: track time spent compiling methods.
14511 * threads.c: track thread creation/destruction.
14513 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
14515 * profiler.c, profiler.h, profiler-private.h: profiling interface
14516 and sample implementation. Moved here so that it can be used also by
14519 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
14521 * reflection.c, reflection.h: keep types and other handles separate in
14522 the hash tables for referred tokens. Add guid for modules.
14524 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14526 * assembly.c: fix bugs found with valgrind.
14527 * metadata.h, metadata.c: added mono_metadata_guid_heap().
14529 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
14531 * threads: added icall support for getting current domain for
14534 2002-04-13 Martin Baulig <martin@gnome.org>
14536 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
14537 (MonoDebugVarInfo): Added `index' field for register based addresses.
14538 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
14539 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
14540 `MonoDebugVarInfo *params' and `guint32 this_offset' with
14541 `MonoDebugVarInfo *this_var'.
14543 * debug-symfile.c (relocate_variable): New static function to write
14544 a location description for a local variable or method parameter.
14546 2002-04-12 Martin Baulig <martin@gnome.org>
14548 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
14549 stack offset and begin/end scope address of a local variable.
14550 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
14551 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
14552 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
14554 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
14555 Added new relocation types for start/end scope of a local variable.
14557 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14559 * object.h: add mono_object_domain() macro.
14560 * reflection.c: handle typespecs.
14561 * icall.c: MonoMethod::get_Name() implementation.
14563 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14565 * icall.c: String::GetHashCode() icall implementation.
14567 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14569 * icall.c: String::IndexOfAny icall.
14570 * object.c, object.h: make array->max_length more useful.
14571 Intrduced mono_object_class() and mono_string_length() macros.
14573 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14575 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
14576 instead of g_unichar_isdigit.
14578 2002-04-11 Nick Drochak <ndrochak@gol.com>
14580 * icall.c: Implement a simple Double.ToString().
14582 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14584 * appdomain.h: only io-layer.h is supposed to be included.
14585 * icall.c: explicitly import environ. Fix warning.
14587 2002-04-10 Nick Drochak <ndrochak@gol.com>
14589 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
14590 return true even if it's not Daylight Savings time.
14591 Only return false for the case where the function isn't
14592 implemented for a plaform (read Windows).
14594 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14596 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
14599 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
14601 * mempool.c (mono_mempool_alloc): only use g_malloc when
14602 absolutely necessary.
14604 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
14606 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
14608 * class.c (mono_class_vtable): use domain mempool to allocate vtable
14609 (mono_class_proxy_vtable): use domain mempool
14611 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14613 * appdomain.h, appdomain.c: split initialization that requires the
14614 execution engine support into mono_runtime_init().
14616 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
14618 * class.c (mono_class_init): don't include vtable inside MonoClass
14619 to save some memory, gather some statistics.
14620 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
14622 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14624 * icall.c: internalcall implementation for ValueType.Equals().
14626 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
14628 * object.c (mono_message_init): moved
14629 (mono_runtime_exec_main): new arch. independent impl.
14630 (mono_runtime_invoke_array): new method - like
14631 mono_runtime_invoke, but you can pass an array of objects.
14632 (mono_remoting_invoke): new arch. independent impl.
14633 (mono_message_invoke): new arch. independent impl.
14634 (mono_runtime_class_init): new arch. independent impl.
14635 (mono_runtime_object_init): new arch. independent impl.
14637 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14639 * metadata.c, object.c, reflection.c: documented the exported
14642 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14644 * icall.c: simpler code to pass the assembly builder data to corlib.
14645 Implement GetNestedTypes() internalcall.
14647 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14649 * class.c: warn if a type can't be loaded.
14651 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
14653 * image.h: typedef MonoImageOpenStatus
14654 * types.h: removed unused file
14656 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
14658 * icall.c: Enum_ToObject accepts enum value arguments.
14660 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14662 * class.c: move initialization of properties, events and nested
14663 classes, so that they happen for interfaces, too.
14665 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14667 * icall.c: cleanup some ugly casts in Array_SetValue*.
14669 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14671 * icall.c: the values array fro enums is of the correct type, now.
14672 Implement (correctly) getFullName instead of assQualifiedName for
14674 * reflection.h, reflection.c: added mono_type_get_name ().
14676 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14678 * assembly.c, image.h: for each MonoImage, record from wich assembly
14680 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
14681 Make Type.Assembly work.
14683 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
14685 * debug-symfile.h: use char* instead of gpointer to avoid
14688 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
14690 * icall.c (ves_icall_InternalExecute): impl. FielSetter
14691 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
14693 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
14695 * icall.c (mono_message_init): impl. (code cleanup)
14696 (ves_icall_InternalExecute): impl. FieldGetter
14698 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
14699 defined we call all (non-static)methods through the vtable.
14701 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
14703 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
14704 finalizer even though the memory is still referenced (and the chunk of
14705 memory is not freed).
14707 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
14709 * assembly.c: fix brokeness.
14711 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
14713 * class.c: kill some warnings. Check explicit interface method
14714 implementation also without considering the namespace.
14715 Load also literal strings in static class data.
14717 2002-03-29 Miguel de Icaza <miguel@ximian.com>
14719 * assembly.c (default_assembly_name_resolver): Kill memory leak.
14720 (default_assembly_name_resolver): Make the resolver take the
14721 "base" directory where the assembly was originally defined, so we
14722 can load DLLs that are in the same directory as the assembly that
14723 is being referenced.
14725 2002-03-28 Dick Porter <dick@ximian.com>
14731 * unicode.c: Warning cleanups
14733 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
14735 * object.h, reflection.h: use the correct type instead of MonoObject.
14737 2002-03-28 Martin Baulig <martin@gnome.org>
14739 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
14740 (mono_debug_update_symbol_file): Initialize classes if necessary.
14742 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
14744 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
14745 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
14747 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
14749 * assembly.h: fix function prototype.
14750 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
14751 * mono-endian.h: use const cast.
14753 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
14755 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
14757 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
14759 * loader.c: don't assert when a typeref can't be loaded, give
14760 a chance to the runtime to trow an exception instead.
14761 * loader.h: fix warning.
14763 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
14765 * class.c (mono_class_proxy_vtable): added proxy support
14767 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
14769 * icall.c: removed last of PAL calls, added System.Environment
14770 * file-io.h, file-io.c: MonoIO implementation
14771 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
14773 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
14775 * appdomain.c: do not use the byte marker in ldstr table lookup.
14776 * debug-helpers.c: allow two ':' to separate class and method name.
14777 * object.c: allocate arrays bounds with the GC, too.
14778 * verify: add a few more checks.
14780 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
14782 * reflection.c: output also literal strings. Allocate parameter data
14783 with GC_malloc() (thanks, Martin, for catching this!).
14785 2002-03-26 Martin Baulig <martin@gnome.org>
14787 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
14788 include the `this' offset in the `param_offsets'.
14790 2002-03-25 Martin Baulig <martin@gnome.org>
14792 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
14793 mono_debug_get_class() function to get the classes. Added new
14794 relocation types for arrays and strings.
14795 (mono_debug_get_class): New static function to search in all
14796 referenced assemblies for a metadata token.
14798 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
14800 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14802 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
14803 hold gc-allocated objects. Make the string heap a stream like the
14804 others. Removed duplicated code when writing stream info.
14805 Added asserts to catch possible buffer overflows. Set the sorted map
14806 for tables that need sorting. Added some documentation.
14808 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
14810 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
14811 for interned strings and vtables.
14813 2002-03-24 Martin Baulig <martin@gnome.org>
14815 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
14816 it in the array since it was created with g_slist_prepend().
14818 2002-03-24 Martin Baulig <martin@gnome.org>
14820 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
14821 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
14822 (mono_debug_method_from_token): Renamed to
14823 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
14824 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
14826 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
14829 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
14831 2002-03-24 Martin Baulig <martin@gnome.org>
14833 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
14834 (mono_debug_method_from_token): New func.
14836 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
14837 New interncall, calls mono_debug_local_type_from_signature().
14838 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
14839 calls mono_debug_method_from_token().
14841 2002-03-23 Martin Baulig <martin@gnome.org>
14843 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
14844 specifies the number of bytes to be converted, not the array size.
14845 Return the number of chars, not the number of bytes.
14846 (ves_icall_iconv_get_chars): The `byteCount' argument
14847 specifies the number of bytes to be converted, not the array size.
14849 2002-03-23 Martin Baulig <martin@gnome.org>
14851 * reflection.h (MonoReflectionSigHelper): New type.
14853 * reflection.c (mono_reflection_sighelper_get_signature_local),
14854 (mono_reflection_sighelper_get_signature_local): New functions.
14856 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
14857 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
14860 2002-03-23 Martin Baulig <martin@gnome.org>
14862 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
14863 is_writeable is set.
14864 (mono_raw_buffer_update): New function to write the modified map
14867 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
14869 * debug-symfile.c (mono_debug_update_symbol_file): Call
14870 mono_raw_buffer_update() when done writing.
14872 2002-03-23 Martin Baulig <martin@gnome.org>
14874 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
14876 * debug-symfile.c: Added support for arguments and local variables.
14878 2002-03-23 Dick Porter <dick@ximian.com>
14880 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
14881 protected by ifdefs, hence breaking the w32 build.
14883 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14885 * object.c: implement is_interned() the right way.
14887 2002-03-21 Martin Baulig <martin@gnome.org>
14889 * debug-symfile.[ch]: New files to handle debugging information
14890 files. There's also support to dynamically update these symbol
14891 files to include machine dependent information.
14893 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
14895 * threads.c (mono_thread_create): new function to create thread
14898 2002-03-20 Martin Baulig <martin@gnome.org>
14900 * icall.c (ves_icall_InternalInvoke): Create a new object if the
14901 method is a constructor.
14902 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
14903 points to ves_icall_InternalInvoke().
14905 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
14907 * file-io.c: Flush shouldn't throw exceptions.
14909 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
14911 * file-io.c: FileStream flush support; FileSetLength now
14912 restores file pointer.
14914 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
14916 * class.c: set image for pointer classes.
14918 2002/03/19 Nick Drochak <ndrochak@gol.com>
14920 * sysmath.c: Forgot one.
14922 2002-03-18 Miguel de Icaza <miguel@ximian.com>
14924 * sysmath.c: Avoid redefining existing names.
14926 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
14928 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
14929 handled by runtime as icall rather than dllimport from libm.so
14930 * file-io.c, file-io.h: fixed handle argument type.
14932 2002-03-18 Dick Porter <dick@ximian.com>
14934 * reflection.c (mono_image_get_type_info): rename interface to
14935 iface, because of "#define interface struct" on windows.
14937 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
14939 * class.c, class.h: rename and export mono_ptr_class_get().
14940 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
14941 * reflection.c, reflection.h, icall.c: better/saner type name
14942 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
14945 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
14947 * class.c (mono_class_init): removed hardcoded GHC_SLOT
14949 * icall.c (ves_icall_InternalInvoke): impl.
14951 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14953 * reflection.c: output the interface map table, too.
14955 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
14957 * class.c (class_compute_field_layout): separate computation of
14958 static field layout
14960 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
14962 * icall.c: added System.Buffer support.
14963 * file-io.c: moved file icalls from PAL to FileStream.
14965 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
14967 * icall.c (ves_icall_System_Object_GetHashCode): impl.
14969 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
14971 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
14973 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14975 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
14977 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
14979 * debug-helpers.{c,h}: moved here from monograph some useful functions
14980 to locate a method by name/signature in a class or image. Included
14981 also a small and flexible IL disassembler.
14983 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
14985 * reflection.c: fixup tokens in methods with small header size, too.
14987 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
14989 * object.c (mono_string_to_utf8): remove assert(!error), instead
14992 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
14994 * icall.c: update to the new mono_Array_class_get interface.
14996 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
14998 * appdomain.c, object.c: Boehm-GC enable.
14999 * icall.c: make get_data_chunk() support split data requests.
15000 Ensure a class is initialized in more cases. Return only the first
15001 property found in GetProperties() or the compiler gets confused.
15002 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
15003 * reflection.h, reflection.c: add fixup mechanism for field and method
15004 tokens. Initialize assembly->typeref in a single place. Output
15005 properties after events. Support custom attributes for events, too.
15006 Typo fix for paramter custom attrs.
15008 2002-03-07 Martin Baulig <martin@gnome.org>
15010 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
15012 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
15014 * class.c (mono_array_class_get): fix. for multi. dim. arrays
15016 2002-03-06 Martin Baulig <martin@gnome.org>
15018 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
15019 non-zero lower bounds. See testcases #F10-#F13.
15021 2002-03-05 Martin Baulig <martin@gnome.org>
15023 * exception.c (mono_get_exception_argument_out_of_range): New exception.
15025 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
15026 ves_icall_System_Array_GetValue(), only calculate the absolute array position
15028 (ves_icall_System_Array_SetValue): Likewise.
15029 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
15030 as argument and does the actual work. This function is used when copying a
15031 multi-dimensional array.
15032 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
15033 now do all the widening conversions of value types.
15034 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
15036 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15038 * class.c: remove some magic numbers and use the smbolic names,
15039 instead. Added init_events() to load event info at class init time.
15040 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
15041 and mono_metadata_methods_from_event().
15042 * reflection.h, reflection.c: added support for writing out the evnets
15043 related information.
15045 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
15047 * reflection.h, icall.c: use a different method (GetInterfaces)
15048 to gather interface info and add isbyref, isprimitive and
15049 ispointer to the ves_icall_get_type_info() return value.
15051 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
15053 * class.h: stared adding support for events.
15054 * icall.c: split find_members implementation. Added debug icall to get
15055 the address of an object.
15056 * reflection.c: handle TypeBuilders in mono_type_get_object().
15058 2002-03-01 Martin Baulig <martin@gnome.org>
15060 * icall.c (ves_icall_System_Array_GetLength): This must throw an
15061 ArgumentOutOfRangeException(), not an ArgumentException().
15062 (ves_icall_System_Array_GetLowerBound): Likewise.
15063 (ves_icall_System_Array_GetValue): Improved argument checking.
15064 (ves_icall_System_Array_SetValue): Improved argument checking.
15066 2002-03-01 Martin Baulig <martin@gnome.org>
15068 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
15069 called with invalid arguments rather than just dying with g_assert().
15070 (ves_icall_System_Array_SetValue): Likewise.
15071 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
15072 raise a NotImplementedException instead.
15073 (ves_icall_System_Array_GetLength): Added argument checking.
15074 (ves_icall_System_Array_GetLowerBound): Added argument checking.
15076 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
15078 * object.h (mono_assert): new macros mono_assert and
15079 mono_assert_not_reached
15081 2002-02-28 Martin Baulig <martin@gnome.org>
15083 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
15084 and "System::String::IsInterned" to "System::String::_IsInterned".
15086 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
15088 * icall.c: remove hacks for typebuilder. Added icall to create a
15089 modified type from a tybebuilder.
15090 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
15091 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
15092 to create a backing MonoClass for a TypeBuilder.
15094 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15096 * class.c, class.h: more refactoring of class init.
15097 Export mono_class_setup_mono_type() and mono_class_setup_parent().
15099 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
15101 * marshal.c, marshal.h: start of marshaling interface.
15103 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15105 * icall.c: fix order in assembly qualified name icall.
15107 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
15109 * class.c: do not free str, since we store it in the hash table.
15110 * reflection.h: add label field to MonoILExceptionInfo.
15111 * reflection.c: handle references to more than one assembly. Handle
15112 case when there isn't a module created in the assembly.
15114 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
15116 * class.c: Fix typo. Start refactoring of class init code.
15118 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
15120 * appdomain.c: exit with 1 on error.
15121 * class.c: we already have the name in MonoClassField.
15122 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
15123 MonoStreamHeader instead of an offset of image->raw_metadata.
15125 2002-02-26 Miguel de Icaza <miguel@ximian.com>
15127 * appdomain.c (mono_init): Be even more descriptive about the error.
15129 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
15131 * appdomain.c: give the user an informative message when corlib can't
15134 2002-02-26 Martin Baulig <martin@gnome.org>
15136 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
15137 New icall to get the time zone data.
15139 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15141 * reflection.c: set virtual and raw size of section correctly.
15142 * threads.c: transfer domain information to newly created threads.
15144 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15146 * class.c: when instancing a class in a domain, load the default
15147 vaules for static fields from the constant table. Fix System.Enum to
15149 * icall.c: implement Object::GetType() internalcall. Implemented
15150 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
15151 Fixed checking of binding flags in find_members().
15152 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
15153 * reflection.c: handle enumerations when writing to the constant
15154 table. Use a different object cache for types.
15157 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
15159 * object.c (mono_object_isinst): fix for arrays
15161 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
15163 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15165 * object.c: don't use mprotect () and fix intern pool hash table
15166 lookup for big endian systems.
15168 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15170 * icall.c: change type_is_subtype_of () signature.
15172 2002-02-21 Mark Crichton <crichton@gimp.org>
15174 * rand.c, rand.h: Added random number generator for
15175 System.Security.Cryptography classes.
15177 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
15179 * icall.c: Added System.Security.Cryptography calls.
15181 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15183 * class.c, icall.c, metadata.c: better support for pointer types.
15184 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
15185 * reflection.c: Add support for getting custom attrs for properties
15186 and simplify some code.
15188 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15190 * icall.c: change getToken () and add custom attribute GetBlob()helper
15192 * reflection.h: add custom attrs array to the reflection builder structures.
15193 * reflection.c: encode and emit custom attributes for all the relevant
15194 reflection objects. Cache fieldref and methodref tokens. Change
15195 mono_image_create_token() interface to take a MonoDynamicAssembly.
15196 More complete custom attributes decoder. Load custom attributes for
15197 Assembly, Field, Method and Constructor objects, too. Make the
15198 returned array an Attribute[] one, not object[]. Added
15199 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
15200 custom attribute constructor.
15202 2002-02-20 Dick Porter <dick@ximian.com>
15206 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
15207 problem code out for now).
15209 2002-02-19 Radek Doulik <rodo@ximian.com>
15211 * object.c (mono_ldstr): use hash table to avoid multiple swapping
15213 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
15215 * icall.c: register the GetCustomAttributes method.
15216 * object.c, object.h: add mono_string_new_len ().
15217 * reflection.h, reflection.c: added mono_runtime_invoke(),
15218 mono_install_runtime_invoke(). Added
15219 mono_reflection_get_custom_attrs () to load custom attributes and
15220 create the attribute objects.
15222 2002-02-19 Dick Porter <dick@ximian.com>
15223 * threads-dummy-types.c:
15224 * threads-dummy-types.h:
15227 * threads-pthread-types.c:
15228 * threads-pthread-types.h:
15229 * threads-pthread.c:
15230 * threads-pthread.h: Deleted obsolete files
15232 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
15234 * class.c (mono_class_vtable): runtime init the class when we
15235 allocate static class data.
15237 * icall.c (ves_icall_System_Array_SetValue): check for null values.
15239 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
15240 and String - but we will need generic marshalling support in the
15242 (mono_init): set the domain name in a ms compatible way
15244 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
15247 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
15249 * object.c (mono_array_clone): use alloca() instead of g_malloc
15252 * appdomain.c (mono_domain_unload): impl.
15254 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15256 * appdomain.c, object.c: fix intern pool implementation.
15257 * class.c: fix alignment code.
15259 2002-02-16 Radek Doulik <rodo@ximian.com>
15261 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
15262 and s2 > s1, just copy lower bytes to be compatible with little
15263 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
15264 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
15266 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
15267 force big_endian to be 1 for big endian machines
15268 (ves_icall_iconv_new_decoder): ditto
15270 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
15272 * socket-io.c (convert_sockopt_level_and_name): If the system
15273 doesn't define SOL_IP or SOL_TCP, get them by hand using
15274 getprotobyname() and caching the values (because this could be a
15276 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
15277 Use the appropriate struct when the system does support it. Ie,
15278 not all systems have struct ip_mreqn so use struct ip_mreq when
15281 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
15283 * reflection.c: handle finally clauses.
15285 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
15287 * socket-io.c: use g_snprintf() instead of snprintf.
15289 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
15291 * reflection.c (mono_param_get_objects): Cast second argument to
15292 mono_method_get_param_names to a const char** to silence the
15295 * appdomain.c (mono_domain_assembly_open): Put parens around the
15296 truth statement in the for-loop.
15298 * unicode.c (iconv_convert): Got rid of a compiler warning about
15299 int i being unused when the system has a new iconv.
15300 (iconv_get_length): Same.
15302 * image.c (load_class_names): Cast the second argument to
15303 g_hash_table_insert() to char* to hush compiler warnings about the
15305 (mono_image_open): Same here.
15307 * socket-io.c: Don't conditionally include sys/filio.h or
15308 sys/sockio.h here anymore since we now get them from
15309 io-layer/io-layer.h
15310 (inet_pton): If the system doesn't support inet_aton, implement
15311 using inet_addr and also #define INADDR_NONE if it isn't defined
15314 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15316 * metadata.c, metadata.h: added function to get packing and size info
15318 * reflection.h, reflection.c: handle field RVA data. Save info about
15319 the table layout if needed. Assign typedef indexes to all the types
15320 before dumping the info about them to avoid forward reference problems.
15322 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
15324 * socket-io.c (convert_sockopt_level_and_name): ifdef
15325 SO_ACCEPTCONN because it is not defined on my system (old debian)
15327 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15329 * opcode.c: use stddef.h to get NULL.
15331 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
15333 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
15334 for FIONBIO, FIONREAD and SIOCATMARK.
15335 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
15336 define INADDR_NONE and besides, inet_addr() is deprecated and
15337 should not be used. Use inet_pton() instead - it also has the
15338 added bonus that it can easily handle IPv6 addresses as well.
15339 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
15341 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
15343 * decimal.c: remove _MSC_VER conditional.
15345 2002-02-13 Dick Porter <dick@ximian.com>
15348 * icall.c: Internal calls for Blocking, Select, Shutdown,
15349 GetSocketOption and SetSocketOption
15351 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15353 * assembly.cs: better resolver: use it instead of some kludgy
15356 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
15358 * reflection.c: the best way to speed-up the compiler is to avoid
15361 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
15363 * class.c (mono_class_vtable): changed the object layout
15364 (obj->vtable->class).
15365 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
15367 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15369 * assembly.c: look for assemblies in the assembly dir, too.
15371 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15373 * class.c: fix thinko in mono_class_from_type().
15375 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15377 * exception.h, exception.c: added TypeLoadException.
15378 * object.h, object.c: added mono_array_clone ().
15379 * icall.c: handle throwOnError in AssemblyGetType().
15380 Added Array.Clone().
15381 * opcode.h, opcode.c: use a single value for the opcode val.
15382 Compile fix for non-gcc compilers.
15384 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
15386 * opcodes.c, opcodes.h: export interesting info about opcodes.
15388 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
15390 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
15393 * class.c (class_compute_field_layout): set element_class for enums
15394 (mono_class_create_from_typedef): set element_class for normal classes
15396 * icall.c (ves_icall_System_Enum_get_value): impl.
15398 * class.c (mono_class_create_from_typedef): do not set valuetype
15399 flag for System.ValueType and System.Enum
15401 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
15403 * unicode.c (iconv_convert): fix big endian problem.
15405 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15407 * class.c: add asserts if we are ever going to scribble over memory.
15408 * socket-io.c: not all systems have AF_IRDA defined.
15410 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
15412 * class.c (class_compute_field_layout): do not consider static
15413 fields to compute alignment
15415 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
15417 * appdomain.c (mono_appdomain_get): impl.
15418 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
15420 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
15422 * icall.c: ignore "file://" prefix when loading an assembly.
15424 2002-01-23 Dick Porter <dick@ximian.com>
15428 * Makefile.am: Added socket support
15430 2002-01-23 Miguel de Icaza <miguel@ximian.com>
15432 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
15433 code back. This should return the assemblies that are loaded by
15434 the runtime on behalf of an application domain.
15436 The current implementation is still broken, it just returns every
15437 assembly loaded, but until we get real applications domain this
15440 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
15442 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
15445 2002-01-23 Miguel de Icaza <miguel@ximian.com>
15447 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
15448 the mono_class_from_name lookup.
15449 (ves_icall_get_parameter_info): ditto.
15450 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
15452 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
15454 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15456 * class.c: load also nested classes on class init.
15457 System.ValueType instance methods gets passed boxed
15458 values, unless methods in derived classed that get a pointer to the
15460 * icall.c: use better name parsing code in GetType().
15461 * image.c, image.h: add mono_image_loaded ().
15462 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
15463 * reflection.c, reflection.h: added mono_reflection_parse_type().
15465 2002-01-22 Veronica De Santis <veron78@interfree.it>
15467 * icall.c : Added mapping of internal calls for Manual and Auto reset events
15468 * threads.c : Added the implementation of internal calls for events
15469 * threads.h : Added prototypes of internal calls for events
15471 2002-01-21 Radek Doulik <rodo@ximian.com>
15473 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
15475 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
15477 * class.c (mono_class_init): set min_align to 1 (instead of 0)
15478 (mono_class_value_size): use min_align
15480 2002-01-20 Dick Porter <dick@ximian.com>
15483 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
15484 so it compiles on w32.
15486 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
15488 * metadata.c (mono_type_stack_size): impl.
15490 * class.c (mono_class_get_field): impl. memberref token
15492 2002-01-16 Veronica De Santis <veron78@@interfree.it>
15494 * icall.h : Added the internal calls mapping for CreateMutex_internal
15495 and ReleaseMutex_internal.
15496 * threads.h : Added the prototype of mutexes internal calls.
15497 * threads.c : Added the implementations of mutexes internal calls.
15499 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15501 * metaparse.h: removed unused file.
15502 * reflection.c, reflection.h: added stream_data_align () function
15503 to align data in streams and keep stream aligned. Add support for
15504 exception support in method headers.
15506 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
15508 * unicode.c: make iconv_convert () return the number of bytess written
15509 in the output buffer.
15511 2002-01-15 Dick Porter <dick@ximian.com>
15512 * threads.c: Make the runtime's idea of infinite timeouts coincide
15513 with the class library's
15515 Fix a particularly egregious bug in mono_thread_cleanup(). That
15516 code was so utterly bogus it must have been written on a Monday.
15518 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
15520 * reflection.h: add subtypes field to TypeBuilder.
15521 * reflection.c: encode constants for literal fields.
15522 Handle subtypes. Fix user string token (and add a zero byte)
15525 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
15527 * class.c (mono_class_init): bug fix: assign slot numbers for
15530 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15532 * reflection.c: don't try to output a code RVA for abstract methods.
15533 Small fixes for method header format. Output parameter info to the
15534 ParamDef table. Save method overriding info to MethodImpl table.
15535 Fix property support. Allow typedef.extends to be a type in the
15537 * verify.c: fix off-by-one error.
15539 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
15541 * class.c: fix mono_class_from_mono_type () for szarray types.
15542 Remove unused cache check in mono_class_from_type_spec().
15543 * icall.c: *type_from_name () functions handle simple arrays and byref.
15544 * reflection.c: handle byref and szarray types. Handle methods without
15545 body (gets P/Invoke compilation working). Handle types and fields in
15547 * reflection.h: add rank to MonoTypeInfo.
15549 2002-01-10 Dick Porter <dick@ximian.com>
15551 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
15554 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15556 * icall.c: initialize class in type_from_handle ().
15557 Loop also in parent classes for get_method ().
15558 * reflection.c: properly encode class and valuetype types.
15559 Start on encoding TypeBuilder types. Handle fieldrefs.
15560 Use correct length when registering a user string.
15561 Handle ConstructorBuilder and MonoMethod in get_token ().
15562 Make mono_type_get_object () aware of cached types.
15563 * object.c: back out change to mono_string_new ().
15565 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
15566 * object.c: mono_string_new should return a NULL when the string
15567 passed in is NULL -- not try to deference it.
15569 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
15571 * icall.c: hack to make IsSubType work for TypeBuilders.
15572 * reflection.c: emit constructors before methods.
15573 Retrieve param names in mono_param_get_objects().
15575 2002/01/05 Nick Drochak <ndrochak@gol.com>
15577 * Makefile.am: fix list of headers and sources so automake 1.5
15578 doesn't complain. Removed \# at end of list.
15580 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15582 * reflection.c: get token for a method ref. Set return type of
15583 constructor to void.
15584 * loader.c: debug message.
15585 * class.c: typo fix.
15587 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
15589 * icall.c: fix array init with rank > 1. FindMembers
15590 loops in parent class as well.
15591 * image.c: do not insert nested types in name cache.
15592 * reflection.c: warning fix.
15593 * reflection.h: add override method (for interface impl).
15595 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
15597 * metadata.c: fix customattr decoding.
15599 2001-12-21 Miguel de Icaza <miguel@ximian.com>
15601 * rawbuffer.cs: Added native Win32 implementation, avoids using
15602 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
15604 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
15606 * class.c: make the low-level routines handle the cache.
15608 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
15610 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
15612 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
15614 * class.c: fix mono_array_element_size() for objects.
15615 * class.h, class.c: add properties to MonoClass and load them
15617 * icall.c: check with isinst() when assigning a value to an array
15618 instead of requiring the classes to match exactly.
15619 Implemented icall for System.Type::GetType().
15620 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
15621 enums. Handle bindingflags when looking for methods and fields.
15622 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
15623 and mono_metadata_methods_from_property().
15624 * reflection.h, reflection.c: added structures for propreties,
15625 parameters and enums. Implemented mono_property_get_object() and
15626 mono_param_get_objects().
15628 2001-12-18 Dick Porter <dick@ximian.com>
15630 * file-io.c: Use mono_string_to_utf16() instead of
15631 mono_string_chars()
15633 * object.c: Added mono_string_to_utf16(), which copies the non
15634 NULL-terminated MonoString into a new double-null-terminated
15637 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
15639 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
15641 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
15643 * file-io.c: raise exceptions if handle is invalid.
15645 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
15647 * assembly.c: yet another check for mscorlib.
15648 * class.c, class.h: load nesting info for classes.
15649 * icall.c: many new functions to support the Reflection classes.
15650 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
15651 * reflection.h, reflection.c: mono_image_create_token(),
15652 mono_assembly_get_object(), mono_type_get_object(),
15653 mono_method_get_object(), mono_field_get_object(): methods to return
15654 objects that parallel the C representation of assemblies, types,
15657 2001-12-11 Dick Porter <dick@ximian.com>
15660 * file-io.c: Internal calls for file IO.
15662 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
15664 * tabledefs.h: missing FileAttributes.
15665 * verify.h, verify.c: use is_valid_string () to simplify and check for
15666 valid strings more correctly. Fix warnings and speeling.
15667 Check more tables: Filed, File, ModuleRef, StandAloneSig.
15668 Check code: branches, maxstack, method calls.
15670 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
15672 * object.c (mono_object_allocate): removed static, so that the jit
15673 can allocate value types.
15675 * icall.c (ves_icall_System_DateTime_GetNow): impl.
15677 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15679 * class.c: init enum types right away and register the
15680 token->MonoClass map in mono_class_create_from_typedef ().
15681 * verify.h, verify.c: first cut of the verifier.
15682 * pedump.c: add --verify switch to verify metadata tables.
15683 * tabledefs.h: add some missing enums.
15685 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
15687 * class.c (mono_install_runtime_class_init): impl.
15688 (mono_class_init): renamed mono_class_metadata_init to
15689 mono_class_init, also removed the metadata_inited flag
15691 * object.c (mono_object_isinst): use faster algorithm
15693 2001-11-30 Radek Doulik <rodo@ximian.com>
15695 * mono-endian.h: reverted last change
15696 added function prototypes
15698 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
15699 add mono-endian.c back
15701 * mono-endian.c: returned back, as Paolo pointed out, it's needed
15702 for unaligned access, I've mistaked it with endianess. I am
15704 (mono_read16): fix reverted endianess
15705 (mono_read64): ditto
15706 (mono_read32): ditto
15708 2001-11-30 Dick Porter <dick@ximian.com>
15710 * exception.c: Implement mono_exception_from_name()
15712 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15714 * metadata.h, metadata.c: remove params_size and locals_size and their
15715 calculation from the metadata code: they are only usefult to the
15718 2001-11-29 Radek Doulik <rodo@ximian.com>
15720 * object.c (mono_ldstr): swap bytes here, it's probably not the
15721 best place, but works for me now, I'll redo it once I know mono
15722 better, also note that I add PROT_WRITE and don't reset back, also
15723 note that it's only affects big endians, so x86 should be OK
15725 * mono-endian.h (read16): use just glib macros for both endians
15727 * mono-endian.c: removed as glib macros are used in in
15728 mono-endian.h so we don't need to care about endianess for read
15729 macros as glib does that for us already
15731 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
15733 * class.h, class.h: take minimum alignment into consideration so
15734 that the fields of a class remain aligned also when in an array.
15736 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15738 * loader.h, loader.c: add mono_method_get_param_names().
15739 * class.c: 0-init class fields.
15741 2001-11-26 Dick Porter <dick@ximian.com>
15745 * threads.c: New file that handles System.Threading on all platforms
15748 * object.h: Remove the synchronisation struct from MonoObject,
15749 replace it with a pointer that gets initialised on demand
15751 * Makefile.am: Replace all the system-specific threading code with
15752 a single file that uses the new wrapper library
15754 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
15756 * class.c, class.h: add mono_install_trampoline() so that the runtime
15757 can register a function to create a trampoline: removes the ugly
15758 requirement that a runtime needed to export arch_create_jit_trampoline.
15759 * object.h, object.c: added mono_install_handler() so that the runtime
15760 can install an handler for exceptions generated in C code (with
15761 mono_raise_exception()). Added C struct for System.Delegate.
15762 * pedump.c: removed arch_create_jit_trampoline.
15763 * reflection.c: some cleanups to allow registering user strings and
15764 later getting a token for methodrefs and fieldrefs before the assembly
15766 * row-indexes.h: updates and fixes from the new ECMA specs.
15768 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
15770 * class.h, class.c: add enum_basetype field to MonoClass.
15771 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
15772 to get index in the constant table reated to a field, param or
15774 * reflection.h, reflection.c: handle constructors. Set public-key and
15775 version number of the built assembly to 0.
15776 * row-indexes.h: update from new ECMA spec.
15778 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15780 * class.h, class.c: add a max_interface_id to MonoClass.
15781 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
15782 since it's used to do that. Added mono_type_type_from_obj().
15783 Make GetType() return NULL instead of segfaulting if the type was not
15784 found. Handle simple arrays in assQualifiedName.
15785 * object.h: add a struct to represent an Exception.
15786 * reflection.c: output call convention in method signature.
15787 Add code to support P/Invoke methods and fixed offsets for fields.
15789 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
15791 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
15793 * icall.c: use mono_array_addr instead of array->vector: fixes the
15794 reflection image writing.
15795 * reflection.c: init call convention byte to 0 in method signature.
15796 Encode the property signature. Don't output property-related methods
15797 twice. Really process the properties for a type (don't cast a field to
15798 a property, my mom always told me that).
15799 Fix 64 bit issues in pointer alignment in a different and more
15802 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
15804 * loader.h: Removed type class from MonoDefaults, added monotype
15806 * loader.c: Loaded MonoType, removed loading of Type
15808 * icall.c (my_mono_new_object): Now returns a System.MonoType,
15809 and fills in System.Type._impl with a RuntimeTypeHandle rather
15810 than the actual MonoClass *
15812 (ves_icall_type_from_handle): change from type_class to
15815 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
15818 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
15821 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
15823 (ves_icall_System_Reflection_Assembly_GetType): implemented
15825 (ves_icall_System_MonoType_assQualifiedName): implemented
15827 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
15829 2001-11-09 Miguel de Icaza <miguel@ximian.com>
15831 * assembly.c (mono_assembly_open): Implement a cache for the
15834 (mono_assembly_close): only destroy the assembly when the last
15837 2001-11-09 Dick Porter <dick@ximian.com>
15839 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
15841 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
15843 * class.c (mono_class_metadata_init): bug fix: compute the right slot
15845 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15847 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
15848 from Martin Weindel.
15849 * object.h: add mono_string_chars ().
15851 2001-11-07 Miguel de Icaza <miguel@ximian.com>
15853 * reflection.c (build_compressed_metadata): Eliminates warnings
15854 and uses 64-bit clean code.
15856 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
15857 (mono_type_equal): Change signature to eliminate warnings.
15859 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15861 * icall.c, loader.c: remove the internalcall array constructors.
15862 Changes to match the new MonoArray structure.
15863 * object.h, object.c: an array object doesn't allocate an extra
15864 vector. Add mono_array_new_full () to create jagged arrays easily.
15866 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15868 * metadata.h, metadata.c: add mono_metadata_field_info () to
15869 retreive all the info about a field from vairous tables.
15870 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
15871 * class.h, class.c: augment MonoClassField with more info.
15872 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
15873 policy and load a field's RVA if needed.
15875 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
15877 * class.c (mono_class_metadata_init): create a trampoline for all
15878 virtual functions instead of actually compiling them.
15880 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
15882 * class.h, class.c: include name in MonoClassField.
15883 * class.c: fix fundamental type of System.Object and System.String.
15884 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
15886 * icall.c: remove internalcalls for the Reflection stuff that is now
15888 * loader.c: mono_field_from_memberref () implementation.
15889 * mono-endian.c: thinko (s/struct/union/g).
15890 * object.c, object.h: make the mono_string_* prototypes actually use
15891 MonoString instead of MonoObject.
15892 * reflection.c, reflection.h: updates for changes in the reflection
15893 code in corlib: we use C structures that map to the actual C# classes.
15894 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
15895 fat method header if needed and use the info from the ILGenerator for
15896 methods. Handle fields in types. Misc fixes.
15898 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
15900 * class.c (mono_class_metadata_init): bug fix: always allocate
15901 space for static class data
15903 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
15905 * class.c (mono_compute_relative_numbering): use relative
15906 numbering to support fast runtime type checks.
15908 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
15910 * class.c (mono_class_create_from_typeref): added debugging output
15911 to print class name when MonoDummy is returned instead of real class
15913 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
15915 * class.c (mono_class_metadata_init): interface offset table now
15916 contains pointers into the vtable - this is more efficient for the jit
15918 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
15920 * class.c (mono_class_metadata_init): use a temporary vtable (the
15921 old algorithm only worked for the interpreter, but not for the jit)
15923 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
15925 * loader.c (method_from_memberref): use mono_class_get to get the
15926 class of an array instead of using System.Array directly.
15927 (mono_get_method): also add MEMBERREF methods to the method cache
15928 which usefull for arrays.
15930 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
15932 * pedump.c (arch_compile_method): added to compute vtable entry
15934 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
15935 number of interfaces.
15937 * class.h: merged MonoArrayClass into MonoClass
15939 * class.c (mono_class_create_from_typedef): compute the vtable size and
15940 allocate space to include the vtable inside MonoClass
15941 (mono_class_metadata_init): initialize the vtable
15943 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
15945 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
15946 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
15947 * image.c: endian fixes by Laurent Rioux.
15948 * object.h, object.c: rename MonoStringObject to MonoString and
15949 MonoArrayObject to MonoArray. Change some function names to conform to
15950 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
15951 guint16* as first argument, so don't use char*.
15952 Provide macros to do the interesting things on arrays in a portable way.
15953 * threads-pthread.c: updates for the API changes and #include <sched.h>
15954 (required for sched_yield()).
15955 * icall.c: updates for the API changes above.
15956 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
15957 platforms that need them.
15959 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
15961 * class.c: set the correct type for all the fundamental
15962 type when loading the class.
15964 2001-10-05 Dick Porter <dick@ximian.com>
15966 * threads-pthread.c (pthread_mutex_timedlock): Simple
15967 compatibility version for C libraries that lack this call.
15969 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
15971 * class.c: MonoTypes stored in MonoClass are stored as
15972 fundamental MonoTypes when the class represents a
15973 fundamental type (System.Int32, ...).
15974 The TypeHandle return by ldtoken is a MonoType*.
15975 * icall.c: ves_icall_get_data_chunk () write out all the
15976 PE/COFF stuff. Implement ves_icall_define_method (),
15977 ves_icall_set_method_body (), ves_icall_type_from_handle ().
15978 * image.c: properly skip unknown streams.
15979 * loader.h, loader.c: add type_class to mono_defaults.
15980 * metadata.c, metadata.h: export compute_size () as
15981 mono_metadata_compute_size () with a better interface.
15982 Typo and C&P fixes.
15983 * pedump.c: don't try to print the entry point RVA if there is no entry point.
15984 * reflection.c, reflection.h: many cleanups, fixes, output method
15985 signatures and headers, typedef and typeref info, compress the metadata
15986 tables, output all the heap streams, cli header etc.
15987 * row-indexes.h: typo fixes.
15989 2001-10-04 Dick Porter <dick@ximian.com>
15991 * object.h: Add a synchronisation mutex struct to MonoObject
15993 * object.c (mono_new_object): Initialise the object
15994 synchronisation mutexes
15996 * icall.c: System.Threading.Monitor internal calls
15998 * threads-pthread.h:
15999 * threads-pthread.c: System.Threading.Monitor internal calls
16001 * threads-types.h: New file, includes the system-specific thread
16004 * threads-pthread-types.h:
16005 * threads-pthread-types.c: New files, handle pthread-specific
16006 synchronisation types
16008 * threads-dummy-types.h:
16009 * threads-dummy-types.c: New files of dummy support for
16010 thread-specific types
16014 * pedump.c: include mono-endian.h not endian.h
16016 * Makefile.am: More threads files.
16017 Name mono-endian.h not endian.h
16019 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
16021 * Makefile.am, reflection.h, reflection.c: move here the reflection related
16022 stuff and implement a few more bits.
16023 * icall.c: a field needs to be dereferenced twice. Do not use the same
16024 name for two variables in the same scope.
16025 * image.c, image.h: cleanups.
16027 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
16029 * class.c (mono_class_metadata_init): bug fix: compute the right size
16031 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
16033 * icall.c: implemented some of the Reflection internalcalls.
16034 * image.c, image.h: start writing out the PE/COFF image.
16035 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
16036 that does the reverse than decode_blob_size ().
16037 * object.c: use mono_metadata_encode_value (). Move here
16038 temporary implementation of mono_string_to_utf8 ().
16039 * rawbuffer.c: make malloc_map static.
16041 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16043 * metadata.c: fix type comparison for arrays.
16044 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
16045 Added a couple of new classes to monodefaults.
16046 * icall.c: added a couple of Reflection-related internalcalls.
16047 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
16048 Added a byval_arg MonoType to MonoClass.
16050 2001-09-28 Dick Porter <dick@ximian.com>
16053 * threads-pthread.h:
16054 * threads-pthread.c: Implemented internal calls for
16055 LocalDataStoreSlot operations. Applied mutexes around all shared
16056 data. Reworked the thread creation and Start() operations to
16057 avoid a race condition.
16060 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
16062 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
16064 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
16066 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
16068 * class.c, loader.c: warn and return NULL instead of erroring out.
16069 * icall.c: added System.AppDomain::getCurDomain().
16070 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
16072 2001-09-25 Dick Porter <dick@ximian.com>
16074 * threads-pthread.h:
16075 * threads-pthread.c: Implemented timed thread joining and added
16076 System.Threading.Thread::Join_internal internal call
16078 * icall.c: Added System.Threading.Thread::Join_internal internal call
16081 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
16083 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
16085 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
16086 mono_string_intern () to implement the semantics of the ldstr opcode
16087 and the interning of System.Strings.
16088 * icall.c: provide hooks to make String::IsIntern and String::Intern
16091 2001-09-23 Dick Porter <dick@ximian.com>
16094 * threads-dummy.h: New files of dummy threading routines
16096 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
16097 support code based on system specifics
16099 Rename PTHREAD_LIBS to THREAD_LIBS
16101 2001-09-23 Dick Porter <dick@ximian.com>
16103 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
16104 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
16106 (mono_thread_init): Set up a Thread object instance to return when
16107 the main thread calls Thread.CurrentThread
16108 (mono_thread_cleanup): Wait for all subthreads to exit
16110 * icall.c: New internal calls for System.Threading.Thread::Sleep
16111 (including Schedule) and CurrentThread
16113 * threads.h: New file, to insulate thread-specific stuff from the
16116 2001-09-21 Dick Porter <dick@ximian.com>
16118 * threads-pthread.h:
16119 * threads-pthread.c: New file, for handling pthreads-style
16120 threading support. Start() now starts a new thread and executes
16121 the ThreadStart delegate instance.
16123 * icall.c: Added the internalcall for
16124 System.Threading.Thread::Start_internal
16126 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
16128 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
16130 * loader.c: work around the different signatures for delegates
16131 constructors csc generates in compiled code vs the ones compiled in mscorlib.
16133 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16135 * class.h, class.c: add mono_class_get_field_from_name ().
16136 * *: Fix C comments and other ANSI C issues.
16138 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
16140 * endian.h, assembly.c: fix some endianness issues.
16142 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
16144 * loader.h, load.c: add delegate_class to mono_defaults.
16145 Handle runtime provided methods in mono_get_method ().
16147 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
16149 * loader.c (mono_get_method): use pinvoke for internal call
16151 * icall.c: use pinvoke for internal call
16153 * loader.c (method_from_memberref): set the method name
16155 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
16157 * metadata.c: help the compiler generate better code for
16158 mono_class_from_mono_type ().
16160 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
16162 * class.c (mono_class_metadata_init): delayed computing of the
16163 class size to mono_class_metadata_init ()
16165 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
16167 * class.c, class.h: add an interfaces member to MonoClass.
16168 * image.c, image.h: add assembly_name field to MonoImage
16169 from the assembly table.
16170 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
16172 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16174 * class.c: Handle Array in mono_class_from_mono_type ().
16175 * metadata.c, pedump.c: some endian fixes.
16177 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
16179 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
16180 * metadata.c: fix small problem introduced with the latest commit.
16182 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
16184 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
16185 We don't need a MonoMetadata pointer anymore to compare signatures in
16186 mono_metadata_signature_equal (), update callers.
16187 Reduced memory usage an number of allocations for MonoMethodHeader and
16188 MonoMethodSignature.
16190 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
16192 * metadata.c: added compare for szarray.
16194 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
16196 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
16197 and add a couple more types to it and mono_defaults. Give an hint on
16198 classes that need implementing in our corlib and are referenced
16201 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
16203 * class.h, class.c: keep track if a class is also an Enum.
16204 * loader.c: Implement a couple more types for use in libffi
16205 marshalling. Gives better diagnostics when failing to dlopen
16206 a library. Set method->klass for P/Invoke methods, too.
16208 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
16210 * class.c, class.h: add a MonoType this_arg to MonoClass that
16211 represents a pointer to an object of the class' type that
16212 can be used by the interpreter and later the type cache.
16213 Add best guess alignment info for valuetype objects.
16215 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
16217 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
16218 into MonoType: one less level of indirection and allocation and
16219 simplifies quite a bit of code. Added cache for MonoTypes that are
16220 used frequently, so that we don't need to allocate them all the time.
16222 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
16224 * class.c (mono_class_create_from_typedef): System.Enum is also a
16225 value type, although it does not derive from System.ValueType
16226 (maybe a bug in the ms compiler?)
16228 * metadata.c (mono_type_size): return the right size for value types
16230 * loader.c (mono_get_method): only initialize method header if not abstract
16232 * class.c (mono_class_from_mono_type): use mono_default values.
16234 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
16236 * *: use MonoClass pointers instead of <type_tokens>
16238 * class.h: new flag: metadata_inited.
16240 * class.c (mono_class_metadata_init): impl.
16241 (mono_class_instance_size): impl.
16242 (mono_class_data_size): impl.
16244 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16246 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
16247 MonoClass now has the name and name_space fields.
16248 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
16249 mono_get_method () takes and optional MonoClass as argument.
16250 Removed mono_typedef_from_name() and added mono_class_token_from_name()
16251 instead that takes advantage of a map from class names to typedef
16252 tokens in MonoImage.
16254 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
16256 * metadata.c: zero is not a valid alignment boundary.
16257 Merge MONO_TYPE_VOID in default decoding code.
16259 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
16261 * image.h: merged MonoMetadata into MonoImage
16263 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
16264 identify the type of elements.
16266 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
16268 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
16269 * cil-coff.h: split MonoMSDOSHeader and add size info.
16270 * image.c: add some consistency checks.
16271 * metadata.c: fix row size computation: one programmer
16272 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
16273 add explanation for the locator routine.
16274 Fix decoding of size in method header.
16276 2001-08-20 Miguel de Icaza <miguel@ximian.com>
16278 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
16279 (g_concat_dir_and_file): Bring g_concat_dir_and_file
16280 function from gnome-libs. This uses the right path separator
16281 based on the OS, and also works around a bug in some systems where
16282 a double slash is not allowed.
16283 (default_assembly_name_resolver): Use g_concat_dir_and_file
16284 (mono_assembly_open): ditto.
16286 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
16288 * metadata.c (mono_metadata_signature_equal): impl.
16290 * *: void is now a realy MonoType (instead of using NULL)
16292 * metadata.c (do_mono_metadata_parse_type): use
16293 mono_metadata_parse_type to parse void value.
16295 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
16297 * metadata.c, metadata.h: in the signature and method header store
16298 only the space required for holding the loca vars and incoming arguments.
16300 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
16302 * metadata.c (do_mono_metadata_parse_type): treat void like any
16303 other type (instead of assigning NULL);
16305 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
16307 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
16309 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
16311 * image.c (do_mono_image_open): added a cache for arrays.
16313 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16315 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
16316 decode a single column from a row in a metadata table and changes
16317 to take advantage of it in the typedef locator (gives a nice speed up).
16318 Store offset info for function params.
16320 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
16322 * image.h (MONO_IMAGE_IS_CORLIB): removed
16324 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
16326 * assembly.c: how could mono_assembly_close () had ever worked?
16327 * metadata.c, metadata.h: provide offset info for local vars.
16328 Implement mono_type_size () to take care of alignment as well
16329 as size (it was mono_field_type_size in cli/class.c before).
16331 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
16333 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
16335 * assembly.h (CORLIB_NAME): set to corlib.dll
16337 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
16339 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16341 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
16342 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
16343 tokentype.h: massive namespace cleanup.
16345 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16347 * metadata.h, metadata.c: decode exception clauses when parsing method header.
16349 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
16351 * metadata.c (mono_metadata_free_type): added check for type !=
16352 NULL (void) before calling mono_metadata_free_type()
16354 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
16356 * metadata.h, row_indexes.h: added header with enumerations to use
16357 to index in the columns from tables in metadata and to decode coded
16358 tokens: we should start using this instead of embedding magic numbers
16361 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
16363 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
16364 Move metadata_t info from cli_image_info_t to MonoImage, where
16365 it's easily accessible. Changed all the uses accordingly.
16366 Added the method and class caches to MonoImage.
16367 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
16368 and mono_metadata_decode_value () signature to be more consistent
16369 with the other parse functions (and simplify code). Taken advantage
16370 of zero-length array allocation with GCC. Removed reduntant (and
16371 wrong) MonoFieldType struct and use MonoParam instead. Changed
16372 mono_metadata_parse_field_type () to use common code for parsing.
16373 Added mono_metadata_typedef_from_field () and
16374 mono_metadata_typedef_from_method () to lookup a typedef index from a
16375 field or method token.
16376 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
16378 2001-07-23 Miguel de Icaza <miguel@ximian.com>
16380 * metadata.c (mono_metadata_parse_field_type): Implement.
16381 (do_mono_metadata_parse_type): Split engine from
16382 mono_metadata_parse_type, so that we can create smaller structures
16383 for things that just have one pointer to the MonoType (look at
16386 2001-07-20 Miguel de Icaza <miguel@ximian.com>
16388 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
16389 as Jan Gray found out, it is incorrect.
16391 2001-07-18 Miguel de Icaza <miguel@ximian.com>
16393 * assembly.c: Implement asssembly loading. This loads an image
16394 and loads all the referenced assemblies. Come to think of it, we
16395 could always do lazy loading of the assemblies.
16397 * image.c (mono_image_open): Keep loaded images in a hashtable.
16399 * image.h (MonoImage): Add reference count.
16401 2001-07-17 Miguel de Icaza <miguel@ximian.com>
16403 * assembly.c (mono_assembly_open): Keep track of the file name in
16404 case the assembly has no ASSEMBLY table.
16406 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
16409 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
16411 * metadata.c, metadata.h: decode local vars in method header
16412 parse function. Change callers accordingly.
16414 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
16416 * metadata.h, cil-coff.h: protect against multiple inclusion.
16417 Added some new structures to hold information decoded from metadata:
16418 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
16419 and relevant decoding/free functions.
16420 * metadata.c: implement decoding functions. Add warning for out of bounds
16421 index in mono_metadata_locate(). Implement mono_get_method () to retreive
16422 all the info about a method signature and invocation. Remove check on
16423 uninitialized local var in parse_mh() and fix memory leak.
16425 2001-07-12 Miguel de Icaza <miguel@ximian.com>
16427 * metadata.h: More macros.
16429 * tokentype.h: New file.
16431 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
16433 * assembly.c: added a consistency check and initialize
16434 some structures with g_new0().
16435 * metadata.c: fixed a couple more bugs in table size computation
16436 and add other checks for out-of bound access to metadata.
16438 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
16440 * metatada.c: fix bugs computing table sizes. Spew a
16441 warning when index in string heap is out of bounds.
16443 2001-07-04 Miguel de Icaza <miguel@ximian.com>
16445 * metadata.h: Add a couple of macros to manipulate tokens.
16447 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16449 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
16450 cli_section_tables).
16452 2001-07-01 Miguel de Icaza <miguel@ximian.com>
16454 * metadata.c (mono_metadata_user_string): New function, provides
16455 access to the UserString heap.
16457 2001-06-27 Miguel de Icaza <miguel@ximian.com>
16459 * metadata.c: Add inline documentation.
16461 2001-06-26 Miguel de Icaza <miguel@ximian.com>
16463 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
16466 2001-06-22 Miguel de Icaza <miguel@ximian.com>
16468 * typeattr.h: New file, TypeAttribute flags.
16470 2001-06-21 Miguel de Icaza <miguel@ximian.com>
16472 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
16473 mono_assembly_ensure_section): Section loading code.
16474 (load_section_tables): Load the sections.
16476 * mono/metadata/metadata.c (mono_metadata_locate_token,
16477 mono_metadata_locate): Functions to locate the information
16478 definition given a token or a table and an index.
16479 (mono_metadata_compute_table_bases): New.
16480 (compute_size): New function to compute the sizes of the various
16483 * mono/metadata/metadata.h: Finish listing the different index
16486 * mono/metadata/pedump.c: Improve to dump new information.
16488 2001-06-19 Miguel de Icaza <miguel@ximian.com>
16490 * mono/metadata/metadata.c: Entered all the tables matching
16493 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2