1 2005-09-13 Zoltan Varga <vargaz@gmail.com>
3 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
4 return a success/failure indication.
5 (mono_metadata_interfaces_from_typedef_full): Ditto.
6 (get_constraints): Ditto.
8 2005-09-12 Zoltan Varga <vargaz@gmail.com>
10 * marshal.c (emit_marshal_array): Fix handling of null arrays.
12 * marshal.c (emit_marshal_array): Add support for returning string
13 arrays from delegates. Fixes #76063.
15 * marshal.c: Use the emit_ldloc/stloc macros where possible.
17 2005-09-11 Zoltan Varga <vargaz@gmail.com>
19 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
22 2005-09-09 Zoltan Varga <vargaz@gmail.com>
24 * reflection.c icall.c: Fix after mono_get_exception_type_load
27 * assembly.c (mono_assembly_get_assemblyref): New helper function.
28 (mono_assembly_load_reference): Use the new helper.
30 * class-internals.h (MonoLoaderError): New structure containing
31 information about type loading errors.
33 * class-internals.h loader.c: Add APIs to store per-thread loader
36 * loader.c class.c: Set the loader error if needed.
38 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
40 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
42 * decimal.c: fixed to handle the broken ARM fp format.
44 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
46 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
49 2005-09-06 Martin Baulig <martin@ximian.com>
51 * domain.c (supported_runtimes): Added v2.0.50727.
53 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
55 * culture-info.h: reduce the size of some structures.
57 2005-09-05 Martin Baulig <martin@ximian.com>
59 Reflect latest API changes in the August CTP.
62 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
63 ("MonoType.HasGenericArguments"): Removed.
64 ("MonoMethod.BindGenericParameters"): Renamed to
66 ("MethodBuilder.BindGenericParameters"): Renamed to
69 2005-09-05 Martin Baulig <martin@ximian.com>
71 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
73 2005-09-05 Martin Baulig <martin@ximian.com>
75 Applying a patch from Michal Moskal <malekith@nemerle.org>.
77 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
78 generic_container is non-NULL.
80 2005-09-05 Martin Baulig <martin@ximian.com>
82 Applying a patch from Michal Moskal <malekith@nemerle.org>.
84 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
86 2005-08-29 Michal Moskal <malekith@nemerle.org>
88 * reflection.c (encode_locals,
89 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
90 for large generic types.
92 2005-09-05 Martin Baulig <martin@ximian.com>
94 Applying a patch from Michal Moskal <malekith@nemerle.org>.
96 * class.c (mono_dup_array_type): New public method.
97 (mono_metadata_signature_deep_dup): New public method.
98 (dup_type): Correctly duplicate array and function types.
100 2005-09-05 Martin Baulig <martin@ximian.com>
102 Applying a patch from Michal Moskal <malekith@nemerle.org>.
104 * reflection.c (get_default_param_value_blobs): Handle generic types
107 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
109 * class.c: Fixed error reporting (method/class were inversed) for
111 * security-manager.c|h: Added the AppDomain when calling the managed
112 System.Security.SecurityManager.InheritanceDemand method.
114 2005-09-01 Raja R Harinath <rharinath@novell.com>
116 * reflection.c (encode_marshal_blob): 'marshaltype' and
117 'marshaltyperef' are alternate sources for the custom marshaler
120 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
122 * class.c: fix creation of array classes with rank == 1
123 (patch by Ankit Jain <jankit@novell.com>).
125 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
127 * object.c: fix check for creating the bound data for arrays vs
130 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
132 * object.c: configuration file name is now based on the executable name,
133 not the image name. Fixes bug #75931.
135 2005-08-29 Zoltan Varga <vargaz@gmail.com>
137 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
138 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
140 2005-08-25 Zoltan Varga <vargaz@gmail.com>
142 * rand.c: Use wincrypt.h instead of WinCrypt.h.
144 2005-08-24 Ankit Jain <jankit@novell.com>
145 Raja R Harinath <rharinath@novell.com>
147 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
148 called by it recursively.
149 (mono_class_init): Remove special case in pending_init handling, since it's
150 superseded by the fix to mono_class_from_typeref.
152 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
154 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
155 BROKEN_THREAD_START stuff.
157 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
159 * class-internals.h object.c: Add a new kind of trampoline called a delegate
162 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
164 * object.c (mono_delegate_ctor): Replace the original function address with
165 a delegate trampoline.
167 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
169 * icall.c: add boolean argument to base64_to_byte_array and
170 InternalFromBase64String to control whether a whitespace-only string
171 is allowed (or should casue a FormatException to be thrown). We need
172 this as the behavior has changed between MS.NET 1.x and 2.0, and we
173 to match the MS behaviour in both profiles.
174 * appdomain.c: Bump corlib version.
176 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
178 This patch implements a big portion of publisher policy
179 support, used to bind assembly versions and redirect
180 one assembly from version A to version B.
183 New GSList loaded_assembly_bindings, for storing the cached
185 (assembly_binding_maps_name): New static function for checking if a
186 assembly binding information maps an assembly name.
187 (mono_assembly_binding_info_free): New function for freeing
188 assembly binding information resources.
189 (get_publisher_policy_info): New static function for retrieving
190 assembly binding information from a MonoImage.
191 (compare_versions): New static function for comparing an assembly
192 binding information data and the version of an assembly name.
193 (check_policy_versions): New static function for checking if an
194 assembly binding info mapping an assembly name is valid for it.
195 (mono_assembly_load_publisher_policy): New static function for
196 loading the 'policy.major.minor.MyAssembly' image for an assembly
197 with an assembly name 'aname'.
198 (mono_assembly_bind_version): New static function for updating
199 assembly redirection.
200 (mono_assembly_apply_binding): New static function for applying
202 (search_binding_loaded): New static function for searching
203 loaded assembly binding infos in the cache domain.
204 (mono_assembly_load_full): Don't apply assembly binding for
205 reflection only assemblies.
207 * metadata-internals.h: Add MonoAssemblyBindingInfo,
208 which contains information about assembly binding. Also
209 declare signature for mono_config_parse_publisher_policy ()
210 function, used to retrieve pub policy info.
213 (publisher_policy_start): New static function used to parse publisher
215 (publisher_policy_parser): New static MonoParseHandler containing
216 the functions used when parsing config files.
217 (mono_config_parse_publisher_policy): New function for parsing
218 publisher policy files.
220 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
222 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
224 * marshal.c (mono_delegate_free_ftnptr): Ditto.
226 * object.c (mono_get_addr_from_ftnptr): New helper function.
228 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
230 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
232 2005-08-19 Dick Porter <dick@ximian.com>
234 * threads.c, threads.h, appdomain.c, appdomain.h,
235 profiler-private.h, monitor.c, object.c, object-internals.h,
236 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
237 store the thread ID, so it can hold a 64 bit value if needed.
239 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
241 * reflection.c (mono_reflection_create_dynamic_method): Store the
242 handle class into the method references as well so ldtoken works in
245 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
248 2005-08-19 Ankit Jain <jankit@novell.com>
251 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
252 here rather than using the method signature of a arbitrary function
253 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
255 Hack done with Harinath.
257 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
259 * threadpool.c: disable printing stack traces when we get a exception
260 in a threadpool thread. I need to do more testing to figure out which
261 cases actually print this. Fixes bug #75828.
263 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
265 * icall.c: there might be ignored whitespace after the last '='. This
266 fixes length computation and bug #75840.
268 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
270 * assembly.c (mono_assembly_load_full): Consider .exe extension as
273 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
276 * reflection.c (create_custom_attr_data): Ditto.
278 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
280 * locales.c, culture-info.h : removed RegionLCIDMap.
281 * culture-info-tables.h : regenerated.
283 2005-08-16 Martin Baulig <martin@ximian.com>
285 * class.c (mono_type_get_name_recurse): Small fix.
287 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
289 * locales.c : indentation fixie.
291 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
293 * object-internals.h,
297 icall.c : added RegionInfo table support.
298 * culture-info-table.h : regenerated for region support.
300 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
302 * reflection.c (resolve_object): handle all kinds of MonoMethod
303 including generic ones
305 2005-08-12 Ankit Jain <jankit@novell.com>
307 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
308 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
310 2005-09-12 Lluis Sanchez <lluis@ximian.com>
312 * process.c: Don't close a thread handle when it's NULL. This is a
313 workaround for bug #75733.
315 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
317 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
319 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
321 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
323 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
325 * threadpool.c: if a work item in the thread pool has a callback that
326 catches a exception, don't propagate it after invoking the callback.
329 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
331 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
333 * class-internals.h (MonoCachedClassInfo): Add some new fields.
335 * class.c (mono_class_init): Load field info lazily in the AOT case.
337 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
339 2005-08-03 Ankit Jain <jankit@novell.com>
342 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
343 PInvoke calling convention is 0.
345 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
347 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
348 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
350 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
352 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
353 to handle threads not started by the GC (patch by Michael Meeks
354 <michael.meeks@novell.com>).
356 2005-07-31 Kamil Skalski <nazgul@omega.pl>
358 * reflection.c: Make buffer used in emitting types larger for some
359 big generic types (patch by Michal Moskal).
361 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
363 * mono-debug.c: Fix some (not all) alignment problems.
365 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
367 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
368 Invoke mono_image_load_from_data_full passing the refonly
372 (mono_assembly_open_from_bundle): Add the refonly argument,
373 in order to pass it to other methods it calls to.
374 (do_mono_assembly_open): Add the refonly argument, in order
375 to pass it to other methods it calls to.
376 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
377 the refonly parameter to it.
379 * image.c: Add loaded_images_refonly_hash and
380 loaded_images_refonly_guid_hash to cache the reflection
382 (mono_images_init): Initialize the hash tables used for
383 caching the reflection only images.
384 (load_modules): Invoke mono_image_open_full passing the refonly
385 parameter to load the modules the correct way.
386 (build_guid_table): Add the refonly argument, to re-build the
388 (do_mono_image_open): Added the refonly argument, in order to
389 define it for the loaded image.
390 (mono_image_loaded_full): New function, which receives an
391 additional parameter to look for the image in the refonly or
393 (mono_image_loaded): Updated, using mono_image_loaded_full.
394 (mono_image_loaded_by_guid_full): The same case that happens
395 with mono_image_loaded_full.
396 (mono_image_loaded_by_guid): Likewise.
397 (register_image): Use the ref_only variable inside MonoImage
398 to decide in which hash table store the current image.
399 (mono_image_open_from_data_full): Rename
400 mono_image_open_from_data to mono_image_open_from_data_full,
401 adding the refonly argument, to define the ref_only variable
403 (mono_image_open_from_data): Return
404 mono_image_open_from_data_full.
405 (mono_image_open_full): Rename mono_image_open to
406 mono_image_open_full, receiving the new refonly argument,
407 to pass it to inner methods.
408 (mono_pe_file_open): Update this function, to open
409 a MonoImage as a non-refonly image.
410 (mono_image_close): Use the refonly variable inside
411 MonoImage to remove the image from the correct caches.
413 * image.h: Add the signatures of mono_image_open_full,
414 mono_image_open_from_data_full, mono_image_loaded_full,
415 mono_image_loaded_by_guid_full.
417 * metadata-internals.h: Add the ref_only field to
420 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
422 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
423 Fix the last behavior, which used to load the assemblies and
424 extract MonoReflectionAssemblyName information, instead of
425 extract it from the metadata tables. Needed for Reflection
428 2005-07-29 Martin Baulig <martin@ximian.com>
430 * mono-debug-debugger.c
431 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
435 (mono_debug_address_from_il_offset): Check whether we have
436 debugging support before attempting to take the lock.
437 (mono_debug_source_location_from_address): Likewise.
438 (mono_debug_source_location_from_il_offset): Likewise.
439 (mono_debug_il_offset_from_address): Likewise.
440 (mono_debug_address_from_il_offset): Likewise.
442 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
444 * class.c (mono_class_from_name_case): Add support for dynamic images.
447 * object.c (mono_class_compute_gc_descriptor): Add a workaround
450 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
452 * reflection.c (mono_method_get_object): Fix warning.
454 2005-07-28 Martin Baulig <martin@ximian.com>
457 (mono_debug_add_wrapper): Also write the wrapper type.
459 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
461 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
463 * class.c (mono_class_init): Avoid reading nested classes if the AOT
464 data indicates the class has none.
466 2005-07-26 Ben Maurer <bmaurer@ximian.com>
468 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
469 loader lock with the debugger lock. Prevents deadlocks for beagle.
471 Beagle can now run on an smp box for a weekend without any
474 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
476 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
477 in a module. Fixes #75629.
479 2005-07-26 Martin Baulig <martin@ximian.com>
481 * mono-debug.c (mono_debug_add_wrapper): New static method.
482 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
483 interncall or a wrapper.
485 * mono-debug.h (MonoDebugWrapperData): New public typedef.
486 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
487 (MONO_DEBUGGER_VERSION): Bump to 51.
489 * mono-debug-debugger.c
490 (mono_debugger_add_type): Removed this empty function.
491 (mono_debugger_add_method): Likewise.
493 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
495 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
496 before accessing method->slot.
498 2005-07-21 Jb Evain <jbevain@gmail.com>
500 * reflection.c (method_encode_clauses/class): Handle filters clauses.
503 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
505 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
508 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
510 * image.h image.c: Add mono_image_get_guid () API function.
512 2005-07-19 Ben Maurer <bmaurer@ximian.com>
514 There were issues when multiple threads tried to load
515 assemblies. A deadlock was created between assemblies_mutex and
516 mono_domain_assemblies_lock. This fixes the issue by making the
517 assembly ref counting be lock free. See bug 75586.
519 * image.c (mono_image_close): The add ref function here was using
520 Interlocked operations while the unref was using a mutex and a
521 --. I don't think this was ever a bug that would be exposed in a
522 non-pendantic way (ie, by an embedder doing a ref on one thread
523 and an unref on another), but for the sake of correctness, this is
526 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
527 (mono_assembly_load_reference): Call mono_assembly_addref rather
528 than touching the refcount ourselves.
529 (mono_assembly_close): Use InterlockedDecrement to unref the
530 assembly. Don't acquire the lock unless it is actually needed.
532 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
534 * class.c (mono_class_layout_fields): Fix calculation of has_references
537 2005-07-12 Martin Baulig <martin@ximian.com>
539 Applying a patch from Michal Moskal <malekith@nemerle.org>.
542 (mono_type_hash): Provide better hashing for generic instances.
543 (mono_generic_inst_hash): Improve hashing.
544 (mono_generic_class_hash): Likewise.
546 * reflection.c (mymono_metadata_type_hash): Improve hashing for
549 2005-07-12 Martin Baulig <martin@ximian.com>
551 * reflection.c (mono_reflection_create_runtime_class): Remove the
552 hack for generic type definitions and non-`Run' assemblies.
553 (mono_reflection_bind_generic_parameters): Also use
554 `klass->wastypebuilder' to check for TypeBuilders.
556 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
558 * class.c (mono_class_layout_fields): Fix calculation of has_references
561 * class.c (inflate_generic_class): Fix a leak.
562 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
565 2005-07-11 Martin Baulig <martin@ximian.com>
567 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
570 2005-07-11 Martin Baulig <martin@ximian.com>
572 * loader.c (find_method): Also lookup in
573 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
575 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
577 * appdomain.c (mono_domain_unload): Don't free the error message
578 before passing it to mono_get_exception_...
580 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
582 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
584 * threads.c: try to better guess an available RT signal (bug #75387).
586 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
588 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
591 2005-07-07 Martin Baulig <martin@ximian.com>
593 * class.c (mono_type_get_name_full): Return NULL for
594 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
597 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
599 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
600 exit the appdomain as well being aborted.
602 * threadpool.c: Create all threadpool threads inside the root appdomain, and
603 change back to the root domain after calling managed code. This enables
604 appdomains using threadpools to be unloaded.
606 2005-07-07 Martin Baulig <martin@ximian.com>
609 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
610 into `MonoDynamicGenericClass' since we only need it for dynamic
613 * reflection.c (mono_class_bind_generic_parameters): We don't need
614 to compute the `parent' here.
616 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
618 * culture-info-table.h : regenerated.
620 2005-07-06 Martin Baulig <martin@ximian.com>
623 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
625 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
627 2005-07-06 Martin Baulig <martin@ximian.com>
629 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
630 we're doing a signature-only comparision; fixes #74945.
632 2005-07-06 Martin Baulig <martin@ximian.com>
634 * class-internals.h (MonoGenericClass): Moved some things out into
635 a new `MonoInflatedGenericClass' type.
636 (MonoInflatedGenericClass): New type; the `klass' of a
637 `MonoGenericClass' is now computed lazyly in
638 mono_get_inflated_generic_class().
640 * class.c (mono_get_inflated_generic_class): New public function.
641 (mono_class_inflate_generic_method): Removed the unused
642 `MonoClass *' argument.
643 (setup_generic_vtable): Don't call mono_get_inflated_method() on
645 (mono_class_create_generic): Make this static and merge it with
646 mono_class_create_generic_2(); we're now called automatically from
647 mono_get_inflated_generic_class().
649 * loader.c (mono_method_signature): Call
650 mono_get_inflated_method() here.
652 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
654 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
655 type of fields with RVA.
657 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
658 for this pseudo class.
659 (my_mono_class_from_generic_parameter): Likewise.
660 (mono_class_init): Allow interfaces to have cctors.
662 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
664 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
665 lazily for AOT methods.
667 2005-07-05 Martin Baulig <martin@ximian.com>
669 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
670 returns FALSE for a successful match, not TRUE.
672 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
674 * loader.c (mono_method_get_index): Optimize this a bit.
676 2005-07-04 Martin Baulig <martin@ximian.com>
679 (class_compute_field_layout): Move the check for generic type
680 definitions into mono_class_layout_fields(). Fixes #74684.
681 (mono_class_from_generic_parameter): Correctly compute
682 `klass->parent'; fixes #75457.
684 * reflection.c (register_assembly, register_module): Make sure
685 `domain->rejobject_hash' is already created.
687 2005-07-02 Martin Baulig <martin@ximian.com>
690 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
691 `MonoDynamicGenericClass'.
693 2005-07-01 Lluis Sanchez <lluis@ximian.com>
695 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
696 returned by a field getter is null, since null is a valid value.
698 2005-07-01 Martin Baulig <martin@ximian.com>
700 * reflection.c (mono_reflection_generic_class_initialize): Update
701 the `dgclass->fields [i].parent' to the correct class.
702 (mono_image_get_fieldref_token): Use the declaring type, not the
705 2005-07-01 Martin Baulig <martin@ximian.com>
707 * loader.c (find_method): Also look in the interfaces; fixes #75429.
709 2005-06-30 Ben Maurer <bmaurer@ximian.com>
711 * threads.c (thread_cleanup): assert that thread != NULL
712 (wait_for_tids_or_state_change): We were using the wrong variable
713 when accessing wait->threads. `i' was always out of the bounds of
716 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
718 * loader.c: map user32 and kernel32 to libMonoSupportW
720 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
722 * appdomain.c (unload_thread_main): Mark this as WINAPI.
724 2005-06-28 Martin Baulig <martin@ximian.com>
726 * loader.c (method_from_methodspec): Fix #75334.
728 2005-06-28 Martin Baulig <martin@ximian.com>
730 Fix #74953 - Arrays now implement the generic IList<T> interface
733 * class-internals.h (MonoDefaults): Added `generic_array_class'.
735 * reflection.c (mono_class_bind_generic_parameters): New public
736 function; similar to mono_reflection_bind_generic_parameters(),
737 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
739 * domain.c (mono_init_internal): Try to initialize.
740 `mono_defaults.generic_array_class' here; this'll only succeed if
741 we're using the 2.0 corlib.
744 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
745 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
746 (mono_lookup_internal_call): Added support for nested classes.
749 (mono_get_method_from_token): Set `result->signature->pinvoke' if
750 we're an interncall and have generic arguments.
753 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
754 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
755 instance of System.Array.InternalArray<T> for arrays, so they
756 implement the generic IList<T> interface.
758 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
760 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
761 (chastamar@yahoo.com). Fixes #75374.
763 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
765 * culture-info-table.h: regenerated.
767 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
769 * icall.c: handle spaces correctly for base64 strings.
771 2005-06-26 Ben Maurer <bmaurer@ximian.com>
773 * *.c: Kill some warnings.
775 2005-06-23 Duncan Mak <duncan@novell.com>
777 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
778 that this builds on Solaris 10 (x86).
780 2005-06-23 Martin Baulig <martin@ximian.com>
783 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
784 generic type definitions.
786 2005-06-23 Martin Baulig <martin@ximian.com>
790 * metadata.c (mono_class_get_overrides): Renamed to
791 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
792 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
793 pass it to mono_get_method_full().
795 2005-06-22 Ben Maurer <bmaurer@ximian.com>
797 * reflection.c (mono_reflection_create_runtime_class): take the
798 mono_domain_lock in this method. Prevents deadlocks
800 2005-06-22 Martin Baulig <martin@ximian.com>
802 * loader.c (method_from_methodspec): Fix #75330.
804 2005-06-22 Martin Baulig <martin@ximian.com>
806 * reflection.c (type_get_qualified_name): Use
807 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
808 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
809 argument; use it if we don't have an assembly name.
811 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
813 * object.c: In mono_message_init, set "copy out" flag for in
814 parameters with the [Out] flag.
816 2005-06-21 Martin Baulig <martin@ximian.com>
819 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
822 2005-06-21 Martin Baulig <martin@ximian.com>
824 * class.c (mono_class_init): Don't initialize `class->fields' for
825 generic instances since they're initialized again in
826 compute_field_layout().
827 (compute_field_layout): Set the field's `generic_info' here; fix
830 2005-06-21 Martin Baulig <martin@ximian.com>
833 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
835 * metadata.c (mono_metadata_generic_method_equal): Also
836 distinguish the `generic_class'; fixes #75334.
838 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
842 * domain-internals.h:
843 * reflection.c: 'domain_assemblies' field is now protected by its own
844 lock. Don't call into managed code to run the AssemblyLoad event if we
845 now there are no registered delegates for it.
847 2005-06-20 Martin Baulig <martin@ximian.com>
849 * class.c (mono_class_is_assignable_from): Use a custom version of
850 mono_class_has_parent() to make things work for generic instances;
853 2005-06-20 Martin Baulig <martin@ximian.com>
855 * loader.c (method_from_methodspec): Apply a patch from
856 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
858 2005-06-20 Martin Baulig <martin@ximian.com>
860 * class.c (mono_class_init): Reverted Zoltan's last change; it
863 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
865 * threads.c (wait_for_tids_or_state_change): Add missing locking.
867 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
869 * socket-io.c: fix the index in the socket array for writable/error
870 sockets. Fixes bug #75306.
872 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
874 * class.c (mono_class_init): Allow interfaces to have static ctors.
876 2005-06-17 Martin Baulig <martin@ximian.com>
878 * loader.c (method_from_methodspec): Use `context->container' when
879 parsing the `gmethod->inst'.
881 2005-06-17 Martin Baulig <martin@ximian.com>
883 * class.c (mono_type_get_name_recurse): Don't add the assembly
884 name for type arguments.
886 2005-06-15 Martin Baulig <martin@ximian.com>
888 * reflection.c (mono_image_get_inflated_method_token): Encode
889 correct klass; fixes #75260.
891 2005-06-13 Michal Moskal <malekith@nemerle.org>
893 * icall.c: Make GetCorrespondingMethod/Constructor take
894 MonoReflectionMethod method not MonoMethod. Removed
895 MonoType.GetCorrespondingField, and make
896 MonoGenericType.GetCorrespondingField take name not
899 2005-06-13 Michal Moskal <malekith@nemerle.org>
901 * reflection.c (field_encode_signature, encode_locals):
902 Make sizes of buffers for types larger (for big generic types).
903 (create_generic_typespec,
904 mono_reflection_sighelper_get_signature_local,
905 mono_reflection_sighelper_get_signature_field):
906 Add asserts for too small buffers.
908 2005-06-15 Martin Baulig <martin@ximian.com>
910 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
911 if our parent is not a dynamic type.
913 2005-06-15 Martin Baulig <martin@ximian.com>
915 * class-internals.h (MonoTypeNameFormat): New enum.
918 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
919 (mono_type_get_full_name): Removed.
920 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
921 argument instead of the boolean's.
923 * icall.c (ves_icall_System_MonoType_getFullName):
924 Added `gboolean assembly_qualified'.
927 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
929 * reflection.c (mono_reflection_parse_type): Parse the new type
932 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
934 * icall.c: no need to convert from utf16 to utf8 and then back again
935 after the call to GetLogicalDrives.
937 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
939 * icall.c: frombase64. Fix problems exposed by new tests.
941 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
943 * icall.c: added internal calls for converting char [] and strings in
946 2005-06-10 Martin Baulig <martin@ximian.com>
948 * class.c (mono_class_create_generic_2): Read the nested classes
949 from the metadata rather than from `gklass->nested_classes' since
950 `gklass' might not be initialized yet.
952 2005-06-09 Duncan Mak <duncan@novell.com>
954 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
955 all public headers. Fixes #74919.
957 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
959 * domain.c: The key for proxy_vtable_hash is now a pointer
960 array. Added new GHashFunc and GCompareFunc functions for this.
962 * class.h: The list of interfaces in MonoRemoteClass is known in
963 advance and can't grow (we create a new MonoRemoteClass if needed),
964 so now the interface array can be allocated together with
967 * object.c: Added a new method create_remote_class_key.
968 Fixed mono_remote_class so it does not depend on
969 mono_upgrade_remote_class.
970 Removed extend_interface_array.
971 Added new method clone_remote_class(), which makes a copy of a remote
972 class and adds a new interface or class to it.
973 mono_upgrade_remote_class() now creates a new remote class (or gets
974 it from the cache) if an vtable upgrade is needed. In this way
975 we make sure that other objects sharing the same remote class
976 don't get the new vtable with unwanted interfaces.
978 * object-internals.h:
979 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
981 * marshal.c: Track changes in mono_upgrade_remote_class().
983 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
984 * icall.c: Add runtime methods for obtaining members of inflated
985 class, which were created from supplied non-inflated members. It
986 is used in internal Get{Method,Constructor,Field} methods in
989 2005-06-09 Martin Baulig <martin@ximian.com>
992 (mono_reflection_bind_generic_method_parameters): Fix #75169.
994 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
995 * reflection.c (mono_image_basic_init): Define
996 Version in MonoDynamicAssembly.
998 2005-06-08 Martin Baulig <martin@ximian.com>
1003 (mono_method_signature_full): New public method; takes a
1004 `MonoGenericContext *'.
1005 (find_method): Use mono_method_signature_full() and pass the
1006 klass'es context to it.
1008 * class.c (mono_class_is_inflated_method): Use
1009 mono_method_signature_full() and pass the context to it.
1011 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
1013 * object.c: add proper locking in mono_remote_class_vtable(),
1014 fixes possible memory corruption.
1016 2005-06-08 Michael Meeks <michael.meeks@novell.com>
1018 * marshal.c (mono_remoting_marshal_init): set
1019 initialized after initialization.
1021 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
1025 2005-06-06 Michael Meeks <michael.meeks@novell.com>
1027 * object.c (extend_interface_array): fix really silly
1028 memory corrupting / comparison bug.
1030 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1032 * reflection.c: Functions added to support the creation
1033 of CustomAttributeData, which includes Attribute data
1034 used by ReflectionOnly methods.
1036 * reflection.h: mono_reflection_get_custom_attrs_data and
1037 mono_custom_attrs_data_construct added (functions exposed).
1039 * icall.c: Added mono_reflection_get_custom_attrs_data
1042 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
1044 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
1047 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
1049 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
1051 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
1052 dynamic DllImportAttribute.
1054 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
1055 dynamic DllImportAttribute.
1057 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
1060 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1062 * threads.c: avoid segfault when an unstarted thread is aborted.
1064 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
1066 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
1067 Returns the name and version of the runtime for reporting.
1069 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1071 * appdomain.c: bump corlib version.
1072 * object-internals.h: new field in MonoReflectionAssembly.
1074 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1076 * object-internals.h: Carlos forgot to add this field.
1078 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
1080 * icall.c: Added create_version to create instances
1081 of Version of MonoReflectionAssemblyName. This change helps
1082 the AssemblyName tests to keep running fine.
1084 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
1086 * object.c (mono_method_return_message_restore): A somehow less
1087 intrusive fix for #75138.
1089 2005-06-03 Raja R Harinath <rharinath@novell.com>
1091 * object.c (mono_method_return_message_restore): Fix computation
1092 of expected number of out args.
1094 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
1096 * reflection.c (mono_image_get_method_info): Fix the case when the
1099 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
1101 * object.c: Added missing null check in
1102 mono_method_return_message_restore.
1104 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
1106 * reflection.c (mono_image_get_method_info): Handle the case when
1109 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
1111 * object.c: When creating the vtable for a proxy, take into account
1112 all inherited interfaces, not only the ones registered in
1113 iclass->interfaces. This fixs bug #74996.
1114 Also, in mono_method_return_message_restore, verify that the array
1115 of out args has the expected lengh.
1117 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1119 * socket-io.c: update the timeout in Poll when the call is interrupte.
1121 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1123 * socket-io.c: support abort/suspend in Select_internal after last
1126 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1128 * threadpool.c: remove warning.
1130 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1133 * socket-io.[ch]: Select_internal uses poll() now when available, thus
1134 removing the 1024 limit from select(). Runtime part of the fix for
1137 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1139 * socket-io.c: when resolving the addresses for the same
1140 host returned by gethostname(), get the local IPs from the interface
1141 list. Loopback addresses are discarded if the are interfaces up with
1142 non-loopback ones. Fixes bug #63265.
1144 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
1146 * appdomain.c, verify.c, object-internals.h, reflection.c:
1147 bumped corlib number to 36, and added new extra_flags field
1148 to ReflectionMethodBuilder and friends. Fixes #75060.
1150 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
1152 * gc.c: register a new weak link only if the object is non-null
1155 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
1157 * culture-info.h : short time pattern too.
1159 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
1161 * culture-info.h : expand long time pattern string length.
1163 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
1165 * culture-info-table.h : update (more French date format; #72788).
1167 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
1169 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
1170 the method is static. Fixes #75029.
1172 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
1174 * reflection.c: Update the table_idx field of method builders after
1175 saving the module, since it can change. This is a workaround for
1178 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
1180 * culture-info-table.h : update (additional French date format).
1182 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
1184 * icall.c (ves_icall_type_Equals): Revert last change.
1186 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
1188 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
1190 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
1192 * class-internals.h: Added executioncontext_class field to
1193 MonoDefaults structure.
1194 * domain.c: Cache System.Threading.ExecutionContext class in
1196 * object.c: Capture the ExecutionContext for asynchroneous calls in
1197 mono_async_result_new.
1198 * object-internals.h: Added execution_context and original_context
1199 fields to MonoAsyncResult. Added execution_context to MonoThread.
1200 * security-manager.c|.h: Added mono_get_context_capture_method to
1201 return the capture method (if required by the security manager or by
1202 the framework version used).
1203 * threadpool.c: Apply capture (if present) ExecutionContext in
1204 mono_async_invoke and revert to original context after it completes.
1206 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
1208 * culture-info-table.h : updated (real hacky solution for zh-CHT).
1210 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
1212 * culture-info-table.h : zh-CHT related workaround.
1214 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
1216 * marshal.c (emit_marshal_custom): Add some error checking and call the
1217 methods in the ICustomMarshaler interface. Fixes #74875.
1219 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
1220 native->managed wrappers.
1222 2005-05-12 Martin Baulig <martin@ximian.com>
1224 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
1225 here and use the loader lock.
1227 * mono-debug.c: Properly lock when the debugger is not attached.
1228 (mono_debug_init): Release the initial lock if we're not running
1231 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
1233 * marshal.c (emit_marshal_custom): Pass through NULL values without
1234 calling the custom marshalling routines.
1236 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
1237 conversion in structures. Fixes #74882.
1239 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
1241 * culture-info-table.h : zh-* cultures were missing.
1243 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
1245 * threads.c: Added a new event background_change_event which is signaled
1246 when a thread changes its background mode.
1247 Moved here several checks previously done in managed code. The checks
1248 require the thread lock, and using the thread lock in managed code
1249 can result in deadlocks.
1250 Merged Start_internal and Thread_internal into a single method. Now
1251 Thread_internal does all work of creating and starting a thread.
1252 Added icalls for setting and getting the state of the object. Moved from
1253 managed code to avoid locking there.
1254 Added wait_for_tids_or_state_change() which is called instad of
1255 wait_for_tids when waiting for non-backround threads to end. This method
1256 will return if one of the threads ends or the background_change_event
1258 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
1259 the background mode. This method signals the background_change_event
1262 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
1263 removed Start_internal.
1265 2005-05-11 Martin Baulig <martin@ximian.com>
1267 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
1268 to order of some fields to get proper alignment on 64-bit machines.
1270 2005-05-11 Martin Baulig <martin@ximian.com>
1272 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
1273 changes as they're broken and completely fuck up the debugger.
1275 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
1277 2005-05-10 Martin Baulig <martin@ximian.com>
1279 * reflection.c (mono_reflection_generic_class_initialize): Don't
1280 call mono_class_setup_parent() here.
1282 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1284 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
1285 send/receive timeout use an integer in milliseconds. We were using a
1288 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1291 (internal_get_cultures): reserve the first slot of the array for the
1292 InvariantCulture, which will be filled in managed code.
1294 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
1296 * reflection.c (mono_image_fill_module_table): Initialize the
1297 GENERATION field as well.
1299 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1301 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
1302 Monitor.Enter on the object.
1304 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
1306 * threads.c: Enable the wait for running threads when exiting.
1307 * icall.c: Suspend all threads before exiting.
1309 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
1311 * assembly.c (mono_assembly_load_reference): Fix warning.
1313 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1315 * threadpool.c: changed the default number of threads per cpu. From now
1316 on, the default will be 20 + (5 * number of cpus) instead of 50.
1318 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
1320 * loader.c (mono_method_get_signature_full): Add locking here.
1322 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
1324 * appdomain.c: Moved methods for parsing and freeing assembly
1325 names to assembly.c.
1326 * assembly.c, domain-internals.h: Created public methods for parsing
1327 assembly names. Fixed mono_assembly_load_with_partial_name:
1328 it now finds the best match, taking into account the version,
1329 token and culture specified in the partial name. Also return
1330 the latest version if no version information is specified.
1332 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
1334 * threadpool.c: replace check for SocketAsyncCall class.
1336 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1338 * threadpool-internals.h:
1339 * Makefile.am: added threadpool-internals.h
1341 * threadpool.c: call mono_unhandled_exception on exceptions not handled
1342 that happen in threadpool threads (tested on MS).
1343 (mono_thread_pool_remove_socket): new function that dispatch any pending
1344 AIO call on a socket that is closing. By now only epoll really needs it,
1345 as select/poll wake up when the socket closes.
1348 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
1350 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
1352 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
1354 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
1356 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
1358 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
1360 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
1361 has an abort request, convert it into a suspend request.
1363 2005-04-30 Ben Maurer <bmaurer@ximian.com>
1365 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
1366 warning for the usage of `UnmanagedFunctionPointerAttribute' which
1367 is not supported yet.
1369 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1371 * image.c: register assemblies loaded from data (bundles) in the loaded
1372 assemblies hash. Fixes bug #74772.
1374 2005-04-29 Martin Baulig <martin@ximian.com>
1376 * class.c (mono_type_get_name_recurse): Update to the new naming
1377 schema from the latest .NET 2.x beta2.
1378 (mono_class_setup_vtable_general): If we're a generic instance,
1379 copy the vtable from our generic type definition and inflate all
1382 * loader.c (find_method): Update to the new naming schema from the
1383 latest .NET 2.x beta2.
1385 2005-04-29 Raja R Harinath <harinath@gmail.com>
1387 * class.c (mono_class_init): Add a mono_loader_unlock to the
1390 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
1392 * icall.c (ves_icall_System_Environment_Exit): Remove the
1393 suspend_all_other_threads () call for the time being, since it can hang.
1395 * threads.c (mono_thread_manage): Similarly, disable the waiting for
1396 the background threads to exit, since it can also hang.
1398 * class.c (mono_class_init): Applied patch from Ankit Jain
1399 (radical@gmail.com). Avoid pending init errors when a field refers
1400 to a nested class using a typeref. Fixes #74734.
1402 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
1403 this for dynamic modules.
1405 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1407 * threads.c: don't wait for threads that are in the process of aborting
1408 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
1409 and waiting for background threads to finish. This makes xsp and
1410 mod-mono-server exit without random length delays and/or hangs.
1412 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1414 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
1416 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
1418 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
1419 dynamic types to prevent infinite loops. Fixes #74727.
1421 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
1422 ..._is_assignable_to.
1424 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
1426 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
1428 2005-04-25 Martin Baulig <martin@ximian.com>
1430 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
1433 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
1435 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
1437 * reflection.c (build_compressed_metadata): Set metadata header
1440 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
1442 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
1443 number into an integral and a decimal part. Fixes #70473.
1445 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
1447 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
1449 * culture-info-table.h : reflected the latest locale-builder output.
1451 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1453 * threadpool.c: check for SuspendRequested too when deciding if
1454 mono_thread_interruption_checkpoint should be called.
1456 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1458 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
1459 * threads.c: remove interruption_mutex and use Interlocked instead. When
1460 suspending all the threads, wait for all the suspended events at once.
1461 If we're shutting down and get an APC that is going to be queued,
1462 call mono_thread_execute_interruption immediately, as the thread might
1463 be sleeping on a pthread condition or mutex.
1465 * icall.c: call mono_runtime_set_shutting_down before suspending the
1468 Fixes bug #74693. And now xsp is happier when exiting.
1470 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
1472 * loader.c (mono_stack_walk): Fix #74690.
1474 2005-04-22 Martin Baulig <martin@ximian.com>
1476 * mono-debug.h (MonoDebugMethodJitInfo): Added
1477 `MonoDebugMethodJitInfo *jit'.
1479 * mono-debug.c (mono_debug_read_method): Cache the
1480 MonoDebugMethodJitInfo in `address->jit'.
1481 (mono_debug_free_method_jit_info): New public method.
1483 2005-04-22 Martin Baulig <martin@ximian.com>
1485 * class.c (mono_class_is_assignable_from): Disallow
1486 type parameter -> interface.
1488 2005-04-21 Dick Porter <dick@ximian.com>
1490 * threads.c (mono_thread_create): Turn an assertion into an error.
1492 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
1494 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
1496 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
1497 Fix some gcc 4.0 warnings.
1499 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
1501 * file-io.c: fix alt dir separator char on unix systems
1502 and cleanup (fixes bug #71214).
1504 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
1506 * marshal.c: Use CALLVIRT instead of CALL when dispatching
1507 a call to a remote domain, since the method may be an
1508 interface method in the client domain. This fixes bug #74192.
1510 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1512 * threadpool.c: recv/send are now performed before going back to managed
1513 code to save one transition.
1515 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1517 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
1519 * metadata/threadpool.c: removed hack to workaround the bug above.
1523 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
1525 * reflection.c reflection.h: Fix handling of parameter defaults in
1526 dynamic methods. Also fixes handling of parameter attributes.
1529 * mono-debug.c (mono_debug_close_image): Fix warning.
1531 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1533 * socket-io.h: replaced old unused field with new 'blocking'.
1534 * threadpool.c: restore socket blocking state on windows(tm).
1536 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
1538 * icall.c: don't return the codebase in the AssemblyName[] returned by
1539 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
1540 * object-internals.h: Removed FIXME (fields were presents) and fixed
1541 versioncompat declaration.
1543 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1545 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
1546 not closed, so don't cleanup when it happens.
1548 2005-04-13 Chris Toshok <toshok@ximian.com>
1550 * mono-debug-debugger.h: change prototype for
1551 mono_debugger_lookup_type.
1553 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
1554 this function, although it should probably be named
1555 mono_debugger_init_type.
1557 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1559 * threadpool.c: fix non-AIO case.
1561 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
1563 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
1564 the built-in profiler to measure just JIT compilation times.
1566 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1568 * threadpool.c: the epollfd might be closed by another thread at
1569 any time, so ignore EBADF at treat it as a "we're closing" sign.
1571 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1573 * threadpool.c: release the semaphores with a count equals to the number
1574 of working threads in both IO and regular pools. Fixed typo that messed
1575 up the count of IO pool threads. Don't initialize the pipe handles if
1578 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1580 * threadpool.c: some systems don't like a NULL when deleting the socket
1583 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1585 * threadpool.c: fix semaphore allocation.
1587 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1589 * threadpool.c: added epoll() based implementation for asynchronous IO
1590 that is used instead of the default poll() when available.
1591 It can be disabled by setting MONO_DISABLE_AIO.
1593 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1595 * threadpool.c: windows needs 'closesocket' and instead of returning
1596 0 when the stream is closed while in select, it returns -1. Fixes bug
1599 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
1601 * class.c (class_compute_field_layout): Fix the regression caused by
1604 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1606 * threadpool.c: separate pool for socket async. IO.
1607 * threadpool.h: mono_max_worker_threads is not a global any more.
1609 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
1611 * class.c (class_compute_field_layout): Fix #74549.
1613 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1615 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
1616 use 2 connected sockets instead.
1618 2005-04-08 Miguel de Icaza <miguel@novell.com>
1620 * mono-config.c: Add new entry point for mkbundle
1621 mono_config_parse_memory.
1623 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1625 * threadpool.c: removed another unused function.
1627 2005-04-08 Ankit Jain <radical@corewars.org>
1629 * reflection.c (get_default_param_value_blobs): Add 'types'
1630 parameter to get the types encoded in the constant table.
1631 (mono_param_get_objects): Use the type from the constant table,
1632 not the type of the parameter, when creating default values.
1633 Handle null default values correctly.
1635 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1642 * socket-io.c: removed dead code for async IO.
1644 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1646 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
1648 * threadpool.c: intercept socket async. calls and pass them to a thread
1649 that is polling and dispatching the job items to the threadpool as
1650 socket become ready. Fixes bugs #71217, #71933.
1652 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
1653 between char and short/ushort arrays.
1655 * socket-io.c: remove dead code.
1657 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
1660 icall.c : removed InternalToUpper_Comp() and
1661 InternalToLower_Comp().
1663 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
1665 * char-conversions.h : The tables were incorrectly generated. Should
1666 be generated against invariant culture.
1668 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
1670 * object.c (mono_runtime_invoke_array): Fix return value when
1671 passing pre-created valuetype objects to ctors.
1673 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
1674 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
1677 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
1679 * domain.c: removed g_assert for runtimesecurityframe_class. This is
1680 only used with --security and hides the wrong corlib version error.
1682 2005-03-30 Joshua Tauberer <tauberer@for.net>
1684 * class.c: Changed mono_class_name_from_token so that types
1685 outside of a namespace don't have an initial period. Improved
1686 the g_warning message used in _mono_class_get when loading
1688 * assembly.c: In mono_assembly_load_reference, when an assembly
1689 can't be found, "No such file or directory" is misleading and
1690 unhelpful because a few paths were checked for the presence of
1691 the assembly. When that happens (ENOENT), display a nicer
1692 message indicating the directories that were searched. In all
1693 cases, the warning is made easier to read for non-hackers.
1695 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
1697 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
1699 * appdomain.h|domain.c: Removed inline from functions.
1700 * appdomain.c: Reduced warnings when compiling on windows.
1701 * icall.c: Fixed output_debug declaration to gunichar2*.
1702 * mono-config.c: Reduced warnings when compiling on windows.
1703 * rand.c: Added missing "windows.h". Added missing return value.
1704 * rawbuffer.c: Added missing winsock2.h for windows.
1705 * sysmath.h: Added mono-compiler.h header to allow/ease
1706 compilation with non-GCC compilers.
1707 * threads.c: Fixed declarations to compile with VS.NET C compiler.
1708 Removed cast warnings.
1710 Adapted from the work of J Lothian (for VC6).
1712 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
1714 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
1717 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
1719 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
1722 2005-03-27 Raja R Harinath <harinath@gmail.com>
1724 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
1725 has to be in $(exec_prefix). $(prefix) is for arch-independent
1726 stuff, and it would probably use $(prefix)/share rather than
1729 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1731 * console-io.c: added 2 includes that might be missing.
1733 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
1735 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
1738 * reflection.c (create_custom_attr): Allocate the params array using
1739 alloca so it gets GC tracking.
1741 2005-03-23 Chris Toshok <toshok@ximian.com>
1743 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
1746 2005-03-24 Raja R Harinath <rharinath@novell.com>
1748 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
1749 changes to pick up any changes in prefix, etc.
1751 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
1753 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
1755 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
1756 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
1758 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
1760 * class-internals.h object-internals.h class.c reflection.c: Extend the
1761 mono_lookup_dynamic_token () function to return the class of the
1764 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
1767 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
1769 * security-manager.c: Skip inheritance checks for intra-corlib
1770 class inheritance and method overrides. This skips a lot of checks
1771 and (anyway) permissions cannot work until corlib is loaded.
1773 2005-03-23 Martin Baulig <martin@ximian.com>
1775 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
1776 MONO_TYPE_GENERICINST.
1778 2005-03-23 Martin Baulig <martin@ximian.com>
1780 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
1782 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
1784 * class.c: added locking comments to some functions.
1785 Cache the interface offsets arrays (saves about 20 KB
1786 of runtime memory in a typical app).
1787 Reduce the time overhead in mono_class_setup_supertypes ().
1789 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
1791 * icall.c: speedup and fix leaks in GetMethodsByName and
1792 GetPropertiesByName.
1794 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
1796 * reflection.c: some locking fixes.
1798 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
1800 * metadata.c: added missing break in case statement.
1802 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
1804 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
1805 typedbyref return values. Fixes #73941.
1807 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
1809 * security-manager.c|h: Added demandunmanaged method and
1810 suppressunmanagedcodesecurity class to MonoSecurityManager.
1811 Renamed aptc class to allowpartiallytrustedcallers.
1813 2005-03-17 Martin Baulig <martin@ximian.com>
1815 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
1817 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1819 * file-io.c: disabled file async. IO using aio_*. It uses the
1820 threadpool now. Workaround for bug #73718.
1822 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
1824 * assembly.h, mono-config.c: added code to deal with bundled configs
1825 for bundled assemblies.
1827 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
1829 * *.c, private.h: cleanup, removing old private.h header file.
1831 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
1833 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
1834 and throw_on_unmappable_char attributes.
1836 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
1838 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
1839 _ProcessName_internal.
1841 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
1843 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
1846 * icall.c threads.c threads-types.h: Remove slothash icalls as they
1849 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
1851 * object.c (compute_class_bitmap): Add support for generics. Fixes
1854 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
1856 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
1858 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1860 * filewatcher.c: commented out the code for windows watcher, as we don't
1861 use it (we use the managed implementation instead).
1863 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
1865 * object-internals.h (MonoThread): Remove 'unused1' field.
1867 * appdomain.c: Bump corlib version.
1869 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
1871 * reflection.c (mono_reflection_create_runtime_class): Remove the
1872 AssemblyBuilder.Save optimization since it causes too many problems.
1874 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
1876 * exception.c|h: Added mono_get_exception_reflection_type_load to
1877 create a ReflectionTypeLoadException object.
1878 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
1879 to return NULL is a InheritanceDemand fails during reflection. Updated
1880 ves_icall_System_Reflection_Assembly_GetTypes to throw a
1881 ReflectionTypeLoadException if an InheritanceDemand fails during
1882 reflection. Added icall mapping for GetLinkDemandSecurity.
1883 * security-manager.c|h: Added ves_icall_System_Security_
1884 SecurityManager_GetLinkDemandSecurity internal call to return the
1885 class and methods permissions set for a LinkDemand. Removed unused
1886 fields in MonoSecurityManager.
1888 2005-03-10 Martin Baulig <martin@ximian.com>
1890 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
1891 it's a generic instance.
1893 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
1895 * reflection.c (mono_get_object_from_blob): Applied patch from
1896 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
1898 * class.c (mono_class_is_assignable_from): Another try at fixing
1899 #73469 without breaking anything.
1901 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
1903 * class.c: (mono_class_is_assignable_from): Revert the last changes
1904 since they don't work with generics.
1906 * class.c (mono_class_is_assignable_from): Fix build bustage.
1908 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
1909 the managed IsAssignableFrom method. Fixes #73469.
1911 * reflection.c (mono_reflection_call_is_assignable_from): New helper
1914 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
1916 * object.c (mono_load_remote_field_new): Fix returning uninitialized
1917 memory when the remoting callback does not sets the out arguments.
1920 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
1923 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
1925 * object-internals.h (MonoStackFrame): Sync with managed object layout.
1927 * appdomain.c: Bump corlib version.
1929 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
1931 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
1934 * threads.c (mono_thread_attach): Detect threads which are not started
1935 by the GC pthread wrappers.
1937 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
1939 * icall.c: Added new icall for RNG.
1940 * rand.c|h: Added new icall to open the RNG. This allows to share a
1941 single handle on Linux to access /dev/urandom and fix #73183.
1943 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
1945 * object.c: setting the new vtable in a transparent proxy object must
1946 not change the GC descriptor.
1948 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
1950 * object.c: fixed compilation without GCJ support.
1951 * reflection.c: for runtime-created types ensure klass->has_references
1952 is correct (bug #73215).
1954 2005-03-02 Martin Baulig <martin@ximian.com>
1956 * class.c (mono_class_is_assignable_from): Make this work if
1957 `oklass' is a generic instance; fixes #72831.
1959 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
1961 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
1964 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
1966 * marshal.c: Reorganize native->managed marshalling code to also use
1967 the emit_marshal_... functions.
1969 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
1971 * object.c: typed allocs have issues with bitmap sizes > 30,
1972 so check for max_set >= 30.
1974 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
1976 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
1977 managed code. Fixes #73012.
1979 * metadata.h (MonoMarshalSpec): Add elem_mult field.
1981 * metadata.c reflection.c: Load/Emit elem_mult as well.
1983 * metadata.h (MonoMarshalSpec): Add comment.
1985 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
1987 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
1988 num_elem to -1 if not given.
1990 * object-internals.h (MonoReflectionMarshal): Add has_size field.
1992 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
1995 2005-03-01 Marek Safar <marek.safar@seznam.cz>
1997 * null-gc.c (mono_gc_free_fixed): Was not compilable.
1999 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
2001 * reflection.c (encode_marshal_blob): Encode param_num field as well.
2003 * object-internals.h (MonoReflectionMarshal): Add param_num field.
2005 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2007 * object.c: generalized the reference bitmap creation
2008 and added hooks for the new GC.
2009 * class-internals.c: removed the gc_bitmap field from MonoClass.
2011 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2013 * domain.c: help the compiler to produce better code
2014 in mono_jit_info_table_find ().
2016 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2018 * object.c: make all allocations look typed.
2020 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2022 * socket-io.c: load Mono.Posix if it's not loaded already
2025 2005-02-24 Martin Baulig <martin@ximian.com>
2027 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
2028 * reflection.c (dup_type): Likewise.
2030 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
2032 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
2033 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
2035 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2037 * domain.c, threads.c, object-internals.h: make the critical thread
2038 local vars use the fast access mode (even when we're compiled in
2039 a lib). Provide accessors to be used by the jit during codegen.
2041 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2043 * appdomain.c: Changed hook functios behavior to include
2044 support for the reflection only assemblies. Some icalls were changed
2045 to support the mentioned assemblies too. Signatures of static methods
2046 try_assembly_resolve and real_load now have an additional parameter:
2049 * assembly.c: General changes to mono_assembly_ methods to support
2050 reflection only api. Functions mono_assembly_open, mono_assembly_load,
2051 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
2052 suffix, to support an additional gbool parameter to specify whether
2053 the assembli is reflection only or not. Created some new hook functions
2054 to add support for reflection only assemblies. Signatures of static
2055 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
2056 have now an additional parameter: refonly.
2058 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
2059 indicating whether the assembly is reflection only or not.
2061 * exception.c: Add mono_get_exception_invalid_operation.
2063 * icall.c: Throw an InvalidOperationException when trying to invoke
2064 a property/method/event, or trying to set/get the value of a field.
2065 Also add an icall to retrieve the ref_only flag to the
2066 MonoReflectionAssembly.
2068 2005-02-23 Chris Toshok <toshok@ximian.com>
2070 Part of fix for #72827.
2071 * mono-debug.c (mono_debug_add_method): add lexical block data to
2072 the info we write. Kind of a hack at the moment - we copy the
2073 lexical block info from the MonoDebugMethodInfo to the
2074 MonoDebugMethodJitInfo here, before writing it.
2075 (mono_debug_read_method): read the lexical block info.
2077 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
2079 * debug-mono-symfile.h: add lexical block support.
2081 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
2084 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
2086 * loader.c (mono_lookup_pinvoke_call): Fix warning.
2088 * object.c (mono_runtime_free_method): Call mono_free_method () and
2089 put the TODOs there.
2091 * loader.c (mono_free_method): Free up most memory allocated for
2094 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
2096 * reflection.c: properly flag a Type argument to a
2097 named custom attr value (bug #72248).
2099 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2101 * reflection.c: reduce code duplication in named custom
2104 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
2106 * reflection.c: properly encode custom attrs of type object
2109 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
2111 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
2113 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
2115 * socket-io.c: load System.dll if it's not loaded already
2116 (bug #72850 and #70477).
2118 2005-02-21 Martin Baulig <martin@ximian.com>
2120 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
2123 2005-02-21 Martin Baulig <martin@ximian.com>
2125 * reflection.c (mono_image_build_metadata): We also need to
2126 "fixup" the MethodImpl table after we computed the final method
2127 indices. Call fixup_methodimpl() to do that.
2128 (fixup_methodimpl): New private method.
2130 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
2132 * assembly.c: special case mscorlib.dll (bug#72536),
2133 patch from Carlos Alberto Cortez.
2135 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
2137 * threads-types.h threads.c: Fix build bustage.
2139 * threads.c: Use a union for long<->double conversions.
2141 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
2142 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
2144 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
2145 containing the checkpoint call with NOT_TAKEN.
2147 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
2148 checkpoint before pushing the arguments, so they won't have to be
2151 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2153 * domain.c, assembly.c, domain-internals.h: make some data
2154 const and relocation-free.
2156 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
2158 * object.c, appdomain.c, class-internals.h: introduce the
2159 MonoClassRuntimeInfo structure to hold the info needed to
2160 use a class at runtime. Made mono_class_vtable() lock-free
2161 for all the appdomains.
2163 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
2165 * metadata-internals.h, image.c: introduce a per-image mempool to
2166 be used for memory that has the same lifetime as the image.
2168 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
2170 * domain.c: In mono_init_internal(), instead of selecting the first
2171 runtime version supported by an executable, get a list of all
2172 supported versions and select the one for which an mscorlib exists
2173 (since even if the runtime supports a given version, it doesn't mean
2174 that the framework for that version is installed).
2175 Modified get_runtimes_from_exe to support this behavior.
2176 In supported_runtimes, added information about additional system
2179 * assembly.c: Added support for more than one system assembly version
2180 per runtime version. Updated the assembly list.
2181 In mono_assembly_remap_version, removed the initial version check,
2182 since we don't know to which version we need to compare until we
2183 get the version set on which the assembly is based.
2184 Moved the code for loading corlib into the new method
2185 mono_assembly_load_corlib(), so it can be used by the initialization
2188 * domain-internals.h: Updated data structures and added declaration
2189 for mono_assembly_load_corlib.
2191 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
2193 * reflection.c (resolve_object): Fix the creation of the signature in
2194 the SignatureHelper case.
2196 * assembly.c (mono_assembly_remap_version): Fix binary search.
2198 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
2200 * class.c: Added inheritance check when a method is overloaded (from a
2201 virtual method or when implementing an interface) and when a class is
2202 inherited. Added functions to set a failure for a class and to
2203 retreive the exception from a failure.
2204 * class-internals.h: Added fields to MonoClass to keep the exception
2205 information status for inheritance (or other exceptions) to be thrown
2206 later (i.e. not at load time).
2207 * object.c: Throw the inheritance SecurityException when a type is to
2208 be created with either class or method inheritance violations.
2209 * reflection.c|h: Fix when getting declsec from a class. Removed
2210 unrequired code for class. Improved sanity in parameter naming.
2211 * security-manager.c|h: Added functions to check for class and method
2214 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
2216 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
2217 and has_finalize in dynamic types as well.
2219 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
2221 * culture-info-table.h : fixed currency format for en-GB (and so on).
2223 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
2225 * gc.c: ensure the GC handles never have 0 as a value.
2227 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
2229 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
2230 a pointer to a struct to unmanaged code. Fixes #72625.
2232 2005-02-16 Martin Baulig <martin@ximian.com>
2234 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
2236 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
2238 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
2240 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
2242 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
2244 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
2245 UnmanagedFunctionPointerAttribute, use it for determining calling convention
2248 * reflection.c (mono_custom_attrs_get_attr): New helper function.
2250 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
2252 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
2254 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
2255 changes to make the current context a field in MonoThread.
2257 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
2259 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
2262 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
2263 extracted from mono_marshal_get_native_wrapper.
2265 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
2266 to create wrappers around native functions.
2268 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
2269 delegates for arbitrary function pointers. Fixes #71472.
2271 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2273 * threads.c: cleaned up the code a little.
2275 2005-02-15 Martin Baulig <martin@ximian.com>
2277 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
2280 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
2281 allocate larger chunks if needed.
2283 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
2285 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
2288 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
2290 * domain.c: keep the domains in an array and ensure the domain ids
2291 are kept small, so they can be used as indexes to domain-specific data
2292 with a small memory overhead.
2294 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
2296 * icall.c: Handle byref types in Type icalls. Fixes #72544.
2298 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
2300 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
2302 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
2304 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
2306 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
2309 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
2311 2005-02-12 Ben Maurer <bmaurer@ximian.com>
2313 * domain-internals.h: add the hashtable here.
2315 * class-internals.h: Remove `info' from MonoMethod
2317 * domain.c: Add a new hashtable, jit_trampoline_hash
2319 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
2321 * object.c: don't set the value of static fields
2324 2005-02-11 Martin Baulig <martin@ximian.com>
2326 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
2327 (mono_debug_add_method): Silently ignore the method if it's too big.
2328 (mono_debug_add_type): Likewise.
2330 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
2332 * threads.c, appdomain.c: remove #ifdefs from the code.
2334 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
2336 * metadata-internals.h: Added flags to MonoAssembly to cache the most
2337 common security informations. This allows us to stay in unmanaged code
2338 when doing LinkDemand and it's special cases (except for the first
2339 time for initialization). The flags a very much used with --security.
2340 * reflection.c|h: Added code to get declarative security attributes
2341 for LinkDemand and InheritanceDemand. This required to refactor the
2342 existing code for Demand.
2343 * security-manager.c|h: Added new method fields for the special cases
2346 2005-02-10 Martin Baulig <martin@ximian.com>
2348 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
2349 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
2351 2005-02-10 Martin Baulig <martin@ximian.com>
2353 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
2354 debugging code; this is almost a complete rewrite.
2356 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
2358 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2360 * domain.c, object.h: expose mono_string_equal () and
2361 mono_string_hash ().
2362 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
2363 it's implemented in managed code.
2365 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2367 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
2368 lo leak objects between appdomains.
2370 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2372 * assembly.c: old compilers compilation fix from
2373 robertj@gmx.net (Robert Jordan).
2375 2005-02-09 Ben Maurer <bmaurer@ximian.com>
2377 * class-internals.h: Little reminder for the future.
2379 * debug-helpers.c: Fix up wrapper_type_names
2381 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2383 * image.c, metadata-internals.h: when loading an image from a file,
2384 mmap all of it and use the same codepaths as when using a
2385 in-memory image: the code is simpler and we use less memory
2386 (both writable and readonly).
2388 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2390 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
2391 API to alloc runtime data structures that need to be tracked by the
2392 GC and contain pointers.
2393 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
2394 make the code more readable and eventually use a different GC.
2396 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
2398 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
2401 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
2403 * object.c: In release_type_locks(), don't release the cctor lock
2404 if it has already been released. This fixes a crash in the
2407 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2409 * gc.c, marshal.c, icall.c: register a delegate for finalization
2410 only when the native function pointer has been allocated for it.
2412 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2414 * object.c: cleaned up some code, allocate objects that are
2415 pointer free with the atomic malloc variant. Allocate memory
2416 for static data from the mempool if it's pointer-free.
2417 Allocate the bounds array at the end of the array data, when needed.
2418 * object-internals.h, object.h: move a private function in a private
2420 * class.c: handle missing case in tracking references in fields.
2422 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
2424 * class.c, class-internals.h: keep track if a type has
2425 reference fields in either the instance or static fields.
2427 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
2429 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
2430 and renamed to MonoRuntimeInfo. Added fields to store the expected
2431 framework assembly version. Changed mono_get_framework_version and
2432 mono_get_runtime_version for a single mono_get_runtime_info method.
2434 * assembly.c: Added method to remap system assembly versions to the
2435 current executing runtime version. Removed old mapping code.
2436 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
2438 * icall.c, reflection.c: Track api changes.
2440 2005-02-06 Miguel de Icaza <miguel@novell.com>
2442 * loader.c (method_from_memberref): Improve error reporting,
2443 produce the class name instead of the typeref/typedef index.
2445 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
2447 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
2449 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
2451 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
2452 stdcall and charset name mangling. Reorganize the code and add
2455 2005-02-05 Ben Maurer <bmaurer@ximian.com>
2457 * monodiet.c: More iters!
2459 * marshal.c: Iter usage.
2461 * icall.c: Iter usage.
2463 * object.c: Use iters.
2465 * debug-helpers.c: More iters
2467 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
2469 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
2472 2005-02-05 Ben Maurer <bmaurer@ximian.com>
2474 * mono-debug-debugger.c: use iters
2476 * class.c, class-internals.h: mono_class_setup_events is static
2479 * All callers: use iters
2481 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
2483 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
2484 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
2486 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
2488 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
2490 * marshal.h: Add prototypes for ldfld/stfld_remote.
2492 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
2493 this is called during startup.
2495 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
2497 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
2498 MonoThreadsSync struct private in monitor.c. Changed the way
2499 MonoThreadsSync is allocated so it's faster and there is no
2500 need to keep track of it with a finalizer and it uses less memory.
2501 This also finally allows us to allocate mono objects as ptrfree when
2502 there are no reference fields.
2504 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
2506 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
2507 disappearing link to the GC interface and use them to simplify
2510 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
2512 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
2513 stfld_remote which call mono_load/store_field_new. This allows methods
2514 calling ldfld/stfld wrappers to be AOTed.
2516 * console-io.c: Include sys/filio.h under solaris.
2518 * console-io.c: Include curses.h if needed correctly.
2520 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
2522 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
2523 method->klass as well.
2525 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
2527 * class.c (mono_class_init): Switch on lazy initialization of
2530 * class.c (mono_class_get_finalizer): Handle the case when the
2531 finalizer is inherited.
2533 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2535 * console-io.c: <curses.h> is needed by term.h on solaris.
2537 2005-02-03 Ben Maurer <bmaurer@ximian.com>
2539 * icall.c, class-internals.h, monodiet.c, class.c: Remove
2540 mono_class_setup_properties where possible. Remove this ftn from
2541 the header file, and make it static.
2543 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
2545 * loader.c: Add missing setup_... call.
2547 * class.c: Add missing setup_... calls.
2549 * class.c (mono_class_init): Switch on lazy initialization of
2552 * class.c (mono_class_init): Fix generics broken by the recent changes.
2554 * monodiet.c (handle_type): Add missing setup_... calls.
2556 * class.c: Back out garbage in previous patch.
2558 * class.c: Add missing setup_... calls.
2560 * class.c (mono_class_get_method_from_name_flags): Avoid calling
2561 mono_class_setup_methods () if possible.
2563 * class-internals.h (MonoClass): Add 'has_cctor' flag.
2565 * class-internals.h (MonoCachedClassInfo): New structure.
2567 * class.c: Initialize properties and events fields of MonoClass lazily.
2569 * class.c: Add infrastructure for lazily initializing the methods and
2570 vtable fields of MonoClass. Not yet used.
2572 * class.c (mono_class_get_finalizer): New helper function.
2574 * class.c: Add infrastructure for loading some class related data from
2577 * object.c: Add infrastructure for initializing the vtable from data
2580 * gc.c (run_finalize): Use mono_class_get_finalizer ().
2582 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
2583 appropriate initialization function before accessing parts of the
2584 MonoClass structure.
2586 * marshal.c: Fix warnings.
2588 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
2590 * mono-debug-debugger.c (get_exception_message): Use
2591 mono_class_get_method_from_name_flags ().
2593 2005-02-02 Ben Maurer <bmaurer@ximian.com>
2595 * reflection.c, appdomain.c: Replace a few manual searches that
2596 Zoltan missed. (Paolo approved this part of my initial patch).
2598 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
2600 * profiler.c: disable recording statistical events at report time.
2602 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2604 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
2605 to byteswap arrays of enum values, too (bug #72080).
2607 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
2609 * appdomain.c (set_domain_search_path): Allow this to be called if
2610 domain->setup is not yet set.
2612 * loader.c (mono_method_get_index): New helper function.
2614 * loader.c reflection.c: Use mono_method_get_index ().
2616 * class.c (mono_class_get_method_from_name_flags): New helper method.
2618 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
2621 * class.c (mono_class_get_cctor): New helper method.
2623 * string-icalls.c object.c class.c marshal.c reflection.c: Use
2624 mono_class_get_method () to look up methods.
2626 2005-02-01 Miguel de Icaza <miguel@novell.com>
2628 * console-io.c: Fix the build, this should work on Windows.
2630 2005-01-31 Ben Maurer <bmaurer@ximian.com>
2632 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
2633 be set to null to keep things valid
2635 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2637 * icall.c: added Console 2.0 icalls.
2638 * Makefile.am: added console-io.[ch]
2639 * console-io.[ch]: internal calls for Console 2.0 API.
2641 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2643 * class.c: make sure we consider all the interfaces
2644 when calculating max_interface_id (bug found by
2645 Jeroen Frijters running ikvm).
2647 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
2649 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
2650 valuetype fields to null.
2652 * object.c (set_value): Ditto. Fixes #71669.
2654 2005-01-31 Martin Baulig <martin@ximian.com>
2656 * metadata.c (mono_metadata_has_generic_params): New public
2657 function; checks whether something is a generic method.
2659 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
2661 * appdomain.c: fix infinite recursion when adding assemblies.
2663 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
2665 * object.c: Fix small typo to return all items for Environment.
2668 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2670 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
2671 reflection.c: more domain and assembly-unload related fixes
2672 and memory leaks plugs.
2674 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
2676 * 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.
2678 2005-01-29 Ben Maurer <bmaurer@ximian.com>
2680 * loader.c (mono_method_signature): Make this method lazy
2681 (mono_get_method_from_token): Don't computate the signature here.
2683 Doing this saves quite a bit of memory. I got 90 kb on starting up
2684 monodoc. It should also save some disk reads on startup.
2686 * *: MonoMethod->signature might be NULL now. You *MUST* use
2687 mono_method_signature.
2689 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
2691 * object.c (mono_runtime_get_main_args): Return an array from the
2692 current domain here. Fixes #71938.
2694 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
2696 * monitor.c: formatting changes to comply with the
2697 mono coding style and remove #ifdefs from the code.
2699 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2701 * metadata.c, private.h: remove some unneeded data
2702 and use a more compact representation for table schemas.
2704 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
2706 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
2707 to get a better distribution in hash tables.
2708 * *.c: use mono_aligned_addr_hash() where appropriate.
2709 * assembly.c: make var static.
2711 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
2713 * domain-internals.h: Put MonoJitInfo on a diet.
2715 * domain.c: Fix a warning.
2717 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2719 * gc.c: rework the gc handles code to reuse handles
2722 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
2724 * domain.c: fixed long standing bug in mono_string_equal() which
2725 was brought to light with the ldstr changes.
2727 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
2729 * reflection.c: Remove warning by adding missing include for marshal.h
2731 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2733 * domain.c, object.c: change the ldstr_table to hold
2734 MonoString* as keys: makes the runtime isinterned lookup
2735 faster and simplifies memory management.
2737 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
2739 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
2740 possible to add imperative security checks before calling the icall.
2741 * reflection.c: Return security attributes on the original MonoMethod
2742 (and not the wrapped one). This fix permissions on icalls.
2744 2005-01-25 Dick Porter <dick@ximian.com>
2746 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
2747 the check for mktime() support actually test the mktime() return
2748 value. "Fixes" bug 71682, though the output is still different to
2751 2005-01-25 Martin Baulig <martin@ximian.com>
2753 * class.c (mono_class_is_assignable_from): Make this work for
2756 2005-01-24 Ben Maurer <bmaurer@ximian.com>
2758 * marshal.c (mono_string_utf8_to_builder)
2759 (mono_string_builder_to_utf16): We might not have ownership of the
2760 string. In thise case, we need to create a new buffer.
2762 * object-internals.h (mono_stringbuilder_capacity): sb->str might
2763 be null, in which case, use the default capacity.
2765 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2767 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
2768 GC events to the profiler.
2770 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2772 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
2773 if you don't want the GC to run.
2775 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
2777 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
2778 start providing a GC API and keeping different implementations in
2780 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
2782 2005-01-22 Ben Maurer <bmaurer@ximian.com>
2784 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
2785 mmap rather than allocating a huge buffer.
2786 (mono_debug_close_mono_symbol_file): Free the buffer allocated
2789 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
2791 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
2792 and CheckExecutionRights.
2793 * reflection.c|h: Keep the index of the declarative security to be
2794 used, instead of the pointer, when AOT compiler is used. Also add
2795 class initialization when requesting demands.
2796 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
2797 CheckExecutionRights. Both properties are now FALSE by default, and
2798 unmodifiable, unless the --security option is used.
2800 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
2802 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
2803 reflection.c: properly refcount images and assemblies, many leaks fixed.
2805 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2807 * threadpool.c: increase the timeout for threads in the thread pool to
2808 10s. Fixes bug #67159.
2810 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
2812 * class-internals.h: Sun's compiler insists on explicit
2813 signed on bit fields to handle then correctly.
2815 2005-01-19 Miguel de Icaza <miguel@ximian.com>
2817 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
2818 Make the size of the array fit only the number of invalid path
2821 * class.c (_mono_class_get): Improve the error reporting when a
2822 class referenced is not found, to assist debugging.
2824 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
2826 * threads.c: fix off-by-one error.
2827 * domain.c: free data allocated in the domain.
2829 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
2831 * reflection.c (mono_method_body_get_object): Fill out exception info
2834 * object-internals.h: Add MonoReflectionExceptionHandlingClause
2837 2005-01-19 Martin Baulig <martin@ximian.com>
2839 * loader.c (mono_get_method_constrained): Make this work again.
2841 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
2843 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
2844 guint16 to match the managed side.
2846 * reflection.c (mono_reflection_body_get_object): Fill out local
2849 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
2852 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
2853 'local_var_sig_token'.
2855 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
2857 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
2860 * reflection.c (mono_method_body_get_object): Handle abstract and
2863 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
2865 * marshal.c, loader.c, class-internals.h, reflection.c:
2866 store the emthod data for a wrapper in an array instead of a list.
2868 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
2870 * marshal.c: change the code to allocate memory more
2871 conservatively for method wrappers.
2873 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
2875 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
2876 fields from MonoClass to the marshal info structure where they belong.
2878 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2880 * class.c, object.c, class-internals.h, marshal.c: rearrange
2881 some fields and tweak some types to lower memory usage.
2883 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
2885 * threads.c (signal_thread_state_change): Handle the case when the
2886 target thread is the current thread.
2888 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
2890 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
2891 emit_ptr_to_object_conv.
2893 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
2894 marshalling. Fixes #71352.
2896 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
2898 * metadata.h, blob.h: move table enum to blob.h so it can be included
2900 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
2901 cut the size of MonoImage/MonoDynamicImage.
2903 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
2905 * profiler.c (mono_profiler_install_simple): Fix default arguments.
2907 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2909 * reflection.c, reflection.h, icall.c: add a function to check
2910 if an attribute type is defined for a metadata object.
2912 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
2914 * object-internals.h: Added some needed fields from StringBuilder class.
2915 * marshal.c: Set the maxCapacity when creating a StringBuilder.
2917 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
2919 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
2920 threads before shutting down the runtime.
2922 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
2924 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2926 * object-internal.h, threads.c: implement stacksize and
2927 parameterized thread start functionality (requires
2928 matching corlib). Marked broken code for later removal.
2930 2005-01-12 Martin Baulig <martin@ximian.com>
2932 * class-internals.h (MonoGenericClass): Moved the `initialized'
2933 flag to MonoDynamicGenericClass, removed `init_pending'.
2934 (MonoGenericInst): Added `is_reference' flag.
2936 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
2938 * reflection.c (mono_image_create_pefile): Only set the pe_offset
2939 inside the MSDOS header. Fixes #71201.
2941 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
2943 (mono_domain_finalize): Ditto.
2945 2005-01-12 Martin Baulig <martin@ximian.com>
2947 * class.c (mono_get_shared_generic_class): Use the cache for
2948 non-dynamic generic classes.
2950 * class-internals.h (mono_class_create_generic_2): Removed
2951 function prototype, this function is now static inside class.c.
2953 * class.c (mono_class_create_generic_2): Made this static, only
2954 call it from mono_class_init() and mono_class_setup_parent().
2955 (collect_implemented_interfaces_aux): Call mono_class_init() on
2956 the interfaces we collect.
2957 (mono_class_setup_vtable): Call mono_class_init (class->parent).
2959 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
2961 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
2962 it a real thread handle.
2964 * domain-internals.h: Move exvar_offset from MonoJitInfo to
2965 MonoJitExceptionInfo, since each catch clause needs its own variable.
2967 2005-01-11 Dick Porter <dick@ximian.com>
2969 * image.c (mono_pe_file_open): New variant on mono_image_open()
2970 that does not set up the CLI metadata; used for FileVersionInfo so
2971 it can get the data for windows binaries too.
2973 * process.c (process_read_string_block): Don't read off the end of
2974 the StringTable block.
2976 These both fix bug 70766.
2978 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
2980 * gc.c: set some fields to NULL at GC cleanup time.
2981 * threads.c: if we quit the main thread, call exit ().
2983 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
2985 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
2987 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
2989 * threads.h, threads.c, object.c: added accessor and settor for
2990 main_thread. Handle it specially when exiting from it: wait
2991 for other foreground threads to exit.
2993 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
2995 * process.c, verify.c: remove some bloat.
2997 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
2999 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
3000 the calling convention to cdecl under win32.
3002 2005-01-08 Ben Maurer <bmaurer@ximian.com>
3004 * object.c (mono_object_get_size): New function to get the size of
3007 * profiler.c (simple_allocation): Use above.
3009 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
3011 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
3012 ves_icall_System_AppDomain_getRootDomain (as it's not required to
3013 get an appdomain by it's id and we can't assume the root's id is 0).
3014 * domain-internals.h: Change the function prototype to match.
3015 * icall.c: Change the icall table for AppDomain.
3017 2005-01-08 Miguel de Icaza <miguel@ximian.com>
3019 * locales.c (string_invariant_compare_char): Only compute
3020 GUnicodeTypes in the case where we need them. Test for ordinality
3021 first and return if so.
3026 * FIXME: here we must use the information from c1type and c2type
3027 * to find out the proper collation, even on the InvariantCulture, the
3028 * sorting is not done by computing the unicode values, but their
3029 * actual sort order.
3032 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3034 * loader.c: for P/Invoke methods, allow the "Internal" shared
3035 library name to refer to the calling process symbol namespace.
3037 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
3039 * Makefile.am: Add the security manager to the build.
3040 * security-manager.c|h: New. Initialization of the security manager.
3042 2005-01-07 Dick Porter <dick@ximian.com>
3045 * monitor.c: Update thread state during Monitor and WaitHandle
3046 waits. Fixes bug 71031.
3048 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
3050 * reflection.c (property_encode_signature): Correctly handle when the
3051 property has no methods.
3053 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
3055 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
3057 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
3058 fields from mb, not rmb. Fixes #71017.
3060 * marshal.c (emit_ptr_to_str_conv): Add support for
3061 ByValTStr -> string conversion. Fixes #71015.
3063 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
3065 * mempool.c (mono_mempool_contains_addr): New helper function.
3067 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
3069 * metadata.c (mono_metadata_compute_size): Fix size calculation of
3070 HasSematics encoded fields.
3072 * metadata.c (mono_type_to_unmanaged): Improve error message for
3073 invalid string marshalling.
3075 * metadata.c: Fix warnings.
3077 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3079 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
3082 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
3084 * domain.c object.c domain-internals.h: Revert part of r38077 since the
3085 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
3088 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
3090 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
3091 so methods containing these can be AOTed.
3093 2005-01-03 Martin Baulig <martin@ximian.com>
3095 * loader.c (find_method): Removed the hack for generic instances.
3096 (method_from_memberref): If our parent is a generic instance, pass
3097 its generic type definition to find_method() and then inflate the
3099 (mono_get_method_constrained): Pass the generic type definition to
3100 find_method() and inflate the method later.
3102 * class-internals.h (MonoStats): Added `generic_class_count'.
3104 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
3105 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
3107 * reflection.c (mono_custom_attrs_from_params): Don't ignore
3108 generic type definitions.
3110 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
3112 * loader.c icall.c: Fix warnings.
3114 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
3116 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
3117 blittable types. Fixes #70864.
3119 2004-12-29 Martin Baulig <martin@ximian.com>
3122 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
3124 * reflection.c (mono_method_get_object): Create a
3125 "System.Reflection.MonoGenericMethod" for inflated methods; don't
3126 call mono_get_inflated_method().
3128 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
3130 2004-12-27 Martin Baulig <martin@ximian.com>
3132 * class-internals.h (MonoMethod): Added `is_inflated' flag.
3133 (MonoMethodInflated): Added `inflated' field.
3135 * class.c (mono_class_inflate_generic_method): Don't really
3136 inflate the method here; just set the `is_inflated' flag in the
3138 (mono_class_get_inflated_method): Actually inflate the method here
3139 if it's not already inflated; we use the MonoMethodInflated's new
3140 `inflated' field as a cache.
3142 2004-12-26 Martin Baulig <martin@ximian.com>
3145 (inflate_generic_class): Moved some code out of inflate_generic_type().
3146 (mono_class_inflate_generic_method): If we're already inflated,
3147 inflate the context and use the declaring method; ie. make sure
3148 the declaring method of an inflated method is always the generic
3150 (mono_class_create_from_typedef): Create
3151 `class->generic_container->context->gclass'.
3153 2004-12-24 Ben Maurer <bmaurer@ximian.com>
3155 * metadata-internals.h, marshal.c, reflection.c: More
3156 MonoGHashTable->GHashTable.
3158 * domain-internals.h, class.c: Change MonoGHashTable's into
3159 GHashTables for some cases where no gc stuff is used
3161 All users: update apis
3163 2004-12-23 Ben Maurer <bmaurer@ximian.com>
3165 * metadata.c (builtin_types): Make this `const'. Makes this get
3166 put into the shareable section.
3167 (mono_metadata_init): Casts to make gcc happy.
3169 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
3171 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
3173 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
3175 * icall.c: Added an internal call to retrieve the position and length
3176 of assembly-level declarative security attributes (RequestMinimum,
3177 RequestOptional and RequestRefuse). This is used by the Assembly class
3178 to re-create the corresponding permission sets.
3180 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
3182 * marshal.c: fix the stelemref wrapper to be type correct
3185 2004-12-20 Ben Maurer <bmaurer@ximian.com>
3187 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
3188 to do key & 0x7fffffff. Hashtable already does this. It just
3189 results in longer code.
3191 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
3193 * appdomain.c: Bump corlib version.
3194 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
3195 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
3196 * reflection.c|h: Add functions to get declarative security infos
3197 (blob position and length) for assemblies, classes and methods.
3199 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
3201 * reflection.c: sort the constant table (bug #70693).
3203 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
3205 * object-internals.h, threads.c, domain.c: add accessors for
3206 the MonoThread and MonoDomain tls keys.
3208 2004-12-18 Martin Baulig <martin@ximian.com>
3210 * class.c (inflate_generic_type): If we're inflating a generic
3211 instance, set `ngclass->context->container = context->container';
3212 ie. the container we inflated into.
3214 * metadata.c (mono_metadata_parse_generic_param): Reflect above
3215 inflate_generic_type() changes.
3217 2004-12-17 Martin Baulig <martin@ximian.com>
3220 (MonoGenericClass): Replaced `MonoType *generic_type' with
3221 `MonoClass *generic_class'. Removed `dynamic_info'; if
3222 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
3223 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
3225 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
3227 * exception.c (mono_exception_from_token): New helper function.
3229 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
3231 * assembly.c (mono_assembly_load_with_partial_name): Call
3232 mono_assembly_loaded before invoking the preload hooks. Fixes
3235 * object-internals.h (MonoThread): Change culture_info and
3236 ui_culture_info into an array.
3238 * threads.c: Cache culture info objects from more than one appdomain.
3240 * threads.c threads-types.h icall.c: Add icalls for manipulating the
3243 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
3245 * threads.h threads.c appdomain.c: Clear the culture_info field of
3246 all threads during unloading if they point to an object in the dying
3249 2004-12-13 Ben Maurer <bmaurer@ximian.com>
3251 * culture-info.h (TextInfoEntry): New struct
3252 * object-internals.h: sync with managed
3253 * locales.c: fill the `text_info_data' field
3254 * culture-info-tables.h: update
3256 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
3258 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
3261 2004-12-12 Ben Maurer <bmaurer@ximian.com>
3263 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
3264 (ves_icall_ModuleBuilder_getMethodToken): Ditto
3266 2004-12-12 Martin Baulig <martin@ximian.com>
3268 * mono-debug-debugger.c (write_type): If we're an enum and the
3269 builtin types have already been initialized, call mono_class_init().
3271 2004-12-11 Martin Baulig <martin@ximian.com>
3273 * metadata.c (mono_metadata_load_generic_params): Added
3274 `MonoGenericContainer *parent_container' argument; automatically
3275 compute `container->is_method'; pass the correct owner to
3278 * reflection.c (compare_genericparam): Sort the GenericParam table
3279 according to increasing owners.
3281 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
3283 * profiler.c: allow disabling the default profiler.
3285 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
3287 * decimal.c, icall.c: allow disabling System.Decimal support.
3289 2004-12-09 Marek Safar <marek.safar@seznam.cz>
3291 * reflection.c: Add support for null attribute arguments.
3293 2004-12-09 Martin Baulig <martin@ximian.com>
3295 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
3296 names to get rid of compiler warnings.
3298 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
3300 * marshal.c (mono_marshal_get_struct_to_ptr): Call
3301 mono_marshal_load_type_info (). Fixes #69625.
3302 (mono_marshal_get_ptr_to_struct): Likewise.
3304 2004-12-08 Martin Baulig <martin@ximian.com>
3306 * mono-debug.h: Bumped version number to 47.
3308 * mono-debug-debugger.c
3309 (mono_debugger_event_handler, mono_debugger_event): Take two
3310 guint64 arguments insteed of a gpointer and a guint32.
3312 2004-12-08 Martin Baulig <martin@ximian.com>
3314 * debug-mono-symfile.h
3315 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
3316 `address' to `native_offset'.
3318 2004-12-08 Martin Baulig <martin@ximian.com>
3320 * class.c (mono_class_create_from_typespec): Only inflate if we
3321 either have `context->gclass' or `context->gmethod'.
3323 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
3325 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
3327 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
3329 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
3331 * reflection.c (mono_assembly_get_object): Remove the workaround put
3334 * appdomain.c: Use the corlib_internal field from MonoAssembly.
3336 * appdomain.c: Bump corlib version.
3338 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
3339 be visible in other appdomains.
3341 2004-12-07 Ben Maurer <bmaurer@ximian.com>
3343 * threads.c: Interlocked inc and dec for longs were messed up,
3344 use a KISS based impl for this. Fixes 70234
3346 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
3348 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
3350 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
3352 * icall.c: fix to follow policy not to allow struct
3353 arguments in icalls.
3355 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3357 * process.c: make the patch that handles spaces in file paths work
3358 on mono/windows too.
3360 2004-12-06 Martin Baulig <martin@ximian.com>
3362 * class.c (mono_class_create_generic): Call
3363 mono_class_setup_supertypes() if we're dynamic.
3364 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
3366 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
3368 * object-internals.h: Add new fields to MonoThread.
3370 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3372 * icall.c threads-types.h threads.c: Add new icalls.
3374 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
3376 * object-internals.h (MonoReflectionAssembly): Sync object layout with
3379 * appdomain.c: Bump corlib version.
3381 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
3382 internal assemblies. Fixes #69181.
3384 2004-12-05 Martin Baulig <martin@ximian.com>
3386 * class.c (mono_class_inflate_generic_signature): Make this a
3387 no-op if `context' is NULL or we don't have any type parameters;
3388 also copy `sentinelpos'.
3390 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
3392 * image.c: Add unbox_wrapper_cache.
3394 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
3396 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
3399 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
3402 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
3404 2004-12-04 Martin Baulig <martin@ximian.com>
3406 * loader.c (mono_method_get_signature_full): New public function;
3407 like mono_method_get_signature(), but with an additional
3408 `MonoGenericContext *' argument.
3410 * class.c (mono_class_inflate_generic_signature): Formerly known
3411 as inflate_generic_signature(); make this public.
3413 2004-12-04 Martin Baulig <martin@ximian.com>
3416 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
3417 instead of a `MonoGenericContainer *'.
3418 (mono_metadata_parse_array_full): Likewise.
3419 (mono_metadata_parse_signature_full): Likewise.
3420 (mono_metadata_parse_method_signature_full): Likewise.
3421 (mono_metadata_parse_generic_inst): Likewise.
3422 (mono_metadata_parse_generic_param): Likewise.
3423 (mono_metadata_parse_mh_full): Likewise.
3424 (mono_type_create_from_typespec_full): Likewise.
3426 2004-12-03 Martin Baulig <martin@ximian.com>
3428 * class-internals.h (MonoGenericContainer): Replaced the
3429 `MonoGenericContext * pointer with a `MonoGenericContext'
3430 structure and made it the first element.
3432 2004-12-03 Martin Baulig <martin@ximian.com>
3435 (inflate_generic_type): Set the `context->container' when creating
3436 a new MonoGenericContext.
3437 (mono_class_inflate_generic_method): Likewise.
3438 (mono_class_create_from_typespec): Just use `context->container'
3439 to get the container.
3441 * loader.c (method_from_methodspec): Set `context->parent' from
3442 `context->container' - and if that's a method container, use its
3443 parent. Also set the `context->container' when creating a new
3445 (mono_get_method_from_token): Use just `context->container' to get
3448 * metadata.c (do_mono_metadata_parse_generic_class): Also set
3449 `gclass->context->container'.
3451 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
3452 the `context->container' when creating a new MonoGenericContext.
3454 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
3456 * reflection.c (compare_genericparam): Sort params with identical
3457 owner by their number. Fixes gen-111 on sparc.
3459 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
3461 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
3462 around the domain changes.
3464 * appdomain.c (mono_domain_unload): Handle the case when the thread
3465 calling Unload is itself being aborted during unloading. Fixes #70022.
3467 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
3469 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
3470 checkpoint_func as an icall so it gets a wrapper.
3471 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
3472 in the cross-appdomain wrappers too.
3474 * threads.c (mono_thread_has_appdomain_ref): Make this public.
3476 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
3478 * reflection.c: Fix some memory leaks.
3480 2004-12-02 Martin Baulig <martin@ximian.com>
3482 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
3484 * metadata.c (generic_class_cache): New static hashtable.
3485 (mono_metadata_lookup_generic_class): New public method.
3487 2004-12-02 Martin Baulig <martin@ximian.com>
3489 * class.c (mono_class_create_from_typedef): Call
3490 mono_class_setup_parent() and mono_class_create_mono_type() before
3491 parsing the interfaces.
3493 2004-12-02 Martin Baulig <martin@ximian.com>
3495 * metadata.c (generic_inst_cache): New static hashtable.
3496 (mono_metadata_lookup_generic_inst): New public function.
3497 (mono_metadata_inflate_generic_inst): New public function.
3498 (mono_metadata_parse_generic_inst): New public function.
3499 (do_mono_metadata_parse_generic_class): Use the new
3500 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
3501 since this'll also use the cache.
3503 * reflection.c (mono_reflection_bind_generic_method_parameters):
3504 Use mono_metadata_lookup_generic_inst() to use the new cache.
3506 * class.c (inflate_mono_type): Use
3507 mono_metadata_inflate_generic_inst() to inflate a generic
3508 instance; this'll also use the new cache.
3510 * loader.c (method_from_methodspec): Use
3511 mono_metadata_parse_generic_inst() and
3512 mono_metadata_inflate_generic_inst() rather than parsing it
3513 manually, so we can use the new cache.
3515 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
3517 * threads.c (wait_for_tids): Do not incorrectly free threads when
3520 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3522 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
3523 iter->args based on whether parameters are passed in registers (i.e.
3524 MONO_ARCH_REGPARMS is defined)
3526 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
3528 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
3529 the exception message. Fixes #70070.
3530 (method_from_methodspec): Fix warnings.
3532 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3534 * process.c: (complete_path) return the path quoted
3536 2004-12-01 Martin Baulig <martin@ximian.com>
3538 * class-internals.h (MonoGenericInst): New structure.
3539 (MonoGenericClass): Replaced `type_argc', `type_argv' and
3540 `is_open' with `MonoGenericInst *inst'.
3541 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
3542 `is_open' with `MonoGenericInst *inst'.
3544 2004-11-30 Martin Baulig <martin@ximian.com>
3546 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
3548 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
3549 to `generic_class_cache'.
3552 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
3553 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
3554 (mono_generic_inst_is_valuetype): Renamed to
3555 mono_generic_class_is_valuetype().
3558 (MonoGenericInst): Renamed to MonoGenericClass.
3559 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
3560 (MonoClass): Renamed `generic_inst' to `generic_class'.
3561 (MonoGenericContext): Renamed `ginst' to `gclass'.
3563 * object-internals.h
3564 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
3566 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
3567 mono_reflection_generic_class_initialize().
3569 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
3570 now known as "System.Reflection.MonoGenericClass".
3571 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
3573 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
3575 * class-internals.h: Added a flag field to MonoClass to cache the
3576 declarative security attributes actions associated with the class.
3577 * domain-internals.h: Added booleans to MonoJitInfo to cache the
3578 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
3579 applicable to the JITted method.
3580 * reflection.c|h: Added functions to extract (as flags) which security
3581 actions are available (declaratively) for a method, class or assembly.
3582 * metadata.c|h: Added functions to search the declarative security
3583 table in the metadata.
3585 2004-11-29 Ben Maurer <bmaurer@ximian.com>
3587 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
3588 EXPORTEDTYPES are already in the class name cache, so there is no
3589 need to add extra code here to look at them. Just removes a bit of
3592 (ves_icall_System_Environment_get_TickCount): No need for #if
3593 WINDOWS. We already have the code in io-layer.
3595 2004-11-28 Martin Baulig <martin@ximian.com>
3598 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
3601 2004-11-27 Miguel de Icaza <miguel@ximian.com>
3603 * assembly.c (do_mono_assembly_open): Instead of having a
3604 conditional WITH_BUNDLE, incorporate support for bundles here, by
3605 having a global `bundles' variable holding a pointer to the actual
3608 (mono_register_bundled_assemblies): New API call used by the
3611 See mkbundle.1 for details.
3613 2004-11-27 Martin Baulig <martin@ximian.com>
3615 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
3616 the vtable for generic methods.
3618 2004-11-26 Martin Baulig <martin@ximian.com>
3621 (mono_metadata_generic_method_hash): New public function.
3622 (mono_metadata_generic_method_equal): Likewise.
3625 (MonoGenericContainer): Added `GHashTable *method_hash'.
3627 * reflection.c (ReflectionMethodBuilder): Added
3628 `MonoGenericContainer *generic_container'.
3629 (reflection_methodbuilder_to_mono_method): Don't create a new
3630 MonoGenericContainer each time we're called.
3631 (mono_reflection_bind_generic_method_parameters): Use
3632 `container->method_hash' to cache the results so we don't create a
3633 different method if we're called several times with the same
3636 * loader.c (method_from_methodspec): Use the new
3637 `container->method_hash' here, too.
3639 2004-11-26 Martin Baulig <martin@ximian.com>
3641 * class.c (inflate_generic_signature): Correctly compute
3642 `res->has_type_parameters'.
3643 (mono_class_vtable): Use the `has_type_parameters' flag to
3644 determine whether we're a generic method.
3646 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
3648 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
3650 * object.c (mono_runtime_run_main): Fix a small memory leak.
3652 2004-11-25 Martin Baulig <martin@ximian.com>
3654 * class.c (set_generic_param_owner): Fixed the loop.
3656 2004-11-25 Martin Baulig <martin@ximian.com>
3658 * object.c (mono_class_vtable): Don't create any JIT wrappers for
3661 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
3663 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
3664 names. Fixes #69787.
3666 2004-11-24 Martin Baulig <martin@ximian.com>
3668 * class.c (mono_class_create_generic_2): If we don't have a
3669 `ginst->parent', inflate `gklass->parent' to get our parent.
3671 2004-11-24 Martin Baulig <martin@ximian.com>
3673 * reflection.c (compare_genericparam): Correctly sort the
3674 GenericParam table; fixes #69779.
3676 2004-11-23 Ben Maurer <bmaurer@ximian.com>
3678 * reflection.c: When writing a PE file, don't create a huge
3679 buffer in memory. Just write the arrays we have to the file.
3680 This reduces memory usage.
3682 * metadata-internals.h: MonoDynamicStream pefile is no longer used
3685 2004-11-17 Martin Baulig <martin@ximian.com>
3687 * class.c (mono_class_init): Don't setup `class->parent' for
3688 dynamic instances; moved this to mono_class_generic_2().
3689 (mono_class_create_generic): Also set `klass->inited' for dynamic
3691 (mono_class_create_generic_2): Don't do anything for dynamic
3692 generic instances. Set `klass->parent' here and also call
3693 mono_class_setup_parent() here.
3695 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
3696 `MonoType *parent' argument; set `ginst->parent' before calling
3697 mono_class_create_generic_2(), so we set the correct parent.
3699 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
3701 * reflection.c: allow getting attributes from ModuleBuilder
3704 2004-11-17 Martin Baulig <martin@ximian.com>
3706 * class.c (mono_class_create_from_typedef): If a type parameter is
3707 inherited from an outer class, set its owner to that class.
3709 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
3711 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
3712 for (int*) written size. This fixes bug #69592.
3714 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
3716 * icall.c: Added IsAuthenticodePresnet internal call.
3717 * image.c|h: New function that check a MonoImage for an Authenticode
3718 signature in the certificate PE data directory.
3719 * security.c|h: New internal call to ask the runtime if an
3720 Authenticode signature seems referenced in the PE header.
3722 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
3724 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
3726 * reflection.c (mono_image_create_pefile): Free the assembly streams
3727 after writing out the assembly file.
3729 * object.c (mono_runtime_run_main): Fix small memory leak.
3731 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
3732 property access modifiers. Fixes #69389.
3734 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
3736 * domain.c, object.c, object-internals.h, domain-internals.h,
3737 object.h, marshal.c: keep dynamic code info per domain.
3739 2004-11-15 Martin Baulig <martin@ximian.com>
3741 * class.c (mono_type_get_name_recurse): Put type arguments in
3742 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
3745 2004-11-15 Martin Baulig <martin@ximian.com>
3747 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
3748 (mono_class_setup_vtable): When computing `the_cname' for a
3749 generic instance, don't include the namespace since we'd otherwise
3752 2004-11-15 Martin Baulig <martin@ximian.com>
3754 * class.c (mono_class_create_generic): Changed return type to void.
3755 (mono_class_create_generic_2): New public function; setup
3756 `class->method', `class->field' and `class->interfaces' here
3757 instead of in mono_class_init().
3759 * class.h (mono_class_create_generic): Moved to class-internals.h.
3761 2004-11-14 Ben Maurer <bmaurer@ximian.com>
3763 * reflection.c (mono_image_create_pefile): take a file HANDLE.
3764 rather than writing to memory, write to this file. Right now,
3765 we are just writting into a buffer, and copying that. However
3766 we can avoid the buffer later.
3768 (mono_dynamic_stream_reset): new function
3770 * icall.c, object-internals.h: update for the above.
3772 2004-11-13 Ben Maurer <bmaurer@ximian.com>
3774 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
3775 have been using gc'd memory. First it is slower, unlikely
3776 the comment in the source code said, secondly, it increases
3777 our footprint to do it in the gc.
3779 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
3780 the method so that it does not have to copy to managed code.
3782 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
3784 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
3786 2004-11-12 Martin Baulig <martin@localhost>
3788 * reflection.c (mono_image_create_token): Allow generic method
3789 definitions here, since they may appear in an `.override'; see
3790 gen-98/gen-99 for an example.
3792 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
3794 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
3797 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
3800 2004-11-11 Martin Baulig <martin@ximian.com>
3802 * class.c (mono_class_setup_vtable): In an explicit interface
3803 implementation, the method name now includes the arity.
3805 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
3807 * object.c (mono_array_full_copy): Fix warning.
3809 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
3811 * appdomain.c: Removed look_for_method_by_name(). Use the new method
3812 mono_class_get_method_from_name() instead.
3814 * class-internals.h: Added two new types of wrappers.
3815 Added MonoRemotingTarget enum. Added new trampoline function type, which
3816 takes an additional MonoRemotingTarget value as parameter, so it is
3817 possible to request a trampoline for a specific target.
3819 * class.c: Added new mono_class_get_method_from_name() method.
3821 * class.h: In MonoRemoteClass, we can have now to vtables, one for
3822 general remoting sinks and one specific for cross domain calls.
3824 * debug-helpers.c: Added new wrapper names.
3826 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
3829 * image.c: Porperly delete value objects form the remoting invoke hashtable.
3831 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
3832 with several other methods (mono_marshal_get_xappdomain_dispatch,
3833 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
3834 and others) can generate a fast remoting wrapper for cross domain calls.
3835 More information can be found in docs/remoting.
3836 Other changes: Removed mono_find_method_by_name, and used
3837 mono_class_get_method_from_name instead.
3838 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
3839 is stored in the remoting invoke hashtable.
3841 * marshal.h: published the new method for getting the xdomain wrapper,
3842 and also added a method for getting the adequate wrapper for a given
3845 * object-internals.h, object.c: Added a couple of methods for capying and
3847 Modified mono_install_remoting_trampoline, which takes the new remoting
3848 trampoline that has a remoting target as parameter.
3849 mono_class_proxy_vtable now also takes a remoting target as parameter, and
3850 will return the most suitable vtable for the target.
3851 Added mono_remote_class_vtable, which returns the vtable of a remote class
3852 (which can be the normal remoting vtable or the xdomain vtable).
3854 * threads.c: the xdomain invoke and dispatch wrappers must also be
3855 protected against interruptions.
3857 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3859 * icall.c: use memmove in BlockCopyInternal when the source and
3860 destination arrays are the same.
3862 2004-11-09 Martin Baulig <martin@ximian.com>
3864 * class-internals.h (MonoGenericContainer): Removed `method' and
3865 `signature', replaced them with `is_method' and `is_signature'
3866 flags. Added `context'.
3868 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
3869 instead of a `MonoGenericContainer *'.
3871 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
3872 for dynamic type parameters.
3873 (mono_metadata_load_generic_params): Setup `container->context'.
3875 * reflection.c (mono_reflection_setup_generic_class): Setup
3876 `tb->generic_container->context'.
3877 (do_mono_reflection_bind_generic_parameters): Use
3878 mono_class_inflate_generic_type() to correctly inflate types,
3879 rather than using our own hack just for MONO_TYPE_VAR.
3881 2004-11-09 Martin Baulig <martin@ximian.com>
3883 * class.c (mono_class_inflate_generic_method): Small fix; don't
3887 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
3888 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
3889 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
3890 (ves_icall_Type_BindGenericParameters): Likewise.
3891 (ves_icall_Type_get_IsGenericInstance): Likewise.
3892 (ves_icall_Type_GetGenericParameterPosition): Likewise.
3893 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
3894 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
3895 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
3897 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
3899 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
3900 assembly versions and public key tokens. Fixes #69113.
3902 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
3904 * metadata.c: fix bug introduced with the type cache changes
3907 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
3909 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
3910 the MonoClass pointer instead of the token in exception clauses.
3911 * reflection.c: updates for the above and make the code not depend
3912 on the structure of MonoExceptionClause.
3914 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
3916 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
3917 Add support for dynamic assemblies. Fixes #69114.
3919 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
3921 2004-11-07 Ben Maurer <bmaurer@ximian.com>
3923 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
3924 since most only those methods use it. the code member of
3925 MonoMethodPInvoke was dead, so that can be removed too. Also,
3926 remove inline_count (again, not used), and move slot so that it
3927 can share bits with some other flags. This saves 8 bytes in the
3928 structure and gives us about 50 kb back for mcs helloworld.cs
3930 * *.[ch]: Do naming changes for the above.
3932 * loader.c (mono_method_get_header): Lazily init the header
3934 (mono_get_method_from_token): don't init the header here
3935 (mono_free_method): the header may never be allocated
3937 Overall, this saves 150 kb of unmanaged allocations
3938 for mcs helloworld.cs. That accounts for 10% of the unmanaged
3941 * loader.c, loader.h (mono_method_get_header): new accessor.
3943 * *.[ch]: use the above method. Prepares us to lazily load
3946 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
3947 three warnings, which are actual bugs (see 69206).
3949 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
3950 unused. Saves a cool 4 bytes / method.
3952 2004-11-06 Ben Maurer <bmaurer@ximian.com>
3954 * metadata.c (builtin_types): Add types for System.Object here.
3955 (mono_metadata_parse_type_full): Cache MonoType*'s that are
3956 for a class or valuetype from klass->this_arg or klass->byval_arg.
3958 On mcs for a hello world, this gets us down from 21836 MonoType's
3961 (mono_metadata_free_type): Account for the above change.
3963 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
3965 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
3966 exception instead of asserting if name is null.
3967 (ves_icall_System_AppDomain_GetData): Ditto.
3969 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
3971 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
3974 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
3975 Return NULL when the domain does not have entry_assembly set.
3977 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
3978 Add a 'resource_modules' argument.
3979 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
3981 * reflection.c (mono_reflection_create_runtime_class): Move setting
3982 of wastypebuilder here, so mono_get_type_object () returns a MonoType
3985 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
3986 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
3987 Throw an ArgumentNullException if 'ptr' is null.
3989 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
3990 assemblies here. Fixes #69020.
3992 2004-11-05 Geoff Norton <gnorton@customerdna.com>
3994 * reflection.c (build_compressed_metadata): Fix the previous patch for
3995 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
3998 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
4000 * assembly.c (mono_assembly_names_equal): Allow a match if one of
4001 the cultures is false. Fixes #69090.
4003 * reflection.c (build_compressed_metadata): Fix invalid memory read
4004 detected by valgrind.
4006 * reflection.c (mono_reflection_get_type): Avoid triggering a
4007 TypeResolve multiple times for the same type. Fixes #65577.
4009 2004-11-04 Ben Maurer <bmaurer@ximian.com>
4011 * marshal.c: Avoid using ldftn to call managed functions. It is
4012 much slower than just a call.
4014 * reflection.c (mono_module_get_object): free the basename we
4015 allocate here from glib.
4017 * reflection.c (ensure_runtime_vtable): make sure to free
4018 overrides. Also, we were allocating an array of MonoMethod not an
4019 array of MonoMethod*.
4021 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
4023 * image.c (mono_image_close): free image->guid here.
4025 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
4027 * reflection.c: Fix some spec conformance issues with the PE file
4028 structures so mcs compiled apps run on the Net 2.0 beta.
4030 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
4032 * string-icalls.c (ves_icall_System_String_ctor_encoding):
4033 Implement this. Fixes #67264.
4035 * debug-helpers.h debug-helpers.c marshal.c: Move
4036 mono_find_method_by_name to debug-helpers.c.
4038 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
4040 * object.c (mono_release_type_locks): type_initialization_hash is
4043 * reflection.c object.c object-internals.h: Fix warnings.
4045 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
4046 without accessors. Fixes #61561.
4048 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
4049 application base from the root domain if not set. Fixes #65641.
4050 (mono_runtime_init): Fix warning.
4052 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4054 * appdomain.c: call mono_thread_pool_init.
4055 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
4056 of worker threads based on the number of CPUs and the environment
4057 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
4058 for non-windows (windows) systems.
4060 2004-10-27 Chris Toshok <toshok@ximian.com>
4062 * mono-debug-debugger.c (write_class): don't call mono_class_init
4063 here, as even with the check for (!klass->init_pending), we get
4064 into a situation where we're hitting cycles in class
4065 initialization. Fixes #68816.
4067 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
4069 * image.c: Avoid overwriting values in the loaded_images_hash when an
4070 assembly is loaded multiple times. Fixes #61152.
4072 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
4073 so multiple satellite assemblies for the same name can be loaded.
4076 * mono_domain_assembly_preload: Actually return the loaded assembly,
4079 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
4080 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
4082 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
4083 pending finalizers are not invoked after the appdomain has been
4084 unloaded. Fixes #67862.
4086 2004-10-22 Martin Baulig <martin@ximian.com>
4088 * mono-debug-debugger.c
4089 (mono_debugger_runtime_invoke): Don't box valuetypes.
4091 2004-10-22 Chris Toshok <toshok@ximian.com>
4093 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
4094 don't hide private methods.
4096 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
4098 * icall.c: Allows the runtime to "share" (when known) the public key
4099 token of an assembly. This avoid the need to recalculate the token
4100 (from the public key) in managed code.
4102 2004-10-21 Chris Toshok <toshok@ximian.com>
4104 * debug-helpers.c (append_class_name): argh, revert last patch.
4106 2004-10-21 Chris Toshok <toshok@ximian.com>
4108 * debug-helpers.c (append_class_name): use '+' as the delimiter,
4109 not '/', so that it matches what the debugger uses to look up
4112 2004-10-21 Martin Baulig <martin@ximian.com>
4114 * mono-debug-debugger.c (mono_debugger_throw_exception): New
4115 public method; this is called each time an exception is thrown and
4116 allows the debugger to use exception catch points.
4118 2004-10-21 Martin Baulig <martin@ximian.com>
4120 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
4121 the stack pointer and the exception object in some struct and pass
4122 that to the debugger.
4124 2004-10-21 Chris Toshok <toshok@ximian.com>
4126 * mono-debug-debugger.c (do_write_class): add instance/static
4127 event support. We don't expose "raise" or "other" yet.
4128 (event_is_static): new method.
4130 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
4132 * mono-debug-debugger.c
4133 (mono_debugger_handle_exception): Remove
4134 bogus return value for fussy compilers.
4136 2004-10-20 Martin Baulig <martin@ximian.com>
4138 * mono-debug-debugger.c
4139 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
4140 (mono_debugger_handled_exception): Likewise.
4142 2004-10-20 Martin Baulig <martin@ximian.com>
4144 * mono-debug-debugger.h (MonoDebuggerEvent): Added
4145 MONO_DEBUGGER_EVENT_EXCEPTION.
4147 * mono-debug-debugger.c (mono_debugger_handle_exception): New
4148 public function to send the debugger a notification for an
4149 exception and inform it about a catch/finally clause.
4151 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
4153 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
4154 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
4157 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
4159 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
4161 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
4162 marshalled as [In,Out]. Fixes #58325.
4164 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
4166 * reflection.c (mono_method_body_get_object): Implement some fields.
4168 2004-10-12 Martin Baulig <martin@ximian.com>
4170 * reflection.c (mono_reflection_bind_generic_parameters): Small
4171 fix, correctly retrieve our parent from a generic instance.
4173 2004-10-12 Martin Baulig <martin@ximian.com>
4175 * metadata.c (mono_metadata_generic_param_equal): We always have
4179 (mono_class_from_generic_parameter): We need to have an owner.
4180 (my_mono_class_from_generic_parameter): Likewise.
4182 * reflection.c (mono_reflection_setup_generic_class): Renamed to
4183 mono_reflection_create_generic_class() and added a new
4184 mono_reflection_setup_generic_class().
4185 (mono_reflection_initialize_generic_param): If we're a nested
4186 generic type and inherited from the containing class, set our
4187 owner to the outer class.
4189 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
4191 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
4193 * reflection.c (mono_method_body_get_object): New function to create
4194 a MethodBody object.
4196 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
4198 2004-10-11 Martin Baulig <martin@ximian.com>
4200 * metadata.c (_mono_metadata_type_equal): Renamed to
4201 do_mono_metadata_type_equal() and made static.
4203 2004-10-11 Martin Baulig <martin@ximian.com>
4205 * appdomain.c: Bump corlib version number to 28.
4207 2004-10-10 Martin Baulig <martin@ximian.com>
4210 (MonoGenericInst): Added `MonoGenericContainer *container'.
4211 (MonoGenericMethod): Likewise.
4212 (MonoGenericContext): Likewise.
4213 (MonoGenericParam): Added `MonoGenericContainer *owner'.
4216 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
4217 (do_mono_metadata_parse_generic_inst): Likewise.
4218 (mono_metadata_parse_type_full): New public method. This is the actual
4219 mono_metadata_parse_type() implementation - with an additional
4220 `MonoGenericContainer *' argument.
4221 (mono_metadata_parse_array_full): Likewise.
4222 (mono_metadata_parse_signature_full): Likewise.
4223 (mono_metadata_parse_method_signature_full): Likewise.
4224 (mono_metadata_parse_mh_full): Likewise.
4225 (mono_type_create_from_typespec): Likewise.
4226 (mono_metadata_interfaces_from_typedef_full): New public method;
4227 this is similar to the other _full() methods, but we take a
4228 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
4229 (mono_metadata_parse_generic_param): Take an additional
4230 `MonoGenericContainer *' argument and lookup the MonoGenericParam
4231 from that container.
4232 (mono_metadata_generic_param_equal): New static method to compare
4233 two type parameters.
4234 (_mono_metadata_type_equal): New static method; takes an
4235 additional `gboolean signature_only' argument - if true, we don't
4236 compare the owners of generic parameters.
4237 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
4238 with a TRUE argument - do a signature-only comparision.
4240 * loader.c: Use the new _full() methods and pass the
4241 MonoGenericContainer to them.
4243 * object-internals.h (MonoReflectionTypeBuilder): Added
4244 `MonoGenericContainer *generic_container' field.
4245 (MonoReflectionMethodBuilder): Likewise.
4247 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
4249 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
4250 case initial images of dynamic assemblies.
4252 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
4254 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
4256 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
4257 length of event->other array.
4258 (typebuilder_setup_events): Ditto.
4260 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
4261 'assembly_by_name' and add an 'assemblies' list.
4263 * assembly.h assembly.c: Add a new search hook for determining whenever
4264 an assembly is already loaded. Use this instead of searching in the
4265 loaded_assemblies list.
4267 * domain.c appdomain.c: Implement the new search hook so loaded
4268 assemblies are now scoped by appdomain. Fixes #67727.
4270 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
4272 * threads.c (mono_thread_attach): Initialize synch_lock field so
4273 mono_thread_detach works again.
4275 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
4276 'lib' too. Fixes #63130.
4278 2004-10-06 Jackson Harper <jackson@ximian.com>
4280 * culture-info-tables.h: regenerated.
4282 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
4284 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
4285 implemented by other interfaces in the result. Fixes #65764.
4287 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4288 Handle unloadable modules without crashing.
4290 * image.c (load_modules): Revert the previous patch since modules must
4291 have a fixed index inside the array.
4293 * image.c (load_modules): Don't include native modules in the modules
4296 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
4298 * reflection.h: Add param_defaults field.
4300 * reflection.c: Add support for parameter defaults in dynamic methods.
4303 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
4304 an empty string when a type has no namespace. Fixes #64230.
4306 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
4308 * tabledefs.h: Added "internal" security actions to support non-CAS
4309 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
4310 Note: they do not seems to be used anymore in 2.0 (new metadata format)
4312 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
4314 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
4315 constructor of abstract class. Fixes #61689.
4317 2004-10-04 Martin Baulig <martin@ximian.com>
4319 * class-internals.h (MonoGenericContainer): New type.
4320 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
4321 `MonoGenericContainer *generic_container'.
4322 (MonoClass): Replaced `gen_params' and `num_gen_params' with
4323 `MonoGenericContainer *generic_container'.
4325 * metadata.c (mono_metadata_load_generic_params): Return a
4326 `MonoGenericContainer *' instead of a `MonoGenericParam *';
4327 removed the `num' argument.
4329 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
4331 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
4334 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
4337 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
4339 * reflection.c: Save pe_kind and machine values into the generated
4342 * appdomain.c: Bump corlib version number.
4344 * object-internals.h: Reorganize layout of LocalBuilder.
4346 * class-internals.h class.c (mono_class_get_implemented_interfaces):
4347 New helper function.
4349 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
4350 created MonoType for dynamic types. Fixes #66180.
4352 2004-10-02 Ben Maurer <bmaurer@ximian.com>
4354 * threadpool.c: the ares hashtable needs a critical section around it.
4355 this prevents some nasty segfaults
4357 2004-10-02 Massimiliano Mantione <massi@ximian.com>
4359 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
4360 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
4363 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
4365 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
4367 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
4369 * image.c: Always canonicalize image file names, to avoid loading
4370 the same assembly twice when referenced using a relative path.
4372 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
4374 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
4376 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
4378 * marshal.c: Fix warnings.
4380 2004-09-29 Geoff Norton <gnorton@customerdna.com>
4382 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
4383 attempting to marshal the delegate_trampoline as the method_addr.
4384 This patch has a static hashtable of marshalled delegates so that
4385 we can map delegate_trampoline addresses back to delegates. This
4386 allows a delegate passed to managed code to be passed back into native
4389 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
4391 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
4393 * reflection.c (method_encode_code): Align method headers properly.
4396 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
4398 * marshal.c: In the runtime invoke wrapper, reset the abort
4399 exception if it is cached. This avoids the automatic rethrowal of
4400 the exception after the catch of the wrapper. Also check for pending
4401 interruptions before calling the managed method. This is done using
4402 the new method emit_thread_force_interrupt_checkpoint, since the
4403 normal checkpoint method is ignored when running the invoke wrapper.
4404 * object.c: If the abort exception is rethrown, set the abort_exc
4405 field of the thread, so it will be rethrown aftere every catch.
4406 * threadpool.c: Only run an interruption checkpoint if what has been
4407 requested is a stop of the thread (aborts will be ignored).
4408 * threads.c: By default, a thread will now never be interrumped while
4409 running the runtime invoke wrapper (this ensures that runtime_invoke
4410 will always return to the caller if an exception pointer is provided).
4411 There is a new special method mono_thread_force_interruption_checkpoint()
4412 to force an interruption checkpoint even if running a protected
4413 wrapper, which is used by the same runtime invoke wrapper to do a check
4416 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
4418 * object.c, object-internals.h: Implemented mono_release_type_locks,
4419 which releases the cctor locks held by a thread.
4420 * threads.c, threads.h: In thread_cleanup, release cctor locks held
4421 by a thread. Added mono_thread_exit() method to be used to safely stop
4424 2004-09-28 Raja R Harinath <rharinath@novell.com>
4426 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4427 Move null check before dereference. Avoid indexing beyond the end
4428 of the 'modules' array.
4430 2004-09-28 Raja R Harinath <rharinath@novell.com>
4432 * metadata-internals.h (MonoImage): Add module_count field.
4433 * image.c (load_modules): Set image->module_count.
4434 (mono_image_load_file_for_image): Use image->module_count.
4435 * reflection.c (mono_image_load_module): Append to image->modules array
4436 of dynamic assembly.
4437 (mono_module_get_object): Fix loop to actually increment index.
4438 Use image->module_count.
4439 * assembly.c (mono_assembly_load_references): Use image->module_count.
4440 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4443 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
4445 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
4446 Avoid assert on generic types.
4448 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
4450 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
4452 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
4454 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
4455 function to convert a MarshalSpec structure to its managed counterpart.
4457 * reflection.c: Fix warnings.
4459 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
4462 * icall.c (mono_create_icall_signature): Fix build.
4464 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
4466 * icall.c: Add MakePointType icall.
4468 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
4471 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4473 * threadpool.c: reuse allocated slots in the queue.
4475 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
4477 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
4479 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
4481 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
4484 * tabledefs.h: Add constants for pinvoke attributes BestFit and
4485 ThrowOnUnmappableChar.
4487 * icall.c (ves_icall_Type_GetPacking): New icall.
4489 2004-09-24 Martin Baulig <martin@ximian.com>
4491 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
4493 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4496 (mono_domain_set): allow setting a domain that is being unloaded.
4497 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
4500 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
4502 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
4503 the GetCustomAttributes icall.
4505 2004-09-23 Martin Baulig <martin@ximian.com>
4507 * object-internals.h (MonoReflectionGenericParam): Replaced
4508 'has_ctor_constraint', `has_reference_type' and `has_value_type'
4509 with `guint32 attrs'.
4511 2004-09-23 Martin Baulig <martin@ximian.com>
4513 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
4515 2004-09-23 Martin Baulig <martin@ximian.com>
4517 * object-internals.h (GenericParameterAttributes): New enum.
4519 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
4521 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
4523 * class.c (init_events): Fill out event->other field.
4525 * class.c: Fix warnings.
4527 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
4529 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
4531 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
4532 walk which doesn't supply the IL offset.
4534 2004-09-22 Martin Baulig <martin@ximian.com>
4536 * reflection.c (mono_reflection_setup_internal_class): If we're
4537 System.ValueType, System.Object or System.Enum, set
4538 `klass->instance_size' and create the vtable.
4539 (mono_reflection_create_internal_class): If we're an enum type,
4540 get the base class from our current corlib.
4542 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
4544 * reflection.h (MonoResolveTokenError): New type.
4546 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
4549 * icall.c: Add an 'error' argument to the ResolveToken icalls.
4551 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
4553 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
4554 Support also calling constructors, but only for already allocated objects.
4556 2004-09-17 Geoff Norton <gnorton@customerdna.com>
4558 * reflection.c (type_get_qualified_name): If the klass is null
4559 return the typename to avoid a NullRefEx.
4560 (encode_cattr_value): Get the qualified name of the boxed type,
4561 not the underlying enumtype. Fixes #62984.
4563 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
4565 * marshal.c: Fix problems with previous checkin.
4567 2004-09-21 <vargaz@freemail.hu>
4569 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
4570 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
4572 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
4574 2004-09-21 Geoff Norton <gnorton@customerdna.com>
4576 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
4577 should only return a type for pointers, arrays, and passbyref types.
4580 2004-09-21 Martin Baulig <martin@ximian.com>
4582 * domain.c (mono_debugger_check_runtime_version): New public
4585 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
4587 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
4589 * reflection.c: Added missing sort to the declarative security
4590 attributes table. MS implementation stops seeing the attributes if the
4591 token number regress in the table (as shown by ildasm and permview).
4593 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
4595 * object-internals.h (MonoReflectionModule): Add 'token' field.
4597 * reflection.c (mono_reflection_get_token): Add support for Module
4599 (mono_module_get_object): Set 'token' field.
4600 (mono_module_file_get_object): Set 'token' field.
4602 * icall.c: Add new Assembly and Module icalls.
4604 * appdomain.c: Bump corlib version.
4606 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
4608 * loader.h loader.c class.h class.c: Add helper functions for obtaining
4609 tokens of metadata objects.
4611 * reflection.h reflection.c (mono_reflection_get_token): New function
4612 to obtain the token of a metadata object.
4614 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
4616 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
4618 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
4620 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
4622 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
4624 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
4625 * object-internals.h: Added 3 MonoArray* members to MonoReflection
4626 AssemblyBuilder to access the permissions set in the class lib.
4627 * reflection.c: Added security attributes encoding step in
4628 mono_image_build_metadata.
4629 * tabledefs.h: Added new security actions defined in 2.0:
4630 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
4632 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
4634 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
4637 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
4639 * locales.c: nullify the ICU_collator member of CompareInfo when it is
4640 finalized. There where random SIGSEVs at program termination, when
4641 an object being finalized was trying to do a string comparison and
4642 the current culture was already finalized.
4644 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4646 * threads.c: call thread_cleanup before finishing the thread if we get
4649 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
4651 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
4652 assemblies from the parent. Fixes #65665.
4654 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
4656 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
4659 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
4661 * reflection.h: add prototype for mono_get_dbnull_object
4662 * reflection.c: add prototypes for get_default_param_value_blobs
4663 and mono_get_object_from_blob for fussier compilers
4665 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
4667 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
4668 false deadlock checks in class initialization.
4670 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
4672 * image.c (mono_image_addref): Fix comment.
4674 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
4677 2004-09-12 Jambunathan K <kjambunathan@novell.com>
4679 * reflection.c (mono_param_get_objects): Modified to return
4680 ParameterInfo.DefaultValue object.
4682 (get_default_param_value_blobs):
4683 (mono_get_object_from_blob):
4684 (mono_get_dbnull_object): New helper routines.
4686 * object.c (mono_get_constant_value_from_blob): New helper routine
4687 carved out from get_default_field_value ()
4689 * object-internals.h (mono_get_constant_value_from_blob): Added
4690 function declaration.
4692 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
4694 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
4695 referenced assemblies. Fixes #62135.
4697 * exception.h exception.c (mono_get_exception_file_not_found2): New
4700 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
4702 * class.h class.c: Add mono_type_get_underlying_type ().
4704 2004-09-09 Geoff Norton <gnorton@customerndna.com>
4706 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
4707 Fix GetTypes() to support dynamically created assemblies.
4709 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
4711 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
4713 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
4716 * reflection.h reflection.c loader.c: Allow dynamic construction of
4717 pinvoke methods. Fixes #65571.
4719 * reflection.c (mono_reflection_get_type): Revert previous change since
4720 it causes regressions.
4722 2004-09-08 Martin Baulig <martin@ximian.com>
4724 * class.c (class_compute_field_layout): Don't call
4725 mono_class_layout_fields() for open generic instances.
4727 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
4728 * threads.c appdomain.c: fix typo in GC macro
4730 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4732 * threads.c: don't call mono_thread_detach() in start_wrapper(),
4733 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
4735 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
4737 * image.c (mono_image_close): Applied patch from
4738 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
4739 assembly is loaded multiple times from data.
4741 * image.c (mono_image_open): Fix warning.
4743 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
4745 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
4748 * reflection.c (mono_reflection_create_runtime_class): Initialize
4749 klass->nested_classes. Fixes #61224.
4751 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
4753 * threads.c: sched_yield() on exit, to allow threads to quit.
4755 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
4757 * object.c (mono_unhandled_exception): Remove leftover debug code.
4759 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
4761 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
4763 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
4765 * marshal.c (emit_marshal_array): Really null terminate string arrays.
4767 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
4769 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
4771 * marshal.c (emit_marshal_array): Null terminate string arrays.
4773 * marshal.c (raise_auto_layout_exception): Fix warning.
4775 * reflection.c (mono_param_get_objects): Initialize the default value
4776 with DBNull.Value, not null. Fixes #62123.
4778 2004-09-01 Miguel de Icaza <miguel@ximian.com>
4780 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
4781 throw an exception with a cute explanation.
4783 2004-09-06 Dick Porter <dick@ximian.com>
4785 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
4786 Close the new process's thread handle, as we don't use it. The
4787 handle stays around forever otherwise.
4789 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
4791 * object.c (arith_overflow): Fix warning.
4793 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
4794 calling conventions in method refs. Fixes #65352.
4796 * reflection.c: Fix warnings.
4798 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
4800 * icall.c: Add a new icall for Array.Clear
4802 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
4804 * object.c: When allocating an array, we have to throw
4805 an overflow exception if any of the lengths are < 0.
4807 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
4809 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
4810 properly. Also move implementation of string array marshalling to
4811 managed code. Fixes #42316.
4813 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4815 * assembly.c: provide more information when loading an assembly fails.
4817 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4819 * filewatcher.c: don't expect the development fam package to be
4822 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
4824 * marshal.c: Make a copy of the signature cookie since it will be
4825 freed by the caller.
4827 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
4829 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
4831 * metadata.c (mono_metadata_free_marshal_spec): New function to free
4834 * marshal.c: More refactoring.
4836 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
4839 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
4841 * object.c: In mono_message_invoke, fill the output parameter array after
4842 calling the managed method (it was done before the call). This fixes
4845 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
4847 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
4850 2004-09-02 Martin Baulig <martin@ximian.com>
4852 * class.c (mono_class_instance_size): Don't allow generic type
4853 definitions or open generic instances.
4854 (mono_class_array_element_size): If we're a value type, call
4855 mono_class_instance_size() on the original class.
4857 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
4858 handle generic instances.
4860 * mono-debug-debugger.c (write_type): Handle generic instances
4863 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
4865 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
4866 the allocation request fails. Fixes #65089.
4868 * object.c (mono_runtime_free_method): Do not call mono_free_method.
4870 * object.c (mono_runtime_free_method): New function to free a dynamic
4873 * marshal.c (mono_delegate_free_ftnptr): New function to free the
4874 delegate trampoline.
4876 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
4877 with hasthis as dynamic,
4879 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
4881 * domain.c (mono_jit_info_table_remove): New function to remove an
4882 entry from the jit info table.
4884 * class-internals.h (MonoMethod): Add 'dynamic' field.
4886 * loader.c: Fix warnings.
4888 2004-09-01 Martin Baulig <martin@ximian.com>
4890 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
4891 instead of mono_debugger_lock() because the latter one is a no-op
4892 unless running in the debugger.
4894 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
4896 * class.c (class_compute_field_layout): Classes with auto-layout or
4897 reference fields are not blittable.
4899 2004-09-01 Dick Porter <dick@ximian.com>
4901 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
4902 mono_image_get_filename() to get the assembly location.
4905 * metadata.h: Fix compile warnings
4907 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
4909 * class.c (class_compute_field_layout): System.Object is blittable.
4911 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
4912 as in/out. Fixes #59909.
4914 2004-09-01 Martin Baulig <martin@ximian.com>
4916 * metadata.h (MONO_TYPE_ISREFERENCE): Call
4917 mono_metadata_generic_inst_is_valuetype() if we're a generic
4918 instance to check whether our underlying type is a reference type.
4920 2004-09-01 Martin Baulig <martin@ximian.com>
4922 * metadata.c (mono_type_size): If we're a generic instance, call
4923 mono_class_value_size() for value types.
4925 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
4927 * marshal.c: Implement more custom marshalling functionality. Fixes
4930 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
4932 * mono-debug.c, debug-mono-symfile.c: add some locking love.
4934 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
4936 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
4938 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
4940 * icall.c: Fix some warnings.
4942 * threads.c (abort_appdomain_thread): Fix unref errors.
4943 (mono_thread_current): Fix THREAD_DEBUG define.
4945 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
4947 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
4949 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
4951 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
4953 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
4956 2004-08-28 Martin Baulig <martin@ximian.com>
4959 (mono_metadata_generic_inst_is_valuetype): New public function.
4961 * metadata.h (MONO_TYPE_ISSTRUCT): Call
4962 mono_metadata_generic_inst_is_valuetype() if we're a generic
4963 instance to check whether our underlying type is a valuetype.
4965 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
4967 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
4970 2004-08-25 Martin Baulig <martin@ximian.com>
4972 * loader.c (mono_get_method_from_token): Abstract methods can also
4973 be generic and thus have type parameters.
4975 * metadata-internals.h
4976 (MonoDynamicImage): Added `GPtrArray *gen_params'.
4978 * reflection.c (mono_image_get_generic_param_info): Don't create a
4979 metadata row, just add an entry to the `gen_params' array.
4980 (build_compressed_metadata): Sort the `gen_params' array and then
4981 actually create the metadata.
4983 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4985 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
4987 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
4989 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
4991 2004-08-24 Martin Baulig <martin@ximian.com>
4993 * class.cs (mono_class_is_subclass_of): Like an interface, a
4994 generic instance also derives from System.Object.
4996 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
4998 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
4999 custom modifiers to be in any order. Fixes #61990.
5001 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
5003 * object.c: Register mono_object_new_fast icall.
5005 * object.c (mono_class_get_allocation_ftn): Return to calling
5006 mono_object_new_fast, since it seems faster to compute the object
5007 size in unmanaged code than passing it as a parameter.
5009 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
5011 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
5012 this function with Boehm as the oom handler, so we don't have to check
5013 the result of GC_malloc.
5015 * object.c: Remove checks for oom.
5017 * object.h object.c (mono_class_get_allocation_ftn): New function to
5018 return the icall which can be used to allocate an instance of a given
5021 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
5023 * class-internals.h: Add 'enabled' field.
5025 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
5027 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
5029 2004-08-18 Jambunathan K <kjambunathan@novell.com>
5030 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
5033 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
5035 * appdomain.c: use the Tls function for appdomain too,
5036 at Zoltan's request. Actually return in mono_context_get
5038 * appdomain.c, profiler.c, threads.c: use __thread
5040 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
5042 * appdomain.c threads.c: Call GC_CreateThread on windows.
5044 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
5045 multiple libraries since this don't work on windows.
5047 2004-08-18 Martin Baulig <martin@ximian.com>
5050 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
5053 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
5054 MonoMethodNormal since we also need it for abstract and interface
5058 (build_compressed_metadata): Sort the GenericParam table.
5059 (mono_image_create_token): Added `gboolean create_methodspec'
5060 argument; this is false when generating a MethodImpl token.
5061 (reflection_methodbuilder_to_mono_method): Abstract and interface
5062 methods may also have generic parameters.
5064 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
5066 * appdomain.c: thread local alloc
5068 2004-08-17 Martin Baulig <martin@ximian.com>
5070 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
5073 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
5076 * class.c (mono_type_get_full_name): New public function.
5077 (mono_type_get_name): Don't include the type arguments.
5079 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
5081 * Makefile.am: Build static versions of libmetadata and libmonoruntime
5082 for inclusion into the mono executable.
5084 2004-08-16 Martin Baulig <martin@ximian.com>
5086 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
5087 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
5089 2004-08-14 Martin Baulig <martin@ximian.com>
5091 * class.c (dup_type): Also copy the `byref' field.
5093 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
5095 * reflection.c (create_dynamic_mono_image): Revert the last change
5096 since it breaks bootstrap.
5098 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
5100 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
5102 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
5103 not free them with g_free.
5105 2004-08-11 Martin Baulig <martin@ximian.com>
5107 * reflection.c (mono_reflection_setup_internal_class): Also call
5108 mono_class_setup_mono_type() if we already have a `tb->type.type'.
5110 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
5112 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
5113 called during default (first) AppDomain creation. Keep track of
5114 Evidence when loading assemblies.
5116 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5118 * opcodes.c, opcodes.h: reduce runtime relocations.
5120 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
5122 * culture-info.h, locales.c: fixes and chages to sue the new
5123 optimized format of the locale data.
5124 * culture-info-tables.h: regenerated.
5126 2004-08-06 Geoff Norton <gnorton@customerdna.com>
5128 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
5130 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
5132 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
5133 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
5134 * domain-internals.h: icall declaration.
5135 * icall.c: icall registration.
5136 * object-internals.h: New fields in MonoAssembly for CAS.
5138 2004-08-05 Duncan Mak <duncan@ximian.com>
5140 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
5143 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5145 * reflection.c: fix to deal with object[] arrays in custom ctors
5148 2004-08-05 Martin Baulig <martin@ximian.com>
5150 * class.c (mono_class_array_element_size): Added support for
5151 generic instances and correctly handle "recursive" types.
5153 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
5155 * assembly.c: Fix warnings.
5157 2004-08-04 Martin Baulig <martin@ximian.com>
5160 (mono_type_get_name_recurse): Added `gboolean include_arity'
5161 argument specifying whether or not we should include the generic
5162 arity in the type name.
5163 (_mono_type_get_name): New static function.
5164 (mono_class_setup_vtable): If we're a generic instance, don't
5165 include the generic arity in the names of explicit method
5168 2004-08-03 Martin Baulig <martin@ximian.com>
5170 * class.c (mono_type_get_name_recurse): Enclose the generic type
5171 arguments in `<', '>'.
5173 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5175 * gc.c: make GC warning messages use the trace API, they are just
5176 noise to most of the users.
5178 2004-08-03 Martin Baulig <martin@ximian.com>
5180 * debug-mono-symfile.c (read_string): Correctly read the string.
5182 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
5184 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
5186 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
5188 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
5190 2004-07-30 Martin Baulig <martin@ximian.com>
5192 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
5193 Reflect latest symbol writer changes.
5195 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5197 * object.c: always create an object if null is passed
5198 to Invoke() where a valuetype is expected.
5200 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
5202 * marshal.c (mono_marshal_init): make managed
5203 signatures match native ones better for 64bits.
5205 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5207 * appdomain.c: hack to build correctly the private bin path on windows.
5210 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
5212 * assembly.c: Load mscorlib from the correct framework directory
5213 (mono/<version>/mscorlib.dll).
5214 * appdomain.h: Added prototypes for new functions.
5215 * internals.h: Added some prototypes.
5216 * domain.c: When initializing the runtime, get from the executable and
5217 the configuration files the runtime version that the app supports.
5218 Added support methods for reading app.exe.config. Added list of versions
5219 supported by the JIT. Added two new methods: mono_init_from_assembly,
5220 which initializes the runtime and determines the required version from
5221 the provided exe file, and mono_init_version, which initializes
5222 the runtime using the provided version.
5223 * icall.c: Get machine.config from version-specific directory.
5224 * reflection.c: When generating an image, embed the version number
5225 of the current runtime.
5227 2004-07-28 Dick Porter <dick@ximian.com>
5230 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
5231 returned sockaddr size before creating the remote address object.
5232 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
5235 2004-07-28 Dick Porter <dick@ximian.com>
5237 * locales.c (string_invariant_compare_char): Fix invariant char
5238 compares between upper and lower cases. Fixes bug 61458.
5240 2004-07-27 Ben Maurer <bmaurer@ximain.com>
5242 * marshal.c: actually cache stelem.ref wrappers.
5244 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
5246 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
5247 sections and remove the mono_cli_rva_map () function.
5249 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5251 * debug-mono-symfile.c: fix one more endianess issue, from a patch
5252 by Geoff Norton (<gnorton@customerdna.com>).
5254 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
5256 * class.c: fix class loads for pointer types (typeof(int) !=
5259 2004-07-27 Martin Baulig <martin@ximian.com>
5261 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
5262 reading the debugging information from an external ".mdb" file.
5264 2004-07-24 Martin Baulig <martin@ximian.com>
5266 * reflection.c (mono_image_get_type_info): Only write a class
5267 layout entry if we actually have a size or a packing size.
5269 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
5271 * reflection.c (type_get_fully_qualified_name):
5272 insert cast to get type checking of ?: with non-gcc compilers
5274 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
5276 * rand.c: use g_getenv for both lookups of
5279 2004-07-17 Martin Baulig <martin@ximian.com>
5281 * reflection.c (mono_reflection_bind_generic_method_parameters):
5282 Set `gmethod->reflection_info'.
5284 2004-07-17 Martin Baulig <martin@ximian.com>
5286 * class.c (mono_class_create_from_typedef): Insert the newly
5287 created class into the hash table before computing the interfaces
5288 since we could be called recursively.
5290 2004-07-16 Ben Maurer <bmaurer@ximain.com>
5292 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
5293 function to implement stelem.ref in managed code
5294 * class-internals.h, debug-helpers.c: a new wrapper type
5297 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
5299 * gc.c: allow GC handles to work even when no GC is compiled in.
5300 Fix part of bug #61134 (GetAddrOfPinnedObject).
5302 2004-07-13 Peter Williams <peter@newton.cx>
5304 * process.c (complete_path): Make sure we don't attempt to execute
5307 2004-07-12 Geoff Norton <gnorton@customerdna.com>
5309 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
5310 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
5311 and will add/subtract the hour if needed
5313 2004-07-12 Martin Baulig <martin@ximian.com>
5315 * reflection.c (mono_field_get_object): If we have
5316 `field->generic_info', take the attributes from
5317 `field->generic_info->generic_type'.
5319 2004-07-12 Martin Baulig <martin@ximian.com>
5321 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
5322 This function must be called before initializing the runtime.
5323 (mono_debug_init_1): New function; call this after initializing
5324 the runtime, but before loading the assembly. It tells the
5325 debugger to load corlib and the builtin types.
5327 * mono-debug-debugger.c: Did some larger changes in the debugging
5328 code; support recursive class declarations, make sure we actually
5331 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5333 * debug-helpers.c: undo my previous patch and fixed the real issue in
5334 ../mini/exceptions-x86.c
5336 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5338 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
5339 when no HOME env. variable was set and a NullRef was thrown in a .cctor
5340 called from other .cctors.
5342 2004-07-09 Miguel de Icaza <miguel@ximian.com>
5344 * loader.c: Removed the mono_loader_wine_init hack now that we are
5345 doing a managed version of Windows.Forms.
5347 2004-07-09 Ben Maurer <bmaurer@ximian.com>
5349 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
5350 threadpool.c, threads.c: remove static data from rootset.
5352 2004-07-09 Dick Porter <dick@ximian.com>
5354 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
5355 Don't do any more processing if the matched length was 0. It was
5356 increasing the size of the string before. Fixes bug 61167.
5358 2004-07-09 Dick Porter <dick@ximian.com>
5362 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
5363 Add support for SO_PEERCRED if its available.
5365 2004-07-09 Peter Bartok <pbartok@novell.com>
5366 * loader.c: winelib.exe.so error message is now only displayed if
5367 MONO_DEBUG is set. To help us avoid questions when people are trying
5368 out the new Managed.Windows.Forms.
5370 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
5372 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
5373 for isinst and castclass wrappers.
5375 * class-internals.h icall.c: Move registration and lookup of JIT icalls
5376 to libmetadata from the JIT, so they could be used by the marshalling
5377 code and the interpreter.
5379 * marshal.c: Register marshalling related JIT icalls here instead of
5380 in mini.c. Use CEE_MONO_ICALL instead of the family of
5381 CEE_MONO_PROC<x> opcodes to call marshalling functions.
5383 * metadata.h: Remove unneeded marshalling conversions.
5385 * opcodes.c: Update for new opcodes.
5387 2004-07-08 Martin Baulig <martin@ximian.com>
5389 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
5390 (mono_debug_get_domain_data): Make this function static.
5392 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5394 * gc.c, object.h: add nice GC handle API for embedders.
5396 2004-07-06 Ben Maurer <bmaurer@ximian.com>
5398 * reflection.c: more changes for the new api
5400 * object.c: When we reflect on a field w/ a constant value, it
5401 will not have a memory location, so we must access metadata. Also,
5402 allow easier reading of strings so that we can read them from
5405 * class.c (mono_class_layout_fields): no need for literal fields here.
5407 * class-internals.h: api changes for const fields
5409 * icall.c (ves_icall_get_enum_info): use new apis for const fields
5411 2004-07-06 Martin Baulig <martin@ximian.com>
5413 * mono-debug.h: Increment version number to 44.
5415 * mono-debug.c (mono_debug_add_wrapper): The second argument is
5416 now a gpointer, rewrote this whole method.
5418 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
5419 function. Add information about the wrapper in a new "misc table".
5421 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
5422 for the new misc table.
5424 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
5426 * metadata-internals.h image.c: Add a cache for helper signatures.
5428 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
5430 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
5432 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
5433 delegates from a delegate. Fixes #61033.
5435 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
5436 marshalling of stringbuilder arrays. Fixes #59900.
5438 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
5440 * icall.c: Add EnumBuilder:setup_enum_type icall.
5442 2004-06-30 Ben Maurer <bmaurer@ximian.com>
5444 * icall.c: Added a new icall for the property version of
5447 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
5449 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
5450 it has a constant size across platforms.
5452 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
5455 2004-06-29 Martin Baulig <martin@ximian.com>
5457 * mono-debug.c (mono_debug_add_method): Protect the whole function
5458 in mono_debugger_lock(), not just parts of it.
5460 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
5462 * reflection.c: make sure padding bytes in heaps are zeroed.
5464 2004-06-24 David Waite <mass@akuma.org>
5466 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
5467 image.c, loader.c, locales.c, marshal.c, metadata.c,
5468 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
5469 string-icalls.c, threads.c: change to C90-style comments from C99 /
5472 2004-06-24 Dick Porter <dick@ximian.com>
5475 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
5476 return createdNew. Fixes bug 60412.
5479 * icall.c: Add createdNew parameter to CreateMutex icall
5481 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5483 * reflection.c, object-internals.h: save default value in params.
5485 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5487 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
5488 no need to build a new path combining that with the application base.
5491 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
5493 * reflection.c: fixed minor standard compliance issues.
5495 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
5497 * reflection.c: fixed issue with encoding some custom attributes
5498 (arrays in properties and fields, bug #60411).
5500 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5502 * reflection.c: fix start address when copying the public key token.
5504 2004-06-23 Martin Baulig <martin@ximian.com>
5506 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
5507 the `exc' object in a static object to put it into the GC's root set.
5509 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
5511 * reflection.c: make mono_reflection_setup_internal_class ()
5512 callable a second time to setup a new parent class.
5514 2004-06-23 Dick Porter <dick@ximian.com>
5516 * threads.c: Check for WAIT_IO_COMPLETION return values.
5518 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
5520 * appdomain.c: Removed the g_free on the public key token. Now copy
5521 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
5522 * assembly.c: Added public key token string value when loading
5523 assemblies. Fix bug #60439.
5524 * icall.c: Added missing informations (like public key) in
5525 GetReferencedAssemblies. Fix #60519.
5526 * image.h: Changed definition for public key token from const char*
5527 public_tok_value to guchar public_key_token [17];
5528 * reflection.c: Updated for changes to public key token.
5530 2004-06-22 Lluis Sanchez Gual
5532 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
5533 for the field in base classes.
5535 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5537 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
5538 mark headers as not supported, they are installed only for use by the
5541 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
5543 * *.c, *.h: avoid namespace pollution in public headers.
5545 2004-06-21 Martin Baulig <martin@ximian.com>
5547 * exception.c (mono_get_exception_security): It's in
5548 "System.Security", not in "System".
5550 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
5551 the exception classes.
5553 2004-06-21 Martin Baulig <martin@ximian.com>
5555 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
5556 Protect the exception object from being finalized.
5558 2004-06-21 Martin Baulig <martin@ximian.com>
5560 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
5563 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
5565 * reflection.c: Load the assembly in mono_reflection_type_from_name,
5566 if it was not loaded before. Fix parts of #60439.
5568 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
5570 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
5571 code that was broken since Ben's change: wrappers are now
5572 dependent on the method signature only again.
5574 2004-06-21 Martin Baulig <martin@ximian.com>
5576 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
5577 added interface support.
5579 2004-06-21 Martin Baulig <martin@ximian.com>
5581 * class.c (mono_vtable_get_static_field_data): New public method.
5583 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
5585 * filewatcher.c : Windows build fix to be compliant with API changes.
5587 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5589 * class.h, class.c: more accessors.
5590 * metadata.h, metadata.c: prepare for hiding MonoType and
5591 MonoMethodSignature: people should use the accessors from now on
5592 outside of the tree.
5594 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
5596 * *.c, *.h: more API cleanups.
5598 2004-06-18 Jackson Harper <jackson@ximian.com>
5600 * assembly.c: Trace loading assemblies.
5601 * loader.c: Trace loading native libraries.
5602 * mono-config.c: Trace loading config files.
5604 2004-06-18 Dick Porter <dick@ximian.com>
5606 * locales.c: Tell ICU the lengths of strings, it can cope with
5607 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
5609 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
5611 * image.c: swapped name/filename;
5613 2004-06-18 Martin Baulig <martin@ximian.com>
5615 * mono-debug-debugger.c (write_class): Write the parent class at
5616 the end of the header.
5618 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
5620 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
5622 2004-06-17 Raja R Harinath <rharinath@novell.com>
5624 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
5625 (bundle_obj): New conditional define.
5626 (BUILT_SOURCES): Remove.
5627 ($(bundle_srcs)): Make parallel-make safe.
5628 (libmonoruntime_la_LIBADD): Make unconditional.
5629 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
5630 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
5632 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
5634 * culture-info-tables.h: It was inconsistent with the latest
5637 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
5639 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
5642 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
5645 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
5647 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
5648 cleaned up public header threads.h.
5650 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5652 * Makefile.am, *.c, *.h: more API cleanups.
5654 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
5656 * Makefile.am: removed monosn from compilation.
5657 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
5658 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
5659 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
5660 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
5661 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
5662 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
5664 2004-06-15 Jackson Harper <jackson@ximian.com>
5666 * assembly.c: Make locales lower case when searching the GAC for
5667 assemblies. gacutil will always make locales lowercase when
5668 installing so this effectively makes them case insensitive.
5670 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
5672 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
5673 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
5674 parameter which allows to choose whether the wait can be interrupted or
5675 not. Also added the method mono_monitor_enter(), which locks the monitor
5676 using an infinite wait and without allowing interruption.
5677 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
5679 * object.h: Added new fields in MonoThread. suspend_event holds the event
5680 used to susped/resume the thread. synch_lock is the lock object to use for
5681 modifying the thread state.
5682 * threads.c: Use the new synch_lock object for locking, instead of "this",
5683 which can generate deadlocks.
5684 Moved thread state change in Thread.Sleep and Thread.Join from managed
5685 to unmanaged code. This avoids a deadlock when the thread was suspended
5686 just after acquiring the thread lock.
5687 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
5688 Implemented Thread.Suspend using an event instead of ThreadSuspend,
5689 which is not fully implemented in the io-layer.
5690 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
5692 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
5694 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
5695 threads-types.h: more API cleanups.
5697 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
5699 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
5700 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
5701 threadpool.c, threads.c: first pass at the exported API cleanup.
5703 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
5705 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
5707 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5709 * icall.c: added internalGetHome.
5711 2004-06-14 Dick Porter <dick@ximian.com>
5713 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
5714 possible to return successfully when '.' or '..' were the only
5715 entries in a directory, but were skipped. The MonoIOStat was not
5716 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
5719 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5721 * reflection.c: make binaries run on .Net 1.1 by default.
5723 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
5725 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
5727 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
5729 * marshal.c: keep track of struct size with explicit layout
5732 2004-06-12 Martin Baulig <martin@ximian.com>
5734 * mono-debug-debugger.c: Comment out a debugging g_message().
5736 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
5738 * reflection.c, reflection.h: do not free custom attrs that are cached.
5739 * icall.c: use braces to make code clearer.
5741 2004-06-11 Martin Baulig <martin@ximian.com>
5743 * class.h (MonoInflatedField): New type.
5744 (MonoClassField): Replaced `MonoType *generic_type' with
5745 `MonoInflatedField *generic_info'.
5748 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
5750 2004-06-11 Martin Baulig <martin@ximian.com>
5752 * reflection.c (mono_image_create_method_token): Correctly encode
5755 2004-06-11 Martin Baulig <martin@ximian.com>
5757 * metadata.c (mono_metadata_parse_method_signature): When parsing
5758 a MethodDef which has VarArgs, also set sentinelpos if we don't
5759 have any parameters.
5761 2004-06-11 Martin Baulig <martin@ximian.com>
5763 * verify.c (mono_method_verify): In CEE_CALL, use
5764 mono_method_get_signature() to get the method's signature, unless
5765 we're a PInvoke method.
5767 2004-06-10 Jackson Harper <jackson@ximian.com>
5769 * assembly.c: Use <path>/lib/mono/gac for the extra paths
5770 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
5771 logical name as the supplied path is just a prefix to the gac not
5772 the direct path to it.
5774 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
5776 * reflection.c: make the token for a created method match
5777 the token of the MethodBuilder it was created from
5778 (IKVM requires this behaviour now).
5780 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
5782 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
5783 reflection.c, socket-io.c: leak fixes.
5785 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
5787 * icall.c: handle sentinel pos in vararg methods in position different
5790 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5792 * culture-info-tables.h: freshly generated.
5794 2004-06-09 Martin Baulig <martin@ximian.com>
5796 * loader.c (mono_get_method_constrained): Call `mono_class_init
5797 (constrained_class)'.
5799 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
5801 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
5802 any methods. Fixes #59629.
5804 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
5806 * culture-info-tables.h: reflecting locale-builder updates.
5808 2004-06-08 Dick Porter <dick@ximian.com>
5811 * locales.c: Fixed compile warnings, including a real bug in
5812 CompareInfo_internal_compare.
5814 2004-06-08 Dick Porter <dick@ximian.com>
5817 (ves_icall_System_Globalization_CompareInfo_internal_index):
5818 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5819 Double-check the resuls of usearches, because ICU currently
5820 ignores most of the collator settings here. Fixes bug 59720.
5822 2004-06-08 Dick Porter <dick@ximian.com>
5825 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
5826 Fix memory leak and segfault-causing typo. No idea how this one
5827 lasted so long without being noticed.
5829 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
5831 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
5832 any methods. Fixes #59629.
5834 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5837 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
5838 own the critical section before). Removed dead code (that's done
5839 in the preload hook).
5841 (mono_assembly_load_with_partial_name): call the preload hook.
5843 2004-06-08 Martin Baulig <martin@ximian.com>
5845 * metadata.c (mono_metadata_signature_alloc): Default
5846 `sentinelpos' to -1.
5848 * reflection.c (mono_image_get_array_token): Likewise.
5850 2004-06-08 Martin Baulig <martin@ximian.com>
5852 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
5854 * metadata.c (mono_metadata_parse_method_signature): When parsing
5855 a MethodDef which has VarArgs, set sentinelpos.
5857 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
5858 `gint16' since we're using -1 for non-varargs methods.
5861 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
5862 (method_encode_signature): Added varargs support.
5863 (method_builder_encode_signature): Likewise.
5864 (mono_image_get_varargs_method_token): New static method.
5865 (mono_image_create_method_token): New public method; this is
5866 called via an icall instead of mono_image_create_token() when
5867 calling a varargs method.
5869 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
5871 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
5873 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
5875 * culture-info-tables.h : Reflecting the latest locale-builder that
5876 fixed empty array representation ({} to {0}).
5878 2004-06-07 Jackson Harper <jackson@ximian.com>
5880 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
5881 looking up extra gac paths. This allows MONO_GAC_PATH to act
5882 exactly like a prefix.
5884 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
5886 * reflection.c (mono_reflection_type_from_name): Make a copy of the
5887 type name before modifying it. Fixes #59405.
5889 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
5891 * culture-info.h: added fields for "all datetime patterns".
5892 * locales.c: ( ves_icall_System_Globalization_CultureInfo
5893 _construct_datetime_format ()): fill xxx_patterns fields.
5894 * object.h: added fields for "all datetime patterns" to
5895 MonoDateTimeFormatInfo.
5896 * culture-info-tables.h: reflecting locale-builder updates.
5898 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
5900 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
5901 the event has no add and remove methods. Fixes #59629.
5903 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
5905 * object.c: Fixed possible integer overflow when allocating large
5908 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
5910 * culture-info-tables.h: reflecting locale-builder updates.
5912 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
5914 * culture-info-tables.h: reflecting locale-builder updates.
5916 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
5918 * culture-info-tables.h: reflecting locale-builder updates.
5920 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
5922 * threads.c: Made Thread.Sleep abortable.
5924 2004-06-02 Martin Baulig <martin@ximian.com>
5926 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
5928 * debug-mono-symfile.h: Bumped symbol file version number to 37.
5930 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
5932 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
5934 2004-05-30 Jackson Harper <jackson@ximian.com>
5936 * reflection.c: Do not hardcode assembly versions or public key
5937 tokens anymore. All of this except the corlib section was dead
5940 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
5942 * object.c (mono_runtime_invoke_array): Automatically create boxed
5943 objects for byref valuetypes if needed. Fixes #59300.
5945 * object.c (mono_method_return_message_restore): Handle
5946 MONO_TYPE_OBJECT as well.
5948 2004-05-28 Jackson Harper <jackson@ximian.com>
5950 * reflection.c: The modified type encoding was causing build
5951 problems. Reverted for now.
5953 2004-05-28 Jackson Harper <jackson@ximian.com>
5955 * reflection.c/h: Take an assembly ref so that we dont create
5956 fully qualified names when encoding types in the same assembly as
5957 the custom attribute being emitted.
5958 * appdomain.c: Increment version number.
5960 2004-05-26 Duncan Mak <duncan@ximian.com>
5963 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
5964 Set the full version number (major, minor, build, revision).
5966 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
5968 * marshal.c (emit_struct_conv): increment src/dst after blit
5969 (mono_marshal_get_managed_wrapper,
5970 mono_marshal_get_native_wrapper): make sure we have marshalling
5971 info before marshalling params (info computation affects
5974 * class.c (class_compute_field_layout): correctly deal with
5976 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
5977 value types (as per what windows dows by default)
5978 (mono_class_setup_mono_type): System.ValueType is blittable
5979 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
5982 * marshal.c (mono_marshal_load_type_info): flag types as
5983 non-blittable if the native layout doesn't match the managed
5986 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5988 * appdomain.c: don't add stuff in the private search path that is
5989 above the application base. If application base is not set, there's
5990 no private search path.
5992 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
5994 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
5995 byref struct arguments in native->managed marshalling.
5997 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
5999 * marshal.c (mono_marshal_get_runtime_invoke): correctly
6000 cache methods using signature (special case for methods
6001 that are value type or string class)
6003 * image.c (mono_image_close): clean up allocated GSList's
6004 in runtime_invoke_cache.
6006 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6008 * mono-config.c: set the correct path for mono_cfg_dir on windows when
6009 there's no MONO_CFG_DIR environment variable defined.
6011 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6013 * threads.c: windows version must be >= 0x0500 to include OpenThread.
6015 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
6017 * threadpool.c: Really wait for 500ms after the async call, even if the wait
6019 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
6020 before waiting for it, and call CloseHandle after the wait to unref it.
6021 This will make sure that handles are not disposed too early.
6023 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6028 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
6031 * object.c: se the application_base only for the domain that runs
6032 Main. Fixes bug #59216,
6034 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6037 * object.c: only the domain in which Main is run have
6038 SetupInformation.ConfigurationFile set, so moved a few lines from
6039 appdomain.c to object.c.
6041 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6043 * appdomain.c: we tried to load [name].(dll|exe), but according
6044 to bug #57710, we must also try [culture]/[name].(dll|exe) and
6045 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
6046 There's a test case attached to bug #58922.
6048 2004-05-27 Dick Porter <dick@ximian.com>
6051 * file-io.c: Implemented icalls for locking and unlocking regions
6053 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
6054 FALSE on error (fixes both compiler warning and real bug.)
6056 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
6058 * culture-info-tables.h: reflecting locale-builder updates.
6060 (Added missing ChangeLog entry for 05/26)
6062 2004-05-27 Jackson Harper <jackson@ximian.com>
6064 * locales.c: Fix some cut and paste errors.
6066 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6068 * mono-config.c: set the correct path for config. directory on windows.
6070 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
6072 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
6075 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
6077 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
6078 from pinvoke functions.
6080 * marshal.c (mono_ftnptr_to_delegate): Implement this.
6082 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
6084 * culture-info-tables.h: reflecting locale-builder updates.
6086 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
6088 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
6091 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
6093 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
6094 * icall.c: Modified icalls for RNG.
6095 * rand.c|h: Changed RNG interface to allow thread-safe usage under
6096 Windows (CryptoAPI).
6098 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
6100 * locales.c: Fix build.
6102 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
6104 * culture-info-tables.h: reflecting locale-builder updates.
6106 2004-05-25 Jackson Harper <jackson@ximian.com>
6108 * locales.c: When creating the current culture use the $LANGs
6109 specific culture. So DateTimeFormat and NumberFormat entries are created.
6111 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
6113 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
6114 a char array as parameter.
6116 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
6118 * image.c: In mono_image_open(), always use an absolute path name to
6119 look for already loaded images.
6121 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
6123 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
6124 missing in the windows build (like older cygwin include files).
6126 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
6128 * icall.c: Fixed check for possible integer overflow in Buffer_
6129 BlockCopy icall. Replaced comments style // by /* */.
6131 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
6133 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
6135 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
6136 check after MONO_VTADDR. Fixes pinvoke2.exe.
6138 * marshal.h marshal.c metadata.h: Add beginnings of support for
6139 ftnptr -> delegate marshalling.
6141 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
6143 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
6144 * threads.c: Fix warnings.
6146 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
6148 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
6149 * icall.c: Registered icalls for Suspend and Resume.
6150 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
6152 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
6153 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
6154 * process.c: Use WaitForSingleObjectEx.
6155 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
6157 * threads.c, threads.h: Make use of new Ex wait methods. Improved
6158 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
6159 for Suspend and Resume. Added new mono_thread_stop, used for stoping
6160 background threads. Added basic support for Abort in Windows.
6161 Start new threads using a managed delegate invoke wrapper. This wrapper
6162 has an interruption checkpoint that is needed since an interruption
6163 can be requested before the thread leaves the unmanaged code that starts
6165 * marshal.c: Added interruption checkpoint after every native call, and
6166 also before managed calls for wrappers called from unmanaged code to
6167 go into managed code.
6168 * object.h: Added new field in MonoThread to keep track of interruption
6171 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
6173 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
6176 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6183 * rand.c: getenv -> g_getenv (windows!)
6185 * process.c: complete_path is also used on non-windows platforms.
6187 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6189 * icall.c: new signature for Process_Start.
6191 * process.[ch]: new signature for Process_Start. If we're on windows
6192 and UseShellExecute is false, we have to search for the program by
6193 ourselves if we don't get a full path.
6195 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
6197 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
6198 marshalling and call CleanUpNativeData if needed. Fixes #58646.
6200 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6202 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
6205 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6207 * process.c: use double quotes to quote program name and arguments on
6208 windows. Fixes bug #58575.
6210 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6212 * file-io.c: don't return "." and ".." when using windows Find*File.
6214 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
6216 * marshal.c: Don't pass wrappers to message init because method
6217 addressed used to lookup metadata. part of remoting[2|3] fix.
6219 2004-05-15 Jackson Harper <jackson@ximian.com>
6221 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
6222 path is essentially the same as MONO_PATH except that it points to
6223 GACs instead of lib directories.
6224 * loader.h: The user gac is gone so we dont need function to
6226 * mono-config.c: user gac option is now gone.
6228 2004-05-15 Jackson Harper <jackson@ximian.com>
6230 * culture-info.h: Make defines more consistent, add calendar data
6231 to the culture info table.
6232 * culture-info-tables.h: Add basic calendar data. Basically
6233 everyone gets default gregorian until all the data is
6235 * locales.c: Use the new consistent defines. Set calendar data for
6236 culture info objects.
6237 * object.h: add a field for calendar data to CultureInfo
6239 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
6241 * image.c: image->runtime_invoke_cache is keyed on signatures now.
6242 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
6244 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
6245 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
6246 an extra param that is the pointer of the method to invoke. The IL for
6247 the invoke method is no longer specific to the method, but to the
6248 signature of the method. Thus, we can share the same code for multiple
6249 methods. This reduces the number of methods that have to be compiled.
6251 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
6253 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
6255 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6257 * icall.c: Optimize Buffer.BlockCopy.
6259 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6261 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
6262 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
6263 quote). Changed them to "MMMM yyyy".
6265 2004-05-12 Miguel de Icaza <miguel@ximian.com>
6268 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
6270 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
6272 * reflection.h: Updated after changes to managed structures.
6274 * appdomain.c: Bump corlib version.
6276 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6278 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
6281 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6283 * Makefile.am: link to ../os/libmonoos.la on windows.
6286 -If MONO_DEBUG, warn about non-existing directories in
6288 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
6289 compile time variable.
6290 -Removed init_default_path and call mono_set_rootdir from
6291 libmonoos.a instead (windows only).
6293 * assembly.h: declare mono_assembly_getrootdir().
6296 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
6298 * loader.c: s/getenv/g_getenv/
6300 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
6302 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
6304 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
6306 * metadata.h: Add new marshalling conversions.
6308 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
6311 * reflection.c (mono_reflection_get_type): Lookup the type in all
6312 modules of a multi-module assembly. Fixes #58291.
6314 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
6316 * threads.c: Before aborting a background, set the StopRequested
6317 state. This avoids throwing the Abort exception.
6318 In mono_thread_manage, don't continue with the shutdown until all
6319 aborted threads have actually stopped.
6321 2004-05-10 Jackson Harper <jackson@ximian.com>
6323 * locales.c: Remove the modifier from culture names.
6325 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6327 * Makefile.am: monosn is not installed any more. It has been deprecated
6330 2004-05-07 Jackson Harper <jackson@ximian.com>
6333 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
6334 Fix array construction, add bailout if the length is 0.
6336 2004-05-07 Dick Porter <dick@ximian.com>
6338 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
6339 machine doesn't have a DNS entry. Patch by Urs Muff
6340 (umuff@quark.com), fixes bug 57928.
6342 2004-05-06 Jackson Harper <jackson@ximian.com>
6344 * reflection.c: Handle null PublicTokens properly. alloc mem for
6345 assembly names culture so we dont crash when freeing it.
6347 2004-05-06 Jackson Harper <jackson@ximian.com>
6349 * assembly.c: Check the usergac when loading with partial names.
6351 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
6353 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
6354 does nothing for now (not required for Linux/Windows) but the class
6355 library can call it (and a newer or modified runtime could need it).
6356 * icall.c: Registred icall.
6358 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6360 * loader.c: prints a message on module loading error we set MONO_DEBUG
6361 environment variable.
6363 2004-05-05 Jackson Harper <jackson@ximian.com>
6365 * appdomain.c: Handle PublicKeyToken=null properly.
6367 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
6369 * environment.c|h: Added icall ves_icall_System_Environment_
6370 GetOSVersionString to get the current OS version as a string.
6371 * icall.c: Registred icall.
6373 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
6375 * object.c: in mono_object_get_virtual_method(), take into account that
6376 non-virtual methods don't have a slot in the vtable. Check needed when
6377 the object is a proxy.
6379 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
6381 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
6382 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
6384 * object.c (mono_class_compute_gc_descriptor): Fix warning.
6386 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
6387 passed when a valuetype is expected.
6389 * object.c (mono_unhandled_exception): Only set the exit code if the
6390 exception happens in the main thread. Fixes thread5.exe.
6392 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
6393 invalid names. Fixes #58047.
6395 2004-05-03 Jackson Harper <jackson@ximian.com>
6397 * assembly.c: This line was committed accidently and is unneeded.
6399 2004-05-03 Jackson Harper <jackson@ximian.com>
6401 * icall.c: Add new icall for Assembly::LoadWithPartialName
6402 * assembly.c/.h: new function that probes the GAC to load partial
6403 assembly names by Paolo Molaro.
6405 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6407 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
6408 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
6409 (type_get_fully_qualified_name): Added PublicKeyToken when building a
6412 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6414 * appdomain.c: fixed check for 'neutral' culture and removed warning.
6415 * reflection.c: fix bug when parsing a full type name and Version is not
6416 the last thing in the string.
6418 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
6420 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
6421 crashes when it is freed.
6423 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6425 * assembly.c: print the compat warning to stderr.
6427 2004-05-01 Miguel de Icaza <miguel@ximian.com>
6429 * assembly.c (mono_assembly_load_references): Add a compatibility
6430 hack to run old applications that might be still referencing the
6431 3300-based assemblies, only do this for System.xxx.
6433 2004-05-01 Jackson Harper <jackson@ximian.com>
6435 * appdomain.c: If the culture is neutral we set it to "".
6437 2004-04-29 Jackson Harper <jackson@ximian.com>
6439 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
6441 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
6443 * string-icalls.c: added low overhead function for copying chars
6444 * icall.c: added needed icall for the above function
6446 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6448 * icall.c: fix return value of get_global_assembly_cache. Implemented
6449 Environment.GetLogicalDrives.
6451 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
6453 * rand.c: try and talk to egd or prngd
6454 for random bytes if opening devices fail.
6456 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
6458 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
6459 alignment for the type using the native alignment of its members
6460 instead of using klass->min_align.
6462 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
6464 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6467 * socket-io.c: added check for sys/aio.h.
6469 2004-04-28 Dick Porter <dick@ximian.com>
6471 * threads.c: Don't abort a thread thats already aborting, when
6472 terminating everything.
6474 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6476 * icall.c: added 2 new async calls for Socket.
6478 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
6481 * threadpool.c: removed unused variable.
6483 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
6485 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
6487 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6489 * locales.c: put back string_invariant_tolower () and
6490 string_invariant_toupper ().
6492 2004-04-26 David Waite <mass@akuma.org>
6497 * unicode.h: remove comma from end of enumeration declarations
6499 2004-04-26 David Waite <mass@akuma.org>
6501 * debug-mono-symfile.h:
6504 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
6507 2004-04-26 Jackson Harper <jackson@ximian.com>
6509 * appdomain.c: Increment version number.
6511 2004-04-26 Jackson Harper <jackson@ximian.com>
6513 * appdomain.c: Set assembly references public token value when
6514 PublicKeyToken is specified, not the hash_value. Free public token
6515 values when free assembly name data. Previously the public key
6516 token was hex decoded, however we are using hex encoded public key
6517 tokens, so this is not neccasary.
6518 * assembly.c: Lookup assemblies in the gac if their public token
6519 value is set. Add function to allow enabling user gac
6520 lookups. Specify whether or not the assembly was loaded from the
6521 GAC. Compare full assembly names when checking the cache for
6522 assemblies (Temporarily disabled see comment in code). Remove
6523 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
6524 specifies trace-loader they get extra info to stdout on the
6525 loading of assemblies.
6526 * image.h: Add a field for an assembly references public token
6527 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
6528 whether an assembly has been loaded from the GAC.
6529 * image.c: Remove a corlib -> mscorlib name mapping.
6530 * loader.h: Add function to enable/disable the user gac.
6531 * mono-config.c: Check if the usergac is enabled in the config
6533 * icall.c: New icall to determine whether or not an assembly has
6534 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
6535 * tabldefs.h: Add constant for assemblyref flag that specifies a
6536 full public key is used instead of a public token.
6537 * reflection.c: Remove mscorlib -> corlib mappings. Set
6538 PublicTokenValue instead of hash value. This value is a hex
6539 string so it does not need to be expanded.
6541 2004-04-26 Martin Baulig <martin@ximian.com>
6543 * mono-debug-debugger.c (mono_debugger_initialize): Set
6544 `mono_debugger_initialized' before calling mono_debug_lock().
6546 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
6548 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
6549 InternalToUpper/InternalToLower.
6550 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
6551 removed invariant culture shortcut. This is now done in managed code.
6552 * locales.c: (string_invariant_toupper/tolower) removed.
6554 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6556 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
6557 Added Poll internal call.
6559 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
6560 call for Poll. Select was too heavy for polling a single socket.
6562 * threadpool.[ch]: added mono_threadpool_cleanup.
6563 * threads.c: use it. Don't use Thread_Abort on windows.
6565 2004-04-23 Martin Baulig <martin@ximian.com>
6567 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
6569 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
6571 * icall.c: Registred new icalls for key pair protection and added an
6572 icall for Environment.GetFolderPath on Windows.
6573 * security.c|h: Added new icalls for key pair protection.
6575 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6577 * socket-io.c: don't display the non-supported family warning for known
6578 families. Now this is not displayed on windows when checking support
6581 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6583 * class.c: don't display the layout warning for static fields.
6585 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
6587 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
6588 * locales.c, locales.h: Added new icalls for culture-specific
6589 Char.ToLower and Char.ToUpper.
6591 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6593 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
6596 2004-04-20 Martin Baulig <martin@ximian.com>
6598 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
6599 of the type name before passing it to mono_reflection_type_from_name().
6601 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
6603 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
6604 encodings here. Fixes #56965.
6606 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
6608 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6609 fix test on strstr result not that I can see anything that
6610 relies on the result.
6612 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
6614 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
6617 * marshal.c (mono_marshal_get_string_encoding): New helper function.
6619 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
6620 function to determine which marshalling to use for strings. Fixes
6623 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
6625 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
6627 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
6629 * icall.c: #include mono-config.h
6631 2004-04-15 Jackson Harper <jackson@ximian.com>
6633 * culture-info-tables.h: Fix date formats for en-US culture.
6635 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
6637 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
6638 ThreadPool.SetMinThreads.
6639 * threadpool.c: Implemented ThreadPool.GetMinThreads and
6640 ThreadPool.SetMinThreads.
6642 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
6644 * mono-config.c: also load the .config file in the directory
6645 where the assembly was found.
6647 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
6649 * assembly.c: load per-assembly config files.
6650 * icall.c: decrapified code to get the config dir and moved to
6652 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
6653 per-assembly config files. When doing a dll map lookup give precedence
6654 to the per-assembly data.
6656 2004-04-14 Martin Baulig <martin@ximian.com>
6658 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
6659 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
6660 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
6662 * mono-debugger-debugger.c: While the debugger is locked, remember
6663 whether the symbol tables have changes and send one single
6664 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
6666 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
6668 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
6670 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
6673 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
6674 account when marshalling string arrays. Fixes #56965.
6676 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
6678 * icall.c: Add new icalls mapping for security.
6679 * security.c|h: Add internal calls for WindowsIdentity,
6680 WindowsImpersonationContext and WindowsPrincipal.
6682 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
6684 * class.c: Added comment to ensure the System.MonoDummy class
6685 is removed when no longer necessary
6687 2004-04-13 Miguel de Icaza <miguel@ximian.com>
6689 * appdomain.c: Pass arguments to the bootstraping exceptions to
6690 minimize JITed methods at boot
6692 * metadata.c (mono_exception_from_name_two_strings): Allow for the
6693 second string to be null.
6695 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
6696 Change the protocol to minimize the JIT methods at startup. Now
6697 it Returns the internal codepage, if the value of "int_code_page"
6698 is 1 at entry, and we can not compute a suitable code page
6699 number, returns the code page as a string.
6701 2004-04-13 Jackson Harper <jackson@ximian.com>
6703 * culture-info-tables.h: Fix number of decimal digits for all
6706 2004-04-13 Jackson Harper <jackson@ximian.com>
6708 * icall.c: Clairfy out of sync error message. It is not always
6709 your corlib that is out of sync.
6711 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
6713 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
6714 properties when only the set accessor is overriden. Fixes #55874.
6716 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
6718 * assembly.c (mono_assembly_load_references): Make this thread safe.
6721 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
6723 * monosn.c: Add missing initialization calls.
6725 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
6728 ves_icall_System_Globalization_CultureInfo_construct_number_format
6729 Fix g_assert so it compiles on fussier compilers re int/ptr
6732 2004-04-08 Dick Porter <dick@ximian.com>
6735 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
6736 53992. Also rearrange the code so that the internal calls return
6737 an error value and exceptions are thrown from managed code.
6739 * icall.c: Add type info to the socket icalls.
6741 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6743 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
6746 2004-04-07 Martin Baulig <martin@ximian.com>
6748 * class.c (mono_class_from_generic_parameter): Don't default
6749 `klass->parent' to `mono_defaults.object_type'.
6751 2004-04-07 Martin Baulig <martin@ximian.com>
6753 * reflection.c (mono_reflection_initialize_generic_parameter): Set
6754 `param->pklass->reflection_info'.
6756 2004-04-07 Jackson Harper <jackson@ximian.com>
6758 * culture-info-tables.h: Fix date separator symbol.
6760 2004-04-07 Martin Baulig <martin@ximian.com>
6762 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
6763 from System.Type to System.MonoType.
6765 2004-04-07 Martin Baulig <martin@ximian.com>
6768 (MonoReflectionGenericParam): Added `has_reference_type' and
6769 `has_value_type' fields.
6771 * reflection.c (mono_image_get_generic_param_info): Encode the
6772 correct flags if we have the `class' or `struct' constraint.
6774 2004-04-07 Martin Baulig <martin@ximian.com>
6777 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
6779 2004-04-07 Jackson Harper <jackson@ximian.com>
6781 * appdomain.c: Revert extra patches, just wanted to bump the
6784 2004-04-07 Jackson Harper <jackson@ximian.com>
6786 * Makefile.am: Add culture-info private headers.
6787 * icall.c: Add new icalls for contructing locales.
6788 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
6789 * locales.h: Declare new culture info construction methods.
6790 * object.h: Add new fields used to avoid the CultureMap to
6792 * culture-info.h: Definition of structs used in the culture info
6794 * culture-info-tables.h: Autogenerated tables that contain culture
6795 info data. This file was generated with the locale-builder tool.
6796 * appdomain.c: Incement corlib version number.
6798 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
6800 * appdomain.c: (mono_runtime_init) move mono_thread_init
6801 to before mono_object_new calls so critical sections
6802 are initialized before use.
6804 2004-04-07 Martin Baulig <martin@ximian.com>
6807 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
6808 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
6809 (ves_icall_MonoGenericParam_initialize): Removed.
6810 (monogenericparam_icalls): Removed.
6811 (generictypeparambuilder_icalls): Added new table for
6812 System.Reflection.Emit.GenericTypeParameterBuilder.
6815 (mono_reflection_define_generic_parameter): Removed.
6816 (mono_reflection_initialize_generic_parameter): This is now called
6817 from GenericTypeParameterBuilder's .ctor.
6819 2004-04-06 Martin Baulig <martin@ximian.com>
6821 * class.c (mono_class_init): Don't inflate nested classes in a
6823 (mono_type_get_name_recurse): Include the generic arguments for
6824 generic instances and generic type declarations.
6825 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
6826 (_mono_class_get_instantiation_name): Removed.
6827 (mono_class_create_generic): Always use `gklass->name' as our name.
6829 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
6831 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
6832 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
6833 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
6834 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
6835 closed generic methods here.
6838 (mono_reflection_generic_inst_get_nested_types): Removed.
6839 (inflate_mono_method): Copy the generic parameters from the
6840 MonoMethodHeader into out MonoGenericMethod.
6842 2004-04-06 Martin Baulig <martin@ximian.com>
6845 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
6847 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
6849 * reflection.c (build_compressed_metadata): If we have any entries
6850 in the GenericParam, MethodSpec or GenericParamConstraint tables,
6851 set the header version to 1.1.
6853 2004-04-06 Martin Baulig <martin@ximian.com>
6855 * class.c (mono_class_init): If we're a generic instance,
6856 initialize our nested classes, too.
6857 (_mono_class_get_instantiation_name): Deal with the new `!%d'
6860 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6862 * process.c: quote the argument passed to the shell on windows.
6864 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
6866 * threads.c (mono_alloc_special_static_data): Allow this to be
6867 called during startup.
6869 2004-04-02 Martin Baulig <martin@ximian.com>
6872 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
6874 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
6876 * icall.c: Fix build.
6878 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
6880 * Makefile.am: Added security.c|h.
6881 * icall.c: Added icall for get_UserName;
6882 * security.c: New file for security related icalls. Added function
6883 get_UserName for System.Environment (fix #56144).
6884 * security.h: New. Header file for security.c
6886 2004-04-02 Dick Porter <dick@ximian.com>
6888 * icall.c: Deleted the icalls that were obsoleted some time ago
6889 by the ICU string code, and which were mixed into the icall
6890 rearranging. Fixes bug 55969.
6893 * string-icalls.c: Deleted the code that those icalls reference.
6895 2004-04-01 Martin Baulig <martin@ximian.com>
6897 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
6899 * class.c (mono_class_from_generic_parameter): Don't set
6900 TYPE_ATTRIBUTE_INTERFACE.
6901 (my_mono_class_from_generic_parameter): Likewise.
6903 2004-04-01 Martin Baulig <martin@ximian.com>
6905 * loader.c (find_method): Added an optional `MonoClass *ic'
6906 argument to search in a specific interface.
6907 (mono_get_method_constrained): New public function.
6909 2004-04-01 Martin Baulig <martin@ximian.com>
6911 * reflection.c (mono_image_get_generic_field_token): Use the
6912 `handleref' cache here.
6914 2004-04-01 Martin Baulig <martin@ximian.com>
6916 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
6918 * reflection.c (create_generic_typespec): Use the `typespec' hash
6919 here, not the `typeref' one.
6921 2004-04-01 Martin Baulig <martin@ximian.com>
6923 * class.c (mono_class_inflate_generic_type): Moved the
6924 functionality into a new static inflate_generic_type() which
6925 returns NULL if it didn't do anything. Only increment the
6926 `mono_stats.inflated_type_count' if we actually inflated
6928 (mono_class_get_full): Check the classes type to see whether we
6929 need to inflate it; also inflate MONO_TYPE_(M)VAR.
6931 2004-04-01 Jackson Harper <jackson@ximian.com>
6933 * reflection.c: Set culture for assembly references.
6935 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
6937 * reflection.[ch], icall.[ch], Fix support for pinning variables.
6939 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6942 (do_mono_assembly_open): the critical section also covers
6943 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
6945 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6948 (mono_manage_threads): abort the background threads when finishing.
6951 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6953 * gc.c: only close the done_event handle if there was no timeout.
6956 2004-03-30 Martin Baulig <martin@ximian.com>
6958 * icall.c (icall_entries): It's called "System.Activator", not
6959 "System.Activation".
6961 2004-03-30 Martin Baulig <martin@ximian.com>
6963 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
6964 (mono_class_create_from_typespec): Likewise.
6966 2004-03-30 Martin Baulig <martin@ximian.com>
6968 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
6969 `has_ctor_constraint' and `initialized'.
6971 2004-03-30 Martin Baulig <martin@ximian.com>
6973 * reflection.c (encode_new_constraint): New static function to add
6974 the constructor constraint attribute to a type parameter.
6975 (encode_constraints): Call encode_new_constraint() if necessary.
6978 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
6980 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
6982 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
6984 * reflection.c, icall.c: add support for pinning variables.
6986 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
6988 * marshal.c (mono_marshal_get_managed_wrapper):
6989 init bool local with zero rather than null.
6991 2004-03-29 Martin Baulig <martin@ximian.com>
6993 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
6994 the "official" behavior here.
6995 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
6997 2004-03-29 Martin Baulig <martin@ximian.com>
6999 * icall.c: Reflect latest API changes.
7001 2004-03-29 Martin Baulig <martin@ximian.com>
7003 * loader.c (mono_get_method_from_token): Also call
7004 mono_metadata_load_generic_params () for abstract and interface
7005 methods; replace the type arguments in the method signature with
7006 the ones which are loaded from the metadata.
7008 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
7010 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
7011 of the lock is not the current thread. MS.NET don't do it, in spite of
7012 what the documentation says. See bug #56157.
7014 2004-03-28 Martin Baulig <martin@ximian.com>
7016 * class.c (mono_class_init): Don't call init_properties() and
7017 init_events() for generic instances; set `prop->parent' when
7018 inflating properties.
7020 * reflection.c (mono_generic_inst_get_object): Call
7021 `mono_class_init (ginst->klass)'.
7022 (mono_type_get_object): Only create a MonoGenericInst if your
7023 generic type is a TypeBuilder.
7024 (do_mono_reflection_bind_generic_parameters): Only set
7025 `ginst->is_dynamic' if our generic type is a TypeBuilder.
7027 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
7029 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
7032 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7034 * icall.c: added Kill_internal icall.
7035 * process.[ch]: added Kill_internal icall.
7037 2004-03-25 Martin Baulig <martin@ximian.com>
7039 * class.h (MonoStats): Added `generic_instance_count',
7040 `inflated_method_count', `inflated_type_count' and
7041 `generics_metadata_size'.
7043 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7045 * reflection.c: no warnings now.
7047 2004-03-25 Martin Baulig <martin@ximian.com>
7049 * class.c (mono_class_get_full): New public function; does a
7050 mono_class_get(), but also takes a `MonoGenericContext *'.
7052 * loader.c (mono_field_from_memberref): Renamed to
7053 `field_from_memberref', made static and added `MonoGenericContext *'
7055 (mono_field_from_token): Added `MonoGenericInst *' argument.
7056 (method_from_memberef): Likewise.
7057 (mono_get_method_from_token): Likewise.
7058 (mono_get_method_full): New public function; does a
7059 mono_get_method(), but also takes a `MonoGenericContext *'.
7061 * verify.c (mono_method_verify): Get the method's generic context
7062 and pass it to mono_field_from_token(), mono_get_method_full() and
7063 mono_class_get_full().
7065 2004-03-25 Martin Baulig <martin@ximian.com>
7067 * class.c (mono_class_inflate_generic_type): Take a
7068 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
7069 `MonoGenericMethod *'.
7071 2004-03-25 Martin Baulig <martin@ximian.com>
7073 * loader.h (MonoMethodInflated): Store the MonoGenericContext
7074 instead of the MonoGenericMethod here.
7076 2004-03-25 Martin Baulig <martin@ximian.com>
7078 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
7079 each time we create a new MonoGenericInst, we also create a new
7080 context which points back to us.
7082 * class.c (inflate_method): Use `ginst->context' instead of
7083 creating a new context.
7085 * loader.c (method_from_memberref): Use
7086 `klass->generic_inst->context' instead of creating a new context.
7088 2004-03-25 Martin Baulig <martin@ximian.com>
7090 * class.h (MonoGenericContext): New struct.
7091 (MonoGenericMethod): Removed `generic_inst'.
7093 * class.c (mono_class_inflate_generic_method): Take a
7094 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
7096 2004-03-25 Martin Baulig <martin@ximian.com>
7098 * loader.h (MonoMethodInflated): New typedef.
7100 * metadata.h (MonoMethodSignature): Removed `gen_method', make
7101 `generic_param_count' consume just 30 bits, added `is_inflated'
7102 and `has_type_parameters' flags (one bit each).
7104 * class.c (mono_class_inflate_generic_method): Create a
7105 MonoMethodInflated instead of a MonoMethodNormal and set
7106 `is_inflated' in the method signature.
7108 * class.h (MonoGenericMethod): Removed `generic_method'.
7110 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
7112 * image.c: Make sure the name of a MonoImage is always an absolute path.
7113 This fixes bug #54415.
7115 2004-03-24 Martin Baulig <martin@ximian.com>
7117 * class.c (mono_class_setup_vtable): If we're a generic instance,
7118 use our generic type's vtable size.
7120 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
7122 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
7123 MONO_NO_UNLOAD env var as a temporary workaround for unloading
7126 2004-03-23 Martin Baulig <martin@ximian.com>
7128 * class.h (MonoDynamicGenericInst): Added `int count_events' and
7129 `MonoEvent *events'.
7131 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
7132 (typebuilder_icalls): Added "get_event_info"; calls
7133 mono_reflection_event_builder_get_event_info().
7135 * reflection.c (mono_reflection_generic_inst_initialize): Added
7136 `MonoArray *events'.
7137 (mono_reflection_event_builder_get_event_info): New function.
7139 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
7141 * object.h: add mono_type_initialization_init
7143 * object.c (mono_runtime_class_init):
7144 implement class constructor synchronization rules
7145 to cope with threading issues.
7146 add mono_type_initialization_init
7148 * appdomain.c (mono_runtime_init): call
7149 mono_type_initialization_init
7151 * class.h: removing initializing field from MonoVTable
7153 2004-03-23 Martin Baulig <martin@ximian.com>
7155 * class.c (my_mono_class_from_generic_parameter): Use
7156 `param->name' if it's not NULL.
7158 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
7160 * class.c: do not insert non-virtual methods in the vtable.
7161 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
7162 that means the method is non-virtual. This never would have
7165 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
7167 * profiler.c: Added lock for accessing coverage_hash.
7169 2004-03-22 Martin Baulig <martin@ximian.com>
7171 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
7172 `method->method->signature->generic_param_count != 0' to make it
7173 work for interface methods.
7175 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7177 * process.c: quote the string passed to the shell using g_shell_quote.
7179 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7182 (mono_threads_manage): don't remove the finalizer thread and self
7183 from the threads hash table so that mono_thread_manage can be called
7186 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7188 * process.c: quote the arguments when UseShellExecute is true. Fixes
7191 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7193 * threads.c: set mono_thread_detach as a cleanup routine for every
7194 thread. This way it's always executed upon thread termination, either
7195 aborted or finished normally. No more xsp hangs!
7197 2004-03-17 Martin Baulig <martin@ximian.com>
7199 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
7200 `int count_nested' and a `MonoType **nested'.
7202 * reflection.c (mono_reflection_bind_generic_parameters): Moved
7203 most of the functionality into a new static
7204 do_mono_reflection_bind_generic_parameters() and don't take a
7205 `MonoType *nested_in' argument any more. Don't compute nested
7207 (mono_reflection_generic_inst_get_nested_types): New public method
7208 to get nested types.
7210 * class.c (mono_class_create_generic): Set `klass->nested_in' if
7211 we're a nested class.
7213 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
7214 mono_reflection_generic_inst_get_nested_types() to compute the
7217 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
7219 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
7220 descriptive error message under windows.
7222 2004-03-17 Martin Baulig <martin@ximian.com>
7224 * class.c (dup_type): Added `const MonoType *original' argument;
7225 copy the attrs from the original type.
7227 2004-03-17 Martin Baulig <martin@ximian.com>
7229 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
7230 `m->generic_inst_cache' here.
7232 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
7234 * exception.h exception.c: Add stack_overflow_exception.
7236 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7239 (overlapped_callback): call SetEvent *after* invoking the callback.
7240 No need to call CloseHandle.
7242 2004-03-16 Martin Baulig <martin@ximian.com>
7244 * reflection.c (mono_image_get_fieldref_token): Take a
7245 `MonoReflectionField *' instead of a `MonoClassField *' and a
7246 `MonoClass *'; store the `MonoReflectionField *' in the hash.
7248 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7250 * appdomain.c: don't add the culture to the filename we're looking for
7251 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
7253 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7255 * locales.c: don't ignore symbols when doing case insensitive compares.
7256 Thanks Dick! Fixes bug #54046.
7258 * threads.c: surround 'threads' usage with enter/leave in
7261 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
7263 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
7264 implicitly marshalled as [Out]. Fixes #55450.
7266 (mono_marshal_get_runtime_invoke): Zero out the result if there is
7269 2004-03-16 Martin Baulig <martin@ximian.com>
7271 * class.c (mono_class_from_generic_parameter): Use the actual
7274 2004-03-16 Martin Baulig <martin@ximian.com>
7276 * reflection.c (type_get_signature_size): New static function.
7277 Compues the size of the type in a method signature.
7278 (method_get_signature_size): New static function; calls
7279 type_get_signature_size() to compute the actual size of the
7281 (method_encode_signature): Use method_get_signature_size() to get
7282 the signature's size rather than using `nparams * 10'.
7284 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7286 * file-io.h: define here WapiOverlapped on windows. I don't want the
7287 regular OVERLAPPED one.
7290 * threadpool.c: somehow, BindIoCompletionCallback is not found.
7291 Disabling AIO on windows.
7293 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7295 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
7298 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7300 * appdomain.c: upgraded corlib version.
7302 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
7303 and BeginWrite. Allow opening files for asynchrnous operations.
7305 * file-io.h: new struct that maps FileStreamAsyncResult.
7306 * icall.c: added new icalls.
7307 * process.[ch]: support setting child process environment variables
7308 and use the SHELL or COMSPEC when UseShellExecute is true.
7310 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
7311 callback for async. IO is here and also BindHandle.
7313 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
7316 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
7318 * reflection.c (create_custom_attr): Allow len == 0.
7320 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
7321 computation on big-endian machines.
7323 2004-03-13 Martin Baulig <martin@ximian.com>
7325 * class.h (MonoGenericInst): Added `int count_ifaces'.
7327 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
7328 `ginst->count_ifaces' instead `klass->interface_count' since we
7329 may get called before the vtable is created.
7331 * loader.c (mono_method_get_param_names): If we're a generic
7332 instance, return and don't initialize the class.
7334 * reflection.c (mono_reflection_setup_generic_class): Don't call
7335 ensure_runtime_vtable().
7336 (mono_reflection_bind_generic_parameters): Set
7337 `ginst->count_ifaces'.
7339 2004-03-11 Jackson Harper <jackson@ximian.com>
7343 * unicode.h: Remove unused System.Char icalls.
7345 2004-03-11 Miguel de Icaza <miguel@ximian.com>
7347 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
7348 code when we P/Invoke the first library in Windows.Forms, instead
7349 of when we first open the assembly.
7351 * assembly.c: Drop the lookup from here.
7353 2004-03-10 Martin Baulig <martin@ximian.com>
7355 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
7356 class for properties, fields and events. Finally fixes #54945.
7358 2004-03-10 Martin Baulig <martin@ximian.com>
7360 * metadata.c (mono_metadata_class_equal): New static function;
7361 checks whether two generic instances or two generic parameters are
7363 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
7366 2004-03-10 Martin Baulig <martin@ximian.com>
7368 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
7370 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
7371 argument and write it into the `reflection_info' field.
7374 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
7375 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
7377 2004-03-09 Jackson Harper <jackson@ximian.com>
7379 * char-conversions.h: use 8 bits for numeric data its all we need
7380 * icall.c: numeric data is only 8 bits now.
7382 2004-03-09 Martin Baulig <martin@ximian.com>
7384 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
7386 * class.c (init_properties, init_events): Initialize the new
7389 * reflection.c (typebuilder_setup_properties): Likewise.
7390 (typebuilder_setup_events): Likewise.
7392 * reflection.h (MonoEventInfo): Replaced `parent with
7393 `declaring_type' and `reflected_type'.
7395 * icall.c (ves_icall_get_property_info): Distinguish between
7396 declaring and reflected type.
7397 (ves_icall_get_event_info): Likewise.
7399 2004-03-09 Martin Baulig <martin@ximian.com>
7401 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
7402 (ves_icall_Type_GetField): Correctly set field->klass.
7404 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
7406 * loader.h: Fix warning.
7408 2004-03-08 Miguel de Icaza <miguel@ximian.com>
7410 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
7411 library routine if present. Notice that it will still continue
7412 executing even if its missing, for those working on the Gtk#
7413 edition of Windows.Forms.
7415 * assembly.c (do_mono_assembly_open): If loading the
7416 System.Windows.Forms call mono_loader_wini_init.
7418 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
7420 * class.h: Added MonoRemoteClass struct.
7421 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
7422 function for MonoStrings.
7423 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
7424 Added internal call for getting the proxy type.
7425 * marshal.c: Get the type of transparent proxies from its remote_class.
7426 Added methods that generate the IL for type checks and casts:
7427 mono_marshal_get_isinst, mono_marshal_get_castclass,
7428 mono_marshal_get_proxy_cancast.
7429 * marshal.h: Declaration of the previous new methods.
7430 * object.c: Added new moethods for creating and updating MonoRemoteClass
7431 instances: mono_remote_class, mono_upgrade_remote_class,
7432 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
7433 * verify.c: FIx transparent_proxy_fields layout.
7434 * appdomain.c: Bump corlib version.
7436 2004-03-04 Jackson Harper <jackson@ximian.com>
7438 * icall.c: Add icall to access char conversion tables.
7439 * char-conversions.h: Character conversion tables.
7440 * Makefile.am: Add char-conversions.h private header file.
7442 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
7444 * appdomain.c (unload_thread_main): Increase unloading timeout to
7445 10 sec as a temporary workaround for Nant problems.
7447 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
7449 * gc.c: Add checks for GC_enable and GC_disable.
7451 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
7452 (jaak@zd.com.pl). Fix memory corruption in String.Replace
7455 2004-02-27 Martin Baulig <martin@ximian.com>
7457 * reflection.c (mono_reflection_bind_generic_parameters): Take a
7458 `MonoReflectionType *' instead of a `MonoType *'.
7460 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
7462 * gc.c (run_finalize): Avoid finalizing the object representing the
7464 (finalizer_thread): Fix warning.
7466 2004-02-25 Martin Baulig <martin@ximian.com>
7468 * class.c (_mono_class_get_instantiation_name): Added `int offset'
7469 argument for nested types.
7470 (mono_class_create_generic): Added support for nested generictypes.
7472 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
7475 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
7477 * reflection.c (method_encode_signature): Increase the minimum
7478 value of `size' from 10 to 11.
7479 (mono_reflection_bind_generic_parameters): Take `int type_argc'
7480 and `MonoType **types' arguments instead of the `MonoArray
7481 *types'; added `MonoType *nested_in'. Recursively instantiate
7484 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
7486 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
7487 stack_overflow_ex members which are used by exception handling.
7489 * appdomain.c (mono_runtime_init): Initialize the new members.
7491 * gc.c (mono_gc_enable): New helper function.
7492 * gc.c (mono_gc_disable): New helper function.
7494 2004-02-23 Martin Baulig <martin@ximian.com>
7496 * icall.c: I must have been really stupid - make it actually work
7499 2004-02-23 Martin Baulig <martin@ximian.com>
7501 * loader.c (method_from_memberref): Only inflate the method if
7502 it's in another klass.
7504 2004-02-23 Martin Baulig <martin@ximian.com>
7506 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
7507 (mono_class_init): If we're a generic instance and an interface,
7508 compute `class->interface_id'; also create `class->interfaces'
7509 here and inflate them.
7511 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
7513 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
7515 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
7517 2004-02-15 Miguel de Icaza <miguel@ximian.com>
7519 * reflection.c (method_encode_code): Improved the error message
7520 generated by the exception.
7522 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7524 * icall.c: Martin did not do what he said in the ChangeLog for
7525 2004-02-18, but put back the changes for properties and events.
7526 Commenting those changes out again and adding comment to bug #54518.
7528 * process.c: removed warning.
7530 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
7532 * marshal.c (emit_struct_conv): Print an error message instead of
7533 asserting when a type does not have the StructLayout attribute.
7535 2004-02-20 Martin Baulig <martin@ximian.com>
7537 * reflection.c (mono_type_get_object): Also use the cache for
7539 (mono_reflection_bind_generic_parameters): Always compute
7542 2004-02-20 Martin Baulig <martin@ximian.com>
7544 * class.h (MonoGenericMethod): Removed `klass'.
7546 * class.c (mono_class_inflate_generic_method): Added `MonoClass
7549 2004-02-20 Martin Baulig <martin@ximian.com>
7551 * reflection.c (method_encode_methodspec): Actually use the
7552 uninflated signature for the memberref.
7554 2004-02-20 Martin Baulig <martin@ximian.com>
7556 * class.h (MonoGenericMethod): Removed `declaring'.
7558 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
7559 is NULL, compute it here.
7561 2004-02-20 Martin Baulig <martin@ximian.com>
7563 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
7565 * metadata.c (mono_metadata_generic_inst_hash): New method.
7566 (mono_metadata_generic_inst_equal): New method.
7568 * reflection.c (mono_reflection_bind_generic_parameters): Use the
7569 `klass->image->generic_inst_cache' cache to avoid creating
7570 duplicate MonoGenericInst's.
7572 * class.c (mono_class_inflate_generic_type): Use the cache.
7574 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7576 * object.c: fixed gc descriptor calculation for embedded valuetypes.
7578 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7580 * icall.c: added Socket.WSAIoctl icall.
7582 * socket-io.[ch]: implemented
7583 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
7585 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
7587 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
7589 2004-02-18 Urs C Muff <umuff@quark.com>
7591 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
7592 this work on PPC and other big-endian architectures.
7594 * debug-mono-symfile.h: Prepended the names of all the `guint32'
7595 fields with an underscore to make sure they're only accessed by
7598 2004-02-18 Martin Baulig <martin@ximian.com>
7600 * icall.c: Put the klass->refclass changes back for methods and
7601 fields, but not for properties and events. We're currently not
7602 distinguishing between DeclaringType and ReflectedType for
7603 properties and events, that's what caused the regressions.
7605 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7608 (mono_async_result_new): the handle can be NULL.
7610 * threadpool.c: Use an event instead of a semaphore, don't initialize
7611 it until needed. This saves quite a few semaphores from being created
7612 when using the threadpool.
7614 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
7616 * object.c (mono_string_is_interned_lookup): Fix interning of long
7617 strings. Fixes #54473.
7619 * domain.c (ldstr_equal): Optimize if the two strings are equal.
7621 * icall.c: Revert the klass->refclass changes since they introduce
7622 regressions (bug #54518).
7624 2004-02-18 Martin Baulig <martin@ximian.com>
7626 * class.c (mono_class_init): If we're a generic instance and don't
7627 come from a TypeBuilder, inflate our members here.
7628 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
7629 (mono_class_create_generic): New public method.
7630 (mono_class_initialize_generic): Removed.
7631 (get_instantiation_name): Renamed to
7632 _mono_class_get_instantiation_name() and made it public.
7634 2004-02-18 Martin Baulig <martin@ximian.com>
7636 * class.c (mono_class_inflate_generic_type): Clear the new
7637 instance's `nginst->klass' when inflating a generic instance.
7638 (mono_class_is_subclass_of): Added (basic) support for generic
7641 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
7643 * appdomain.h, domain.c: use a MonoCodeManager instead of a
7644 MonoMempool to hold compiled native code.
7646 2004-02-17 Martin Baulig <martin@ximian.com>
7648 * class.h (MonoDynamicGenericInst): Added `count_properties' and
7651 * reflection.c (mono_reflection_generic_inst_initialize): Added
7652 `MonoArray *properties' argument.
7654 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
7656 2004-02-17 Martin Baulig <martin@ximian.com>
7658 * icall.c (ves_icall_Type_GetFields): Renamed to
7659 ves_icall_Type_GetFields_internal() and added a
7660 `MonoReflectionType *rtype' argument; pass it to
7661 mono_field_get_object() to set the field's "reflected" type.
7662 (ves_icall_Type_GetConstructors): Likewise.
7663 (ves_icall_Type_GetEvents): Likewise.
7664 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
7665 argument; pass it to mono_method_get_object() to set the method's
7668 2004-02-17 Martin Baulig <martin@ximian.com>
7670 * class.h (MonoDynamicGenericInst): New type.
7671 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
7673 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
7674 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
7675 (ves_icall_MonoGenericInst_GetFields): New interncall.
7677 * class.c (mono_class_from_generic): Don't call
7678 mono_class_initialize_generic() if this is a dynamic instance;
7679 ie. it's being created from a TypeBuilder.
7680 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
7681 `class->byval_arg.type'.
7683 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
7684 to `inflate_method' and made static.
7685 (mono_reflection_inflate_field): Removed.
7686 (mono_reflection_generic_inst_initialize): New public method.
7688 * reflection.h (MonoReflectionGenericInst): Removed `methods',
7689 `ctors' and `fields'; added `initialized'.
7691 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
7693 * debug-helpers.c (mono_method_full_name): Fix output for empty
7696 2004-02-12 Martin Baulig <martin@ximian.com>
7698 * class.h (MonoClassField): Added `MonoType *generic_type'.
7700 * reflection.c (mono_image_get_fieldref_token): Added support for
7701 instantiated generic types.
7702 (field_encode_inflated_field): Removed.
7703 (mono_image_get_inflated_field_token): Removed.
7704 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
7706 * reflection.h (MonoReflectionInflatedField): Removed.
7708 2004-02-12 Martin Baulig <martin@ximian.com>
7710 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
7711 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
7713 * reflection.c (mono_image_get_methodspec_token): Take a
7714 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
7715 (mono_image_create_token): Check whether we have a
7716 `method->signature->gen_method' and call
7717 mono_image_get_methodspec_token() if appropriate.
7718 (inflated_method_get_object): Removed.
7719 (mono_reflection_bind_generic_method_parameters): Return a
7720 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
7721 (mono_reflection_inflate_method_or_ctor): Likewise.
7723 * reflection.h (MonoReflectionInflatedMethod): Removed.
7725 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
7727 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
7728 for custom valuetype marshalling.
7730 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
7732 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7734 * icall.c: fixed WSAGetLastError_internal name.
7736 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
7738 * threads.c (mono_thread_attach): Allow this to be called multiple
7741 * threads.c (build_wait_tids): Do not wait for ourselves.
7743 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
7744 appdomain list is empty.
7746 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
7747 memory returned by mono_string_builder_to_utf16, since it points into
7748 managed memory. Thanks to Bernie Solomon for noticing this.
7750 * icall.c: Add AppDomainSetup icalls.
7752 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
7754 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
7757 * reflection.c (reflection_methodbuilder_to_mono_method): Save
7758 custom attributes to the method_aux struct. Also fix array indexes etc.
7760 * loader.c (mono_method_get_param_names): Make dynamic case work again.
7762 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
7764 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
7765 (both static and runtime) and reduce startup time.
7767 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
7769 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
7770 AsAny marshalling conversion instead of crashing.
7772 * marshal.c: Fix warnings.
7774 2004-02-09 Martin Baulig <martin@ximian.com>
7776 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
7778 * reflection.h (MonoReflectionInflatedMethod): Removed the
7779 `declaring' field, it's now in the unmanaged MonoGenericMethod.
7781 * reflection.c (method_encode_methodspec): Removed the `method'
7782 argument; we get it from `gmethod->declaring'.
7783 (inflated_method_get_object): Removed the `declaring' argument.
7785 2004-02-09 Martin Baulig <martin@ximian.com>
7787 * class.h (MonoGenericMethod): New type.
7788 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
7791 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
7792 a `MonoGenericMethod *gen_method' one.
7794 * class.c (mono_class_inflate_generic_type): Take an additional
7795 `MonoGenericMethod * argument. This is only non-NULL if we're
7796 inflating types for a generic method.
7797 (mono_class_inflate_generic_signature): Renamed to
7798 inflate_generic_signature() and made static; take a
7799 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7800 (inflate_generic_header): Take a `MonoGenericMethod *' argument
7801 instead of a `MonoGenericInst *' one.
7802 (mono_class_inflate_generic_method): Likewise.
7804 * reflection.c (encode_generic_method_sig): Take a
7805 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
7806 (method_encode_methodspec): Likewise.
7807 (inflated_method_get_object): Likewise.
7809 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
7810 field with a `MonoGenericMethod *gmethod' one.
7812 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
7814 * class.h (mono_class_has_parent): add parens to expansion
7817 2004-02-08 Martin Baulig <martin@ximian.com>
7819 * image.h (MonoImage): Removed `generics_cache'.
7821 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
7822 instead of a `MonoType *' argument; removed the `inflate_methods'
7823 argument. Don't inflate methods here.
7825 * loader.c (find_method): If it's a generic instance, call
7826 mono_class_init() on the `sclass->generic_inst->generic_type'.
7828 * metadata.c (mono_type_size): Make this work on uninitialized
7829 generic instances; call it on the `ginst->generic_type's class.
7831 * reflection.c (mono_reflection_bind_generic_parameters): Call
7832 mono_class_from_generic() to create the `ginst->klass'.
7834 2004-02-08 Martin Baulig <martin@ximian.com>
7836 * class.h (MonoClass): Changed type of `generic_inst' from
7837 `MonoType *' to `MonoGenericInst *'.
7839 2004-02-08 Martin Baulig <martin@ximian.com>
7841 * icall.c (ves_icall_Type_BindGenericParameters): Just call
7842 mono_type_get_object(), this is now creating a `MonoGenericInst'
7843 for MONO_TYPE_GENERICINST.
7844 (ves_icall_MonoGenericInst_GetParentType): Likewise.
7845 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
7847 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
7848 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
7849 (inflated_method_get_object): Added `MonoClass *refclass' argument.
7850 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
7853 * reflection.h (MonoReflectionInflatedMethod): Removed
7854 `declaring_type' and `reflected_type'.
7856 2004-02-08 Martin Baulig <martin@ximian.com>
7858 * class.h (MonoGenericInst): Added `MonoType *parent' and
7859 `MonoType **ifaces'.
7861 * reflection.h (MonoReflectionGenericInst): Removed `klass',
7862 `parent' and `interfaces'.
7864 * reflection.c (mono_reflection_bind_generic_parameters): Take a
7865 `MonoType *' argument and return a `MonoType *'.
7868 (ves_icall_MonoGenericInst_GetParentType): New interncall.
7869 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
7871 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
7873 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
7874 valuetype marshalling.
7876 2004-02-06 Martin Baulig <martin@ximian.com>
7879 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
7880 (my_mono_class_from_generic_parameter): Likewise.
7882 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
7884 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
7885 contents of the symbol files lazily.
7887 * object.h (MonoThread): Add 'name' and 'name_len' fields.
7889 * threads.h threads.c icall.c: New icalls for getting and setting the
7892 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
7894 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
7895 Raise an exception when the domain is not found.
7897 2004-02-03 Martin Baulig <martin@ximian.com>
7899 * reflection.c (mono_image_get_methodspec_token): Use the
7900 uninflated signature; fixes gen-33.
7902 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
7904 * gc.c threads.c: Make the finalizer thread a normal managed thread so
7905 the finalizer code can use thread functionality.
7907 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
7908 the finalizer thread.
7910 * threads.c: Make some functions more robust.
7912 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
7914 * metadata.h: Add new marshalling conventions.
7916 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
7917 stringbuilder marshalling. Fixes #53700.
7919 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
7921 * reflection.c (mono_image_get_type_info): Save declarative security
7924 * reflection.c (mono_image_get_field_info): Handle uninitialized
7925 unmanaged fields as well.
7927 * appdomain.c: Bump corlib version.
7929 2004-02-01 Martin Baulig <martin@ximian.com>
7931 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
7932 method type arguments.
7934 2004-01-30 Duncan Mak <duncan@ximian.com>
7936 * marshal.h: Add prototype for
7937 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
7939 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
7942 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
7944 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
7945 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
7947 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
7949 * marshal.c (mono_marshal_get_native_wrapper): Add support for
7950 custom marshalling of valuetypes.
7952 * marshal.c: Fix some warnings.
7954 2004-01-29 Martin Baulig <martin@ximian.com>
7956 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
7957 for generic method parameters.
7959 * reflection.c (method_encode_methodspec): Write the uninflated
7960 signature into the methodspec table.
7961 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
7962 is always the uninflated method.
7963 (reflection_methodbuilder_to_mono_method): Copy the generic
7964 parameters from the MethodBuilder into `header->gen_params'.
7966 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
7968 * class.c (mono_class_from_generic_parameter): Fix warning.
7970 2004-01-27 Martin Baulig <martin@ximian.com>
7972 * class.c (mono_class_from_generic_parameter): Don't create
7973 `klass->methods' here.
7975 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
7977 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
7978 extension since it does not work with libraries named lib<FOO>.dll.so.
7980 2004-01-25 Martin Baulig <martin@ximian.com>
7982 * class.c (mono_class_inflate_generic_type): Added support for
7983 MONO_TYPE_GENERICINST.
7985 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
7986 inflate methods on open constructed types.
7988 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7990 * object.c: fire ProcessExit event in the root AppDomain after running
7991 Main. Fixes bug #53299.
7993 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
7995 * socket-io.c: include the new socket-wrappers.h header.
7996 Use the wrappers instead of the unix socket functions to make the code
7999 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
8001 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
8003 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8006 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
8008 * reflection.c (mono_image_create_pefile): Handle the case when the
8009 entry point is not a MethodBuilder.
8011 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8012 field to ReflectionMethod since it is not allways a builder.
8014 * reflection.c (type_get_fully_qualified_name): New helper function to
8015 return the fully qualified name of a type.
8017 * reflection.c (encode_marshal_blob): Always emit the fully qualified
8018 type name for custom marshallers.
8020 * reflection.c (mono_marshal_spec_from_builder): Ditto.
8022 * class.c (mono_class_setup_vtable): If a parent class already
8023 implements an interface, use the implementing methods from that class.
8026 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8028 * threadpool.c: just return instead of ExitThread to allow for thread
8031 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
8033 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
8034 when closing resource modules.
8036 * reflection.c (mono_image_create_pefile): Handle the case when the
8037 entry point is not a MethodBuilder.
8039 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
8040 field to ReflectionMethod since it is not allways a builder.
8042 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
8044 * marshal.c (mono_marshal_get_managed_wrapper):
8045 mono_marshal_alloc takes native int so CONV_I
8048 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
8050 * reflection.c (fixup_cattrs): New function to fixup the methoddef
8051 tokens in the cattr table. Fixes #53108.
8053 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8055 * loader.c: don't trim ".dll" before looking up in the config file.
8056 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
8058 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
8060 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
8061 Return the module which contains the resource as well.
8062 (ves_icall_System_Reflection_Module_Close): New icall.
8064 * appdomain.c: Bump corlib version number.
8066 * image.c (mono_image_addref): New public function.
8068 * assembly.c: Call mono_image_addref.
8070 * reflection.c (mono_module_get_object): Increase reference count of
8073 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
8076 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
8077 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
8078 proper exceptions on DllImport problems.
8080 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
8082 * class.c, metadata.c: eliminate CSIZE macro.
8084 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
8086 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
8087 * object.h: Added async_callback field in MonoAsyncResult.
8088 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
8089 * verify.c: Added async_callback in MonoAsyncResult layout.
8091 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
8093 * reflection.c (mono_reflection_get_custom_attrs): Add support
8096 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
8098 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
8100 (mono_marshal_method_from_wrapper): Add null pointer check.
8102 2004-01-16 Martin Baulig <martin@ximian.com>
8104 * debug-mono-symfile.h: Set version number to 36 and reflect
8105 latest symbol writer changes.
8107 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
8109 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
8110 multi-dimensional arrays.
8111 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
8112 (mono_class_from_mono_type): Use bounded_array_class_get.
8114 * class.c (mono_bounded_array_class_get): New function which takes
8115 a 'bounded' bool argument to distinguish vectors from one dimensional
8118 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
8119 bounded_array_class_get if the array has bounds.
8121 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
8122 Search modules loaded using AssemblyBuilder:AddModule as well.
8124 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8126 * appdomain.c: increased corlib version.
8127 * filewatcher.c: removed g_print.
8129 (get_property_info): only allocate what is actually requested.
8130 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
8132 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8134 * Makefile.am: added filewatcher.[ch]
8135 * filewatcher.[ch]: FileSystemWatcher runtime support.
8136 * icall.c: added new FSW icalls.
8138 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
8140 * string-icalls.c: fix stringbuilder regression as suggested by
8141 Iain McCoy <iain@mccoy.id.au>.
8143 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
8145 * process.c (process_read_stringtable_block): Recognize '007f' as
8146 a language neutral stringtable block.
8148 2004-01-12 Patrik Torstensson
8150 * object.h (MonoStringBuilder) : Changed layout to support our
8151 new stringbuilder class.
8152 * marshal.c: Change marshalling to support the new layout of
8154 * appdomain.c: increased version number because new layout of
8157 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
8159 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
8160 assembly name as an string instead of an AssemblyName, since it is
8161 easier to extract info from it.
8163 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
8164 the culture subdirectories too. Fixes #52231.
8166 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8168 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
8169 It takes 2 new parameters with an optional name for the method to look
8170 for and case ignoring info.
8172 * threadpool.c: removed unused variable.
8174 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8176 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
8177 It takes 2 new parameters with an optional name for the property to look
8178 for and case ignoring info.
8181 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
8183 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
8186 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8189 * assembly.c: escape the uri before passing it to g_filename_from_uri.
8192 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
8194 * reflection.c: Add support for more than one unmanaged resource.
8196 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
8197 in field->def_value, as done in all other cases.
8199 * reflection.c (mono_reflection_get_custom_attrs): Add support for
8202 * reflection.c (mono_reflection_create_runtime_class): Remove
8203 errorneous assignment to klass->element_class, since it is already
8204 done in mono_reflection_setup_internal_class.
8206 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8208 * gc.c: added missing LeaveCriticalSection.
8209 * icall.c: indented a couple of lines.
8210 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
8211 if we call EndInvoke inside a callback. Fixes bug #52601.
8213 2004-01-07 Martin Baulig <martin@ximian.com>
8215 * mono-debug-debugger.h
8216 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
8218 2004-01-06 Miguel de Icaza <miguel@ximian.com>
8220 * appdomain.c: Use messages in NotImplementedException.
8222 * exception.c (mono_get_exception_not_implemented): Now this takes
8225 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
8226 exception instead of g_asserting an aborting when something is not
8229 Add some inline docs.
8231 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
8233 * reflection.h: Update after changes to object layout.
8235 * reflection.c: Implement saving of unmanaged aka win32 resources.
8237 * appdomain.c: Bump version number.
8239 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
8240 Handle missing domains gracefully.
8242 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
8244 * file-io.c : On Windows, there are much more invalid_path_chars.
8246 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
8248 * class.h, object.c: prepare for GetType () speedup.
8250 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
8252 * profiler.c: workaround for --profile null reference exception on
8253 cygwin. Patch by Patrik Torstensson.
8255 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
8257 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
8258 make work for unaligned access.
8260 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
8262 * class.c: small cleanup (class->fields [i] -> field).
8263 * image.c: check address of metadata is valid.
8265 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
8267 * assembly.h assembly.c (mono_assembly_loaded): New public function to
8268 search the list of loaded assemblies.
8270 * reflection.c (mono_reflection_type_from_name): Use
8271 mono_assembly_loaded instead of mono_image_loaded.
8273 * reflection.c: Fix warnings.
8275 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
8277 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
8278 is dynamic. This is needed since an assembly can contain both dynamic and
8281 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
8284 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
8286 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
8287 to store modules loaded using AddModule.
8289 * reflection.c (mono_image_fill_file_table): Generalize this so it works
8292 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
8294 * reflection.c (mono_image_fill_export_table_from_module): New function to
8295 fill out the EXPORTEDTYPES table from a module.
8297 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
8298 into a separate function. Also handle loaded non-dynamic modules.
8300 * reflection.c (mono_image_basic_init): Fix memory allocation.
8302 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8304 * assembly.c (mono_assembly_load_references): Make this public.
8306 2003-12-19 Martin Baulig <martin@ximian.com>
8308 * class.c (mono_class_initialize_generic): Made this static, take
8309 a `MonoGenericInst *' instead of a `MonoClass *'.
8310 (mono_class_from_generic): Call mono_class_initialize_generic()
8311 unless we're already initialized or being called from
8312 do_mono_metadata_parse_generic_inst().
8314 * class.h (MonoGenericInst): Added `initialized' and
8315 `init_pending' flags.
8317 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
8318 `mono_class_init (gklass)' or mono_class_initialize_generic()
8319 here; set `generic_inst->init_pending' while parsing the
8322 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
8324 * locales.c: include string.h for memxxx prototypes
8326 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
8328 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
8329 constructor when accessing literal fields.
8331 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
8333 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8335 * reflection.c (assembly_add_resource_manifest): New function to fill
8336 the MANIFESTRESOURCE table.
8338 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
8340 * reflection.h: Update to changes in class layout.
8342 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
8343 Reenable call to mono_runtime_is_shutting_down ().
8345 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
8346 determine if the runtime is shutting down.
8348 2003-12-16 Jackson Harper <jackson@ximian.com>
8350 * icall.c: comment out call to mono_runtime_is_shutting_down to
8353 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
8355 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
8356 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
8358 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
8360 * reflection.c: move definition of swap_with_size
8361 to before its first call
8363 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
8365 * appdomain.c (mono_runtime_is_shutting_down): New public function.
8367 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
8370 * object.c: Fix warnings.
8372 * icall.c (ves_icall_Type_Get...): Only consider inherited static
8373 members if FlattenHierarchy is set.
8375 * reflection.c (mono_image_add_decl_security): New function to emit
8376 declarative security.
8378 * reflection.h reflection.c: Add support for declarative security.
8380 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8382 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
8384 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
8386 * appdomain.c verify.c: Moved corlib version checking into its own
8387 function in appdomain.c since it needs to create vtables etc.
8389 2003-12-13 Patrik Torstensson <p@rxc.se>
8391 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
8392 instead of unwrapped server.
8394 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
8396 * verify.c (check_corlib): Fix field index.
8398 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
8400 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
8403 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
8405 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
8406 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
8407 cope with sizeof(size_t) != sizeof(guint32).
8409 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8411 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
8414 2003-12-10 Mark Crichton <crichton@gimp.org>
8416 * icall.c: removed the GetNonZeroBytes. We now handle this case
8419 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
8421 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
8423 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
8426 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
8428 * verify.c (check_corlib): Handle the case when the version field is
8429 initialized by a static constructor.
8431 2003-12-08 Patrik Torstensson <p@rxc.se>
8433 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
8435 2003-12-08 Martin Baulig <martin@ximian.com>
8437 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
8438 a MonoReflectionGenericParameter, also take the parameter index
8439 and name as arguments.
8440 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
8441 (ves_icall_MonoGenericParam_initialize): New interncall.
8442 (ves_icall_Type_make_byref_type): New interncall.
8444 * reflection.h (MonoReflectionGenericParam): Derive from
8445 MonoReflectionType, not just from MonoObject. Added `refobj' and
8448 * reflection.c (mono_reflection_define_generic_parameter): Create
8449 and return a new MonoReflectionGenericParam; don't initialize the
8451 (mono_reflection_initialize_generic_parameter): New public method;
8452 initializes the constraints and creates the `param->pklass'.
8454 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
8456 * reflection.h reflection.c: Use the new fields 'num_types',
8457 'num_fields' and 'num_methods' to track the number of types etc.
8459 * verify.c (check_corlib): Check corlib version number.
8461 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
8463 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
8464 function works on all methods.
8466 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
8468 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
8469 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
8470 the custom_type_info flag of the transparent proxy.
8471 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
8472 objects that supports IRemotingTypeInfo.
8473 * object.h: Added custom_type_info field in transparent proxy.
8475 2003-12-06 Martin Baulig <martin@ximian.com>
8477 * class.c (mono_class_create_from_generic): Removed.
8478 (mono_class_from_generic): Check `ginst->klass' before doing
8479 anything else. This is important to fully support "recursive"
8482 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
8483 empty `generic_inst->klass' before doing anything else.
8485 2003-12-06 Dick Porter <dick@ximian.com>
8490 * locales.c: Use C structs to access class fields. Don't do a
8491 conversion between MonoString and UChar because both are
8492 platform-endian UTF-16. Compare now takes startindex and count
8493 parameters. Add a char overload for IndexOf. Speed up the
8494 invariant string IndexOf.
8496 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
8498 * Makefile.am (monosn_LDADD): Fix parallel build.
8500 2003-12-04 Martin Baulig <martin@ximian.com>
8503 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
8504 (ves_icall_Type_make_array_type): New interncall.
8506 2003-12-04 Martin Baulig <martin@ximian.com>
8508 * locales.c: also change it in the !HAVE_ICU case.
8510 2003-12-04 Dick Porter <dick@ximian.com>
8513 * locales.c: construct_compareinfo is now in CompareInfo, not
8516 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
8518 * image.c (mono_image_load_file_for_image): Cache loaded images in the
8521 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
8524 * assembly.c (mono_assembly_load_references): Only load references
8527 * class.c (mono_class_from_name): Avoid linear search of the
8530 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
8532 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
8534 * image.h (MonoImage): Add 'field_cache' field.
8536 * loader.c (mono_field_from_token): Cache field lookups.
8538 * reflection.c (mono_module_get_object): Fix name property.
8540 * icall.c (ves_icall_get_enum_info): Update after changes to
8541 mono_metadata_get_constant_index ().
8543 * icall.c: Get rid of get_type_info icall, use a separate icall for
8544 each type property to avoid needless memory allocations. Fixes #51514.
8546 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
8547 to avoid needless binary searches.
8549 * class.c (class_compute_field_layout): Move the initialization of
8550 field->def_value to mono_class_vtable ().
8552 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
8555 * object.c (mono_object_allocate): Make it inline.
8557 * object.c (mono_object_allocate_spec): Make it inline.
8559 2003-12-02 Dick Porter <dick@ximian.com>
8561 * locales.c (create_NumberFormat): NumberFormatInfo construction.
8562 Patch by Mohammad DAMT (mdamt@cdl2000.com).
8564 2003-12-01 Dick Porter <dick@ximian.com>
8566 * threads.c: Fix signature and call in CreateMutex and
8569 2003-12-01 Dick Porter <dick@ximian.com>
8572 * locales.c: Implement string compares and searching
8574 * object.h: Add extra Thread field
8576 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
8578 * reflection.c (fixup_method): Add support for MonoCMethod.
8580 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
8582 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
8584 * reflection.c (assembly_name_to_aname): Allow extra characters in
8585 assembly names. Fixes #51468.
8587 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
8589 * exception.c (mono_exception_from_name_domain): New helper function.
8591 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
8592 exception object in the correct domain.
8594 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
8595 formatting + make a copy a the input data.
8597 * loader.c (mono_get_method_from_token): Methods which contain
8598 native code do not have entries in the ImplMap.
8600 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
8601 Thanks to Gonzalo for spotting this.
8603 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
8604 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
8606 * assembly.h (mono_assembly_load_from): Split the second part of
8607 assembly loading into a new public function.
8609 * exception.h (mono_get_exception_bad_image_format): New function.
8611 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
8613 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
8614 Enumerate all modules inside a dynamic assembly. Fixes #51293.
8616 * icall.c: Add new icall for creating dynamic methods.
8618 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
8620 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
8622 * reflection.c (mono_reflection_create_dynamic_method): New icall to
8623 create a dynamic method.
8625 * reflection.c (resolve_object): New helper function.
8627 * reflection.c: Generalize ReflectionMethodBuilder and the functions
8628 which manipulate it so they can also work on dynamic methods.
8630 * reflection.c (reflection_method_builder_to_mono_method): Avoid
8631 creating the MonoReflectionMethodAux structure if it is not needed.
8633 * reflection.h verify.c: Update after changes to object layout.
8635 * reflection.c (method_builder_encode_signature): Fix compilation on
8638 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
8640 * appdomain.h: Added support for context static fields. Added static_data
8641 field to MonoAppContext and renamed thread_static_fields to a more
8642 generic special_static_fields in MonoAppDomain, since it can now contain
8643 context static fields.
8644 * domain.c: Updated hashtable name.
8645 * object.c: Replaced field_is_thread_static() for a more generic
8646 field_is_special_static() which also checks for context static attribute.
8647 In mono_class_vtable(), added support for static context fields.
8648 * threads.c: Changed methods that manage thread static fields to more
8649 generic methods so they can be reused both for thread and context static
8651 * threads.h: Declared some new methods.
8653 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
8655 * reflection.h: Update after changes to the managed types.
8657 * reflection.c (encode_custom_modifiers): New helper function.
8659 * reflection.c (method_encode_signature): Emit custom modifiers.
8661 * reflection.c (field_encode_signature): Emit custom modifiers.
8663 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
8665 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
8667 * icall.c (ves_icall_System_ValueType_Equals): New optimized
8670 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
8673 * object.c (mono_field_get_value_object): New function.
8675 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
8678 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
8680 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
8681 return a preallocated out-of-memory exception instance.
8683 * object.c (out_of_memory): Use the new function.
8685 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
8686 flag is before the custom modifiers. Fixes #49802.
8688 2003-11-16 Martin Baulig <martin@ximian.com>
8690 * class.c (mono_class_is_open_constructed_type): Implemented the
8691 MONO_TYPE_GENERICINST case.
8693 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
8695 * assembly.c (mono_assembly_fill_assembly_name): New function to
8696 fill out the MonoAssemblyName structure.
8697 (mono_assembly_open): Use the new function.
8699 * icall.c (fill_reflection_assembly_name): New helper function.
8701 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
8704 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
8706 2003-11-15 Martin Baulig <martin@ximian.com>
8708 * class.c (mono_class_is_open_constructed_type): New public
8709 function; checks whether a type is an open constructed type,
8710 ie. whether it still contains type parameters.
8711 (mono_class_inflate_generic_type): If we're a type parameter and
8712 the inflated type is also a MONO_TYPE_(M)VAR, return the original
8715 * class.h (MonoGenericInst): Added `guint32 is_open'.
8717 * loader.c (method_from_methodspec): Check whether we're an open
8718 or closed constructed type and set `ginst->is_open'.
8720 * reflection.c (mono_reflection_bind_generic_parameters): Check
8721 whether we're an open or closed constructed type and set
8723 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
8724 from open constructed types.
8726 2003-11-15 Martin Baulig <martin@ximian.com>
8728 * reflection.c (mono_reflection_bind_generic_parameters): If we're
8729 a generic instance (instead of a generic type declaration) with
8730 unbound generic parameters, bind them to our actual types.
8732 2003-11-14 Martin Baulig <martin@ximian.com>
8734 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
8736 * reflection.c (mono_reflection_bind_generic_parameters): If we're
8737 an interface type, populate `res->interfaces' with instantiated
8738 versions of all the interfaces we inherit.
8740 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
8742 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
8743 when MONO_PATH is set but doesn't contain the install dir.
8745 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8748 (ves_icall_Type_GetInterfaces): don't return an interface twice when
8749 it's also implemented in base classes. Fixes bug #50927.
8751 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
8753 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
8754 if this method is called from a finalizer. Fixes #50913.
8756 2003-11-12 Miguel de Icaza <miguel@ximian.com>
8758 * threads.c: Implement VolatileRead/VolatileWrite
8760 * icall.c: Add new icalls for VolatileRead/VolatileWrite
8762 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
8764 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
8765 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
8768 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
8769 from Peter Ross (pro@missioncriticalit.com).
8771 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
8773 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
8775 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
8777 * assembly.c (mono_assembly_load_references): Disable check because it
8778 triggers on older corlibs which lots of people have.
8780 2003-11-12 Jackson Harper <jackson@ximian.com>
8782 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
8783 load corlib.dll if mscorlib.dll is not found.
8784 * assembly.h: Remove corlib name define.
8787 * image.c: Change corlib name to mscorlib.
8789 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
8791 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
8793 2003-11-11 Miguel de Icaza <miguel@ximian.com>
8795 * appdomain.h: Added loader_optimization here to sync with the C#
8796 code, and add disallow_binding_redirects field.
8798 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
8800 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
8802 * reflection.c (mono_image_build_metadata): Fix crash on modules
8805 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
8807 * icall.c (ves_icall_get_method_info): Return callingConvention as
8810 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
8811 namespaces from the EXPORTEDTYPE table as well.
8813 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
8814 from all modules inside the assembly.
8816 2003-11-11 Martin Baulig <martin@ximian.com>
8818 * reflection.c (mono_reflection_bind_generic_parameters): Make
8819 this work for interfaces.
8821 2003-11-11 Martin Baulig <martin@ximian.com>
8823 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
8825 2003-11-11 Martin Baulig <martin@ximian.com>
8827 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
8828 "MonoInflatedMethod" and "MonoInflatedCtor".
8830 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
8832 * reflection.c (resolution_scope_from_image): Use the assembly table
8833 from the manifest module, since other modules don't have it.
8835 * debug-helpers.c (mono_type_full_name): New helper function.
8837 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
8839 * image.c (mono_image_load_file_for_image): New public function which
8840 is a replacement for the load_file_for_image in class.c.
8842 * assembly.c (mono_assembly_load_module): A wrapper for the function
8843 above which does assembly association and reference loading too.
8845 * class.c (mono_class_from_name): Call mono_assembly_load_module.
8847 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8849 * appdomain.c: not all of the attributes for the full assembly name
8850 are required and the order doesn't matter. Fixes bug #50787.
8852 2003-11-10 Dick Porter <dick@ximian.com>
8854 * locales.c: Use platform-endian UTF16
8856 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
8858 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8860 2003-11-10 Martin Baulig <martin@ximian.com>
8863 (mono_metadata_load_generic_params): Make this actually work.
8865 * reflection.c (mono_reflection_bind_generic_parameters): If our
8866 parent is a generic instance, pass all the `types' to it, no
8867 matter whether it has the same number of type parameters or not.
8869 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
8871 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
8873 * assembly.c (mono_assembly_load_references): Move the image<->assembly
8874 assignment code to this function so it gets called recursively for all
8877 * image.c (load_modules): Remove the assembly assignment since it is
8878 now done by mono_assembly_load_references.
8880 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
8881 Add 'module' argument.
8882 (mono_module_get_types): New helper function.
8883 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
8885 2003-11-08 Martin Baulig <martin@ximian.com>
8887 * class.c (mono_class_inflate_generic_method): Interface method
8888 don't have a header.
8890 * reflection.c (mono_image_get_methodspec_token): Take an
8891 additional `MonoGenericInst *' argument instead of reading it from
8892 the header; this is necessary to support interfaces.
8893 (mono_image_create_token): Pass the `MonoGenericInst *' from the
8894 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
8895 (inflated_method_get_object): Take an additional `MonoGenericInst *'
8898 * reflection.h (MonoReflectionInflatedMethod): Added
8899 `MonoGenericInst *ginst'.
8901 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
8903 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
8905 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
8907 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
8909 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
8912 (reflection_methodbuilder_from_method_builder):
8913 (reflection_methodbuilder_from_ctor_builder): New helper functions to
8914 initialize a ReflectionMethodBuilder structure.
8915 (mono_image_get_methodbuilder_token):
8916 (mono_image_get_ctorbuilder_token): New functions to emit memberref
8917 tokens which point to types in another module inside the same assembly.
8919 * reflection.c: Use the new helper functions.
8921 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
8923 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
8924 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
8926 * reflection.c (resolution_scope_from_image): Emit a moduleref if
8929 * reflection.c (mono_image_build_metadata): Emit metadata only for the
8930 current module. Emit the manifest only for the main module.
8932 * reflection.c (mono_image_create_token): Add assertion when a
8933 memberref needs to be created.
8935 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
8937 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
8938 larger buffer for the custom attribute blob. Fixes #50637.
8940 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8942 * threadpool.c: notify listener on async processing handles after
8943 invoking the async callback. Thanks to Zoltan.
8945 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
8947 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
8948 avoid code duplication.
8950 * reflection.h (MonoDynamicImage): New type which is currently unused,
8951 but will be used through the ref.emit code in place of
8952 MonoDynamicAssembly.
8954 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
8957 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
8958 a MonoDynamicImage instead of just a MonoImage.
8960 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
8961 icalls to ModuleBuilder but keep their semantics, so they will work
8962 with moduleb->assemblyb. This will change later.
8964 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
8966 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
8969 * reflection.c (mono_image_build_metadata): Avoid creation of a default
8970 main module, since it is now done by the managed code.
8972 2003-11-03 Martin Baulig <martin@ximian.com>
8974 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
8975 `ginst->klass' here.
8976 (method_encode_methodspec): Don't use the `ginst->generic_method's
8977 klass if it's a generic instance, use `ginst->klass' in this case.
8979 2003-11-03 Martin Baulig <martin@ximian.com>
8981 * reflection.c (mono_image_get_generic_method_param_info):
8982 Removed, use mono_image_get_generic_param_info() instead.
8983 (mono_image_get_type_info): Write the GenericParam table before
8984 the Method table. This is neccessary because in the GenericParam
8985 table, type parameters of the class (ie. '!0' etc.) must come
8986 before the ones from its generic methods (ie. '!!0' etc).
8988 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
8990 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
8992 2003-11-02 Martin Baulig <martin@ximian.com>
8994 * reflection.c (create_generic_typespec): Take a
8995 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
8996 the generic parameters from it.
8998 2003-11-02 Martin Baulig <martin@ximian.com>
9000 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
9001 instead of a `MonoClassField *' since we just need the type.
9002 (create_generic_typespec): New static function. Creates a
9003 TypeSpec token for a generic type declaration.
9004 (mono_image_get_generic_field_token): New static function.
9005 (mono_image_create_token): If we're a FieldBuilder in a generic
9006 type declaration, call mono_image_get_generic_field_token() to get
9009 2003-11-02 Martin Baulig <martin@ximian.com>
9012 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
9013 `MonoReflectionGenericInst *declaring_type' and
9014 `MonoReflectionGenericInst *reflected_type' fields.
9016 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
9017 `MonoReflectionGenericInst *declaring_type' and a
9018 `MonoReflectionGenericInst *reflected_type' argument instead of a
9019 single `MonoReflectionGenericInst *type' one. Set
9020 `res->declaring_type' and `res->reflected_type' from them.
9021 (mono_reflection_inflate_field): Likewise.
9023 2003-11-02 Martin Baulig <martin@ximian.com>
9025 * class.c (mono_class_setup_vtable): Don't store generic methods
9028 2003-11-02 Martin Baulig <martin@ximian.com>
9030 * reflection.h (MonoReflectionGenericInst): Added
9031 `MonoReflectionType *declaring_type'.
9033 * reflection.c (mono_reflection_bind_generic_parameters): Use
9034 `if (tb->parent)' instead of `klass->parent'.
9036 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
9038 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
9039 with an empty ASSEMBLY table.
9041 * reflection.c (mono_image_build_metadata): Avoid using the same loop
9042 variable in the inner and outer loops.
9044 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
9046 * metadata.h (mono_metadata_make_token): Put parentheses around macro
9049 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
9051 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
9052 icalls. Instead, do everything in managed code. This is needed since
9053 it is hard to restore the original domain etc. in unmanaged code in the
9054 presence of undeniable exceptions.
9056 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
9057 New icalls to push and pop appdomain refs.
9059 2003-10-31 Martin Baulig <martin@ximian.com>
9061 * class.c (inflate_generic_type): Renamed to
9062 mono_class_inflate_generic_type() and made it public.
9064 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
9067 * loader.c (mono_field_from_memberref): Also set the retklass for
9070 * fielder.c (mono_image_get_inflated_field_token): New static
9071 method; creates a metadata token for an inflated field.
9072 (mono_image_create_token, fixup_method): Added support for
9073 "MonoInflatedField".
9074 (fieldbuilder_to_mono_class_field): New static function.
9075 (mono_reflection_inflate_field): New public function.
9078 (MonoReflectionGenericInst): Added `MonoArray *fields'.
9079 (MonoReflectionInflatedField): New typedef.
9081 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
9083 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
9084 for Solaris and other platforms without s6_addr16
9086 2003-10-30 Martin Baulig <martin@ximian.com>
9088 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
9089 argument instead of two.
9090 (mono_class_inflate_generic_signature): Likewise.
9091 (inflate_generic_header): Likewise.
9092 (mono_class_inflate_generic_method): Likewise. In addition, if
9093 `ginst->klass' is set, it becomes the new `method->klass'.
9095 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
9098 * reflection.c (encode_generic_method_sig): Write a 0xa as the
9100 (method_encode_methodspec): If we have generic parameters, create
9101 a MethodSpec instead of a MethodRef.
9102 (fixup_method): Added support for "MonoInflatedMethod" and
9104 (mono_image_create_token): Added support for "MonoInflatedMethod"
9105 and "MonoInflatedCtor".
9106 (inflated_method_get_object): New static function; returns a
9107 managed "System.Reflection.MonoInflatedMethod" object.
9108 (mono_reflection_bind_generic_method_parameters): Return a
9109 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
9110 (mono_reflection_inflate_method_or_ctor): Likewise.
9111 (mono_image_get_generic_method_param_info): Initialize unused
9113 (mono_image_get_generic_param_info): Likewise.
9115 * reflection.h (MonoReflectionInflatedMethod): New public
9116 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
9117 "S.R.MonoInflatedCtor" classes.
9119 * loader.c (method_from_memberref): If we're a TypeSpec and it
9120 resolves to a generic instance, inflate the method.
9122 2003-10-28 Dick Porter <dick@ximian.com>
9124 * object.c (mono_runtime_run_main): Convert command-line arguments
9125 into utf8, falling back to the user's locale encoding to do so.
9127 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
9129 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
9132 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
9134 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
9135 up icalls at method definition time. Partially fixes #33569.
9137 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
9139 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
9140 marshalling of arrays. Fixes #50116.
9142 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
9144 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
9145 points to a vtable in the dying appdomain.
9147 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
9148 listeners into unmanaged code inside the lock.
9150 * object.c (mono_class_vtable): Turn off typed allocation in non-root
9151 domains and add some comments.
9153 2003-10-25 Martin Baulig <martin@ximian.com>
9155 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
9157 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
9159 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
9160 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
9161 currently parsing. Create the generic class and store it in
9162 `generic_inst->klass' before parsing the type arguments. This is
9163 required to support "recursive" definitions; see mcs/tests/gen-23.cs
9165 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
9166 to support recursive typespec entries.
9168 * class.c (mono_class_setup_parent): If our parent is a generic
9169 instance, we may get called before it has its name set.
9170 (mono_class_from_generic): Splitted into
9171 mono_class_create_from_generic() and mono_class_initialize_generic().
9173 2003-10-25 Martin Baulig <martin@ximian.com>
9175 * icall.c (ves_icall_Type_BindGenericParameters): Return a
9176 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
9177 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
9178 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
9180 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
9181 (create_typespec): Likewise.
9182 (mono_reflection_bind_generic_parameters): Return a
9183 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
9184 (mono_reflection_inflate_method_or_ctor): New public function.
9186 * reflection.h (MonoReflectionGenericInst): New typedef.
9188 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
9190 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
9191 inside the domain lock. Fixes #49993.
9193 * object.c (mono_class_vtable): When typed allocation is used,
9194 allocate vtables in the GC heap instead of in the mempool, since the
9195 vtables contain GC descriptors which are used by the collector even
9196 after the domain owning the mempool is unloaded.
9198 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
9200 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
9201 reflect what it does. Also invalidate mempools instead of freeing
9202 them if a define is set.
9204 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
9207 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
9208 hold the finalizable objects in this domain.
9210 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
9213 * appdomain.c (mono_domain_set): New function to set the current
9214 appdomain, but only if it is not being unloaded.
9216 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
9217 appdomain which is being unloaded.
9219 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
9220 unloading of the root appdomain.
9222 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
9223 icall to execute a method in another appdomain. Intended as a
9224 replacement for InternalSetDomain, which can confuse the code
9225 generation in the JIT.
9227 * appdomain.c (mono_domain_is_unloading): New function to determine
9228 whenever an appdomain is unloading.
9230 * appdomain.c (mono_domain_unload): New function to correctly unload
9233 * assembly.c (mono_assembly_load_references): Check that an assembly
9234 does not references itself.
9236 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
9237 domain manually, it asks the finalizer thread to do it, then waits for
9238 the result. Also added a timeout.
9240 * icall.c: Register the new icalls.
9242 * threads.h threads.c: Export the mono_gc_stop_world and
9243 mono_gc_start_world functions.
9245 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
9246 function to fill out the mempool with 0x2a.
9248 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
9250 * reflection.h (MonoReflectionMethodAux): New structure to store
9251 information which is rarely used, thus is not in the MonoMethod
9254 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
9257 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
9258 and marshalling info into the aux structure.
9260 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
9261 from the aux structure.
9263 * loader.c (mono_method_get_param_names): Retrieve the param names from
9266 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
9268 * exception.h exception.c: Add AppDomainUnloadedException && fix
9271 2003-10-21 Dick Porter <dick@ximian.com>
9274 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
9275 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
9277 2003-10-21 Martin Baulig <martin@ximian.com>
9279 * reflection.c (mono_reflection_bind_generic_parameters):
9280 `klass->parent' is NULL for interfaces.
9282 2003-10-21 Martin Baulig <martin@ximian.com>
9284 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9286 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
9288 * exception.c (mono_exception_from_name_msg): New helper function for
9289 creating exceptions and initializing their message field.
9291 * exception.c: Simplify functions using the new helper.
9293 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
9296 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
9297 mono_raise_exception, since otherwise gcc doesn't generate the function
9298 epilog for raise_exception, confusing the stack unwinding in the JIT.
9301 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
9302 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
9305 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9307 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
9310 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
9312 * icall.c: Removed GetUninitializedObject method because
9313 AllocateUninitializedClassInstance does the same.
9315 2003-10-18 Martin Baulig <martin@ximian.com>
9317 * class.c (inflate_generic_signature): Renamed to
9318 mono_class_inflate_generic_signature() and made it public.
9319 (my_mono_class_from_generic_parameter): New static function; if we
9320 don't already have the generic parameter's MonoClass, create a
9321 very simple one which is just used internally in the runtime and
9322 not passed back to managed code.
9324 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
9326 * metadata.h (MonoMethodSignature): Moved the
9327 `MonoGenericParam *gen_params' to the MonoMethodHeader.
9328 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
9330 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
9331 ves_icall_MonoMethod_GetGenericArguments(); this is now an
9332 interncall on the MonoMethod class, not on MethodInfo.
9333 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
9334 calling mono_reflection_bind_generic_method_parameters() directly.
9336 * loader.c (mono_method_get_signature): If this is a MethodSpec;
9337 return the already computed `method->signature'.
9338 (method_from_methodspec): New static function to load a method
9339 from a MethodSpec entry.
9340 (mono_get_method_from_token): Call the new method_from_methodspec()
9341 for MethodSpec tokens.
9342 (mono_get_method_from_token): If we're a generic method, load the
9345 * reflection.c (mono_image_get_memberref_token): Allow
9346 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
9348 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
9349 (mono_image_create_token): First check whether it's a generic
9350 method (so we'd need to create a MethodSpec), then do the other
9352 (mono_reflection_bind_generic_method_parameters): Return a
9353 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
9354 called directly from the interncall.
9356 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
9358 * reflection.c (load_public_key): Move loading of the public key
9361 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
9363 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
9366 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
9367 culture, hash_alg and public_key. Fixes #49555.
9369 2003-10-17 Martin Baulig <martin@ximian.com>
9371 * class.h (MonoGenericInst): Moved this declaration here and added
9372 `MonoMethod *generic_method'.
9375 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
9376 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
9378 * metadata.c (mono_metadata_type_equal): Two types of
9379 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
9380 index; ie. don't compare the address of the `MonoGenericParam'
9382 (mono_metadata_load_generic_params): Removed the `MonoMethod
9385 * metadata.h (MonoGenericInst): Moved declaration to class.h.
9386 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
9388 * reflection.c (method_encode_signature): Encode the number of
9390 (encode_generic_method_sig): New static function.
9391 (method_encode_methodspec): New static function; creates an entry
9392 in the MethodSpec table for a generic method.
9393 (mono_image_get_methodspec_token): New static function.
9394 (mono_image_create_token): Call mono_image_get_methodspec_token()
9395 for generic methods.
9396 (mono_reflection_bind_generic_method_parameters): New public
9397 function. Instantiates a generic method.
9399 2003-10-16 Martin Baulig <martin@ximian.com>
9401 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
9402 *gen_params' here from MonoMethodHeader.
9404 * metadata.c (mono_metadata_parse_method_signature): If we have
9405 generic parameters, initialize `method->gen_params' and then set
9406 the correct `type->data.generic_param' in all the parameters.
9408 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
9410 * threads.c (mono_threads_get_default_stacksize): New function to
9411 return the default stacksize.
9413 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
9414 termination of the finalizer thread, since the previous method had
9415 race conditions. Fixes #49628.
9417 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
9418 as for the other managed threads.
9420 2003-10-16 Martin Baulig <martin@ximian.com>
9422 * class.c (inflate_generic_signature): Copy `generic_param_count'
9425 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
9428 * metadata.c (mono_metadata_parse_method_signature): Actually set
9429 the `method->generic_param_count' here.
9430 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
9432 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
9434 * object.h: Add a new field to TypedRef to simplify the implementation
9435 of the REFANY opcodes in the JIT.
9437 * icall.c: Make use of the new field.
9439 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
9442 2003-10-15 Martin Baulig <martin@ximian.com>
9444 * class.c (mono_class_from_gen_param): Renamed to
9445 mono_class_from_generic_parameter() and moved most of the
9446 functionality from mono_reflection_define_generic_parameter()
9447 here; ie. we create a "real" class here.
9448 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
9449 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
9450 previously been called.
9452 * class.h (MonoGenericParam): Moved the declaration of this struct
9453 here from metadata.h and added `MonoMethod *method'.
9455 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
9458 * loader.c (mono_get_method_from_token): If we have any generic
9459 parameters, call mono_metadata_load_generic_params() to read them
9460 from the MONO_TABLE_GENERICPAR.
9462 * metadata.c (mono_metadata_load_generic_params): Added
9463 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
9465 * metadata.h (MonoMethodSignature): Replaced
9466 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
9467 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
9469 * reflection.c (mono_reflection_define_generic_parameter): Moved
9470 most of the functionality into the new
9471 mono_class_from_generic_parameter(); set the `method' field if
9472 we're a method parameter.
9474 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
9476 * marshal.c (emit_struct_conv): if native size is 0
9479 2003-10-14 Martin Baulig <martin@ximian.com>
9481 * icall.c: The generics API has changed in the spec since it was
9482 added to System.Type; these modifications make it match the spec
9484 (ves_icall_Type_GetGenericParameters): Renamed to
9485 `ves_icall_Type_GetGenericArguments'.
9486 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
9487 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
9488 `ves_icall_MonoType_get_HasGenericArguments'.
9489 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
9490 `ves_icall_MonoType_get_IsGenericParameter'.
9491 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
9492 this is no interncall anymore.
9493 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
9494 `ves_icall_TypeBuilder_get_IsGenericParameter'.
9496 2003-10-14 Martin Baulig <martin@ximian.com>
9498 * reflection.c (mono_reflection_bind_generic_parameters): Also
9499 inflate generic methods if we're reading the class from IL.
9501 2003-10-13 Martin Baulig <martin@ximian.com>
9503 * reflection.c (mono_reflection_define_generic_parameter): This
9504 method isn't called directly from the icall anymore; take a
9505 `MonoReflectionAssemblyBuilder *' so we can use this for type and
9506 method generic parameters.
9507 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
9508 (method_builder_encode_signature): Encode generic parameters.
9509 (mono_image_get_method_info): Write generic params to the
9510 MONO_TABLE_GENERICPARAM table.
9512 * reflection.h (MonoReflectionMethodBuilder): Added
9513 `MonoArray *generic_params'.
9515 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
9517 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
9518 wrapper for mono_reflection_define_generic_parameter().
9519 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
9521 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
9523 * marshal.h: Add missing function to fix build.
9525 * marshal.c (mono_marshal_get_native_wrapper): Add support for
9526 the SetLastError pinvoke attribute.
9528 * marshal.c (mono_marshal_set_last_error): New helper function called
9529 by the generated code.
9531 * marshal.c (mono_mb_emit_branch): New helper function.
9533 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
9535 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9536 classes as parameters and return values of delegates. Fixes #29256.
9538 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
9540 * locales.c: use gint32 in non HAVE_ICU case
9542 2003-10-11 Martin Baulig <martin@ximian.com>
9544 * mono-debug.c (mono_debug_add_method): Added a workaround for
9547 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
9549 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
9550 delegates passed to native code must use the STDCALL calling
9551 convention. Fixes #35987.
9553 2003-10-10 Martin Baulig <martin@ximian.com>
9555 * class.c (inflate_generic_type): If we're inflating for a generic
9556 type instance (and not for a generic method), return
9557 MONO_TYPE_MVAR unchanged.
9559 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9561 * string-icalls.c: Join ignores null strings in the source array.
9562 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
9563 * threads.c: GetAvailableTheads is slightly more accurate.
9565 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
9567 * threads.h threads.c : add mono_threads_set_default_stacksize
9568 and pass default to CreateThread calls.
9570 2003-10-09 Dick Porter <dick@ximian.com>
9574 * locales.c: Internal calls for constructing CultureInfo and
9575 related objects from libicu (if its available.)
9577 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
9579 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
9581 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9583 * threadpool.c: added an argument to async_invoke_thread that is the
9584 item to process, pass the MonoAsyncResult to the thread start function
9585 when creating a new thread. This way we don't need to acquire any lock
9586 when we're creating a new thread. Readded a semaphore for faster
9587 response times (instead of that Sleep i added).
9589 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
9591 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
9592 get daylight change dates better on Windows, fix handling
9593 of platforms without tm_gmtoff.
9595 2003-10-06 Martin Baulig <martin@ximian.com>
9597 * class.c (inflate_generic_method): Renamed to
9598 mono_class_inflate_generic_method() and made public.
9599 (mono_class_init): Don't inflate the generic methods here.
9600 (mono_class_from_generic): Added `gboolean inflate_methods'
9601 argument. Inflate the methods here.
9603 * loader.c (mono_method_get_param_names): Ignore instances of
9604 generic types for the moment.
9606 * reflection.c (fixup_method): Added support for inflated methods.
9607 (mono_image_create_token): Use mono_image_get_methodref_token()
9608 for inflated methods.
9609 (mono_custom_attrs_from_param): Ignore instances of generic types
9611 (mono_reflection_bind_generic_parameters): New public function.
9612 Moved all the functionality from
9613 ves_icall_Type_BindGenericParameters() here and added support for
9615 (mono_reflection_define_generic_parameter): Initialize
9616 `klass->methods' here.
9618 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
9619 functionality into mono_reflection_define_generic_parameter().
9620 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
9621 TypeBuilder, return that TypeBuilder.
9623 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9625 * appdomain.c: removed mono_delegate_semaphore.
9628 (mono_thread_pool_add): moved hash table creation inside and the thread
9629 creation outside of the critical region.
9630 (mono_thread_pool_finish): removed obsolete code.
9631 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
9632 continue or exit the thread depending on the queue.
9634 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
9636 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
9637 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
9638 handle more bool marshalling options
9640 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
9642 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
9643 arrays of structs. Also add a more descriptive error message when
9644 a structure member is marshalled as LPArray.
9646 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
9648 * marshal.c (mono_marshal_get_native_wrapper): Add support for
9649 marshalling arrays of complex types. Fixes #29098. Also remove an
9650 usused and incomplete function.
9652 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
9654 * gc.c: report heap_size - free_bytes as total memory allocated
9657 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
9659 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
9660 fix timezone handling problems on Windows.
9662 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
9663 asserts when the year is outside the range handled by ms the functions.
9665 * class.c (setup_interface_offsets): If the class is an interface,
9666 fill out its interface_offsets slot.
9668 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9670 * threadpool.c: mark threadpool threads as background.
9672 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
9674 * decimal.c - define DECINLINE to nothing if not using GCC
9676 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
9678 * assembly.c: More refcount fixes.
9680 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9682 * string-icalls.c: if we're not trimming, return the same string.
9683 When not splitting, don't create a new string.
9685 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9688 (mono_image_open): increment the ref_count inside the critical section.
9690 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
9692 * image.c (mono_image_open): Fix reference counting bug.
9694 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
9696 * marshal.c (mono_marshal_type_size) struct alignment changed for
9697 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
9698 64bits. Avoid leak in mono_marshal_get_native_wrapper when
9699 mono_lookup_pinvoke_call throws.
9701 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
9703 * reflection.c (mono_reflection_parse_type): Fix #49114.
9705 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
9706 temporary workaround for cygwin header problem.
9708 * object.c (mono_object_isinst): Synchronize this with the code
9709 generated by the JIT for casts.
9711 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
9713 * reflection.c (encode_type): Fix #38332.
9715 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
9717 * marshal.c (mono_marshal_method_from_wrapper): New function to return
9718 the original method from the wrapper method.
9720 2003-09-25 Martin Baulig <martin@ximian.com>
9722 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
9723 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
9724 (ves_icall_Type_get_IsGenericInstance): New interncall.
9726 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
9728 * object.c: fix cast warning in big endian code.
9730 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
9732 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
9734 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9736 * assembly.c: don't call check_env from mono_assembly_load. It's
9737 already done once in mono_assemblies_init and may cause headaches when
9738 multiple threads are loading assemblies.
9740 2003-09-19 Martin Baulig <martin@ximian.com>
9742 * reflection.c (mono_reflection_define_generic_parameter): Don't
9743 allocate `klass->methods', set `klass->flags' to
9744 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
9746 2003-09-18 Martin Baulig <martin@ximian.com>
9748 * class.c (mono_class_init): Don't create `class->methods' if it's
9749 already initialized.
9751 * metadata.c (mono_metadata_load_generic_params): Make this
9754 * reflection.c (mono_reflection_define_generic_parameter): Set
9755 parent class and interfaces from the constraints.
9757 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
9758 to keep this struct in sync with the declaration in TypeBuilder.cs.
9760 2003-09-17 Martin Baulig <martin@ximian.com>
9762 * metadata.h (MonoType): Replaced the data's `int type_param'
9763 field with `MonoGenericParam *generic_param'.
9764 (MonoGenericParam): Added `MonoClass *klass'.
9766 * class.c (mono_class_from_gen_param): Removed the
9767 `MonoImage *image' and `int type_num' arguments.
9769 * metadata.c (mono_metadata_parse_generic_param): New static
9770 method; creates a MonoGenericParam which just contains the index.
9771 (do_mono_metadata_parse_type): Call
9772 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
9775 * reflection.c (mono_image_typedef_or_ref): Generic type
9776 parameters may be in the same assembly, but never use a typedef
9778 (mono_reflection_define_generic_parameter): We're now creating a
9779 "real" class for the type parameter; it's now safe to call
9780 mono_class_from_mono_type() on the class'es type, it'll do the
9783 2003-09-16 Martin Baulig <martin@ximian.com>
9785 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
9786 `symfile->range_entry_size' and `symfile->class_entry_size' here;
9787 the `symfile' data structure must be fully initialized before it
9788 gets added to the table.
9790 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
9792 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
9794 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
9795 class init trampolines.
9797 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
9799 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
9800 to the built-in profiler to turn off time and allocation profiling
9803 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
9805 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
9808 * debug-helpers.c (mono_method_full_name): Print the wrapper type
9809 in human readable form.
9811 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
9813 * reflection.c icall.c: Fixed warnings.
9815 * image.c (load_class_names): Use a temporary hash table to hold the
9816 namespaces in order to avoid doing many string comparisons.
9818 * image.h: Fix typo.
9820 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
9821 Pass NULL instead of g_direct_equal to the GHashTable constructor
9822 since the NULL case is short-circuited inside g_hash_table_lookup,
9823 leading to better performance.
9825 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
9826 obtain the first custom attribute for a given index. Depends on the
9827 CustomAttribute table being sorted by the parent field.
9829 * reflection.c (mono_custom_attrs_from_index): Use the new function
9830 for better performance.
9832 2003-09-07 Martin Baulig <martin@ximian.com>
9834 * class.c (mono_class_init): If we're a generic instance, inflate
9835 all our methods instead of loading them from the image.
9836 (mono_class_from_generic): Set `class->methods = gklass->methods'.
9838 2003-09-07 Martin Baulig <martin@ximian.com>
9840 * mono-debug-debugger.c: Added support for constructors.
9842 2003-09-06 Martin Baulig <martin@ximian.com>
9844 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
9847 * reflection.c (mono_reflection_setup_generic_class): Call
9848 ensure_runtime_vtable() to create the vtable.
9850 2003-09-05 Martin Baulig <martin@ximian.com>
9852 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
9855 2003-09-04 Martin Baulig <martin@ximian.com>
9857 * reflection.c (mono_reflection_define_generic_parameter): Generic
9858 parameters start with zero.
9860 2003-09-04 Martin Baulig <martin@ximian.com>
9862 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9864 * reflection.h (MonoReflectionGenericParam): New typedef.
9865 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
9866 the generic parameters from the managed TypeBuilder.
9868 * reflection.c (mono_reflection_define_generic_parameter): New function.
9869 (mono_reflection_create_runtime_class): Encode generic parameters.
9870 (mono_reflection_setup_generic_class): New function; this is
9871 called after adding adding all generic params to the TypeBuilder.
9872 (encode_type): Added MONO_TYPE_VAR.
9874 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
9876 * class.h class.c (mono_class_needs_cctor_run): Moved this method
9879 * assembly.h assembly.c: Moved the AOT loading code into an assembly
9882 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
9884 * reflection.h reflection.c class.h class.c: Delete duplicate
9885 definition of mono_type_get_name () from reflection.c and export the
9888 * class.c: Class loading fixes from Bernie Solomon
9889 (bernard@ugsolutions.com).
9891 * reflection.c: Endianness fixes from Bernie Solomon
9892 (bernard@ugsolutions.com).
9894 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
9896 * assembly.h assembly.c: Define a file format version for AOT
9899 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
9901 * appdomain.h (MonoJitInfo): New field to determine whenever the
9902 code is domain neutral.
9904 2003-08-31 Miguel de Icaza <miguel@ximian.com>
9906 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
9908 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
9910 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
9911 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
9912 Avoid caching the result since strings must be domain specific. Fixes
9915 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
9917 * marshal.c (mono_marshal_init): Make this callable multiple times
9918 since it is hard to find a correct place to call it.
9920 * object.c (mono_runtime_class_init): Execute static constructors in
9921 the correct appdomain.
9923 * image.c (build_guid_table): Handle the case when multiple images have
9926 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9928 * icall.c: added a couple of icalls for System.Web.
9930 2003-08-28 Martin Baulig <martin@ximian.com>
9932 * icall.c (ves_icall_Type_BindGenericParameters): Use
9933 `klass->generic_inst' instead of `&klass->byval_arg' in the
9934 mono_type_get_object() call. The returned type must be
9935 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
9937 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
9941 * object.c (mono_class_proxy_vtable): Make it thread safe.
9943 * pedump.c: Fix warning.
9945 * object.c appdomain.h: Get rid of metadata_section.
9946 It is no longer needed and it was causing deadlocks with domain->lock.
9948 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
9950 2003-08-26 Martin Baulig <martin@ximian.com>
9952 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
9954 2003-08-26 Martin Baulig <martin@ximian.com>
9956 * pedump.c (main): Call mono_metadata_init(),
9957 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
9958 and mono_loader_init().
9960 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
9962 * loader.h: Add missing include to fix build.
9964 * image.h: mono_image_load_references is no more.
9966 * assembly.c: Reworked assembly loading to make it really thread safe.
9967 After these changes, the assembly returned by mono_assembly_open is
9968 fully initialized, i.e. all its references assemblies are loaded.
9970 * assembly.c (mono_image_load_references): Renamed to
9971 mono_assembly_load_references, and made private, since clients no
9972 longer need to call it.
9974 * class.c: Removed calls to mono_assembly_load_references, since it was
9975 a source of deadlocks.
9977 * loader.h loader.c class.h class.c: Protect data structures using a
9978 new lock, the loader lock.
9980 * class.c (mono_class_setup_vtable): Create temporary hash tables and
9981 GPtrArrays only when needed.
9983 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
9984 into empty structures by mcs. Fixes pinvoke7.cs.
9986 * domain.c (mono_init): Call a new initialization function.
9988 * appdomain.c (mono_runtime_init): Call the new initializer function
9989 of the marshal module.
9991 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
9992 inserted into empty structures by mcs. Fixes pinvoke7.cs.
9994 * marshal.h marshal.c: Added locks around the wrapper caches to make
9995 this module thread safe.
9997 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
9998 this argument. Fixes pinvoke1.exe.
10000 2003-08-25 Lluis Sanchez <lluis@ximian.com>
10002 * object.h: Added call_type field to MonoMethodMessage and the corresponding
10003 enumeration of values. Removed fields to store remote call output values in
10004 MonoAsyncResult. Not needed any more.
10005 * object.c: Initialize call_type and async_result fields in mono_message_init.
10006 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
10007 dispatching the message.
10008 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
10009 async call to finish. To do it use a message with EndInvoke call type.
10011 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
10013 * loader.h loader.c (mono_method_hash_marhal_info): New function which
10014 determines whenever a method has marshalling info.
10016 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10018 * assembly.c: fix the build on windows.
10020 2003-08-22 Lluis Sanchez <lluis@ximian.com>
10022 * object.cs: Fixed bug #47785.
10024 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
10026 * string-icalls.c (StringReplace): If their are no occurances of
10027 the old string found return a reference to the supplied
10028 string. This saves some memory and matches MS behavoir.
10030 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10032 * socket-io.c: fixed compilation for systems that define AF_INET6
10033 and don't define SOL_IP/SOL_IPV6.
10035 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
10037 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
10038 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
10040 * rawbuffer.c rawbuffer.h: Make this module thread safe.
10042 * domain.c: Make this module thread safe.
10044 * domain.c (mono_init): Call new initialization function.
10046 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
10047 reference types too. Fixes #38812.
10049 * image.c (mono_image_init): Fixed warnings.
10051 * class.c (mono_class_from_typeref): Handle assembly load failure
10054 * appdomain.c (add_assemblies_to_domain): Handle the case when
10055 the references of an assembly are not yet loaded.
10057 * metadata.c image.c assembly.c: Moved initialization of global
10058 variables to a separate function called at startup since lazy
10059 initialization of these variables is not thread safe.
10061 * image.c assembly.c: Made this module thread safe by adding locks in
10062 the appropriate places.
10064 * domain.c (mono_init): Call the new initialization functions of the
10067 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
10069 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
10070 make a direct call. It is proxy's work to make the call asynchronous.
10071 mono_delegate_end_invoke(): If the targe is a proxy, just collect
10073 * object.cs: mono_method_call_message_new(): read AsyncResult and
10074 state object from parameters list, if this info is requested.
10075 * object.h: Added fields to store remote call output values in
10076 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
10078 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10080 * object.h: add needed fields to MonoThread.
10081 * threads.c, threads.h: allow registering a function to cleanup data
10082 allocated per thread by the JIT.
10084 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10086 * loader.h: portability fix by Bernie Solomon
10087 * <bernard@ugsolutions.com>.
10089 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
10091 * reflection.h reflection.c (mono_param_get_objects): Changed this to
10092 return a MonoArray. This simplifies the code and also ensures that
10093 the cache allways contains an object reference as a value.
10095 * icall.c (ves_icall_get_parameter_info): Simplified using the new
10098 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10100 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
10101 fixes a problem with byte ordering when getting the address family for
10104 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
10106 * .cvsignore: Added monosn.
10108 * reflection.h reflection.c loader.c: Added support for parameter
10109 marshalling to dynamically created types. Fixes #47295.
10111 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
10113 * rand.c: remove useless warnings.
10115 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10117 * class.c: implemented ldtoken for methods and fieldrefs.
10119 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10121 * threadpool.c: when mono_async_invoke was called, no one took care of
10122 monitoring the queue. So if the method invoked took some time and we
10123 got new async invoke requests after 500 ms (the thread created waited
10124 that long in WaitForSingleObject), the new async invoke was not called
10125 until the previous one finished.
10127 This is fixed now. Thanks to Totte for helping with it.
10129 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10131 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
10133 2003-08-11 Martin Baulig <martin@ximian.com>
10135 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
10137 2003-08-06 Martin Baulig <martin@ximian.com>
10139 * mono-debug-debugger.c: Added support for static fields,
10140 properties and methods.
10142 2003-08-06 Martin Baulig <martin@ximian.com>
10144 * mono-debug-debugger.c: Don't store the MonoString's vtable to
10145 make this work for applications with multiple application domains.
10147 2003-08-04 Martin Baulig <martin@ximian.com>
10149 * mono-debug-debugger.c: Completely reworked the type support; the
10150 most important thing is that we're now just using one single
10151 `MonoType' instance per type.
10153 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
10155 * mono-endian.h, mono-endian.c, icall.c: Added icall
10156 ves_icall_System_Double_AssertEndianity to assert double word endianity
10157 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
10159 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10161 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
10162 support, icalls and fixes.
10164 2003-07-31 Miguel de Icaza <miguel@ximian.com>
10166 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
10167 classes that are a punctuation character in .NET is not the same a
10170 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10172 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
10174 2003-07-29 Miguel de Icaza <miguel@ximian.com>
10176 * icall.c: Add new MemCopy internalcall.
10177 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10178 Simplified code; It is not necessary to handle all the cases here,
10179 as the C# code takes care of it. Only handle the case of the name
10180 resource embedded into the assembly.
10182 Changed signature to return the data pointer and the size of the
10185 2003-07-26 Miguel de Icaza <miguel@ximian.com>
10187 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
10188 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
10190 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
10192 * socket-io.c: ignore EINTR error in select.
10194 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
10196 * class.h, class.c: removed unused subclasses field in MonoClass.
10198 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
10200 * icall.c: improve fix of get_base_definition(). If the parent class
10201 doesn't have the mehod, look at the parent of the parent.
10202 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
10203 to check if a parameter is an in or out parameter
10204 (PARAM_ATTRIBUTE_IN is not set by default).
10205 mono_method_return_message_restore(): Use mono_class_value_size to
10206 get the size of a value type. mono_type_stack_size (parameterType)
10207 does not return the correct value if parameterType is byRef.
10208 mono_load_remote_field(), mono_load_remote_field_new(),
10209 mono_store_remote_field(), mono_store_remote_field_new():
10210 raise exception if the remote call returns an exception.
10212 2003-07-28 Martin Baulig <martin@ximian.com>
10214 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
10215 method. This is a wrapper around mono_runtime_invoke() which
10216 boxes the instance object if neccessary.
10218 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10220 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
10221 metadata.h, row-indexes.h, verify.c: first cut of generics support.
10223 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10225 * icall.c: disable mcs bug workaround.
10227 2003-07-21 Miguel de Icaza <miguel@ximian.com>
10229 * object.c (mono_runtime_class_init): Take the metadata_section
10230 mutex before obtaining the domain mutex.
10232 * appdomain.h: Added definition of metadata_section mutex here.
10234 * object.c: define metadata_mutex here.
10236 2003-07-24 Ravi Pratap <ravi@ximian.com>
10238 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
10241 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
10243 * reflection.c: Fix bug #46669
10245 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10250 * object.h: fill in the type name for TypeLoadException.
10252 2003-07-23 Ravi Pratap <ravi@ximian.com>
10254 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
10255 relationship between TypeBuilders while compiling corlib) and bug
10256 45993 (Array types returned from the runtime while compiling
10257 corlib were from the loaded corlib).
10259 2003-07-22 Martin Baulig <martin@ximian.com>
10261 * mono-debug-debugger.c: Reworked the type support a bit more;
10262 distinguish between types and classes.
10264 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
10266 * icall.c: add IsArrayImpl icall.
10268 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
10270 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
10271 initializing real_size only once. Also fix bug #46602.
10273 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
10275 * object.c: Renamed mono_metadata_section to metadata_section.
10277 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
10279 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
10280 empty array if the type is an array. Fixed.
10281 ves_icall_MonoMethod_get_base_definition: if the base method
10282 is abstract, get the MethodInfo from the list of methods of
10284 * reflection.c: ParameterInfo.PositionImpl should be zero-based
10285 and it was 1-based. Fixed in mono_param_get_objects.
10287 2003-07-20 Martin Baulig <martin@ximian.com>
10289 * mono-debug.h: Set version number to 31.
10290 (mono_debug_init): Added `MonoDomain *' argument.
10292 * mono-debug-debugger.c: Reworked the type support; explicitly
10293 tell the debugger about builtin types; pass the `klass' address to
10296 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
10298 * image.c: Allow new metadata tables to be loaded without a
10299 warning. Also update the warning message to give the new constant value.
10301 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
10303 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
10304 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
10305 array type representation changes.
10307 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10309 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
10310 on Environment.Exit () call.
10312 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
10314 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
10315 requires a matching corlib.
10317 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
10319 * Changelog: My editor decided to add a CR to each line. Sorry about that.
10320 Committed again without the CRs.
10322 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
10324 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
10325 getting it from the "this" socket instance. Did not work
10326 if the socket is a subclass of Socket.
10327 Also fixed bug #35371.
10329 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10331 * metadata.c: fixed size for TypedByRef.
10332 * loader.c: when searching for a method, consider the vararg amrker.
10333 * unicode.c, decimal.c: constify some arrays.
10335 2003-07-15 Dick Porter <dick@ximian.com>
10337 * socket-io.c: Fixed compilation for gcc < 3.2.
10339 Fixed compilation for machines that don't have AF_INET6 (thanks to
10340 Bernie Solomon <bernard@ugsolutions.com> for that part.)
10342 Fixed compile warnings.
10344 Fixed formatting and line endings.
10346 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
10349 * socket-io.c: Added IPv6 support.
10351 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
10353 * class.c (mono_class_is_assignable_from): New function to implement
10354 the is_assignable_from logic. Used by mono_object_isinst,
10355 Type::IsAssignableFrom () and the interpreter.
10357 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
10358 Object, even interfaces.
10360 * object.c (mono_object_isinst): Implement in terms of
10361 is_assignable_from.
10363 * icall.c (ves_icall_type_is_assignable_from): New icall.
10365 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
10367 * domain.c (foreach_domain): fix compiler warning.
10369 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
10371 * image.c (load_metadata_ptrs): use g_strndup because strndup is
10372 not available on all plattforms
10374 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
10376 * image.h image.c: Store the metadata version string in MonoImage.
10377 * icall.c: New icall to retrieve the image version.
10378 * reflection.c (create_dynamic_image): Fill in the image version field
10379 * reflection.c (build_compressed_metadata): Use the image version
10380 from the image structure.
10382 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10384 * appdomain.c: modified comment.
10385 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
10386 That will be its last iteration when mono_gc_cleanup is called from
10387 mono_runtime_cleanup and before the domain is unloaded.
10391 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
10393 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
10396 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10398 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
10399 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
10400 Bernie Solomon <bernard@ugsolutions.com>.
10402 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10404 * object.c, object.h: provide mono_object_new_fast() for faster
10405 allocation in some special cases.
10407 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10409 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
10410 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
10412 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
10414 * threadpool.c: fix leaks.
10416 2003-07-01 Dick Porter <dick@ximian.com>
10418 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
10419 using MonoGHashTables. Fixes threadpool bug posted to list.
10421 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
10423 * image.h, image.c: added support to load an assembly from a byte array.
10424 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
10425 assembly bundle support.
10427 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
10429 * threadpool.c (mono_thread_pool_add): keep a reference to the
10430 AsyncResult to prevent GC
10432 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
10434 * class.c: leak fix.
10436 2003-06-25 Dick Porter <dick@ximian.com>
10438 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
10439 for the async object, the WaitHandle object will close the handle.
10442 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10444 * class.c: in mono_array_class_get (), lookup from the hash with the
10445 same type we insert: this works around a bug in
10446 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
10447 lluis. The real fix will have to wait for after the release.
10449 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10451 * icall.c: fix memory leak when getting type members.
10453 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10455 * reflection.c: added more pubtoken special cases.
10457 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
10459 * class.c: handle field offset correctly when class size
10460 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
10462 2003-06-20 Martin Baulig <martin@ximian.com>
10464 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
10467 2003-06-20 Martin Baulig <martin@ximian.com>
10469 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
10471 2003-06-20 Martin Baulig <martin@ximian.com>
10473 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
10474 just distinguish between variables in registers and variables at
10475 an offset relative to a register.
10477 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10479 * icall.c: #ifdef out latest changes until mcs is fixed.
10481 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10483 * icall.c: return members in metadata order.
10485 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
10487 * icall.c: avoid infinite loop in GetTimeZoneData.
10489 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
10491 * icall.c: added Marshal.Prelink/All icalls.
10493 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
10495 * object.c, object.h: fix warnings and do some overflow checking
10496 when creating arrays.
10498 2003-06-17 Dick Porter <dick@ximian.com>
10501 * file-io.c: File attributes need to be tweaked slightly when
10502 passed from the managed to the w32 world.
10504 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
10505 * profiler.h profiler-private.h profiler.c: Rework last patch
10506 based on suggestion by Paolo.
10508 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
10510 * profiler.h profiler-private.h profiler.c: Added infrastructure for
10511 instruction level coverage data collection.
10512 * profiler.h profiler.c (: Added new callback function which can be
10513 used by the profiler to limit which functions should have coverage
10515 * profiler.c (mono_profiler_load): Call g_module_build_path to
10516 generate the file name of the profiler library.
10518 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
10520 * profiler.c, profiler.h, profiler-private.h: added basic block
10521 coverage profiling API.
10523 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
10525 * reflection.c (mono_reflection_create_runtime_class): Add support
10526 for events in dynamically generated code.
10528 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
10531 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
10533 * icall.c: when getting timezone info, return reasonable values if we
10534 can't get the actual data.
10536 2003-06-14 Dick Porter <dick@ximian.com>
10538 * threads.c (start_wrapper): Remove the reference to the thread
10539 object in the TLS data, so the thread object can be finalized.
10540 This won't be reached if the thread threw an uncaught exception,
10541 so those thread handles will stay referenced :-( (This is due to
10542 missing support for scanning thread-specific data in the Boehm GC
10543 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
10545 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
10547 * reflection.c: ensure streams and tables are first allocated with
10548 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
10550 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10552 * icall.c: fixed GetElementType for byrefs (bug# 44792).
10554 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
10556 * reflection.c (mono_reflection_create_runtime_class): Add support for
10557 properties to dynamically created classes.
10558 * reflection.c: Fix a few places where non-MonoObjects were inserted
10559 into the tokens hashtable.
10561 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10563 * object.c: some support to handle out of memory exceptions.
10565 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
10567 * marshal.c (mono_marshal_get_native_wrapper): support reference
10570 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10572 * object.h, object.c: more portability stuff from Bernie Solomon.
10573 Unexport mono_object_allocate(). Added mono_object_unbox ().
10574 Set exitcode when an unhandled exception is thrown.
10576 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
10578 * marshal.c (mono_marshal_get_native_wrapper): use custom
10579 marshaler for return types.
10581 2003-06-10 Dick Porter <dick@ximian.com>
10583 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
10584 ip_mreq is available
10586 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
10588 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
10589 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
10590 by Bernie Solomon <bernard@ugsolutions.com>.
10592 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
10594 * gc.c (mono_gc_init): Avoid error message on shutdown when
10595 GC_DONT_GC=1 is used.
10597 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
10598 New icall to return the GUID of a module.
10600 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
10602 * class.c: ensure instance size always includes the parent's size
10603 even whem class size is set explicitly (fixes bug#44294).
10605 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10607 * profiler.h, profiler.c: made the simple profiler thread-safe,
10608 get more accurate timing info. Allow the loading of an
10609 externally-developed profiler module.
10611 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
10613 * marshal.c (mono_marshal_get_native_wrapper): improved
10614 class/byref arguments.
10615 (mono_marshal_get_native_wrapper): better string marshaling support.
10617 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
10619 * class.c: ensure .pack and .size are handled correctly and
10620 simplified layout of static fields.
10622 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
10625 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
10627 * loader.c (mono_lookup_pinvoke_call): look for modules in the
10628 current directory (fix bug 44008)
10630 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
10632 * marshal.c (mono_marshal_get_native_wrapper): started support for
10634 (mono_delegate_to_ftnptr): consider marshalling specifications
10636 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
10638 * reflection.c, reflection.h: emit custom marshal info.
10640 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10642 * object.c: free the GError.
10643 * icall.c: added CloseEvent_internal.
10645 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
10648 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
10650 * loader.c (mono_method_get_signature): Add support for dynamic
10653 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
10655 * reflection.c: fixed bug #43905.
10657 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10659 * class.c, domain.c, icall.c, metadata.h, object.h: support for
10660 handling TypedReference and ArgIterator.
10661 * loader.c, loader.h: added function to get signature at call site.
10663 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10665 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
10666 data readonly. Buglets and warning fixes. Some MethodSpec support.
10668 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10670 * class.h, class.c, object.c: remove relative numbering support.
10672 2003-05-26 Miguel de Icaza <miguel@ximian.com>
10674 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
10675 free the string, until we get a chance to fix Gtk#
10677 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10679 * marshal.c: revert last patch.
10681 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
10683 * icall.c: updates for new mono_class_vtable() not calling
10684 the type constructor anymore.
10686 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
10688 * object.h, object.c: separate vtable creation from type
10689 initialization. Make running the .cctor thread safe.
10691 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
10693 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
10695 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
10697 * loader.c (mono_get_method): consider calling convention
10699 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
10701 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
10702 to return the invisible global type for a module.
10704 * reflection.c (mono_image_build_metadata): Emit global fields too.
10706 2003-05-20 Peter Williams <peterw@ximian.com>
10708 * loader.c (mono_lookup_internal_call): Add a few newlines.
10710 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
10712 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
10715 * appdomain.c (set_domain_search_path): Recalculate search path when
10716 AppDomainSetup.PrivateBinPath changes.
10718 * object.c (mono_class_compute_gc_descriptor): It turns out some
10719 parts of the class libs (like System.Thread) holds pointers to
10720 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
10721 to treat native int a pointer type here.
10723 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
10725 * appdomain.h, domain.c: add hashtable for jump target resolution.
10727 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
10729 * reflection.h reflection.c icall.c: Added new icalls
10730 GetManifestResourceInfoInternal, GetModulesInternal and support
10733 2003-05-16 Dick Porter <dick@ximian.com>
10737 * file-io.c: Implement System.IO.MonoIO::GetTempPath
10739 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
10741 * object.c: mono_store_remote_field: little fix to previous patch.
10743 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
10745 * class.c: add constructors to array classes.
10746 * icall.c: special case array construction for InternalInvoke (),
10748 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
10750 * class.h class.c reflection.c object.c: Added support for field
10751 defaults in dynamically generated classes.
10753 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
10755 * reflection.c: properly encode charset for ddlimport.
10757 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
10759 * threads.c: allow compiling without GC.
10761 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
10763 * appdomain.h, object.c, object.h, threads.c, threads.h: added
10764 handling of thread static data.
10766 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10768 * reflection.h, reflection.c: added mono_custom_attrs_free ().
10770 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
10772 * class.c (mono_array_class_get): always set the serializable flags
10773 (mono_array_class_get): always set the SEALED attribute for array types
10775 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
10777 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
10778 attributes (fix for bug 42021).
10780 2003-05-12 Dick Porter <dick@ximian.com>
10782 * gc.c: Don't run finalizers when the finalizer thread is
10783 finishing up, because the default domain has already been
10786 2003-05-11 Miguel de Icaza <miguel@ximian.com>
10788 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
10789 value is null, we should throw an exception. This is slightly
10790 different than the other conventions used for the constructor.
10792 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10794 * socket-io.c: fixed windows build.
10796 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10798 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
10800 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
10802 * object.c (mono_string_new_wrapper): Compatibility fix for MS
10805 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
10807 * class.c (mono_class_layout_fields): Add experimental GC aware
10808 auto layout facility. Requires class library changes to work correctly.
10810 (mono_class_setup_vtable): Avoid overriding explicit interface
10811 method implementations. Fixes iface3.exe test.
10813 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
10815 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
10816 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
10818 * metadata.h: Add new type classification macro which determines
10819 whenever the type holds an object reference.
10821 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
10823 * marshal.c (mono_marshal_get_native_wrapper): cleanups
10825 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
10827 * gc.c (finalizer_thread): Work around a GC bug.
10829 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
10831 * marshal.c (emit_struct_conv): allow unions
10833 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
10835 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
10837 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
10839 2003-05-06 Martin Baulig <martin@ximian.com>
10841 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
10843 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10846 (Select_internal): allow NULLs, don't create arrays if not needed.
10847 Coupled with Socket.cs changes.
10850 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
10851 register a finalizer for it that will close the semaphore handle. This
10852 fixes the leak and make Lupus' test run with > 4080 loops.
10854 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
10856 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
10857 Jerome Laban (bug #42287)
10859 2003-05-02 Martin Baulig <martin@ximian.com>
10861 * debug-mono-symfile.h
10862 (MonoSymbolFile): Moved declaration into mono-debug.h.
10863 (MonoDebugMethodJitInfo): Likewise.
10864 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
10866 (_mono_debug_address_from_il_offset): Take a
10867 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
10870 (MonoDebugDomainData): New struct.
10871 (mono_debug_get_domain_data): New function.
10872 (mono_debug_add_method): Take an additional `MonoDomain *'
10874 (mono_debug_source_location_from_address): Likewise.
10875 (mono_debug_il_offset_from_address): Likewise.
10876 (mono_debug_address_from_il_offset): Likewise.
10878 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
10880 * reflection.c: one more check for null type in custom attrs.
10882 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10884 * reflection.c: avoid warning (comparison is always false due to limited
10885 range of data type).
10887 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10889 * icall.c: throw an exception in Type.GetField if the argument 'name'
10892 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
10894 * reflection.c: fixed handling of enums in named arguments to custom
10895 attributes (bug #42123).
10897 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
10899 * reflection.c: use the right array element type and handle
10900 a null for a Type argument, too.
10902 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
10904 * reflection.c: handle arrays as arguments to custom attributes.
10906 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
10908 * reflection.c: handle a string value in a custom attr
10909 ctor that takes an object.
10911 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
10913 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
10916 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
10918 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
10920 2003-04-27 Martin Baulig <martin@ximian.com>
10922 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
10923 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
10924 MONO_DEBUGGER_EVENT_BREAKPOINT.
10925 (mono_breakpoint_trampoline_code): Removed.
10926 (mono_debugger_event_handler): The last argument is now a
10928 (mono_debugger_insert_breakpoint_full): Removed the
10929 `use_trampoline' argument.
10930 (mono_debugger_method_has_breakpoint): Likewise.
10931 (mono_debugger_trampoline_breakpoint_callback): Renamed to
10932 mono_debugger_breakpoint_callback(); take the method and
10933 breakpoint number as arguments.
10935 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
10937 * metadata.c: fix off by one when loading parameters attributes.
10939 2003-04-24 Martin Baulig <martin@ximian.com>
10941 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
10943 2003-04-24 Martin Baulig <martin@ximian.com>
10945 * mono-debug-debugger.c: Moved all code which interacts with the
10946 Mono Debugger here.
10948 * debug-mono-symfile.c: This code now just deals with the symbol
10949 file itself, the debugger code is now in mono-debug-debugger.c.
10951 2003-04-23 Martin Baulig <martin@ximian.com>
10953 * mono-debug.c (mono_debug_source_location_from_il_offset):
10954 New method; like mono_debug_source_location_from_address(), but
10955 takes an IL offset instead of a machine address.
10957 2003-04-23 Martin Baulig <martin@ximian.com>
10959 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
10960 `line' field; this is now computed by the debugger.
10962 2003-04-23 Martin Baulig <martin@ximian.com>
10964 * mono-debug.[ch]: New files. This is the new debugging interface.
10966 * mono-debug-debugger.[ch]: New files. Moved all code which
10967 interacts with the Mono Debugger here.
10969 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
10971 * domain.c (mono_init): initialize mono_defaults.monitor_class
10973 2003-04-21 Miguel de Icaza <miguel@ximian.com>
10975 * reflection.c (method_encode_code): Add a spicy exception to help
10976 future compiler authors.
10978 2003-04-21 Martin Baulig <martin@ximian.com>
10981 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
10982 Make this work with relative pathnames; g_filename_to_uri() needs
10983 an absolute filename.
10985 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
10987 * icall.c: Track name changes in Object and ValueType.
10989 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
10991 * metadata.c (mono_type_stack_size): size should be a multiple of
10994 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10997 (internal_domain_finalize): moved into mono_domain_finalize. No need
10998 to create another thread because the finalizers will be run in the
11001 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
11002 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
11003 to be run (MS does this too).
11005 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
11007 * object.c (mono_class_compute_gc_descriptor): Update comment.
11009 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
11011 * image.h: Add synchronized wrapper cache.
11013 * image.c (do_mono_image_open): Initialize cache.
11015 * reflection.c (create_dynamic_mono_image): Initialize cache.
11017 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11019 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
11020 ves_icall_System_Buffer_ByteLengthInternal.
11022 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11024 * reflection.c: setup klass->nested_in earlier. Allow
11025 a dash in the assembly name.
11027 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
11029 * metadata.c (mono_type_to_unmanaged): dont access
11030 type->data.klass for MONO_TYPE_OBJECT
11031 (mono_type_to_unmanaged): consider System.Delegate class
11033 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
11035 * class.c: just setup supertypes in the proper place instead of
11036 initializing the full element class for arrays.
11038 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11040 * class.c: ensure the element class of arrays is initialized.
11041 Setup the supertype info for array classes, too.
11043 2003-04-14 Miguel de Icaza <miguel@ximian.com>
11045 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
11047 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11049 * Makefile.am: re-added -m option when running cygpath. This way,
11050 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
11052 * mono-config.c: same codepath for locating mono config file for WIN32
11054 * assembly.c: if mono_assembly_setrootdir is called, don't override
11057 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11059 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
11060 MONO_ASSEMBLIES variable.
11062 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
11064 * icall.c: added Assembly::GetNamespaces() icall.
11066 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11068 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
11070 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
11072 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
11073 * object.c: fixed bug in the construction of vtable for proxies
11075 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
11077 * object.c (mono_array_new): Mark mono_array_new as an icall.
11079 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11081 * class.c: fixed test for public method when overriding interfaces.
11084 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11086 * appdomain.h, domain.c: added mono_domain_foreach() to
11087 be able to access the currently loaded appdomains.
11088 * object.c: make string interning work across sppdomains.
11089 Mark some functions for use as icalls.
11091 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
11093 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
11095 * reflection.h reflection.c: Allocate long living data using
11096 GC_MALLOC_ATOMIC so the collector does not need to scan it.
11098 * reflection.c: Double the allocation size in streams instead of
11099 increasing it, to prevent unneccesary copying on large assemblies.
11101 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
11102 creation if the assembly does not have the Run flag set.
11104 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11106 * class.h: avoid the C++ keywords in header files (Jerome Laban
11107 spotted and fixed this).
11109 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11112 (mono_unhandled_exception): fill in the arguments for the
11113 UnhandledException event. Only trigger that event for the default
11114 domain (as MS does).
11116 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
11118 * object.c: Improve typed allocation stuff based on suggestions from
11119 Paolo. Also turn it on if the GC library supports it.
11121 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
11123 * object.c object.h class.h: Added experimental typed allocation
11124 facility using the interfaces in gc_gcj.h.
11126 * os/gc_wrapper.h: Added new include files.
11128 2003-04-03 Martin Baulig <martin@ximian.com>
11130 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
11131 which is not yet enabled by default.
11133 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
11135 (mono_gc_lock, mono_gc_unlock): New static functions.
11137 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
11138 functions; stop/start the world for the garbage collector. This
11139 is using the windows API; we need to complete the SuspendThread()/
11140 ResumeThread() implementation in the io-layer to make this work on Unix.
11141 (mono_gc_push_all_stacks): New public function; tells the garbage
11142 collector about the stack pointers from all managed threads.
11144 2003-04-03 Martin Baulig <martin@ximian.com>
11146 * object.h (MonoThread): Added `gpointer stack_ptr'.
11148 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
11150 2003-04-03 Martin Baulig <martin@ximian.com>
11152 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
11154 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
11156 * reflection.c (typebuilder_setup_fields): Initialize field.first and
11159 2003-04-02 Miguel de Icaza <miguel@ximian.com>
11161 * loader.c (mono_lookup_internal_call): Report the corlib that is
11164 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
11166 * icall.c (ves_icall_type_GetTypeCode): fixed check for
11167 System.DBNull (it's class not valuetype).
11169 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11171 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
11172 if the array method was already assigned a token (fixes bug#40646).
11174 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
11176 * reflection.c (mono_reflection_get_type): Attempt type resolve even
11177 if no assembly is given.
11179 2003-04-01 Miguel de Icaza <miguel@ximian.com>
11181 * metadata.h: Added the new tables.
11183 * row-indexes.h: Added definitions for new tables.
11185 * metadata.c: Add schemas for new tables, and add support for
11186 computing the sizes of them.
11188 * class.c: Update for handling the new type cases.
11190 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
11192 * metadata.h (MONO_TYPE_IS_VOID): new macro
11194 2003-03-31 Martin Baulig <martin@ximian.com>
11196 * threads.h (MonoThreadCallbacks): Added `thread_created'.
11198 * threads.c (mono_thread_new_init): Call `thread_created' in the
11199 mono_thread_callbacks.
11201 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
11203 * loader.h: added marshalbyrefobject_class to mono_defaults
11204 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
11205 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
11206 generation of output parameters.
11207 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
11208 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
11209 contextbound and the target object belongs to the context of the caller.
11210 * object.h: added context and unwrapped_server variables in MonoRealProxy.
11211 * object.c: Implemented support for interfaces and abstract classes
11212 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
11213 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
11215 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
11217 * class.h class.c (mono_class_is_subclass_of): New function.
11219 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
11220 routines for most common case (calls from ArrayList::ToArray).
11222 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
11223 routine so programs which call Environment::Exit() can be profiled.
11225 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
11226 Added MONO_ARCH_SAVE_REGS.
11228 * icall.c (ves_icall_type_is_subtype_of): Use new function.
11230 2003-03-29 Miguel de Icaza <miguel@ximian.com>
11232 * blob.h: Add a couple of new MonoType types definitions.
11234 * tabledefs.h: Add a couple of new call convs.
11236 2003-03-27 Zoltan Varga <vargaz@freemail.h>
11238 * reflection.h (MonoReflectionDynamicAssembly): track changes in
11239 the layout of the class.
11241 * reflection.c (alloc_table): double the size on overflow to avoid
11242 unnecessary copying.
11244 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
11245 avoid filling out metadata tables and blobs. Also set mb->ilgen to
11246 null so it can be garbage collected.
11248 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
11250 * reflection.c (mono_reflection_get_type): Return the resolved type
11251 only if it is in the assembly we searched.
11253 * reflection.c (ensure_runtime_vtable): Initialize method slots.
11255 * class.c (mono_class_setup_vtable): Set the slot of the overriding
11258 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11261 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
11262 the right one is 'file:///blah', but MS allows it.
11264 (mono_assembly_open): allow 'file://blah'
11266 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
11268 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
11270 * socket-io.c: fixes bug #40310.
11272 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
11274 * reflection.c (mono_reflection_parse_type): handle deeply nested
11277 * reflection.c (mono_image_create_token): Use unique token values
11278 since they will be put into a hash table.
11280 * class.c (mono_class_setup_vtable): If a method occurs in more than
11281 one place in the vtable, and it gets overriden, then change the
11282 other occurances too.
11284 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
11285 object as return type.
11287 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
11289 * icall.c: Deleted "ToString" implementation for double and float
11290 because they are full implemented in managed code.
11292 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11294 * reflection.c, reflection.h: implemented and exported functions
11295 to retrieve info about custom attributes.
11297 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11299 * appdomain.c: moved Uri handling to assembly.c
11300 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
11301 work when using a file Uri in *nix and windows.
11303 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
11304 GetReferencedAssemblies.
11306 2003-03-18 Dick Porter <dick@ximian.com>
11308 * icall.c: Rename a couple of internal calls
11310 * threads.c: Set the thread state to Stopped when a thread exits.
11313 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
11315 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
11318 * object.c (mono_class_vtable): fix warning.
11320 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
11322 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
11324 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
11326 (method_encode_clauses): Create exception info structures in the right
11328 (mono_reflection_setup_internal_class): Initialize supertypes field.
11330 * class.c object.c: Handle interfaces which implement other interfaces
11333 * class.h class.c: Move the supertypes array initialization code into
11334 a separate function so it can be used for dynamic types too. Also call
11335 it earlier, in mono_class_init(), since it can be used before the
11336 type is initialized.
11338 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11342 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
11347 * object.c: remove warnings.
11349 2003-03-13 Martin Baulig <martin@ximian.com>
11351 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
11352 (MonoDebugLexicalBlockEntry): New types.
11354 * debug-mono-symfile.c
11355 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
11357 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11359 * process.c: ret can be any non-zero value accroding to MS doc.
11361 2003-03-07 Miguel de Icaza <miguel@ximian.com>
11363 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
11364 fixing a warning for a miss-used prototype, would have cause
11365 random memory corruption.
11367 2003-03-07 Martin Baulig <martin@ximian.com>
11369 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
11370 getting really annoying ....
11372 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
11374 * reflection.c (fixup_method): added support for array methods.
11376 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
11378 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
11379 (pointed out by Michael Adams).
11381 2003-03-04 Dick Porter <dick@ximian.com>
11383 * icall.c: Temporarily reverted the Double and Single ToString()
11384 change, because it broke nunit.
11386 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
11388 * object.h, threads.h: make include files compatible with C++
11389 (patch by Jerome Laban <jlaban@wanadoo.fr>).
11391 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
11393 * icall.c: Erased ToString helper functions for Double and Single.
11394 Now, that implementations ar all in managed code (Double and Single
11397 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
11399 * appdomain.c: Added method for initializing the default context of
11400 a domain. Added internal call for getting the default context.
11401 * appdomain.h: Added context variable in MonoDomain struct.
11402 * domain.c: mono_domain_set also sets the default context of the domain
11403 * icall.c: Mapped internal method InternalGetDefaultContext.
11404 * object.c: mono_object_get_virtual_method returns always a remoting
11405 wrapper if the object is a transparent proxy.
11406 mono_runtime_invoke_array: when creating an object by calling the
11407 constructor, if the created object is a proxy, then the constructor should
11408 be called using the a remoting wrapper.
11410 2003-03-03 Dick Porter <dick@ximian.com>
11412 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
11413 variable so it compiles on solaris. Problem spotted by
11414 Christopher Taylor <ct@cs.clemson.edu>
11416 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11419 (get_info_from_assembly_name): don't leak value.
11422 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
11425 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
11427 * assembly.c: export mono_image_load_references ().
11428 * class.c: handle function pointers. mono_class_from_name() now
11429 supports nested type names directly.
11431 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
11433 * reflection.h reflection.c: Encode already created dynamic methods
11434 and fields correctly as a DEF instead of a REF.
11436 * reflection.c: Get rid of the force_ref argument to
11437 mono_image_typedef_or_ref since it was wrong in the first place.
11439 * string-icalls.c: add error checking to string constructors according
11442 * reflection.c: Emit types in the order their TypeBuilders were
11443 created. Previously, a new table index was assigned to each type before
11444 the tables were emitted. This was wrong because the signature blob
11445 might already refer to a type by its original table index.
11447 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
11449 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
11452 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11454 * Makefile.am: make assemblies dir have \ instead of / on windows.
11456 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
11458 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
11459 iterate over the NESTEDCLASS table using a linear search since the
11460 table is not guaranteed to be sorted by the secondary key.
11462 * class.c (mono_class_create_from_typedef): fixed up call to
11463 mono_metadata_nesting_typedef.
11465 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
11467 * marshal.c (mono_string_to_byvalstr): clear the memory as
11468 suggested by Jerome Laban <jlaban@wanadoo.fr>
11470 2003-02-26 Dick Porter <dick@ximian.com>
11472 * process.c: Cope with padding in .rsrc blocks
11474 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
11476 * metadata.h: reverted the filter_len change, it breaks reflection
11478 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
11480 * metadata.h: added a new field to store the filter_len
11483 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
11485 * reflection.c: handle custom attributes for types and members
11486 created with Reflection.Emit (bug#38422).
11488 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
11490 * reflection.c: define RTSpecialName automatically for constructors for
11491 compatibility with MS.NET.
11493 * reflection.c (mono_reflection_create_runtime_class): initialize
11494 nested_in field of dynamically created classes.
11496 2003-02-22 Martin Baulig <martin@ximian.com>
11498 * debug-mono-symfile.h: Incremented version number.
11500 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
11502 * object.h icall.c process.c: fix warnings.
11504 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
11506 * appdomain.h appdomain.c:
11507 (mono_domain_try_type_resolve): split the
11508 name_or_tb argument into a name and a tb argument.
11509 (mono_domain_has_type_resolve): new function to check whenever the
11510 application has registered a TypeResolve event handler.
11512 * icall.c reflection.h reflection.c: move the type resolve logic into
11513 mono_reflection_get_type () so it will be invoked when
11514 Assembly::GetType () is called.
11517 (mono_reflection_get_type): renamed to get_type_internal.
11518 (mono_reflection_get_type): fixed type name generation so it works
11519 for nested types too.
11520 (mono_reflection_get_type): call has_type_resolve () to avoid the
11521 costly type name generation if there is no resolve event handler.
11523 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11525 * class.c, image.c: load exported types from file references.
11527 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
11529 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
11530 used to cache the managed methods used to create proxies and make
11531 remote invocation of methods.
11532 * class.h: Added in MonoVTable a flag to indicate that a class needs
11533 to be remotely created.
11534 * object.c: Modified the method mono_class_vtable(). It now initializes
11535 the remote flag of the vtable. Modified mono_object_new_specific(),
11536 so now it checks the remote flag.
11537 * icall.c: Added a couple of internal methods, one for enabling instance
11538 creation interception for a type, and one for creating objects bypassing
11541 2003-02-18 Martin Baulig <martin@ximian.com>
11543 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
11544 New interncall to get a method's metadata token.
11546 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
11547 New interncall for the debugger.
11549 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
11551 * class.c (mono_class_setup_vtable): allocate supertype array
11553 2003-02-18 Martin Baulig <martin@ximian.com>
11555 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
11557 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11560 (assembly_name_to_aname): jump over unknown properties (i've found
11561 something like: 'type, assembly, version=xxx, custom=null, public...',
11562 so now will ignore custom=null and still get the rest of the values).
11564 2003-02-17 Dick Porter <dick@ximian.com>
11566 * threads.c: Have Thread.Start() wait for a semaphore to signal
11567 that the thread has set up all its local data. This fixes bug
11568 34323, where Abort() raced the new thread's TLS data.
11570 Also removes the handle_store() call from start_wrapper, because
11571 threads are now always created suspended and there is no longer a
11572 race between the parent and child threads to store the info.
11574 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
11576 * image.c: explain the #- heap issue in a message, hopefully
11577 avoiding FAQs on mono-list.
11579 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11582 (GetEntryAssembly): if the domain has not invoked
11583 AppDomain.ExecuteAssembly yet, return the assembly of the default
11586 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
11588 * class.c (mono_ldtoken): make it work in dynamic assemblies.
11590 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
11592 * metadata.c, reflection.c: simple speedup to type hash
11595 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
11597 * image.c, image.h, class.c, assembly.c: move module loading
11598 to MonoImage. When loading metadata, consider alignemnet from
11599 the start of metadata, not from the metadata address in memory.
11601 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
11603 * reflection.c (mono_reflection_get_custom_attrs): Added support for
11604 AssemblyBuilder objects. Factored out custom attribute creation into
11605 a separate function.
11606 (create_custom_attr): new function to create custom attributes.
11608 2003-02-12 Miguel de Icaza <miguel@ximian.com>
11610 * Makefile.am: Got tired of typing the full pathname to pedump.
11611 Until there is another option, am installing this.
11613 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
11615 * class.c (class_compute_field_layout): always set field->parent
11616 (mono_ldtoken): use mono_defaults.fieldhandle_class;
11618 2003-02-11 Dick Porter <dick@ximian.com>
11621 * monitor.c: Rewrote Monitor, making lock much faster and
11622 Pulse/Wait work as specified. Also uses much fewer handles, and only
11623 creates them as needed.
11625 * exception.c: Added SynchronizationLockException
11627 * threads.c: Deleted old Monitor implementation. The new one is
11630 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
11632 * class.c: handled TypedReference type code. Set the correct size for
11633 class data. Setup interface_offsets for interface classes, too.
11635 2003-02-09 Martin Baulig <martin@ximian.com>
11637 * debug-mono-symfile.h: Reflect latest symbol writer changes.
11639 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
11641 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
11642 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
11643 * object.c: fixed mono_object_get_virtual_method () for interfaces.
11644 * verify.c: check for code that runs after the end of the method.
11646 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
11648 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
11649 "System.Math::Round2".
11650 * sysmath.h: Added Floor, Round and Round2 definitions.
11651 * sysmath.c: Modified certain functions that were not 100% compliant
11652 with MS.NET (math precision) and added the implementation of Floor,
11655 2003-02-07 Martin Baulig <martin@ximian.com>
11657 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
11659 2003-02-07 Martin Baulig <martin@ximian.com>
11661 * debug-mono-symfile.c: Reflected latest symwriter changes.
11662 (mono_debug_create_mono_symbol_file): Removed.
11663 (mono_debug_open_mono_symbol_file): Take an argument which
11664 specifies whether to create a dynamic symbol file.
11666 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
11668 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
11670 2003-02-05 Martin Baulig <martin@ximian.com>
11672 * reflection.c (mono_image_build_metadata): Make this public,
11673 protect it against being called multiple times, don't create
11674 resources and don't build the compressed metadata here.
11675 (mono_image_create_pefile): Do this here.
11678 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
11680 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11682 * socket-io.c: fixed bug #36322.
11684 2003-02-06 Piers Haken <piersh@friskit.com>
11688 * debug-mono-symfile.c:
11694 * socket-io.c: warning cleanups
11696 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
11698 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
11699 function. works like remoting invoke, but does a check for the Proxy first.
11701 2003-02-05 Miguel de Icaza <miguel@ximian.com>
11703 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
11705 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
11707 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
11709 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
11710 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
11712 * object.c (mono_store_remote_field_new): used by the new jit
11713 instead of mono_store_remote_field
11714 (mono_load_remote_field_new): used by the new jit
11715 instead of mono_load_remote_field
11717 2003-02-05 Patrik Torstensson
11719 * appdomain.c: changed unload to take the domain id instead
11722 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
11725 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11727 * appdomain.c: don't look for assemblies in ApplicationBase if
11728 PrivateBinPathProbe is set.
11730 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11732 * object.c: make the first argument in main_args contain the absolute
11733 path to the assembly. Fixes bug #37511.
11735 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11737 * icall.c: get correct UTC offset for countries not using daylight
11738 time saving. Fixes bug #30030.
11740 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11742 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
11743 and 1 are the family).
11745 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
11747 * icall.c (ves_icall_InternalExecute): removed wrong assertion
11749 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
11751 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
11753 * reflection.c: added support for SignatureHelper tokens, which is
11754 needed by the Calli opcode.
11756 * reflection.h: track changes to SignatureHelper class.
11758 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
11760 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11762 * appdomain.c: fixed loading assemblies from PrivateBinPath.
11764 2003-02-03 Patrik Torstensson
11765 * appdomain.[c|h], domain.c :
11766 - Added support for getting a domain via domain id
11767 - Support for setting and getting domain from System.AppDomain
11768 (used in cross appdomain channel)
11769 - Added support for get/set for a MonoAppContext on a thread
11770 (Context class in System.Runtime.Remoting.Contexts),
11771 - Removed hack in Get/SetData and ExecuteAssembly.
11773 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
11774 the managed world to get control when a proxy is created.
11776 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
11778 2003-02-03 Miguel de Icaza <miguel@ximian.com>
11781 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11782 Populate the codebase field as well.
11784 2003-02-02 Martin Baulig <martin@ximian.com>
11786 * debug-mono-symfile.c
11787 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
11788 (mono_debug_symfile_add_method): Allow interncalls.
11790 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11792 * icall.c: throw parse exception if strtod fails or the string is empty.
11794 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
11796 * marshal.c: handle object type separately from defined
11799 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
11801 * marshal.c: handle NATIVE_LPSTR for strings when it's
11802 explicitly specified.
11804 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
11806 * reflection.c, reflection.h, icall.c: setup the reflection
11807 handle cache for ModuleBuilders and AssemblyBuilders.
11809 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
11811 * reflection.c (reflection_methodbuilder_to_mono_method): set
11814 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11816 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
11818 2003-01-29 Dick Porter <dick@ximian.com>
11820 * threads.c: No need for the fake_thread kludge now that Thread
11821 doesn't run a class constructor
11823 2003-01-29 Dick Porter <dick@ximian.com>
11825 * threads.c: Use g_direct_hash instead of the rather bogus
11828 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
11830 * marshal.c (mono_marshal_get_native_wrapper): add check for null
11831 (fix pinvoke12.exe)
11832 (mono_marshal_get_struct_to_ptr): generate valid IL code
11833 (mono_marshal_get_ptr_to_struct): generate valid IL code
11834 (*): correctly set sig->pinvoke, we need to memdup the signature
11837 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
11839 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
11840 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
11842 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
11844 * profiler.c: provide more callers information.
11846 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
11848 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
11850 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
11852 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
11854 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
11856 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
11857 exception instead of going into an infinite loop on dates which it
11860 * string-icalls.c (ves_icall_System_String_get_Chars): raise
11861 out-of-range exception if needed.
11863 * class.c (mono_class_setup_vtable): allow a virtual method to provide
11864 an implementation for an interface method and to override an inherited
11865 method at the same time.
11866 Imagine a scenario when a virtual method is used to override a
11867 virtual abstract method in a parent class, and this same method
11868 provides an implementation for an method inherited from an interface.
11869 In this case, the interface resolution code will set im->slot, which
11870 means that the virtual method override pass will skip this method
11871 which means a pointer to the abstract method inherited from the parent
11872 will remain in the vtable of this non-abstract class.
11874 * class.c: (mono_class_setup_vtable): continue search for a real
11875 method if only an abstract method is found.
11877 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
11879 * reflection.c: add size to encoding for ByValStr and ByValArray
11880 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
11882 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
11884 * class.c (mono_class_setup_vtable): pass the override info as an
11887 * class.c (mono_class_setup_vtable): set the slot of overriding methods
11890 * reflection.c (ensure_runtime_vtable); add support for method
11893 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
11895 * reflection.c (resolution_scope_from_image): Hack to work to work with
11896 dynamic assemblies.
11898 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
11899 added a 'force_ref' argument to force this function to allways return
11900 a TypeRef. This is needed by mono_image_get_memberref_token ().
11902 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
11904 * reflection.c (mono_image_get_type_info): interfaces really don't have
11907 * reflection.c (mono_image_basic_init): fill out missing fields of
11910 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
11911 dynamic assemblies. This is required so dynamic assemblies show up in
11912 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
11913 Type::GetType() etc. This is consistent with MS behaviour.
11915 * image.c image.h reflection.c: add newly created classes to the name
11916 cache so mono_class_get () will find them.
11918 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
11920 First part of changes to get IKVM.NET running under mono.
11922 * appdomain.h, appdomain.c: added new function
11923 mono_domain_try_type_resolve() which will emit TypeResolve events.
11924 This function will call AppDomain::DoTypeResolve to do the actual work.
11926 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
11927 moved existing code dealing with dynamic tokens to a new function
11928 called mono_reflection_lookup_dynamic_token (). This function will
11929 raise TypeResolve events when appropriate. Since reflection.c is not
11930 part of libmetadata, a new hook function called
11931 mono_lookup_dynamic_token() is added to class.c which will call this.
11933 * assembly.h assembly.c: make the invoke_load_hook function public,
11934 so it can be called for dynamic assemblies.
11936 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
11938 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
11941 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
11942 MonoGHashTable, since it contains pointers to objects which the GC
11945 * assembly.c (search_loaded): remove unused variable.
11947 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
11949 * object.c: fixed issue exposed by gcc-generated IL programs
11950 that use RVA data for pointers.
11952 2003-01-25 Martin Baulig <martin@ximian.com>
11954 * threads.c (start_wrapper): Moved the initialization of
11955 `start_func' above the mono_new_thread_init() call to which we
11956 pass it as argument.
11958 2003-01-24 Martin Baulig <martin@ximian.com>
11960 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
11961 the MonoThread pointer.
11963 2003-01-21 Miguel de Icaza <miguel@ximian.com>
11965 * icall.c: Rename `PowImpl' to Pow.
11967 2003-01-23 Dick Porter <dick@ximian.com>
11969 * threads.c (start_wrapper): Create a Thread object if needed, so
11970 the Main() thread can do the class initialisation in a subthread
11971 that has been set up to allow managed code execution.
11973 Pass the thread ID instead of the MonoThread pointer to the thread
11974 start and attach callbacks. This change is required, because the
11975 jit thread start callback must be called _before_ the Thread
11976 object can be created.
11978 (mono_thread_init): Removed much object creation code that is no
11979 longer needed. No managed code is called from here now.
11981 * object.c (mono_runtime_exec_managed_code): Create a subthread
11982 for Main, and call back to the runtime to use it.
11983 Set the exit code when Main exits.
11985 * gc.c: Make sure domain finalisation happens in a subthread.
11986 Re-enable threaded GC, fixing bug 31333 (again).
11988 * environment.c: System.Environment internall calls (so far just
11989 ExitCode is here, the others are still in icall.c)
11991 * appdomain.c (mono_runtime_cleanup): All threads running managed
11992 code should have finished before mono_runtime_cleanup() is
11993 reached, so no need to clean up threads.
11995 2003-01-22 Martin Baulig <martin@ximian.com>
11997 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
11998 `gpointer func' arguments.
11999 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
12000 but added `MonoThread *thread' argument.
12001 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
12003 * threads.c (mono_new_thread_init): Added `gpointer func' argument
12004 and pass it to the mono_thread_start_cb callback.
12005 (mono_install_thread_callbacks): New public function to install a
12006 set of callbacks which are set by the debugger.
12007 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
12009 2003-01-22 Martin Baulig <martin@ximian.com>
12011 * Makefile.am: Install debug-mono-symfile.h.
12013 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
12015 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
12017 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
12019 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
12020 * class.c (mono_ptr_class_get): correctly set access levels of pointers
12021 (mono_array_class_get): correctly set access levels of arrays
12023 2003-01-20 Patrik Torstensson
12024 * image.h (MonoAssemblyName): changed major, minor, build, revision
12025 from signed to unsigned.
12027 2003-01-20 sean kasun <skasun@azstarnet.com>
12029 * reflection.c (load_cattr_value): Now this handles
12030 MONO_TYPE_SZARRAY. Fixes bug #35629
12032 2003-01-20 Miguel de Icaza <miguel@ximian.com>
12034 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
12037 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12039 * decimal.c: fixed bug #26056.
12041 2003-01-17 Martin Baulig <martin@ximian.com>
12043 * gc.c: Raise an ExecutionEngineException instead of using g_error().
12045 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12048 (mono_get_exception_type_initialization): new function.
12050 * object.c: throw a TypeInitializationException when an exception is
12051 thrown invoking the class constructor.
12053 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12055 * reflection.c: fixed attribute reading.
12057 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12060 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
12061 provided, look for the type in the calling assembly and then in
12062 mscorlib; if the assembly name is provided, only try that one.
12064 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12066 * object.c: register the vtable before there is a chance it's
12067 queried again recursively.
12069 2003-01-13 Duncan Mak <duncan@ximian.com>
12071 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
12074 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
12076 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
12078 2003-01-11 Martin Baulig <martin@ximian.com>
12080 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
12081 this to 20 for the release.
12083 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
12085 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
12087 * loader.c (mono_method_get_marshal_info): bug fix
12089 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
12090 structures with explicit layout
12092 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12094 * profiler.c: made the output more readable (and sorted).
12095 Added caller information for the allocation profiler.
12097 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
12099 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
12101 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12103 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
12104 to get value types.
12106 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
12108 * object.c, profiler.h, profiler.c, profiler-private.h:
12109 Added object allocation profiler.
12111 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
12113 * reflection.h, reflection.c: handle global methods.
12114 Compress blob entries.
12116 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
12118 * marshal.c: fix compilation.
12120 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
12122 * loader.c (mono_method_get_marshal_info): impl.
12124 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
12126 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12128 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
12129 for reference types.
12131 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
12133 * loader.c: fixed off by one error in loaded parameter names.
12135 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
12137 * marshal.c (mono_marshal_get_icall_wrapper): like
12138 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
12139 instead of a MonoMethod.
12141 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12143 * decimal.c: fixed bug #36537.
12145 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
12147 * marshal.c: throw a missing method exception if a
12148 P/Invoke method is not found.
12150 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12152 * icall.c: allow a null this for constructors.
12154 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12156 * icall.c: raise the proper exceptions if the arguments to the
12157 internal Invoke are incorrect.
12159 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
12161 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
12163 2003-01-03 Martin Baulig <martin@ximian.com>
12165 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12167 2002-12-31 Martin Baulig <martin@ximian.com>
12169 * debug-mono-symfile.c: Completely rewrote the type section.
12170 Instead of using individual malloc()ed fields, we use one big
12171 continuous memory area and offsets into this area.
12172 See the comments in the source code for details.
12174 2002-12-30 Martin Baulig <martin@ximian.com>
12176 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
12178 2002-12-30 Martin Baulig <martin@ximian.com>
12180 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
12181 line number table in this data blob instead of using an external
12184 2002-12-28 Martin Baulig <martin@ximian.com>
12186 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
12188 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
12190 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
12191 as a boxed return type.
12193 2002-12-21 Miguel de Icaza <miguel@ximian.com>
12196 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
12197 g_build_filename to properly get separators on the filename created.
12199 * object.h: Small change, introduce MonoMarshalByRefObject to
12200 track the layout of that structure in the C# universe as we make
12203 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
12205 * object.c: removed assert to allow static fields on interfaces.
12206 * loader.c: a TypeSpec may be used for any type, not just arrays.
12208 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12210 * class.c, class.h: added mono_class_array_element_size ().
12211 Ignore static methods in interfaces.
12213 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12215 * threads.c: fixed the build under cygwin.
12217 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
12219 * reflection.c: handle nullref constants. Allocate keys for
12220 reflection handles with the GC.
12222 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12224 * threads.c, threads.h: added mono_thread_get_abort_signal()
12225 to get a suitable signal for thread abort.
12227 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12229 * metadata.c: fix handling of ExportedType table.
12231 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12233 * icall.c: added WriteWindowsDebugString internal call.
12235 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12237 * reflection.h: added fields to match C# implementation.
12239 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12241 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
12243 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
12245 * gc.h, gc-internal.h: Rename header for GC internal calls to
12246 gc-internal.h from gc.h as to not clash with Boehm GC having its
12247 header installed as <gc.h> in outside include paths.
12248 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
12249 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
12251 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12253 * icall.c: assign minor, build and revision in FillName.
12255 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
12257 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
12258 Added support for running code generated by Reflection.Emit.
12260 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12262 * appdomain.c: check for NULL argument in LoadFrom.
12264 2002-12-10 Dick Porter <dick@ximian.com>
12266 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
12268 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12270 * appdomain.c: fix buglet when building exe file name. Handle full
12271 assembly name (needed after latest changes to AssemblyName).
12273 (mono_image_close): free some hashtables.
12275 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
12277 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
12278 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
12279 on some systems (redhat 7.3)
12281 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
12283 * threads.c: delete the critical section of a sync block,
12284 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
12286 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
12288 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
12290 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12292 * appdomain.[ch]: handle the assembly preload event to try loading the
12293 assemblies using the paths we have in the current domain.
12295 * assembly.[ch]: created an assembly preload hook that is called to try
12296 loading the assembly by other means that the ones provided here.
12298 * domain.c: initialize the domain search path.
12300 From now on, assemblies (TODO: except corlib and System) are loaded
12301 according to these rules when using mono_assembly_load ():
12303 1. It tries to load the assembly from the ApplicationBase
12304 of the current domain appending .dll and .exe (TODO: have to
12305 try loading from name/name.dll and name/name.exe).
12307 2. It tries the search path specified in PrivateBinPath for the
12308 current domain (if any).
12310 3. Previous behavior.
12312 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
12314 * icall.c: implemented GetInterfaceMap() related icall.
12315 * domain.c, loader.h: load MethodInfo in mono_defaults.
12317 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12319 * gc.c: disable the finalizer thread for now, untill all the issues
12320 with it are resolved.
12322 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12324 * string-icalls.c: handle embedded nulls in string ctor when the
12325 length is specified.
12327 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
12329 * class.c: look for explicit interface implementation in parent
12332 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
12334 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
12336 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
12338 * gc.c: protect handles with a critical section.
12340 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12343 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
12344 parameters. If no assembly specified, try getting the type from all
12345 the assemblies in the current domain, else, load the assembly and get
12348 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12350 * marshal.c: applied patch from Aleksey Demakov that fixes
12351 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
12353 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12355 * icall.c: fixed get_location.
12357 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
12359 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
12360 declarations to make it work with older gcc.
12362 * loader.c (mono_get_method): set signature->pinvoke for native calls
12364 2002-11-20 Dick Porter <dick@ximian.com>
12366 * threads.c (mono_thread_init): Set the main thread's handle
12368 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
12370 * gc.c: allow compilation without GC support. Changed to match the
12373 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12375 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
12377 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
12379 * reflection.c: set a public key token on the core assemblies.
12381 2002-11-18 Dick Porter <dick@ximian.com>
12383 * threads.c: Split out some thread initialisation so that other
12384 files can set the start callback function.
12386 * gc.c: Run finalisers in a separate thread, to avoid stack
12387 overflow. Fixes bug 31333.
12389 * appdomain.c: Set up GC finalisation thread.
12393 * domain.c: Use gc.h macros for GC_malloc
12395 2002-11-15 Dick Porter <dick@ximian.com>
12399 * appdomain.c: Removed mono_runtime_init_with_attach(),
12400 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
12401 merging the extra parameter with the existing function. Removed
12402 unneeded code in mono_thread_attach().
12404 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
12406 * image.c (mono_image_loaded_by_guid): a method to get loaded
12408 (load_metadata_ptrs): we store the guid as string.
12410 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
12412 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
12414 * metadata.c (mono_guid_to_string): imported method form Zoltan
12415 Varga (slightly modified)
12417 * assembly.c (mono_assembly_open): load precompiled code
12419 * loader.h (MonoMethod): we store the method token for use in the
12422 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12424 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
12425 the hook function called when an assembly is loaded.
12427 * domain.c: Modified file.
12428 (mono_domain_assembly_load): removed hash table insertion of assemblies.
12432 2002-11-07 Miguel de Icaza <miguel@ximian.com>
12434 * reflection.c: Map PEFileKind to the value expected by the WinNT
12437 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12439 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
12440 Read until the buffer is filled completely.
12442 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12444 * icall.c: implemented MonoType.InternalGetEvent ().
12446 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12448 * appdomain.c: implemented InitAppDomainSetup. Delayed
12449 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
12450 the entry_assembly.
12452 * assembly.c: base_dir is now an absolute path ending with
12455 * icall.c: modified get_location according to the above changes.
12457 * object.c: init AppDomain.SetupInformation for the default domain after
12458 we have the entry assembly.
12460 * domain.c: when unloading a domain, setup = NULL.
12462 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
12464 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
12466 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
12468 * object.h, object.c: introduced mono_object_get_virtual_method ()
12469 to lookup the method invoked on an object when a callvirt is done on
12471 * icall.c: make MethodInfo::Invoke() always do a virtual call.
12473 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12475 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
12476 current domain when loaded an assembly and failed to load it.
12478 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
12480 2002-10-31 Dick Porter <dick@ximian.com>
12484 * file-io.c: Return the error status in a parameter, as the
12485 GetLastError() value has long since been blown away if we try and
12486 look it up in a subsequent internal call invocation. Delete the
12487 GetLastError() internal call, because it's useless.
12489 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
12491 * class.[ch]: added cast_class to fix bug 29517
12493 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
12495 * marshal.c: create valid IL code in the filter clause:
12496 the new JIT is less forgiving:-)
12498 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12500 * icall.c: removed get_property internal call.
12502 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
12504 * appdomain.h domain.c: Added an ID to appdomains.
12506 * threads.c threads.h icall.c: Implement icall
12507 Thread:GetDomainID(), and remove unused icall
12508 CurrentThreadDomain_internal.
12510 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12512 * icall.c: Don't recurse through the base types in GetConstructor.
12515 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
12517 * mempool.h, mempool.c: added mono_mempool_empty() and
12518 mono_mempool_stats().
12520 2002-10-23 Dick Porter <dick@ximian.com>
12524 * icall.c: Added MonoIO.GetFileType internal call
12526 2002-10-17 Dick Porter <dick@ximian.com>
12528 * appdomain.c (mono_runtime_cleanup): Don't signal the async
12529 delegate semaphore before waiting for all threads to finish,
12530 because new threads can also call async delegates. Fixes bug
12533 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
12534 of 3 seconds, in case another async job is queued. (This part is
12535 needed because the bug fix reintroduced the 3s exit lag.) This
12536 makes the mono_runtime_shutdown flag superfluous.
12538 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12540 * reflection.c: include ehader size in method section headers.
12541 Really check for suplicated modules entries.
12543 2002-10-17 Martin Baulig <martin@gnome.org>
12545 * debug-mono-symfile.c: Added back support for locals.
12547 2002-10-14 Martin Baulig <martin@gnome.org>
12549 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
12552 2002-10-14 Martin Baulig <martin@gnome.org>
12554 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
12555 mono_class_get() instead of looking in the class cache.
12557 2002-10-13 Martin Baulig <martin@gnome.org>
12559 * debug-mono-symfile.c: Set version number to 28, include the
12560 signature in method names.
12562 2002-10-13 Martin Baulig <martin@gnome.org>
12564 * debug-mono-symfile.h: Set version number to 27.
12566 2002-10-11 Martin Baulig <martin@gnome.org>
12568 * gc.c: Don't register/unregister NULL pointers as disappearing links.
12570 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12572 * metadata.c, metadata.h: added helper function to allocate signatures.
12574 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12576 * icall.c: added internal call to get the location of machine.config.
12578 2002-10-08 Martin Baulig <martin@gnome.org>
12580 * debug-mono-symfile.c: Ignore classes with a pending init for the
12583 2002-10-03 Dick Porter <dick@ximian.com>
12585 * threads.c: Freebsd pthread_t is a pointer
12587 2002-10-03 Dick Porter <dick@ximian.com>
12589 * socket-io.c: Implemented GetHostName_internal
12591 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12594 (mono_config_parse_file): don't leak the text.
12596 2002-10-02 Martin Baulig <martin@gnome.org>
12598 * debug-mono-symfile.c: Added support for methods.
12600 2002-10-01 Martin Baulig <martin@gnome.org>
12602 * debug-mono-symfile.c: Don't emit methods and line numbers for
12603 the dynamic symbol file, just write the type table. We can easily
12604 have an external helper program which creates a symbol file for an
12607 2002-10-01 Dick Porter <dick@ximian.com>
12609 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
12610 Only add the handle to the cleanup array when we're about to
12611 launch the thread. Bug 31425 deadlocked when the test was run on
12614 2002-10-01 Martin Baulig <martin@gnome.org>
12616 * debug-mono-symfile.c: Added support for properties.
12618 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12620 * reflection.c: unaligned store fix from Mark Crichton
12621 <crichton@gimp.org>.
12623 2002-09-27 Martin Baulig <martin@gnome.org>
12625 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
12628 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12630 * assembly.h, assembly.c: use a sane API to hook into the assembly
12631 loading process instead of a useless special-purpouse hack
12632 (ngen needs a hook, too, for example).
12634 2002-09-27 Dick Porter <dick@ximian.com>
12636 * threads.c (mono_thread_init): Call GetCurrentProcess() so
12637 io-layer can set up some process handle info. Not needed on w32,
12638 but doesn't hurt either.
12640 * process.c: Pass the program name in the second parameter to
12641 CreateProcess, so the path is searched. Include the working
12642 directory. Implemented process name, process enumeration, and some
12643 process detail internal calls.
12645 * icall.c: Added internal calls for process lookup, and some
12648 2002-09-26 Martin Baulig <martin@gnome.org>
12650 * assembly.c (mono_install_open_assembly_hook): New global
12651 function to install a function to be invoked each time a new
12652 assembly is loaded.
12653 (mono_assembly_open): Run this callback function if set.
12655 * debug-mono-symfile.c: Put back line numbers for the dynamic
12656 symbol file and also record the .il file as source file. This
12657 allows us to install the temporary symbol file as `file.dbg' just
12658 like a compiler-generated one.
12660 2002-09-26 Nick Zigarovich <nick@chemlab.org>
12662 * Corrected typo in gc.c (BOHEM vs BOEHM).
12664 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12666 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
12667 GetProperties. Also avoid calling g_slist_length in GetProperties and
12670 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
12672 * reflection.c: avoid unaligned stores (bug spotted by
12673 Mark Crichton <crichton@gimp.org>).
12675 2002-09-25 Martin Baulig <martin@gnome.org>
12677 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
12678 instead of guint64 for addresses and added prologue/epilogue info.
12680 2002-09-25 Martin Baulig <martin@gnome.org>
12682 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
12683 store line number info. For the dynamic symbol file, we only need
12684 to provide the JIT generated dynamic line number info for the dynamic
12687 2002-09-25 Martin Baulig <martin@gnome.org>
12689 * debug-mono-symfile.h: Incremented version number.
12691 2002-09-24 Martin Baulig <martin@gnome.org>
12693 * class.c (mono_debugger_class_init_func): New global function
12695 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
12698 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
12699 function. This is called via the mono_debugger_class_init_func
12700 hook to add all types to the dynamic type table.
12701 (ves_icall_MonoDebugger_GetType): New interncall to get a class
12702 from its metadata token.
12704 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
12705 New interncall for the debugger.
12707 2002-09-24 Nick Drochak <ndrochak@gol.com>
12709 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
12710 before using it in case it is null.
12712 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12714 * metadata.c: allow custom modifiers in local var signatures
12715 (bug spotted by Zoltan Varga).
12717 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12719 * class.c: deal with the <Module> class that may have a NULL vtable.
12720 Eliminate warnings.
12722 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12724 * image.c, image.h: more strong name helpers.
12725 * monosn.c: more work: convert pem keys to cryptoapi format.
12727 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
12729 * string-icalls.c: speedup IndexOf.
12731 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12733 * icall.c: updates from Zoltan.2.Varga@nokia.com.
12735 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
12737 * icall.c: cleanup: use mono_object_domain ().
12739 2002-09-23 Martin Baulig <martin@gnome.org>
12741 * debug-mono-symfile.c: Improved type support.
12743 2002-09-22 Martin Baulig <martin@gnome.org>
12745 * debug-mono-symfile.c: Added support for reference types and strings.
12747 2002-09-22 Martin Baulig <martin@gnome.org>
12749 * debug-mono-symfile.c: Started to work on the type table.
12751 2002-09-21 Martin Baulig <martin@gnome.org>
12753 * debug-mono-symfile.c: Largely reworked the symbol table format.
12754 The symbol table is now incrementally updated each time a new
12755 method is added. We're now also using our own magic and version
12756 so that you don't need to recompile all your classes if the
12757 dynamic table changes.
12758 (mono_debug_update_mono_symbol_file): Removed.
12759 (mono_debug_symfile_add_method): New function to add a method.
12761 2002-09-21 Martin Baulig <martin@gnome.org>
12764 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
12767 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
12768 New interncall to get a method from its metadata token.
12770 2002-09-21 Martin Baulig <martin@gnome.org>
12772 * debug-mono-symfile.c: Create type table.
12774 2002-09-20 Martin Baulig <martin@gnome.org>
12776 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
12778 2002-09-20 Martin Baulig <martin@gnome.org>
12780 * debug-mono-symfile.c: Provide information about params and locals.
12782 2002-09-20 Martin Baulig <martin@gnome.org>
12784 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
12787 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
12788 interncall to get a method from its metadata token.
12790 2002-09-20 Martin Baulig <martin@gnome.org>
12792 * debug-mono-symfile.c: Added a few checks for method->header
12793 being non-NULL. This should never happen, but for the moment
12794 let's use a g_warning() rather than a g_assert().
12796 2002-09-19 Mark Crichton <crichton@gimp.org>
12798 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
12799 even if support for it isn't present. Added an #ifdef to fix this.
12801 * socket-io.c: Added checks back for Solaris support.
12803 2002-09-19 Martin Baulig <martin@gnome.org>
12805 * debug-mono-symfile.c (read_string, write_string): Reflect latest
12806 changes in the symbol file format.
12808 2002-09-18 Martin Baulig <martin@gnome.org>
12810 * debug-mono-symfile.c: Set version number to 21.
12812 2002-09-18 Dick Porter <dick@ximian.com>
12814 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
12815 on netbsd. Fixes bug 30051.
12817 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12820 (set_version_from_string): little fix.
12822 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12824 * monosn.c, Makefile.am: added strong name utility.
12825 * reflection.h, reflection.c: implemented delayed signing,
12826 locale, version and hash id assembly attributes.
12828 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
12830 * loader.c, metadata.c: load param attributes in signatures.
12832 2002-09-16 Martin Baulig <martin@gnome.org>
12834 * debug-mono-symfile.c: Added string table with all method names.
12836 2002-09-14 Martin Baulig <martin@gnome.org>
12838 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
12839 fast method lookup.
12841 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
12843 * reflection.c: record the public key token of referenced assemblies.
12845 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
12847 * image.c, image.h: added functions to get the strong name and the
12848 public key of an assembly.
12849 * pedump.c: use them.
12851 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
12853 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
12855 2002-09-12 Miguel de Icaza <miguel@ximian.com>
12857 * marshal.c (mono_marshal_get_managed_wrapper): Added
12860 2002-09-11 Martin Baulig <martin@gnome.org>
12862 * gc.c: Call GC_unregister_disappearing_link() on all links when
12863 finalizing them, this is necessary to aviod a crash in boehm's
12866 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12868 * gc.c: handle GetTarget for finalized objects spotted and fixed by
12871 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
12873 * icall.c: implemented MonoType::Module.
12874 * reflection.c, reflection.h: mono_module_get_object () from
12875 Tomi Pakarinen <tomi.pakarinen@welho.com>.
12877 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12879 * icall.c: ignore overridden methods in GetMethods ().
12880 Fix for FieldInfo::SetValue().
12881 * object.c: handle float/double in runtime invoke.
12883 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12885 * object.c: allow a constructor to be called again on an object.
12887 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12889 * class.h, class.c: move field layout code to it's own function and
12890 export it. Get an interface id earlier. Move fields in MonoClass
12891 so they are more cache friendly and align the bitfields.
12892 * loader.c: temporary handle get_param_names() for a runtime method.
12893 * reflection.c, reflection.h: more code to handle runtime creation of
12896 2002-09-09 Martin Baulig <martin@gnome.org>
12898 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
12899 signature with the pinvoke field being set for the actual call.
12901 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
12903 * icall.c: removed some unused icalls. Start of map of glib charsets
12904 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
12906 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
12908 * debug-helpers.c: break infinite loop (found and fixed by
12909 Holger Arnold <harnold@gmx.de>).
12911 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
12913 * icall.c: target may be null in create_delegate.
12915 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
12917 * marshal.c: handle a boolean return type.
12919 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
12921 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
12923 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
12925 * gc.c: fix weakreferences.
12927 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
12929 * icall.c: added icall to get default codepage.
12931 2002-09-03 Dick Porter <dick@ximian.com>
12934 * threads.c: Use MonoThread instead of MonoObject where
12937 Store running thread objects in a hash table, so that we have all
12938 the info to hand when waiting for them to finish
12939 (means we don't need OpenThread() any more, so mingw builds should
12940 be fully functional again.)
12943 * object.h: Added thread ID to MonoThread
12945 2002-09-03 Martin Baulig <martin@gnome.org>
12947 * icall.c (System.Reflection.Assembly::get_location): New interncall.
12949 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12951 * icall.c: fixed leak in get_temp_path. Thanks lupus.
12953 2002-09-03 Martin Baulig <martin@gnome.org>
12955 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
12956 argument to store the end address of the disassembled instruction.
12958 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
12959 here from debug-symfile.h.
12960 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
12961 JIT into this struct.
12962 (MonoSymbolFile): Added `char *image_file' field.
12963 (MonoDebugGetMethodFunc): Removed.
12964 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
12965 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
12966 (mono_debug_find_method): New method.
12968 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
12969 create a full symbol file.
12970 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
12971 and static symbol files.
12972 (mono_debug_find_method): The symbol file keeps an internal method hash,
12973 call this to get a MonoDebugMethodInfo from a MonoMethod.
12975 * debug-symfile.[ch]: Removed.
12977 2002-08-29 Miguel de Icaza <miguel@ximian.com>
12979 * image.c (do_mono_image_open): Remove linker version check.
12981 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
12983 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
12984 wrappers for instance methods.
12986 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12988 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
12990 2002-08-28 Dick Porter <dick@ximian.com>
12992 * Makefile.am: Export HOST_CC for w32 builds
12994 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12996 * file-io.c process.c: MonoString are null terminated, no
12997 need for mono_string_to_utf16() anymore.
12999 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13001 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
13003 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
13005 * icall.c, reflection.h: speedup System.MonoType.
13007 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13009 * reflection.c: allow null as the value of a string argument in
13010 custom attributes constructors.
13012 2002-08-27 Martin Baulig <martin@gnome.org>
13014 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
13015 `trampoline_address' field.
13017 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
13019 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
13020 check (fixes bug #29486)
13022 2002-08-27 Martin Baulig <martin@gnome.org>
13024 * debug-mono-symfile.c: Changed the file format in a way that allows us
13025 open it read-only and to use a specially malloced area for all the
13026 dynamic data. We can now also generate a symbol file on-the-fly if we're
13027 debugging IL code and there is no MCS generated symbol file for it.
13029 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
13031 * object.c: added a define for a good string and array
13032 creation speedup (not enabled by default because we need to deal with
13035 2002-08-26 Martin Baulig <martin@gnome.org>
13037 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
13038 function to create a dynamic symbol file. This is used by the
13039 debugger to create a symbol file for IL code on-the-fly.
13041 2002-08-26 Martin Baulig <martin@gnome.org>
13043 * loader.c (mono_lookup_pinvoke_call): Include the error message
13044 from g_module_error() in the error message.
13046 2002-08-24 Martin Baulig <martin@gnome.org>
13048 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
13049 function to update the symbol file. The symbol file is mmap()ed
13050 writable, but private. This allows us to install the symbol file
13051 together with the assembly.
13053 2002-08-24 Martin Baulig <martin@gnome.org>
13055 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
13056 but they can read the new symbol file format which mcs is now creating.
13058 * debug-symfile.c (mono_debug_find_source_location): Moved to
13059 debug-mono-symfile.c; this is now operating on the new symbol file.
13061 2002-08-23 Martin Baulig <martin@gnome.org>
13063 * debug-helpers.c (mono_method_desc_from_method): New function to get
13064 a MonoMethodDesc from a MonoMethod.
13066 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13068 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
13069 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
13071 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13073 * string-icalls.[ch]: make helper methods static.
13075 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13077 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
13078 types to it and to SetValueInternal.
13080 * object.c: Moved handle_enum label to its proper place. This was the
13083 This time i compiled mcs and gtk-sharp and they both work.
13085 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13087 * icall.c: reverted partially my previous patch until
13088 object.c:set_value handles enums correcly.
13090 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13093 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
13094 (ves_icall_System_Environment_get_MachineName): removed warning when
13095 compiling under cygwin.
13097 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13099 * object.c: fixed field_get_value() for reference types.
13101 2002-08-22 Dick Porter <dick@ximian.com>
13103 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
13104 Don't free a buffer while it's still needed. Patch from Jonathan
13105 Liger <Jonathan.liger@wanadoo.fr>
13107 2002-08-21 Miguel de Icaza <miguel@ximian.com>
13109 * icall.c (ves_icall_System_Environment_get_Platform): Add new
13112 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
13114 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
13115 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
13117 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
13118 we call unmanaged code which throws exceptions.
13120 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13122 * appdomain.h: added per-domain entry_assembly.
13123 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
13125 * icall.c: Assembly::GetEntryAssembly icall.
13126 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
13127 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
13129 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13131 * appdomain.h, gc.c: added mono_domain_finalize ().
13133 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13136 (mono_print_unhandled_exception): changed g_warning by g_printerr
13137 because g_log has a 1024 characters limit (yeah, i got a big stack
13138 trace). Don't print exception name, that should be in ToString
13141 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13143 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
13144 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
13146 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13149 (mono_print_unhandled_exception): after previous commit, i realized
13150 that MS calls ToString on the exception. I changed this function to
13151 do that. This way we get stack_trace for free.
13153 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13156 (mono_print_unhandled_exception): invoke Message property instead of
13157 getting 'message' field from Exception. Don't allocate memory for
13158 'trace' and 'message' if not needed.
13160 2002-08-18 Dick Porter <dick@ximian.com>
13162 * unicode.c: Fix asserts to match Encoder.cs checks
13164 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13166 * marshal.c: fix unaligned store issue and a few wrong
13167 opcode argument types.
13169 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13171 * icall.c: added GetUninitializedObjectInternal internal call.
13173 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
13175 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
13176 to the right domain.
13178 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
13180 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
13182 * class.c (class_compute_field_layout): set blittable to false for Strings
13184 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
13186 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13188 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
13189 first chunk of code to create types at runtime. Code to
13190 handle ReflectedType/DeclaringType. Make reflection handles
13193 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
13195 * class.c: set correct name in arrays.
13197 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
13199 * appdomain.c (mono_domain_transfer_object): make it work with
13200 valuetypes. bug fixes.
13202 2002-08-12 Dick Porter <dick@ximian.com>
13204 * object.h: Rename some parameters to avoid c++ keywords (Patch
13205 from Joseph Wenninger <kde@jowenn.at>)
13207 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
13209 * icall.c: added icall to implement Assembly.GetFile*.
13211 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13213 * reflection.h, reflection.c: code to embed managed resources.
13215 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13217 * class.c: move all the type size stuff into
13218 class_compute_field_layout().
13220 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13222 * class.c: ensure enums have always the correct instance size.
13223 * unicode.c: remove wrong assert.
13225 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13227 * assembly.c: fix mem corruption issue.
13228 * image.h, image.c: added mono_image_get_resource () to access
13230 * icall.c: implemented Assembly.EntryPoint property and some
13231 Managed Resources related internalcalls.
13234 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13236 * image.c, image.h: impemented mono_image_get_entry_point ().
13237 * appdomain.c: use mono_image_get_entry_point.
13239 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13241 * reflection.c: support the object type argument when loading
13244 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
13246 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
13247 String as return type.
13249 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
13251 * reflection.c: fix encoding of named args for custom attrs to match
13252 the ms implementation. Read them back when instantiating custom
13255 2002-08-02 Radek Doulik <rodo@ximian.com>
13257 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
13258 by Dietmar as quick fix
13259 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
13260 16 as stack size, used on more places as quick fix before Dietmar
13261 will fix it properly
13263 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13265 * object.h, object.c: added accessors for fields and properties.
13267 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
13269 * class.c, class.h: made mono_class_get_field_from_name ()
13270 loop on parent types.
13271 Added mono_class_get_property_from_name ().
13273 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13275 * class.c, class.h: move the code to setup the type vtable in its own
13276 function so that it can be reused also for types created at runtime.
13277 Eliminate the "class" identifier from the header file.
13278 * reflection.c: setup the vtable for enums so that we can create
13279 objects for use in SetConstant ().
13281 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
13283 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
13284 instead of the delegate itself as this pointer (bug #28383)
13286 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
13288 * marshal.c (mono_marshal_get_managed_wrapper): added return type
13291 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13293 * loader.c: don't set the pinvoke bit on icalls.
13295 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
13297 * debug-helpers.c (mono_method_full_name): only print a number to
13298 indicate wrapper type (so that the output is more readable in traces).
13300 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
13302 * class.c (mono_class_init): include method override patch from Paolo
13304 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
13306 * icall.c: fixed GetTypeCode().
13308 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
13310 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
13311 use real delegate invoke function to make it work with multicast
13312 delegates (fix bug# 28291).
13314 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13316 * object.c: load constant strings.
13318 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13320 * reflection.c: no magic numbers.
13321 * tabledefs.h: security action enum.
13323 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13325 * assembly.c: fix possible memory corruption.
13327 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13329 * reflection.h, reflection.c: added support for linking resources.
13330 * verify.c: check we have an updated corlib.
13332 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
13334 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
13336 (mono_marshal_string_array): null terminate unmanaged string arrays.
13337 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
13339 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13341 * icall.c: Type.GetType () can now return also types from the
13344 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13346 * loader.h, loader.c: stack walking support.
13347 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
13348 GetCallingAssembly.
13350 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
13352 * marshal.c: added optimisations for blittable types
13354 * class.c (mono_array_class_get): do not set blittable attribute on arrays
13355 (mono_class_setup_mono_type): set blittable attribute for single
13358 * marshal.c (mono_string_utf8_to_builder): impl.
13359 (mono_string_builder_to_utf8): impl.
13360 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
13362 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
13364 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
13365 (mono_marshal_get_managed_wrapper): impl. byref types
13367 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13370 (search_method): don't display debug message.
13372 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
13374 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
13376 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
13378 * appdomain.c: set the missing filename when throwing exception.
13380 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
13382 * metadata.c (mono_type_size): code cleanup
13383 (mono_type_stack_size): removed some test code
13385 2002-07-21 Miguel de Icaza <miguel@ximian.com>
13387 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
13388 mono_get_exception_file_not_found now.
13390 * exception.c (mono_exception_from_name_two_strings): New version
13391 that will call a constructor with two string arguments.
13392 (mono_get_exception_file_not_found): New helper routine, used to
13393 report file-not-found errors.
13395 2002-07-20 Dick Porter <dick@ximian.com>
13398 * process.c: Pass file handles to CreateProcess
13402 * file-io.c: Implemented CreatePipe
13404 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
13406 * metadata.c (mono_get_param_info): set alignment for value types
13408 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
13410 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
13411 Constify mono_domain_assembly_open().
13412 * loader.c: handle null namespace in icalls.
13414 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
13416 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
13417 (emit_str_to_ptr_conv): marshal object as structs
13419 * metadata.c (mono_type_to_unmanaged): marshal object as structs
13421 * marshal.c (mono_marshal_get_runtime_invoke): support value types
13423 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
13425 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
13426 (mono_marshal_get_native_wrapper): we an now return value types
13428 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13430 * verify.c: more checks implemented.
13432 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
13434 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
13436 (mono_marshal_get_native_wrapper): allow byref arguments
13437 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
13438 impl. PtrToStringXXX methods
13439 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
13440 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
13441 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
13442 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
13443 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
13445 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13447 * reflection.c: fix buglet in parsing an assembly name.
13449 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
13451 * marshal.c (emit_ptr_to_str_conv): first impl.
13453 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13455 * object.c, class.h: cache the vtable in the class as suggested by
13456 vargaz@freemail.hu (Zoltan Varga).
13458 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13460 * class.h, loader.c: added mono_field_from_token().
13461 * verify.c: first cut of type checking code.
13463 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
13465 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
13467 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
13469 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
13471 (mono_marshal_get_remoting_invoke): impl.
13472 (mono_delegate_begin_invoke): impl.
13473 (mono_mb_emit_save_args): impl.
13474 (mono_delegate_end_invoke): impl.
13475 (mono_marshal_get_delegate_begin_invoke):
13476 (mono_marshal_get_delegate_end_invoke):
13477 (mono_marshal_get_delegate_invoke): generate a special name for
13478 those methods (including the signature) and associate them whith
13479 the delegate class.
13481 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
13484 (mono_reflection_type_from_name): now it has a MonoImage parameter
13485 which is used as the default image to search the type in. If the image
13486 is NULL or getting the type from it fails, it defaults to corlib.
13488 * icall.c: changed 1 call to mono_reflection_type_from_name to match
13491 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13493 * reflection.c: update the parameter table index.
13495 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13497 * domain.c: don't include the mark byte in the string hash.
13499 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13501 * icall.cs: icall for Type.GetTypeCode ().
13502 * verify: a couple of fixes and disabled local initialization checks.
13504 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
13506 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
13508 * debug-helpers.c (mono_method_full_name): print the type of the
13511 * metadata.c (mono_signature_hash): a hash function for signatures
13512 (mono_signature_hash): better hash algorithm
13514 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
13516 * debug-helpers.c (mono_method_full_name): this can now generate
13517 method names with signatures
13519 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
13520 method dont have this pointers.
13522 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
13524 * reflection.c: fixup typebuilder tokens.
13525 * image.c: fix buglet.
13526 * marshal.h: remove whitespace.
13527 * metadata.h, metadata.c: reinstate code that was removed.
13528 * verify.c: handle catch directives and fix another couple of bugs.
13530 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
13532 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
13533 (mono_marshal_get_native_wrapper): make it comp. with the old code
13534 (mono_marshal_get_native_wrapper): support boolean
13535 (mono_marshal_get_managed_wrapper): support more types
13537 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
13539 * class.c (class_compute_field_layout): compute class->blittable attribute.
13541 2002-07-09 Dick Porter <dick@ximian.com>
13543 * threads.c: Make the thread cleaning up cope with threads that
13546 2002-07-08 Radek Doulik <rodo@ximian.com>
13548 * reflection.c (method_encode_code): use non-translated values to
13549 compute finally_start, this fixes exception handling on ppc, yay!
13551 * decimal.h (struct signscale): fix endianess
13553 2002-07-07 Radek Doulik <rodo@ximian.com>
13555 * reflection.c: swap box_val and not val
13557 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
13559 * reflection.c, reflection.h: handle full assembly info in type name.
13560 Handle Type arguments when loading custom attributes.
13561 * icall.c: updated to use new mono_reflection_type_from_name () method.
13563 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13566 (method_from_memberref): also print assembly name when method not found.
13568 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13571 (ves_icall_TypeGetProperties): fixed bug #27473.
13573 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13575 * reflection.c: display image name and token when cannot find the
13576 .ctor for an attribute.
13578 2002-07-05 Martin Baulig <martin@gnome.org>
13580 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13582 2002-07-04 Dick Porter <dick@ximian.com>
13584 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
13585 compile on mingw. This will cause mingw builds to not wait for
13586 subthreads to terminate after the main thread does. I've lodged a
13587 bug with the mingw developers for them to wrap OpenThread().
13589 2002-07-03 Dick Porter <dick@ximian.com>
13591 * threads.c: Store thread IDs instead of handles, because
13592 GetCurrentThread() returns a pseudohandle and therefore stores
13593 useless values. mono_thread_cleanup() continues checking the
13594 array of threads until it is empty, to cope with subthreads
13595 spawning new threads after the main thread has finished.
13599 * profiler-private.h: Pass the thread ID to thread profiler
13600 functions, instead of a handle
13602 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
13604 * verify.c: fixes to make it more usable.
13605 * pedump.c: added --verify code to verify IL code in an assembly.
13607 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13609 * reflection.c: turn errors into warnings to allow compiling corlib.
13611 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
13613 * reflection.c: add special cases to compile corlib.
13615 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13617 * reflection.c: handle properties with only a set method.
13619 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
13621 * opcodes.h: add enum with opcodes in opval order.
13623 2002-07-01 Dick Porter <dick@ximian.com>
13626 * object.c (mono_runtime_run_main): Removed unneeded argument
13628 2002-06-28 Martin Baulig <martin@gnome.org>
13630 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
13632 2002-06-27 Dick Porter <dick@ximian.com>
13634 * threads.c: Store the handle in both the parent thread and in the
13635 subthread, to minimise the time between starting a new thread and
13638 2002-06-26 Dick Porter <dick@ximian.com>
13640 * appdomain.c (mono_runtime_cleanup): Close the socket library
13641 after all the threads have finished, not before
13643 2002-06-26 Martin Baulig <martin@gnome.org>
13645 * debug-symfile.c (mono_debug_find_source_location): Added
13646 `guint32 *line_number' argument. If it's not NULL, store the line number
13647 there and return the file name without the line number.
13649 2002-06-25 Dick Porter <dick@ximian.com>
13653 * process.c: Process forking and other support functions
13655 2002-06-25 Dick Porter <dick@ximian.com>
13657 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
13658 things dont happen when the image is closed.
13659 (mono_image_lookup_resource): Walk the resource section looking
13660 for a particular entry
13662 * cil-coff.h: PE resource section decoding
13664 2002-06-25 Dick Porter <dick@ximian.com>
13668 (mono_assembly_foreach): Accessor functions to walk the list of
13670 (mono_assembly_set_main):
13671 (mono_assembly_get_main): Process methods need to know which
13672 assembly is the "main" one
13674 * object.c (mono_runtime_run_main): Record the main assembly
13676 * debug-helpers.c: Fix typo
13678 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
13680 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
13681 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
13683 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13685 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
13687 2002-06-21 Miguel de Icaza <miguel@ximian.com>
13689 * image.c (do_mono_image_open): Initialize reference count,
13690 otherwise we leak the MonoImage.
13692 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13694 * reflection.c: small tweak to handle self-hosting.
13696 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13698 * reflection.c: fix type name parse code.
13700 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13702 * reflection.c: break out of the loop.
13703 * image.c: special case corlib.
13705 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13707 * reflection.c: add all the custom attrs at the end to ensure the
13708 ctors have been properly initialized when the attributes are defined
13709 in the current assembly.
13711 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13713 * reflection.c: handle correctly multiple-nested types.
13715 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
13717 * row-indexes.h: fix typos.
13718 * reflection.c: adjust for typos and fix method_def_or_ref
13719 encoding in MethodImpl table.
13721 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13723 * reflection.c: fix entry point patching (thanks Serge!).
13725 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
13727 * verify.c: add check for System.Exception
13729 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
13731 * image.c, class.c: minifix for code just c&p'ed.
13732 * reflection.c: warning fix.
13733 * object.h, loader.h, domain.c: load also StringBuilder.
13735 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13737 * marshal.h, marshal.c: some support code to handle complex marshaling.
13739 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13741 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
13742 Better signatures with vtable error dump.
13744 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
13746 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
13748 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
13750 * icall.c (ves_icall_Type_GetField): impl.
13752 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13754 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
13755 to retrieve a marshal description blob for a field or param.
13757 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13759 * reflection.h, reflection.c: change order of nested type emission
13760 to avoid table corruption. The NestedTypes table is sorted.
13761 * icall.c: change order of GetConstructor results to workaround mcs bug.
13763 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
13765 * reflection.h, reflection.c: handle field and param marshal
13768 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
13770 * icall.c, marshal.c marshal.h: more Marshal class implementation.
13772 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13774 * reflection.c: fix call convention.
13776 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13778 * reflection.h, reflection.c: mono_image_get_memberref_token()
13779 takes a type instead of a class, now. Added
13780 mono_image_get_array_token() to create tokens for the special
13781 multi-dim array methods.
13783 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13785 * assembly.c: handle modules (no assembly table). Split
13786 loading references in its own function.
13787 * class.c: handle moduleref resolution scope.
13788 * image.c, image.h: cache module name in image.
13790 2002-06-07 Martin Baulig <martin@gnome.org>
13792 * reflection.c (mono_image_get_type_info): Only add a class layout entry
13793 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
13795 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13797 * icall.c: more signature fixes that used uint instead of int.
13799 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13801 * reflection.c: fixed signature of field refs.
13803 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
13805 * class.c, reflection.c: handle typerefs of nested types
13806 (both on read and when writing files).
13808 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13810 * icall.c: fix method signatures that tried to workaround the previous
13813 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
13815 * debug-helpers.c: fix typo.
13817 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
13819 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
13820 rewrote the PE/COFF writing code (our programs are understood by the
13823 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13825 * gc.c, gc.h, icall.c: weakreference support.
13827 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13829 * Makefile.am, mono-config.c: use $(sysconfdir).
13831 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
13833 * icall.c: changed default precision of Double.ToString() to 15.
13834 Fixed memory leak. Unified with Single.ToString.
13836 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
13838 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
13840 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13842 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
13843 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
13844 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
13847 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13849 * debug-symfile.c, sysmath.c: yet more compilation fixes.
13851 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13853 * reflection.c, socket-io.c: more compilation fixes.
13855 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13857 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
13858 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
13859 unicode.c: warning and compiler compatibility fixes.
13861 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13863 * class.h, metadata.c: fixed warnings/compilation errors.
13865 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
13867 * Makefile.am, mono-config.c, mono-config.h: configuration file
13869 * loader.c, loader.h: make Dll mapping configurable at runtime in the
13870 config file. Export methods to insert and lookup mappings.
13872 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13874 * reflection.c: handle types and boxed objects in custom attr
13877 2002-05-30 Martin Baulig <martin@gnome.org>
13880 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
13882 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
13884 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
13885 to lookup the implmap row for a P/Invoke method.
13886 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
13887 P/Invoke method from the runtime on an as needed basis.
13889 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
13891 * metadata.c (mono_metadata_parse_signature): impl.
13893 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
13895 * class.c: handle .pack directive.
13897 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13899 * object.c: initialize static fields with RVA data.
13901 2002-05-25 Martin Baulig <martin@gnome.org>
13904 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
13906 2002-05-24 Martin Baulig <martin@gnome.org>
13909 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
13910 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
13911 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
13913 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
13915 * object.c: special case string ctros in invoke.
13916 * gc.c: silly whitespace changes.
13918 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
13920 * threadpool.[ch]: impl. a threadpool that can
13921 be used by mint and mono.
13923 2002-05-22 Martin Baulig <martin@gnome.org>
13925 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
13926 The first argument is now a `MonoReflectionModuleBuilder *', the return
13927 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
13928 `methods' field to get the method builder. The `token' argument is the
13931 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
13932 invalid characters instead of g_assert_not_reached()ing. This seems
13933 to be the behaviour of mscorlib.
13935 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
13937 * object.c (mono_runtime_invoke_array): applied patch from Rachel
13938 Hestilow to fix bug #25104
13940 2002-05-21 Martin Baulig <martin@gnome.org>
13942 * debug-symfile.c (mono_debug_find_source_location): New function.
13943 Looks up an IL offset in the line number table and returns the source
13944 location as a string.
13946 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13949 (mono_double_ToStringImpl): changed %f by %g until we have something
13952 2002-05-21 Nick Drochak <ndrochak@gol.com>
13954 * icall.c : Use different name for Math.Pow's icall. Needed to check
13955 parameters first in C#.
13957 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
13959 * icall.c, reflection.h: added icall to get info about an event.
13961 2002-05-20 Radek Doulik <rodo@ximian.com>
13963 * object.c (mono_value_box): don't use memcpy for boxing on BIG
13965 (mono_value_box): don't use memcpy for small sizes on
13966 architectures with unaligned access
13968 2002-05-20 Martin Baulig <martin@gnome.org>
13970 * reflection.c (mono_reflection_setup_internal_class): Don't crash
13971 if `tb->parent == NULL'.
13972 (mono_reflection_create_internal_class): New function. This is
13973 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
13976 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
13979 2002-05-19 Martin Baulig <martin@gnome.org>
13981 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
13982 argument to get the length, don't default to the array length.
13984 2002-05-18 Miguel de Icaza <miguel@ximian.com>
13986 * assembly.c (mono_assembly_setrootdir): New function used to
13987 override the MONO_ASSEMBLIES directory.
13989 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13991 * icall.c: ValueType_GetHashCode() initialize local var.
13993 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
13995 * reflection.c: sort custom attributes table.
13997 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13999 * reflection.c: support named args in custom attributes (write support).
14001 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
14003 * reflection.c: fix finally position calculation.
14005 2002-05-15 Radek Doulik <rodo@ximian.com>
14007 * reflection.c: fixed endianess at many places
14009 * icall.c (ves_icall_InitializeArray): comment out debug msg
14011 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
14013 * object.c (mono_unhandled_exception): new function to handle
14014 unhandled exceptions.
14015 (mono_unhandled_exception): call the UnhandledException event.
14016 (mono_runtime_delegate_invoke): impl.
14018 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
14020 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
14021 returns the RVA, not the direct pointer to the data. Handle the case
14022 when the class size is fixed.
14024 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14026 * reflection.c: fix some endianess issues.
14028 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
14030 * object.c (mono_runtime_invoke): is now able to catch exceptions.
14032 * threads.c (mono_thread_init): added a callback which is invoked
14035 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
14037 * icall.c: make GetHashCode return non-negative values.
14039 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
14041 * object.c, icall.c, gc.c: revert to address-based hashcode.
14043 2002-05-13 Miguel de Icaza <miguel@ximian.com>
14045 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
14047 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14049 * icall.c, class.c: special case <Module>.
14051 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
14053 * icall.c: fix bug in GetNow().
14055 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
14057 * object.c (mono_runtime_class_init): make sure that we call all
14058 static class constructors.
14060 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14062 * reflection.c: sort methodsemantics table.
14064 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14066 * reflection.h, reflection.c: honour init locals setting.
14068 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
14070 * icall.c: copied Double ToStringImpl for Single ToStringImpl
14072 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14074 * reflection.c: support ContructorBuilders in attribute blob creation.
14076 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14078 * reflection.c: some changes to build a binary that can be run
14079 directly in windows.
14081 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14083 * loader.c: print a big message when an icall can't be found.
14085 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14087 * string-icalls.c: fix bug 24248.
14089 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14091 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
14092 icall.c, reflection.h: separate assembly loading by pathname and by
14093 assembly name. Use the MONO_PATH env var to search for assemblies.
14095 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14097 * assembly.c, image.h: add some support for assemblies
14098 with multiple modules.
14099 * class.c, class.h: export mono_class_from_typeref().
14100 * loader.c: remove duplicated code and use mono_class_from_typeref(),
14103 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14105 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
14106 documentation says (the ECMA one is correct).
14108 2002-05-02 Dick Porter <dick@ximian.com>
14110 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
14111 Don't name the synchronisation mutex.
14113 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
14116 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
14117 Make the prototypes match.
14118 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
14122 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
14123 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
14124 all systems have tm.tm_zone, so use strftime() with %Z to print
14125 the timezone abreviation into a temp string.
14127 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
14128 rather than mono_array_addr() on a MonoString on Big Endian
14131 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
14133 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
14136 2002-04-30 Dick Porter <dick@ximian.com>
14138 * socket-io.c: Cope with SOCKET being an integer rather than a
14141 * threads.c: Added Thread_free_internal, to deal with thread
14142 handle cleanup. Moved calls to handle_store() and handle_remove()
14143 to start_wrapper(), so each can only be called once. Allocate
14144 synchronisation blocks with GC_malloc(), and use GC finalisation
14145 to close the handles.
14147 * icall.c: added System.Threading.Thread::Thread_free_internal
14149 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14151 * icall.c: support Environment.Exit, CommandLineArgs().
14153 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14155 * object.c, object.h: added mono_runtime_run_main () and
14156 mono_runtime_get_main_args () for use in System.Environment.
14158 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14160 * gc.c: fix thinko, enable actual finalization since the jit is now
14163 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14165 * gc.c, object.c: take into account that an object may be offset wrt the address
14166 returned by GC_malloc().
14168 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
14170 * image.c: handle files without entries in the assembly table (modules).
14172 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
14174 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
14175 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
14176 allowed to be null when it's System.Object class setup.
14178 2002-04-27 Martin Baulig <martin@gnome.org>
14180 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
14181 if `tb->parent == NULL' rather than crashing.
14183 2002-04-28 Nick Drochak <ndrochak@gol.com>
14185 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
14186 calling acos() where asin() should have been called.
14188 2002-04-26 Martin Baulig <martin@gnome.org>
14190 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
14191 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
14192 there's a subdirectory called `System', but we don't want to read that
14193 subdirectory as an assembly.
14195 2002-04-25 Martin Baulig <martin@gnome.org>
14197 * debug-symfile.c: Reflect latest MonoString changes.
14199 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14201 * rand.c, rand.h: instance method icalls need to have an explicit
14202 this pointer as first argument in the C implementation.
14204 2002-04-25 Nick Drochak <ndrochak@gol.com>
14206 * icall.c: Fix typo in map for GetNonZeroBytes
14208 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
14210 * string-icalls.c : String does now passes unit tests without any
14211 errors, the following changes has been made:
14213 Implemented replace methods.
14214 Renaming of methods to (try) follow the standard.
14215 Fixed compare ordinal
14216 Made all memory allocated directly to function instead of via icall function.
14217 Small performance fix in is_in_array function
14219 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
14221 c (mono_string_Internal_ctor_charp_int_int):
14222 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
14223 sindex < 0, throw ArgumentOutOfRangeException instead of
14224 ArgumentNullException.
14226 Added new check for length == 0, however
14227 I need to make it return String.Empty from the C code.
14229 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
14230 that calculate the length for us here.
14232 (mono_string_Internal_ctor_sbytep_int_int): Replaced
14233 mono_string_new_utf16 with mono_string_new, since value is utf8.
14235 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14237 * object.c: register the object for finalization if needed.
14238 Allocate one more char in the string for the terminating 0 char.
14240 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14242 * class.c, class.h, image.c: check if a type implemenst a destructor.
14243 Use the proper key for array class lookups.
14244 * icall.c: register the icalls in the System.GC class.
14245 * gc.c, gc.h: GC-related functions and icalls.
14247 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14251 * unicode.c: free some strings gotten from mono_string_to_utf8 and
14252 changed a couple of free () by g_free ().
14254 * decimal.c: one-liner in the comments for decimal2string ().
14256 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
14258 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
14260 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
14262 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
14263 * object.c (mono_runtime_invoke_array) : handle null in params
14265 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
14267 * string-icalls.c: fixed bug in split (one off bug)
14269 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
14271 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
14272 * icalls.c: added String::Equals as internal method
14274 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
14276 * threads.c: fixed bug in the double interlocked functions
14278 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
14280 * threads.c: implemented all of the new interlocked icalls.
14281 * string-icalls.c: fix a bug in insert.
14282 * icalls.c: added the icalls for interlocked, removed old string functions.
14284 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14286 * loader.c: fix off-by-one error when reading argument names.
14288 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14290 * profiler.c: win32 counter implementation (untested).
14291 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
14292 (the latter needs testing and more complete impl. from win32 folks).
14294 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
14296 * object.c: mono_array_new_full workaround mono_array_class_get
14299 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14301 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
14302 * object.h (mono_string_chars): Changed casting type.
14304 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14306 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
14307 method signatures to use gunichar2 instead of gint16.
14309 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
14311 * object.h, object.c: domain-specific versions of mono_object_new and
14314 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
14316 * object.c: changed String layout
14318 * string-icalls.c (mono_string_Internal_ctor_chara): added
14319 internal string constructors.
14321 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
14323 * threads.c: pass 'this' to the thread start routine.
14325 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14327 * string-icalls.c: fix IndexOf and LastIndexOf. Now
14328 InternalCompareStr don't call twice mono_string_cmp_char for the last
14329 character. Improved performance in mono_string_cmp_char.
14331 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
14333 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
14334 code into its own library: libmonoruntime.
14336 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
14338 * object.h, object.c: changed array format so that szarrays do not
14339 require a bounds structure.
14340 * icall.c, appdomain.c: support for new szarray format.
14342 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
14344 * metadata.c: compare also the retuns type when comparing signatures:
14345 we didn't do this as an optimization since really overloaded methods
14346 must differ also in the arguments, but this doesn't work with
14347 low-level IL code (or when using explicit conversion operators: see
14348 bug#23498 for an example).
14350 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14352 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
14354 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14356 * icall.c: make MonoType::GetElementType its own icall.
14358 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14360 * icall.c: remove MonoMethod_get_Name().
14361 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
14364 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14366 * string-icalls.c: optimized a few methods.
14368 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
14370 * icall.c: added all new string internal calls
14371 * string-icalls.c: added, new string internal call implementation.
14372 * object.c: added mono_string_new_size for allocating a string a size
14374 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
14376 * object.c (mono_object_isinst): use the same code as in the
14377 optimized x86 version.
14379 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14381 * profiler.c: TSC-based timer code (faster and more accurate).
14382 Not hooked up in configure, yet (set USE_X86TSC to 1).
14384 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
14386 * profiler.c, profiler.h: track time spent compiling methods.
14387 * threads.c: track thread creation/destruction.
14389 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
14391 * profiler.c, profiler.h, profiler-private.h: profiling interface
14392 and sample implementation. Moved here so that it can be used also by
14395 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
14397 * reflection.c, reflection.h: keep types and other handles separate in
14398 the hash tables for referred tokens. Add guid for modules.
14400 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14402 * assembly.c: fix bugs found with valgrind.
14403 * metadata.h, metadata.c: added mono_metadata_guid_heap().
14405 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
14407 * threads: added icall support for getting current domain for
14410 2002-04-13 Martin Baulig <martin@gnome.org>
14412 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
14413 (MonoDebugVarInfo): Added `index' field for register based addresses.
14414 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
14415 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
14416 `MonoDebugVarInfo *params' and `guint32 this_offset' with
14417 `MonoDebugVarInfo *this_var'.
14419 * debug-symfile.c (relocate_variable): New static function to write
14420 a location description for a local variable or method parameter.
14422 2002-04-12 Martin Baulig <martin@gnome.org>
14424 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
14425 stack offset and begin/end scope address of a local variable.
14426 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
14427 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
14428 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
14430 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
14431 Added new relocation types for start/end scope of a local variable.
14433 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14435 * object.h: add mono_object_domain() macro.
14436 * reflection.c: handle typespecs.
14437 * icall.c: MonoMethod::get_Name() implementation.
14439 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14441 * icall.c: String::GetHashCode() icall implementation.
14443 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14445 * icall.c: String::IndexOfAny icall.
14446 * object.c, object.h: make array->max_length more useful.
14447 Intrduced mono_object_class() and mono_string_length() macros.
14449 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14451 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
14452 instead of g_unichar_isdigit.
14454 2002-04-11 Nick Drochak <ndrochak@gol.com>
14456 * icall.c: Implement a simple Double.ToString().
14458 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
14460 * appdomain.h: only io-layer.h is supposed to be included.
14461 * icall.c: explicitly import environ. Fix warning.
14463 2002-04-10 Nick Drochak <ndrochak@gol.com>
14465 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
14466 return true even if it's not Daylight Savings time.
14467 Only return false for the case where the function isn't
14468 implemented for a plaform (read Windows).
14470 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14472 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
14475 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
14477 * mempool.c (mono_mempool_alloc): only use g_malloc when
14478 absolutely necessary.
14480 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
14482 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
14484 * class.c (mono_class_vtable): use domain mempool to allocate vtable
14485 (mono_class_proxy_vtable): use domain mempool
14487 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14489 * appdomain.h, appdomain.c: split initialization that requires the
14490 execution engine support into mono_runtime_init().
14492 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
14494 * class.c (mono_class_init): don't include vtable inside MonoClass
14495 to save some memory, gather some statistics.
14496 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
14498 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14500 * icall.c: internalcall implementation for ValueType.Equals().
14502 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
14504 * object.c (mono_message_init): moved
14505 (mono_runtime_exec_main): new arch. independent impl.
14506 (mono_runtime_invoke_array): new method - like
14507 mono_runtime_invoke, but you can pass an array of objects.
14508 (mono_remoting_invoke): new arch. independent impl.
14509 (mono_message_invoke): new arch. independent impl.
14510 (mono_runtime_class_init): new arch. independent impl.
14511 (mono_runtime_object_init): new arch. independent impl.
14513 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14515 * metadata.c, object.c, reflection.c: documented the exported
14518 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
14520 * icall.c: simpler code to pass the assembly builder data to corlib.
14521 Implement GetNestedTypes() internalcall.
14523 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14525 * class.c: warn if a type can't be loaded.
14527 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
14529 * image.h: typedef MonoImageOpenStatus
14530 * types.h: removed unused file
14532 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
14534 * icall.c: Enum_ToObject accepts enum value arguments.
14536 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14538 * class.c: move initialization of properties, events and nested
14539 classes, so that they happen for interfaces, too.
14541 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14543 * icall.c: cleanup some ugly casts in Array_SetValue*.
14545 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14547 * icall.c: the values array fro enums is of the correct type, now.
14548 Implement (correctly) getFullName instead of assQualifiedName for
14550 * reflection.h, reflection.c: added mono_type_get_name ().
14552 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14554 * assembly.c, image.h: for each MonoImage, record from wich assembly
14556 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
14557 Make Type.Assembly work.
14559 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
14561 * debug-symfile.h: use char* instead of gpointer to avoid
14564 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
14566 * icall.c (ves_icall_InternalExecute): impl. FielSetter
14567 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
14569 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
14571 * icall.c (mono_message_init): impl. (code cleanup)
14572 (ves_icall_InternalExecute): impl. FieldGetter
14574 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
14575 defined we call all (non-static)methods through the vtable.
14577 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
14579 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
14580 finalizer even though the memory is still referenced (and the chunk of
14581 memory is not freed).
14583 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
14585 * assembly.c: fix brokeness.
14587 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
14589 * class.c: kill some warnings. Check explicit interface method
14590 implementation also without considering the namespace.
14591 Load also literal strings in static class data.
14593 2002-03-29 Miguel de Icaza <miguel@ximian.com>
14595 * assembly.c (default_assembly_name_resolver): Kill memory leak.
14596 (default_assembly_name_resolver): Make the resolver take the
14597 "base" directory where the assembly was originally defined, so we
14598 can load DLLs that are in the same directory as the assembly that
14599 is being referenced.
14601 2002-03-28 Dick Porter <dick@ximian.com>
14607 * unicode.c: Warning cleanups
14609 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
14611 * object.h, reflection.h: use the correct type instead of MonoObject.
14613 2002-03-28 Martin Baulig <martin@gnome.org>
14615 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
14616 (mono_debug_update_symbol_file): Initialize classes if necessary.
14618 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
14620 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
14621 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
14623 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
14625 * assembly.h: fix function prototype.
14626 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
14627 * mono-endian.h: use const cast.
14629 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
14631 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
14633 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
14635 * loader.c: don't assert when a typeref can't be loaded, give
14636 a chance to the runtime to trow an exception instead.
14637 * loader.h: fix warning.
14639 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
14641 * class.c (mono_class_proxy_vtable): added proxy support
14643 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
14645 * icall.c: removed last of PAL calls, added System.Environment
14646 * file-io.h, file-io.c: MonoIO implementation
14647 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
14649 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
14651 * appdomain.c: do not use the byte marker in ldstr table lookup.
14652 * debug-helpers.c: allow two ':' to separate class and method name.
14653 * object.c: allocate arrays bounds with the GC, too.
14654 * verify: add a few more checks.
14656 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
14658 * reflection.c: output also literal strings. Allocate parameter data
14659 with GC_malloc() (thanks, Martin, for catching this!).
14661 2002-03-26 Martin Baulig <martin@gnome.org>
14663 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
14664 include the `this' offset in the `param_offsets'.
14666 2002-03-25 Martin Baulig <martin@gnome.org>
14668 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
14669 mono_debug_get_class() function to get the classes. Added new
14670 relocation types for arrays and strings.
14671 (mono_debug_get_class): New static function to search in all
14672 referenced assemblies for a metadata token.
14674 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
14676 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14678 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
14679 hold gc-allocated objects. Make the string heap a stream like the
14680 others. Removed duplicated code when writing stream info.
14681 Added asserts to catch possible buffer overflows. Set the sorted map
14682 for tables that need sorting. Added some documentation.
14684 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
14686 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
14687 for interned strings and vtables.
14689 2002-03-24 Martin Baulig <martin@gnome.org>
14691 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
14692 it in the array since it was created with g_slist_prepend().
14694 2002-03-24 Martin Baulig <martin@gnome.org>
14696 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
14697 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
14698 (mono_debug_method_from_token): Renamed to
14699 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
14700 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
14702 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
14705 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
14707 2002-03-24 Martin Baulig <martin@gnome.org>
14709 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
14710 (mono_debug_method_from_token): New func.
14712 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
14713 New interncall, calls mono_debug_local_type_from_signature().
14714 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
14715 calls mono_debug_method_from_token().
14717 2002-03-23 Martin Baulig <martin@gnome.org>
14719 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
14720 specifies the number of bytes to be converted, not the array size.
14721 Return the number of chars, not the number of bytes.
14722 (ves_icall_iconv_get_chars): The `byteCount' argument
14723 specifies the number of bytes to be converted, not the array size.
14725 2002-03-23 Martin Baulig <martin@gnome.org>
14727 * reflection.h (MonoReflectionSigHelper): New type.
14729 * reflection.c (mono_reflection_sighelper_get_signature_local),
14730 (mono_reflection_sighelper_get_signature_local): New functions.
14732 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
14733 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
14736 2002-03-23 Martin Baulig <martin@gnome.org>
14738 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
14739 is_writeable is set.
14740 (mono_raw_buffer_update): New function to write the modified map
14743 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
14745 * debug-symfile.c (mono_debug_update_symbol_file): Call
14746 mono_raw_buffer_update() when done writing.
14748 2002-03-23 Martin Baulig <martin@gnome.org>
14750 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
14752 * debug-symfile.c: Added support for arguments and local variables.
14754 2002-03-23 Dick Porter <dick@ximian.com>
14756 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
14757 protected by ifdefs, hence breaking the w32 build.
14759 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14761 * object.c: implement is_interned() the right way.
14763 2002-03-21 Martin Baulig <martin@gnome.org>
14765 * debug-symfile.[ch]: New files to handle debugging information
14766 files. There's also support to dynamically update these symbol
14767 files to include machine dependent information.
14769 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
14771 * threads.c (mono_thread_create): new function to create thread
14774 2002-03-20 Martin Baulig <martin@gnome.org>
14776 * icall.c (ves_icall_InternalInvoke): Create a new object if the
14777 method is a constructor.
14778 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
14779 points to ves_icall_InternalInvoke().
14781 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
14783 * file-io.c: Flush shouldn't throw exceptions.
14785 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
14787 * file-io.c: FileStream flush support; FileSetLength now
14788 restores file pointer.
14790 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
14792 * class.c: set image for pointer classes.
14794 2002/03/19 Nick Drochak <ndrochak@gol.com>
14796 * sysmath.c: Forgot one.
14798 2002-03-18 Miguel de Icaza <miguel@ximian.com>
14800 * sysmath.c: Avoid redefining existing names.
14802 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
14804 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
14805 handled by runtime as icall rather than dllimport from libm.so
14806 * file-io.c, file-io.h: fixed handle argument type.
14808 2002-03-18 Dick Porter <dick@ximian.com>
14810 * reflection.c (mono_image_get_type_info): rename interface to
14811 iface, because of "#define interface struct" on windows.
14813 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
14815 * class.c, class.h: rename and export mono_ptr_class_get().
14816 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
14817 * reflection.c, reflection.h, icall.c: better/saner type name
14818 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
14821 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
14823 * class.c (mono_class_init): removed hardcoded GHC_SLOT
14825 * icall.c (ves_icall_InternalInvoke): impl.
14827 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14829 * reflection.c: output the interface map table, too.
14831 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
14833 * class.c (class_compute_field_layout): separate computation of
14834 static field layout
14836 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
14838 * icall.c: added System.Buffer support.
14839 * file-io.c: moved file icalls from PAL to FileStream.
14841 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
14843 * icall.c (ves_icall_System_Object_GetHashCode): impl.
14845 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
14847 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
14849 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14851 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
14853 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
14855 * debug-helpers.{c,h}: moved here from monograph some useful functions
14856 to locate a method by name/signature in a class or image. Included
14857 also a small and flexible IL disassembler.
14859 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
14861 * reflection.c: fixup tokens in methods with small header size, too.
14863 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
14865 * object.c (mono_string_to_utf8): remove assert(!error), instead
14868 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
14870 * icall.c: update to the new mono_Array_class_get interface.
14872 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
14874 * appdomain.c, object.c: Boehm-GC enable.
14875 * icall.c: make get_data_chunk() support split data requests.
14876 Ensure a class is initialized in more cases. Return only the first
14877 property found in GetProperties() or the compiler gets confused.
14878 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
14879 * reflection.h, reflection.c: add fixup mechanism for field and method
14880 tokens. Initialize assembly->typeref in a single place. Output
14881 properties after events. Support custom attributes for events, too.
14882 Typo fix for paramter custom attrs.
14884 2002-03-07 Martin Baulig <martin@gnome.org>
14886 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
14888 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
14890 * class.c (mono_array_class_get): fix. for multi. dim. arrays
14892 2002-03-06 Martin Baulig <martin@gnome.org>
14894 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
14895 non-zero lower bounds. See testcases #F10-#F13.
14897 2002-03-05 Martin Baulig <martin@gnome.org>
14899 * exception.c (mono_get_exception_argument_out_of_range): New exception.
14901 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
14902 ves_icall_System_Array_GetValue(), only calculate the absolute array position
14904 (ves_icall_System_Array_SetValue): Likewise.
14905 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
14906 as argument and does the actual work. This function is used when copying a
14907 multi-dimensional array.
14908 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
14909 now do all the widening conversions of value types.
14910 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
14912 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14914 * class.c: remove some magic numbers and use the smbolic names,
14915 instead. Added init_events() to load event info at class init time.
14916 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
14917 and mono_metadata_methods_from_event().
14918 * reflection.h, reflection.c: added support for writing out the evnets
14919 related information.
14921 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
14923 * reflection.h, icall.c: use a different method (GetInterfaces)
14924 to gather interface info and add isbyref, isprimitive and
14925 ispointer to the ves_icall_get_type_info() return value.
14927 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
14929 * class.h: stared adding support for events.
14930 * icall.c: split find_members implementation. Added debug icall to get
14931 the address of an object.
14932 * reflection.c: handle TypeBuilders in mono_type_get_object().
14934 2002-03-01 Martin Baulig <martin@gnome.org>
14936 * icall.c (ves_icall_System_Array_GetLength): This must throw an
14937 ArgumentOutOfRangeException(), not an ArgumentException().
14938 (ves_icall_System_Array_GetLowerBound): Likewise.
14939 (ves_icall_System_Array_GetValue): Improved argument checking.
14940 (ves_icall_System_Array_SetValue): Improved argument checking.
14942 2002-03-01 Martin Baulig <martin@gnome.org>
14944 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
14945 called with invalid arguments rather than just dying with g_assert().
14946 (ves_icall_System_Array_SetValue): Likewise.
14947 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
14948 raise a NotImplementedException instead.
14949 (ves_icall_System_Array_GetLength): Added argument checking.
14950 (ves_icall_System_Array_GetLowerBound): Added argument checking.
14952 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
14954 * object.h (mono_assert): new macros mono_assert and
14955 mono_assert_not_reached
14957 2002-02-28 Martin Baulig <martin@gnome.org>
14959 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
14960 and "System::String::IsInterned" to "System::String::_IsInterned".
14962 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
14964 * icall.c: remove hacks for typebuilder. Added icall to create a
14965 modified type from a tybebuilder.
14966 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
14967 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
14968 to create a backing MonoClass for a TypeBuilder.
14970 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
14972 * class.c, class.h: more refactoring of class init.
14973 Export mono_class_setup_mono_type() and mono_class_setup_parent().
14975 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
14977 * marshal.c, marshal.h: start of marshaling interface.
14979 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
14981 * icall.c: fix order in assembly qualified name icall.
14983 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
14985 * class.c: do not free str, since we store it in the hash table.
14986 * reflection.h: add label field to MonoILExceptionInfo.
14987 * reflection.c: handle references to more than one assembly. Handle
14988 case when there isn't a module created in the assembly.
14990 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
14992 * class.c: Fix typo. Start refactoring of class init code.
14994 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
14996 * appdomain.c: exit with 1 on error.
14997 * class.c: we already have the name in MonoClassField.
14998 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
14999 MonoStreamHeader instead of an offset of image->raw_metadata.
15001 2002-02-26 Miguel de Icaza <miguel@ximian.com>
15003 * appdomain.c (mono_init): Be even more descriptive about the error.
15005 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
15007 * appdomain.c: give the user an informative message when corlib can't
15010 2002-02-26 Martin Baulig <martin@gnome.org>
15012 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
15013 New icall to get the time zone data.
15015 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15017 * reflection.c: set virtual and raw size of section correctly.
15018 * threads.c: transfer domain information to newly created threads.
15020 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15022 * class.c: when instancing a class in a domain, load the default
15023 vaules for static fields from the constant table. Fix System.Enum to
15025 * icall.c: implement Object::GetType() internalcall. Implemented
15026 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
15027 Fixed checking of binding flags in find_members().
15028 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
15029 * reflection.c: handle enumerations when writing to the constant
15030 table. Use a different object cache for types.
15033 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
15035 * object.c (mono_object_isinst): fix for arrays
15037 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
15039 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15041 * object.c: don't use mprotect () and fix intern pool hash table
15042 lookup for big endian systems.
15044 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15046 * icall.c: change type_is_subtype_of () signature.
15048 2002-02-21 Mark Crichton <crichton@gimp.org>
15050 * rand.c, rand.h: Added random number generator for
15051 System.Security.Cryptography classes.
15053 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
15055 * icall.c: Added System.Security.Cryptography calls.
15057 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15059 * class.c, icall.c, metadata.c: better support for pointer types.
15060 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
15061 * reflection.c: Add support for getting custom attrs for properties
15062 and simplify some code.
15064 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15066 * icall.c: change getToken () and add custom attribute GetBlob()helper
15068 * reflection.h: add custom attrs array to the reflection builder structures.
15069 * reflection.c: encode and emit custom attributes for all the relevant
15070 reflection objects. Cache fieldref and methodref tokens. Change
15071 mono_image_create_token() interface to take a MonoDynamicAssembly.
15072 More complete custom attributes decoder. Load custom attributes for
15073 Assembly, Field, Method and Constructor objects, too. Make the
15074 returned array an Attribute[] one, not object[]. Added
15075 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
15076 custom attribute constructor.
15078 2002-02-20 Dick Porter <dick@ximian.com>
15082 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
15083 problem code out for now).
15085 2002-02-19 Radek Doulik <rodo@ximian.com>
15087 * object.c (mono_ldstr): use hash table to avoid multiple swapping
15089 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
15091 * icall.c: register the GetCustomAttributes method.
15092 * object.c, object.h: add mono_string_new_len ().
15093 * reflection.h, reflection.c: added mono_runtime_invoke(),
15094 mono_install_runtime_invoke(). Added
15095 mono_reflection_get_custom_attrs () to load custom attributes and
15096 create the attribute objects.
15098 2002-02-19 Dick Porter <dick@ximian.com>
15099 * threads-dummy-types.c:
15100 * threads-dummy-types.h:
15103 * threads-pthread-types.c:
15104 * threads-pthread-types.h:
15105 * threads-pthread.c:
15106 * threads-pthread.h: Deleted obsolete files
15108 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
15110 * class.c (mono_class_vtable): runtime init the class when we
15111 allocate static class data.
15113 * icall.c (ves_icall_System_Array_SetValue): check for null values.
15115 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
15116 and String - but we will need generic marshalling support in the
15118 (mono_init): set the domain name in a ms compatible way
15120 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
15123 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
15125 * object.c (mono_array_clone): use alloca() instead of g_malloc
15128 * appdomain.c (mono_domain_unload): impl.
15130 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15132 * appdomain.c, object.c: fix intern pool implementation.
15133 * class.c: fix alignment code.
15135 2002-02-16 Radek Doulik <rodo@ximian.com>
15137 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
15138 and s2 > s1, just copy lower bytes to be compatible with little
15139 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
15140 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
15142 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
15143 force big_endian to be 1 for big endian machines
15144 (ves_icall_iconv_new_decoder): ditto
15146 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
15148 * socket-io.c (convert_sockopt_level_and_name): If the system
15149 doesn't define SOL_IP or SOL_TCP, get them by hand using
15150 getprotobyname() and caching the values (because this could be a
15152 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
15153 Use the appropriate struct when the system does support it. Ie,
15154 not all systems have struct ip_mreqn so use struct ip_mreq when
15157 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
15159 * reflection.c: handle finally clauses.
15161 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
15163 * socket-io.c: use g_snprintf() instead of snprintf.
15165 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
15167 * reflection.c (mono_param_get_objects): Cast second argument to
15168 mono_method_get_param_names to a const char** to silence the
15171 * appdomain.c (mono_domain_assembly_open): Put parens around the
15172 truth statement in the for-loop.
15174 * unicode.c (iconv_convert): Got rid of a compiler warning about
15175 int i being unused when the system has a new iconv.
15176 (iconv_get_length): Same.
15178 * image.c (load_class_names): Cast the second argument to
15179 g_hash_table_insert() to char* to hush compiler warnings about the
15181 (mono_image_open): Same here.
15183 * socket-io.c: Don't conditionally include sys/filio.h or
15184 sys/sockio.h here anymore since we now get them from
15185 io-layer/io-layer.h
15186 (inet_pton): If the system doesn't support inet_aton, implement
15187 using inet_addr and also #define INADDR_NONE if it isn't defined
15190 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15192 * metadata.c, metadata.h: added function to get packing and size info
15194 * reflection.h, reflection.c: handle field RVA data. Save info about
15195 the table layout if needed. Assign typedef indexes to all the types
15196 before dumping the info about them to avoid forward reference problems.
15198 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
15200 * socket-io.c (convert_sockopt_level_and_name): ifdef
15201 SO_ACCEPTCONN because it is not defined on my system (old debian)
15203 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15205 * opcode.c: use stddef.h to get NULL.
15207 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
15209 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
15210 for FIONBIO, FIONREAD and SIOCATMARK.
15211 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
15212 define INADDR_NONE and besides, inet_addr() is deprecated and
15213 should not be used. Use inet_pton() instead - it also has the
15214 added bonus that it can easily handle IPv6 addresses as well.
15215 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
15217 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
15219 * decimal.c: remove _MSC_VER conditional.
15221 2002-02-13 Dick Porter <dick@ximian.com>
15224 * icall.c: Internal calls for Blocking, Select, Shutdown,
15225 GetSocketOption and SetSocketOption
15227 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15229 * assembly.cs: better resolver: use it instead of some kludgy
15232 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
15234 * reflection.c: the best way to speed-up the compiler is to avoid
15237 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
15239 * class.c (mono_class_vtable): changed the object layout
15240 (obj->vtable->class).
15241 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
15243 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15245 * assembly.c: look for assemblies in the assembly dir, too.
15247 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15249 * class.c: fix thinko in mono_class_from_type().
15251 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15253 * exception.h, exception.c: added TypeLoadException.
15254 * object.h, object.c: added mono_array_clone ().
15255 * icall.c: handle throwOnError in AssemblyGetType().
15256 Added Array.Clone().
15257 * opcode.h, opcode.c: use a single value for the opcode val.
15258 Compile fix for non-gcc compilers.
15260 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
15262 * opcodes.c, opcodes.h: export interesting info about opcodes.
15264 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
15266 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
15269 * class.c (class_compute_field_layout): set element_class for enums
15270 (mono_class_create_from_typedef): set element_class for normal classes
15272 * icall.c (ves_icall_System_Enum_get_value): impl.
15274 * class.c (mono_class_create_from_typedef): do not set valuetype
15275 flag for System.ValueType and System.Enum
15277 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
15279 * unicode.c (iconv_convert): fix big endian problem.
15281 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15283 * class.c: add asserts if we are ever going to scribble over memory.
15284 * socket-io.c: not all systems have AF_IRDA defined.
15286 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
15288 * class.c (class_compute_field_layout): do not consider static
15289 fields to compute alignment
15291 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
15293 * appdomain.c (mono_appdomain_get): impl.
15294 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
15296 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
15298 * icall.c: ignore "file://" prefix when loading an assembly.
15300 2002-01-23 Dick Porter <dick@ximian.com>
15304 * Makefile.am: Added socket support
15306 2002-01-23 Miguel de Icaza <miguel@ximian.com>
15308 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
15309 code back. This should return the assemblies that are loaded by
15310 the runtime on behalf of an application domain.
15312 The current implementation is still broken, it just returns every
15313 assembly loaded, but until we get real applications domain this
15316 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
15318 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
15321 2002-01-23 Miguel de Icaza <miguel@ximian.com>
15323 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
15324 the mono_class_from_name lookup.
15325 (ves_icall_get_parameter_info): ditto.
15326 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
15328 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
15330 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15332 * class.c: load also nested classes on class init.
15333 System.ValueType instance methods gets passed boxed
15334 values, unless methods in derived classed that get a pointer to the
15336 * icall.c: use better name parsing code in GetType().
15337 * image.c, image.h: add mono_image_loaded ().
15338 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
15339 * reflection.c, reflection.h: added mono_reflection_parse_type().
15341 2002-01-22 Veronica De Santis <veron78@interfree.it>
15343 * icall.c : Added mapping of internal calls for Manual and Auto reset events
15344 * threads.c : Added the implementation of internal calls for events
15345 * threads.h : Added prototypes of internal calls for events
15347 2002-01-21 Radek Doulik <rodo@ximian.com>
15349 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
15351 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
15353 * class.c (mono_class_init): set min_align to 1 (instead of 0)
15354 (mono_class_value_size): use min_align
15356 2002-01-20 Dick Porter <dick@ximian.com>
15359 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
15360 so it compiles on w32.
15362 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
15364 * metadata.c (mono_type_stack_size): impl.
15366 * class.c (mono_class_get_field): impl. memberref token
15368 2002-01-16 Veronica De Santis <veron78@@interfree.it>
15370 * icall.h : Added the internal calls mapping for CreateMutex_internal
15371 and ReleaseMutex_internal.
15372 * threads.h : Added the prototype of mutexes internal calls.
15373 * threads.c : Added the implementations of mutexes internal calls.
15375 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
15377 * metaparse.h: removed unused file.
15378 * reflection.c, reflection.h: added stream_data_align () function
15379 to align data in streams and keep stream aligned. Add support for
15380 exception support in method headers.
15382 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
15384 * unicode.c: make iconv_convert () return the number of bytess written
15385 in the output buffer.
15387 2002-01-15 Dick Porter <dick@ximian.com>
15388 * threads.c: Make the runtime's idea of infinite timeouts coincide
15389 with the class library's
15391 Fix a particularly egregious bug in mono_thread_cleanup(). That
15392 code was so utterly bogus it must have been written on a Monday.
15394 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
15396 * reflection.h: add subtypes field to TypeBuilder.
15397 * reflection.c: encode constants for literal fields.
15398 Handle subtypes. Fix user string token (and add a zero byte)
15401 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
15403 * class.c (mono_class_init): bug fix: assign slot numbers for
15406 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15408 * reflection.c: don't try to output a code RVA for abstract methods.
15409 Small fixes for method header format. Output parameter info to the
15410 ParamDef table. Save method overriding info to MethodImpl table.
15411 Fix property support. Allow typedef.extends to be a type in the
15413 * verify.c: fix off-by-one error.
15415 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
15417 * class.c: fix mono_class_from_mono_type () for szarray types.
15418 Remove unused cache check in mono_class_from_type_spec().
15419 * icall.c: *type_from_name () functions handle simple arrays and byref.
15420 * reflection.c: handle byref and szarray types. Handle methods without
15421 body (gets P/Invoke compilation working). Handle types and fields in
15423 * reflection.h: add rank to MonoTypeInfo.
15425 2002-01-10 Dick Porter <dick@ximian.com>
15427 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
15430 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
15432 * icall.c: initialize class in type_from_handle ().
15433 Loop also in parent classes for get_method ().
15434 * reflection.c: properly encode class and valuetype types.
15435 Start on encoding TypeBuilder types. Handle fieldrefs.
15436 Use correct length when registering a user string.
15437 Handle ConstructorBuilder and MonoMethod in get_token ().
15438 Make mono_type_get_object () aware of cached types.
15439 * object.c: back out change to mono_string_new ().
15441 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
15442 * object.c: mono_string_new should return a NULL when the string
15443 passed in is NULL -- not try to deference it.
15445 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
15447 * icall.c: hack to make IsSubType work for TypeBuilders.
15448 * reflection.c: emit constructors before methods.
15449 Retrieve param names in mono_param_get_objects().
15451 2002/01/05 Nick Drochak <ndrochak@gol.com>
15453 * Makefile.am: fix list of headers and sources so automake 1.5
15454 doesn't complain. Removed \# at end of list.
15456 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15458 * reflection.c: get token for a method ref. Set return type of
15459 constructor to void.
15460 * loader.c: debug message.
15461 * class.c: typo fix.
15463 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
15465 * icall.c: fix array init with rank > 1. FindMembers
15466 loops in parent class as well.
15467 * image.c: do not insert nested types in name cache.
15468 * reflection.c: warning fix.
15469 * reflection.h: add override method (for interface impl).
15471 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
15473 * metadata.c: fix customattr decoding.
15475 2001-12-21 Miguel de Icaza <miguel@ximian.com>
15477 * rawbuffer.cs: Added native Win32 implementation, avoids using
15478 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
15480 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
15482 * class.c: make the low-level routines handle the cache.
15484 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
15486 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
15488 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
15490 * class.c: fix mono_array_element_size() for objects.
15491 * class.h, class.c: add properties to MonoClass and load them
15493 * icall.c: check with isinst() when assigning a value to an array
15494 instead of requiring the classes to match exactly.
15495 Implemented icall for System.Type::GetType().
15496 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
15497 enums. Handle bindingflags when looking for methods and fields.
15498 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
15499 and mono_metadata_methods_from_property().
15500 * reflection.h, reflection.c: added structures for propreties,
15501 parameters and enums. Implemented mono_property_get_object() and
15502 mono_param_get_objects().
15504 2001-12-18 Dick Porter <dick@ximian.com>
15506 * file-io.c: Use mono_string_to_utf16() instead of
15507 mono_string_chars()
15509 * object.c: Added mono_string_to_utf16(), which copies the non
15510 NULL-terminated MonoString into a new double-null-terminated
15513 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
15515 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
15517 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
15519 * file-io.c: raise exceptions if handle is invalid.
15521 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
15523 * assembly.c: yet another check for mscorlib.
15524 * class.c, class.h: load nesting info for classes.
15525 * icall.c: many new functions to support the Reflection classes.
15526 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
15527 * reflection.h, reflection.c: mono_image_create_token(),
15528 mono_assembly_get_object(), mono_type_get_object(),
15529 mono_method_get_object(), mono_field_get_object(): methods to return
15530 objects that parallel the C representation of assemblies, types,
15533 2001-12-11 Dick Porter <dick@ximian.com>
15536 * file-io.c: Internal calls for file IO.
15538 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
15540 * tabledefs.h: missing FileAttributes.
15541 * verify.h, verify.c: use is_valid_string () to simplify and check for
15542 valid strings more correctly. Fix warnings and speeling.
15543 Check more tables: Filed, File, ModuleRef, StandAloneSig.
15544 Check code: branches, maxstack, method calls.
15546 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
15548 * object.c (mono_object_allocate): removed static, so that the jit
15549 can allocate value types.
15551 * icall.c (ves_icall_System_DateTime_GetNow): impl.
15553 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15555 * class.c: init enum types right away and register the
15556 token->MonoClass map in mono_class_create_from_typedef ().
15557 * verify.h, verify.c: first cut of the verifier.
15558 * pedump.c: add --verify switch to verify metadata tables.
15559 * tabledefs.h: add some missing enums.
15561 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
15563 * class.c (mono_install_runtime_class_init): impl.
15564 (mono_class_init): renamed mono_class_metadata_init to
15565 mono_class_init, also removed the metadata_inited flag
15567 * object.c (mono_object_isinst): use faster algorithm
15569 2001-11-30 Radek Doulik <rodo@ximian.com>
15571 * mono-endian.h: reverted last change
15572 added function prototypes
15574 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
15575 add mono-endian.c back
15577 * mono-endian.c: returned back, as Paolo pointed out, it's needed
15578 for unaligned access, I've mistaked it with endianess. I am
15580 (mono_read16): fix reverted endianess
15581 (mono_read64): ditto
15582 (mono_read32): ditto
15584 2001-11-30 Dick Porter <dick@ximian.com>
15586 * exception.c: Implement mono_exception_from_name()
15588 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15590 * metadata.h, metadata.c: remove params_size and locals_size and their
15591 calculation from the metadata code: they are only usefult to the
15594 2001-11-29 Radek Doulik <rodo@ximian.com>
15596 * object.c (mono_ldstr): swap bytes here, it's probably not the
15597 best place, but works for me now, I'll redo it once I know mono
15598 better, also note that I add PROT_WRITE and don't reset back, also
15599 note that it's only affects big endians, so x86 should be OK
15601 * mono-endian.h (read16): use just glib macros for both endians
15603 * mono-endian.c: removed as glib macros are used in in
15604 mono-endian.h so we don't need to care about endianess for read
15605 macros as glib does that for us already
15607 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
15609 * class.h, class.h: take minimum alignment into consideration so
15610 that the fields of a class remain aligned also when in an array.
15612 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15614 * loader.h, loader.c: add mono_method_get_param_names().
15615 * class.c: 0-init class fields.
15617 2001-11-26 Dick Porter <dick@ximian.com>
15621 * threads.c: New file that handles System.Threading on all platforms
15624 * object.h: Remove the synchronisation struct from MonoObject,
15625 replace it with a pointer that gets initialised on demand
15627 * Makefile.am: Replace all the system-specific threading code with
15628 a single file that uses the new wrapper library
15630 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
15632 * class.c, class.h: add mono_install_trampoline() so that the runtime
15633 can register a function to create a trampoline: removes the ugly
15634 requirement that a runtime needed to export arch_create_jit_trampoline.
15635 * object.h, object.c: added mono_install_handler() so that the runtime
15636 can install an handler for exceptions generated in C code (with
15637 mono_raise_exception()). Added C struct for System.Delegate.
15638 * pedump.c: removed arch_create_jit_trampoline.
15639 * reflection.c: some cleanups to allow registering user strings and
15640 later getting a token for methodrefs and fieldrefs before the assembly
15642 * row-indexes.h: updates and fixes from the new ECMA specs.
15644 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
15646 * class.h, class.c: add enum_basetype field to MonoClass.
15647 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
15648 to get index in the constant table reated to a field, param or
15650 * reflection.h, reflection.c: handle constructors. Set public-key and
15651 version number of the built assembly to 0.
15652 * row-indexes.h: update from new ECMA spec.
15654 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15656 * class.h, class.c: add a max_interface_id to MonoClass.
15657 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
15658 since it's used to do that. Added mono_type_type_from_obj().
15659 Make GetType() return NULL instead of segfaulting if the type was not
15660 found. Handle simple arrays in assQualifiedName.
15661 * object.h: add a struct to represent an Exception.
15662 * reflection.c: output call convention in method signature.
15663 Add code to support P/Invoke methods and fixed offsets for fields.
15665 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
15667 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
15669 * icall.c: use mono_array_addr instead of array->vector: fixes the
15670 reflection image writing.
15671 * reflection.c: init call convention byte to 0 in method signature.
15672 Encode the property signature. Don't output property-related methods
15673 twice. Really process the properties for a type (don't cast a field to
15674 a property, my mom always told me that).
15675 Fix 64 bit issues in pointer alignment in a different and more
15678 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
15680 * loader.h: Removed type class from MonoDefaults, added monotype
15682 * loader.c: Loaded MonoType, removed loading of Type
15684 * icall.c (my_mono_new_object): Now returns a System.MonoType,
15685 and fills in System.Type._impl with a RuntimeTypeHandle rather
15686 than the actual MonoClass *
15688 (ves_icall_type_from_handle): change from type_class to
15691 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
15694 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
15697 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
15699 (ves_icall_System_Reflection_Assembly_GetType): implemented
15701 (ves_icall_System_MonoType_assQualifiedName): implemented
15703 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
15705 2001-11-09 Miguel de Icaza <miguel@ximian.com>
15707 * assembly.c (mono_assembly_open): Implement a cache for the
15710 (mono_assembly_close): only destroy the assembly when the last
15713 2001-11-09 Dick Porter <dick@ximian.com>
15715 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
15717 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
15719 * class.c (mono_class_metadata_init): bug fix: compute the right slot
15721 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
15723 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
15724 from Martin Weindel.
15725 * object.h: add mono_string_chars ().
15727 2001-11-07 Miguel de Icaza <miguel@ximian.com>
15729 * reflection.c (build_compressed_metadata): Eliminates warnings
15730 and uses 64-bit clean code.
15732 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
15733 (mono_type_equal): Change signature to eliminate warnings.
15735 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
15737 * icall.c, loader.c: remove the internalcall array constructors.
15738 Changes to match the new MonoArray structure.
15739 * object.h, object.c: an array object doesn't allocate an extra
15740 vector. Add mono_array_new_full () to create jagged arrays easily.
15742 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
15744 * metadata.h, metadata.c: add mono_metadata_field_info () to
15745 retreive all the info about a field from vairous tables.
15746 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
15747 * class.h, class.c: augment MonoClassField with more info.
15748 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
15749 policy and load a field's RVA if needed.
15751 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
15753 * class.c (mono_class_metadata_init): create a trampoline for all
15754 virtual functions instead of actually compiling them.
15756 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
15758 * class.h, class.c: include name in MonoClassField.
15759 * class.c: fix fundamental type of System.Object and System.String.
15760 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
15762 * icall.c: remove internalcalls for the Reflection stuff that is now
15764 * loader.c: mono_field_from_memberref () implementation.
15765 * mono-endian.c: thinko (s/struct/union/g).
15766 * object.c, object.h: make the mono_string_* prototypes actually use
15767 MonoString instead of MonoObject.
15768 * reflection.c, reflection.h: updates for changes in the reflection
15769 code in corlib: we use C structures that map to the actual C# classes.
15770 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
15771 fat method header if needed and use the info from the ILGenerator for
15772 methods. Handle fields in types. Misc fixes.
15774 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
15776 * class.c (mono_class_metadata_init): bug fix: always allocate
15777 space for static class data
15779 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
15781 * class.c (mono_compute_relative_numbering): use relative
15782 numbering to support fast runtime type checks.
15784 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
15786 * class.c (mono_class_create_from_typeref): added debugging output
15787 to print class name when MonoDummy is returned instead of real class
15789 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
15791 * class.c (mono_class_metadata_init): interface offset table now
15792 contains pointers into the vtable - this is more efficient for the jit
15794 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
15796 * class.c (mono_class_metadata_init): use a temporary vtable (the
15797 old algorithm only worked for the interpreter, but not for the jit)
15799 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
15801 * loader.c (method_from_memberref): use mono_class_get to get the
15802 class of an array instead of using System.Array directly.
15803 (mono_get_method): also add MEMBERREF methods to the method cache
15804 which usefull for arrays.
15806 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
15808 * pedump.c (arch_compile_method): added to compute vtable entry
15810 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
15811 number of interfaces.
15813 * class.h: merged MonoArrayClass into MonoClass
15815 * class.c (mono_class_create_from_typedef): compute the vtable size and
15816 allocate space to include the vtable inside MonoClass
15817 (mono_class_metadata_init): initialize the vtable
15819 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
15821 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
15822 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
15823 * image.c: endian fixes by Laurent Rioux.
15824 * object.h, object.c: rename MonoStringObject to MonoString and
15825 MonoArrayObject to MonoArray. Change some function names to conform to
15826 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
15827 guint16* as first argument, so don't use char*.
15828 Provide macros to do the interesting things on arrays in a portable way.
15829 * threads-pthread.c: updates for the API changes and #include <sched.h>
15830 (required for sched_yield()).
15831 * icall.c: updates for the API changes above.
15832 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
15833 platforms that need them.
15835 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
15837 * class.c: set the correct type for all the fundamental
15838 type when loading the class.
15840 2001-10-05 Dick Porter <dick@ximian.com>
15842 * threads-pthread.c (pthread_mutex_timedlock): Simple
15843 compatibility version for C libraries that lack this call.
15845 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
15847 * class.c: MonoTypes stored in MonoClass are stored as
15848 fundamental MonoTypes when the class represents a
15849 fundamental type (System.Int32, ...).
15850 The TypeHandle return by ldtoken is a MonoType*.
15851 * icall.c: ves_icall_get_data_chunk () write out all the
15852 PE/COFF stuff. Implement ves_icall_define_method (),
15853 ves_icall_set_method_body (), ves_icall_type_from_handle ().
15854 * image.c: properly skip unknown streams.
15855 * loader.h, loader.c: add type_class to mono_defaults.
15856 * metadata.c, metadata.h: export compute_size () as
15857 mono_metadata_compute_size () with a better interface.
15858 Typo and C&P fixes.
15859 * pedump.c: don't try to print the entry point RVA if there is no entry point.
15860 * reflection.c, reflection.h: many cleanups, fixes, output method
15861 signatures and headers, typedef and typeref info, compress the metadata
15862 tables, output all the heap streams, cli header etc.
15863 * row-indexes.h: typo fixes.
15865 2001-10-04 Dick Porter <dick@ximian.com>
15867 * object.h: Add a synchronisation mutex struct to MonoObject
15869 * object.c (mono_new_object): Initialise the object
15870 synchronisation mutexes
15872 * icall.c: System.Threading.Monitor internal calls
15874 * threads-pthread.h:
15875 * threads-pthread.c: System.Threading.Monitor internal calls
15877 * threads-types.h: New file, includes the system-specific thread
15880 * threads-pthread-types.h:
15881 * threads-pthread-types.c: New files, handle pthread-specific
15882 synchronisation types
15884 * threads-dummy-types.h:
15885 * threads-dummy-types.c: New files of dummy support for
15886 thread-specific types
15890 * pedump.c: include mono-endian.h not endian.h
15892 * Makefile.am: More threads files.
15893 Name mono-endian.h not endian.h
15895 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
15897 * Makefile.am, reflection.h, reflection.c: move here the reflection related
15898 stuff and implement a few more bits.
15899 * icall.c: a field needs to be dereferenced twice. Do not use the same
15900 name for two variables in the same scope.
15901 * image.c, image.h: cleanups.
15903 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
15905 * class.c (mono_class_metadata_init): bug fix: compute the right size
15907 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
15909 * icall.c: implemented some of the Reflection internalcalls.
15910 * image.c, image.h: start writing out the PE/COFF image.
15911 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
15912 that does the reverse than decode_blob_size ().
15913 * object.c: use mono_metadata_encode_value (). Move here
15914 temporary implementation of mono_string_to_utf8 ().
15915 * rawbuffer.c: make malloc_map static.
15917 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
15919 * metadata.c: fix type comparison for arrays.
15920 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
15921 Added a couple of new classes to monodefaults.
15922 * icall.c: added a couple of Reflection-related internalcalls.
15923 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
15924 Added a byval_arg MonoType to MonoClass.
15926 2001-09-28 Dick Porter <dick@ximian.com>
15929 * threads-pthread.h:
15930 * threads-pthread.c: Implemented internal calls for
15931 LocalDataStoreSlot operations. Applied mutexes around all shared
15932 data. Reworked the thread creation and Start() operations to
15933 avoid a race condition.
15936 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
15938 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
15940 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
15942 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
15944 * class.c, loader.c: warn and return NULL instead of erroring out.
15945 * icall.c: added System.AppDomain::getCurDomain().
15946 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
15948 2001-09-25 Dick Porter <dick@ximian.com>
15950 * threads-pthread.h:
15951 * threads-pthread.c: Implemented timed thread joining and added
15952 System.Threading.Thread::Join_internal internal call
15954 * icall.c: Added System.Threading.Thread::Join_internal internal call
15957 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
15959 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
15961 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
15962 mono_string_intern () to implement the semantics of the ldstr opcode
15963 and the interning of System.Strings.
15964 * icall.c: provide hooks to make String::IsIntern and String::Intern
15967 2001-09-23 Dick Porter <dick@ximian.com>
15970 * threads-dummy.h: New files of dummy threading routines
15972 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
15973 support code based on system specifics
15975 Rename PTHREAD_LIBS to THREAD_LIBS
15977 2001-09-23 Dick Porter <dick@ximian.com>
15979 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
15980 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
15982 (mono_thread_init): Set up a Thread object instance to return when
15983 the main thread calls Thread.CurrentThread
15984 (mono_thread_cleanup): Wait for all subthreads to exit
15986 * icall.c: New internal calls for System.Threading.Thread::Sleep
15987 (including Schedule) and CurrentThread
15989 * threads.h: New file, to insulate thread-specific stuff from the
15992 2001-09-21 Dick Porter <dick@ximian.com>
15994 * threads-pthread.h:
15995 * threads-pthread.c: New file, for handling pthreads-style
15996 threading support. Start() now starts a new thread and executes
15997 the ThreadStart delegate instance.
15999 * icall.c: Added the internalcall for
16000 System.Threading.Thread::Start_internal
16002 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
16004 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
16006 * loader.c: work around the different signatures for delegates
16007 constructors csc generates in compiled code vs the ones compiled in mscorlib.
16009 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16011 * class.h, class.c: add mono_class_get_field_from_name ().
16012 * *: Fix C comments and other ANSI C issues.
16014 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
16016 * endian.h, assembly.c: fix some endianness issues.
16018 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
16020 * loader.h, load.c: add delegate_class to mono_defaults.
16021 Handle runtime provided methods in mono_get_method ().
16023 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
16025 * loader.c (mono_get_method): use pinvoke for internal call
16027 * icall.c: use pinvoke for internal call
16029 * loader.c (method_from_memberref): set the method name
16031 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
16033 * metadata.c: help the compiler generate better code for
16034 mono_class_from_mono_type ().
16036 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
16038 * class.c (mono_class_metadata_init): delayed computing of the
16039 class size to mono_class_metadata_init ()
16041 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
16043 * class.c, class.h: add an interfaces member to MonoClass.
16044 * image.c, image.h: add assembly_name field to MonoImage
16045 from the assembly table.
16046 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
16048 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16050 * class.c: Handle Array in mono_class_from_mono_type ().
16051 * metadata.c, pedump.c: some endian fixes.
16053 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
16055 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
16056 * metadata.c: fix small problem introduced with the latest commit.
16058 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
16060 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
16061 We don't need a MonoMetadata pointer anymore to compare signatures in
16062 mono_metadata_signature_equal (), update callers.
16063 Reduced memory usage an number of allocations for MonoMethodHeader and
16064 MonoMethodSignature.
16066 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
16068 * metadata.c: added compare for szarray.
16070 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
16072 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
16073 and add a couple more types to it and mono_defaults. Give an hint on
16074 classes that need implementing in our corlib and are referenced
16077 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
16079 * class.h, class.c: keep track if a class is also an Enum.
16080 * loader.c: Implement a couple more types for use in libffi
16081 marshalling. Gives better diagnostics when failing to dlopen
16082 a library. Set method->klass for P/Invoke methods, too.
16084 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
16086 * class.c, class.h: add a MonoType this_arg to MonoClass that
16087 represents a pointer to an object of the class' type that
16088 can be used by the interpreter and later the type cache.
16089 Add best guess alignment info for valuetype objects.
16091 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
16093 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
16094 into MonoType: one less level of indirection and allocation and
16095 simplifies quite a bit of code. Added cache for MonoTypes that are
16096 used frequently, so that we don't need to allocate them all the time.
16098 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
16100 * class.c (mono_class_create_from_typedef): System.Enum is also a
16101 value type, although it does not derive from System.ValueType
16102 (maybe a bug in the ms compiler?)
16104 * metadata.c (mono_type_size): return the right size for value types
16106 * loader.c (mono_get_method): only initialize method header if not abstract
16108 * class.c (mono_class_from_mono_type): use mono_default values.
16110 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
16112 * *: use MonoClass pointers instead of <type_tokens>
16114 * class.h: new flag: metadata_inited.
16116 * class.c (mono_class_metadata_init): impl.
16117 (mono_class_instance_size): impl.
16118 (mono_class_data_size): impl.
16120 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16122 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
16123 MonoClass now has the name and name_space fields.
16124 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
16125 mono_get_method () takes and optional MonoClass as argument.
16126 Removed mono_typedef_from_name() and added mono_class_token_from_name()
16127 instead that takes advantage of a map from class names to typedef
16128 tokens in MonoImage.
16130 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
16132 * metadata.c: zero is not a valid alignment boundary.
16133 Merge MONO_TYPE_VOID in default decoding code.
16135 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
16137 * image.h: merged MonoMetadata into MonoImage
16139 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
16140 identify the type of elements.
16142 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
16144 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
16145 * cil-coff.h: split MonoMSDOSHeader and add size info.
16146 * image.c: add some consistency checks.
16147 * metadata.c: fix row size computation: one programmer
16148 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
16149 add explanation for the locator routine.
16150 Fix decoding of size in method header.
16152 2001-08-20 Miguel de Icaza <miguel@ximian.com>
16154 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
16155 (g_concat_dir_and_file): Bring g_concat_dir_and_file
16156 function from gnome-libs. This uses the right path separator
16157 based on the OS, and also works around a bug in some systems where
16158 a double slash is not allowed.
16159 (default_assembly_name_resolver): Use g_concat_dir_and_file
16160 (mono_assembly_open): ditto.
16162 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
16164 * metadata.c (mono_metadata_signature_equal): impl.
16166 * *: void is now a realy MonoType (instead of using NULL)
16168 * metadata.c (do_mono_metadata_parse_type): use
16169 mono_metadata_parse_type to parse void value.
16171 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
16173 * metadata.c, metadata.h: in the signature and method header store
16174 only the space required for holding the loca vars and incoming arguments.
16176 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
16178 * metadata.c (do_mono_metadata_parse_type): treat void like any
16179 other type (instead of assigning NULL);
16181 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
16183 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
16185 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
16187 * image.c (do_mono_image_open): added a cache for arrays.
16189 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16191 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
16192 decode a single column from a row in a metadata table and changes
16193 to take advantage of it in the typedef locator (gives a nice speed up).
16194 Store offset info for function params.
16196 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
16198 * image.h (MONO_IMAGE_IS_CORLIB): removed
16200 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
16202 * assembly.c: how could mono_assembly_close () had ever worked?
16203 * metadata.c, metadata.h: provide offset info for local vars.
16204 Implement mono_type_size () to take care of alignment as well
16205 as size (it was mono_field_type_size in cli/class.c before).
16207 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
16209 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
16211 * assembly.h (CORLIB_NAME): set to corlib.dll
16213 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
16215 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
16217 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
16218 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
16219 tokentype.h: massive namespace cleanup.
16221 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
16223 * metadata.h, metadata.c: decode exception clauses when parsing method header.
16225 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
16227 * metadata.c (mono_metadata_free_type): added check for type !=
16228 NULL (void) before calling mono_metadata_free_type()
16230 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
16232 * metadata.h, row_indexes.h: added header with enumerations to use
16233 to index in the columns from tables in metadata and to decode coded
16234 tokens: we should start using this instead of embedding magic numbers
16237 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
16239 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
16240 Move metadata_t info from cli_image_info_t to MonoImage, where
16241 it's easily accessible. Changed all the uses accordingly.
16242 Added the method and class caches to MonoImage.
16243 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
16244 and mono_metadata_decode_value () signature to be more consistent
16245 with the other parse functions (and simplify code). Taken advantage
16246 of zero-length array allocation with GCC. Removed reduntant (and
16247 wrong) MonoFieldType struct and use MonoParam instead. Changed
16248 mono_metadata_parse_field_type () to use common code for parsing.
16249 Added mono_metadata_typedef_from_field () and
16250 mono_metadata_typedef_from_method () to lookup a typedef index from a
16251 field or method token.
16252 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
16254 2001-07-23 Miguel de Icaza <miguel@ximian.com>
16256 * metadata.c (mono_metadata_parse_field_type): Implement.
16257 (do_mono_metadata_parse_type): Split engine from
16258 mono_metadata_parse_type, so that we can create smaller structures
16259 for things that just have one pointer to the MonoType (look at
16262 2001-07-20 Miguel de Icaza <miguel@ximian.com>
16264 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
16265 as Jan Gray found out, it is incorrect.
16267 2001-07-18 Miguel de Icaza <miguel@ximian.com>
16269 * assembly.c: Implement asssembly loading. This loads an image
16270 and loads all the referenced assemblies. Come to think of it, we
16271 could always do lazy loading of the assemblies.
16273 * image.c (mono_image_open): Keep loaded images in a hashtable.
16275 * image.h (MonoImage): Add reference count.
16277 2001-07-17 Miguel de Icaza <miguel@ximian.com>
16279 * assembly.c (mono_assembly_open): Keep track of the file name in
16280 case the assembly has no ASSEMBLY table.
16282 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
16285 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
16287 * metadata.c, metadata.h: decode local vars in method header
16288 parse function. Change callers accordingly.
16290 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
16292 * metadata.h, cil-coff.h: protect against multiple inclusion.
16293 Added some new structures to hold information decoded from metadata:
16294 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
16295 and relevant decoding/free functions.
16296 * metadata.c: implement decoding functions. Add warning for out of bounds
16297 index in mono_metadata_locate(). Implement mono_get_method () to retreive
16298 all the info about a method signature and invocation. Remove check on
16299 uninitialized local var in parse_mh() and fix memory leak.
16301 2001-07-12 Miguel de Icaza <miguel@ximian.com>
16303 * metadata.h: More macros.
16305 * tokentype.h: New file.
16307 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
16309 * assembly.c: added a consistency check and initialize
16310 some structures with g_new0().
16311 * metadata.c: fixed a couple more bugs in table size computation
16312 and add other checks for out-of bound access to metadata.
16314 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
16316 * metatada.c: fix bugs computing table sizes. Spew a
16317 warning when index in string heap is out of bounds.
16319 2001-07-04 Miguel de Icaza <miguel@ximian.com>
16321 * metadata.h: Add a couple of macros to manipulate tokens.
16323 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
16325 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
16326 cli_section_tables).
16328 2001-07-01 Miguel de Icaza <miguel@ximian.com>
16330 * metadata.c (mono_metadata_user_string): New function, provides
16331 access to the UserString heap.
16333 2001-06-27 Miguel de Icaza <miguel@ximian.com>
16335 * metadata.c: Add inline documentation.
16337 2001-06-26 Miguel de Icaza <miguel@ximian.com>
16339 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
16342 2001-06-22 Miguel de Icaza <miguel@ximian.com>
16344 * typeattr.h: New file, TypeAttribute flags.
16346 2001-06-21 Miguel de Icaza <miguel@ximian.com>
16348 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
16349 mono_assembly_ensure_section): Section loading code.
16350 (load_section_tables): Load the sections.
16352 * mono/metadata/metadata.c (mono_metadata_locate_token,
16353 mono_metadata_locate): Functions to locate the information
16354 definition given a token or a table and an index.
16355 (mono_metadata_compute_table_bases): New.
16356 (compute_size): New function to compute the sizes of the various
16359 * mono/metadata/metadata.h: Finish listing the different index
16362 * mono/metadata/pedump.c: Improve to dump new information.
16364 2001-06-19 Miguel de Icaza <miguel@ximian.com>
16366 * mono/metadata/metadata.c: Entered all the tables matching
16369 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2