2 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
4 * icall.c: use the defining class vtable when accessing a
5 static field, not a pobblibly derived class.
7 2006-09-17 Zoltan Varga <vargaz@gmail.com>
9 * icall.c string-icalls.c: Remove references to unicode.h.
11 * unicode.h unicode.c Makefile.am: Remove these unused source files.
13 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
15 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
16 indicating the image where custom marshaller types should be looked up.
17 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
18 custom marshallers, instead of corlib. Fixes #79425.
20 2006-09-14 Zoltan Varga <vargaz@gmail.com>
22 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
24 2006-09-14 Jonathan Chambers <joncham@gmail.com>
26 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
27 Implement Environment.ProcessorCount.
29 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
30 Implement Environment.ProcessorCount.
33 Add Environment.ProcessorCount icall.
35 Patch by Jason McFall.
37 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
39 * assembly.c: don't append .exe/.dll when the filename already contains
40 one of those extensions.
42 2006-09-12 Martin Baulig <martin@ximian.com>
44 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
47 2006-09-11 Martin Baulig <martin@ximian.com>
49 * reflection.c (mono_image_build_metadata): Create the
50 MethodImpl's after emitting all types and methods, so we don't
51 need another fixup pass for them.
53 2006-09-11 Zoltan Varga <vargaz@gmail.com>
55 * class.c (mono_class_from_name_case): Fix regression introduced by the last
58 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
60 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
63 2006-09-10 Zoltan Varga <vargaz@gmail.com>
65 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
66 args is not set. Fixes #78926.
68 2006-09-08 Zoltan Varga <vargaz@gmail.com>
70 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
72 * image.c (load_class_names): Move this to class.c, and rename it to
73 'mono_image_init_name_cache'.
74 (load_modules): Fix a warning.
76 * class.c icall.c image.c: Initialize image->name_cache lazily.
78 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
79 on its name using information in the AOT file.
81 * class.c (mono_class_from_name): Use the new hook function.
83 2006-09-06 Zoltan Varga <vargaz@gmail.com>
85 * reflection.c (mono_param_get_objects): Handle enum default parameter values
88 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
91 2006-09-06 Martin Baulig <martin@ximian.com>
93 * icall.c (mono_lookup_internal_call): Small fix.
95 2006-09-05 Raja R Harinath <rharinath@novell.com>
97 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
100 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
102 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
103 when --debug is specified.
105 2006-09-04 Zoltan Varga <vargaz@gmail.com>
107 * class.c (setup_generic_array_ifaces): Fix a warning.
109 2006-09-04 Miguel de Icaza <miguel@novell.com>
111 * Temporarily remove the patch to assemly.c that checks the
112 assembly versions as it breaks our gacutil.
114 2006-09-03 Zoltan Varga <vargaz@gmail.com>
116 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
118 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
121 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
122 created using the default ctor. Fixes #79152.
123 (mono_string_builder_to_utf16): Ditto.
125 2006-09-01 Martin Baulig <martin@ximian.com>
127 Fix handling of the generic array interfaces.
130 (MonoDefaults): Removed `generic_array_class' and added
131 `generic_ilist' class.
134 (mono_bounded_array_class_get): Add the new generic array interfaces.
135 (setup_generic_array_ifaces): New static method; create vtable
136 entries for each method in the generic array interfaces.
139 (select_container): Allow "parent-less" generic methods.
142 (mono_marshal_get_generic_array_helper): New public method.
145 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
146 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
147 moved the interncall into System.Array.
149 2006-09-01 Raja R Harinath <rharinath@novell.com>
151 A few more cases of avoiding work on types with ->byref set.
152 Has the real fix for #79238
153 * icall.c (is_generic_parameter): New helper.
154 (ves_icall_Type_GetGenericParameterPosition): Use it.
155 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
156 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
157 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
158 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
160 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
162 (ves_icall_Type_get_IsGenericInstance): Likewise.
163 (ves_icall_Type_get_IsGenericType): Likewise.
165 2006-09-01 Zoltan Varga <vargaz@gmail.com>
167 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
170 * mempool.h (mono_mempool_get_allocated): New helper function.
172 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
175 * mempool.c: Fix warnings and the calculation of stats.
177 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
179 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
181 * loader.c (mono_get_method_from_token): Update method_count stat.
183 * class-internals.h (MonoStats): Add some stats.
185 2006-08-31 Robert Jordan <robertj@gmx.net>
187 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
188 with managed variants.
189 All code is contributed under the MIT/X11 license.
191 2006-08-31 Zoltan Varga <vargaz@gmail.com>
193 * reflection.c (reflection_methodbuilder_to_mono_method): Set
194 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
196 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
198 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
199 with cycles in classes.
201 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
203 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
204 missing a [MarshalAs] directive. Fixes #79203.
206 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
207 klass->marshal_info. Fixes #79217.
209 2006-08-30 Martin Baulig <martin@ximian.com>
211 Committing a patch from Joachim Ante <joe@otee.dk>:
212 Add support for binary data symbol stores.
214 * debug-mono-symfile.c
215 (mono_debug_open_mono_symbol_file): Renamed into
216 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
220 (mono_debug_open_image): Added `raw_contents' and `size' args.
221 (mono_debug_init_2_memory): New public function.
223 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
225 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
227 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
229 * appdomain.c: implement support for ShadowCopyFiles.
231 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
233 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
234 when value is NULL (and should remove CID #51).
236 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
238 * image.c: moved 2 functions to ../utils.
240 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
242 * gc.c: cope with the target object of a GC handle being NULL
245 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
247 * class.c: recursively check parent's explicit implementations
248 of interface methods (fixes bug #79125).
250 2006-08-19 Miguel de Icaza <miguel@novell.com>
252 * filewatcher.c: Avoid warnings when building, do not redefine
253 constants that are defined.
257 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
259 * image.c: don't fail when the link points to an absolute path.
261 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
263 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
266 2006-08-17 Miguel de Icaza <miguel@novell.com>
268 * image.c (full_path): A new method used to obtain the actual path
269 of an assembly even in the presence of symbolic links.
271 This is necessary for the case where we are running a binary that
272 has been GACed, but we are using the "published" path name
273 ($prefix/mono/1.0/blah.exe) which happens to point to the real
276 This was the source of the failure for the `xsp' command with the
277 recent AppDomain changes, as far as the runtime was concerned,
278 there were two different assemblies: $prefix/mono/1.0/blah.exe and
279 $prefix/mono/gac/blah/version/blah.exe.
281 (do_mono_image_open): use full path
283 2006-08-17 Zoltan Varga <vargaz@gmail.com>
285 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
287 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
289 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
290 domain_id is supplied. Fix CID #241 and corlib's unit tests.
292 2006-08-17 Zoltan Varga <vargaz@gmail.com>
294 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
295 small structures. Fixes #78990.
297 2006-08-17 Zoltan Varga <vargaz@gmail.com>
299 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
301 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
303 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
306 * marshal.c: don't load all the assemblies from a domain into newly
307 created ones. The new domains might have different rules and load
308 assemblies from different locations. Fixes bug #76757.
310 Patch by Lluis. Conflicts resolved by Brian Crowell.
312 2006-08-16 Alp Toker <alp@atoker.com>
314 * socket-io.c: First half of the fix for #79084.
315 Set sa_size to the length of the content, not that of the struct.
316 Don't add NULL suffix to the content, this should be done in
317 managed code if needed.
319 2006-08-14 Raja R Harinath <rharinath@novell.com>
322 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
323 mono_metadata_parse_type returns NULL.
325 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
327 * normalization-tables.h : new file for string normalization data.
328 * locales.c, locales.h, icall.c :
329 added load_normalization_resource() for string normalization,
331 * Makefile.am : added normalization-tables.h to the sources.
333 2006-08-13 Zoltan Varga <vargaz@gmail.com>
335 * marshal.c: Add more helper functions to reduce code duplication and use them
338 2006-08-12 Zoltan Varga <vargaz@gmail.com>
340 * marshal.c: Fix non-x86 stdcall warnings.
342 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
345 2006-08-11 Jonathan Chambers <joncham@gmail.com>
347 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
348 type check on multi-dimensional arrays. Fixes #79000.
350 2006-08-10 Jonathan Chambers <joncham@gmail.com>
352 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
353 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
354 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
355 * class-internals.h: add is_com_object to class structure.
356 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
357 null checks to COM object marshalling. Fix .ctor call on RCW.
358 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
360 All code is contributed under the MIT/X11 license.
362 2006-08-09 Dick Porter <dick@ximian.com>
364 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
365 racing mono_monitor_allocator_lock() somewhere, so don't delete
366 the critical section for now. Found by running and exiting
369 2006-08-10 Zoltan Varga <vargaz@gmail.com>
371 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
372 (ves_icall_System_ComObject_FindInterface): Ditto.
373 (ves_icall_System_ComObject_CacheInterface): Ditto.
375 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
376 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
378 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
380 * threadpool.c: treat pipes from process asynchronous reads as sockets
381 when reading from them, so we get select/poll or epoll to wait for
384 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
386 * loader.c: Fix a typo (CID #233) in the null check.
388 2006-08-07 Zoltan Varga <vargaz@gmail.com>
390 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
391 Hopefully fixes #78949.
393 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
394 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
397 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
399 * filewatcher.c: we need to set errno here.
401 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
403 * filewatcher.c: let Win32Exception get the error value.
405 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
407 * filewatcher.c: translate errno into win32 errors for Win32Exception
408 to know what happened.
410 2006-08-01 Zoltan Varga <vargaz@gmail.com>
412 * threadpool.c: Fix more warnings.
414 * assembly.c (search_loaded): Fix warnings.
416 * threadpool.c (mono_thread_pool_finish): Fix warnings.
417 (mono_async_invoke): Ditto.
419 2006-07-28 Jonathan Chambers <joncham@gmail.com>
421 * object.c (mono_remote_class_vtable): Need to create proxy vtable
422 entries for __ComObject type in addition to ComImport types.
423 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
426 All code is contributed under the MIT/X11 license.
428 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
430 * image.c: avoid tentative loading of modulerefs that contain
431 no metadata (P/Invoke library names).
433 2006-07-28 Dick Porter <dick@ximian.com>
435 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
436 mono_loader_lock() somewhere, so don't delete the critical section
437 for now. Found by running and exiting monodevelop.
439 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
441 * filewatcher.c: define the inotify syscalls when we're building on
442 linux and have sys/syscall.h. The build system might not have support
443 for inotify but the target system might have it.
445 2006-07-26 Miguel de Icaza <miguel@novell.com>
447 * domain.c: Documentation updates.
449 * loader.c (mono_free_method): Do not release the method
450 information if we are being profiled, as profilers will use this
451 information at shut down to present some data to the user.
453 This is needed so that the profiler does not crash, as the
454 profiler tends to keep MonoMethods around, and they might become
455 invalid if we free these.
457 (mono_get_method_constrained): Return the original CIL stream
458 method as well, so verification can be performed against it.
460 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
462 * filewatcher.[ch]: support for inotify file system watcher.
463 * icall.c: add new internal calls for the inotify file system watcher.
465 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
467 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
470 2006-07-20 Dick Porter <dick@ximian.com>
472 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
475 2006-07-20 Dick Porter <dick@ximian.com>
477 * threads.c (start_wrapper): Do the thread cleanup while we still
478 hold a reference to its object. Fixes bug 78123.
480 2006-07-18 Kornél Pál <kornelpal@gmail.com>
482 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
483 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
484 "managed-to-managed".
485 * icall.c: Redirect string constructors that take sbyte* to
486 ves_icall_System_String_ctor_RedirectToCreateString.
487 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
488 to CreateString () methods with matching signature.
489 * reflection.c: Use original security informations for
490 MONO_WRAPPER_MANAGED_TO_MANAGED.
491 * security-manager.c: Use original security informations for
492 MONO_WRAPPER_MANAGED_TO_MANAGED.
493 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
494 that is a placeholder and only its address should be used.
495 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
496 that is a placeholder and only its address should be used.
498 2006-07-15 Jonathan Chambers <joncham@gmail.com>
500 Begin implementing COM Interop.
501 * appdomain.c: Increment corlib version.
502 * class.c: Set ComImport classes' parent to __ComObject.
503 * loader.c: Mark cominterop methods as such.
504 * domain.c: Add __ComObject class to MonoDefaults structure.
505 * image.c: Add 2 hashtables to the image for COM Interop related methods
506 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
507 using the mempool allocator
509 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
510 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
511 declaration for mono_metadata_type_dup_mp.
513 * debug-helpers.c: Added strings for two additional wrapper types
514 * object.c: Create proxy objects for ComImport classes
515 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
516 and added __ComObject class to MonoDefaults structure.
518 * object-internals.h: Finish MonoRealProxy definition, and add definition of
519 MonoComInteropProxy and MonoComObject.
521 * marshal.c: Added support for COM Interop
522 (signature_cominterop): Converts managed signature to corresponding
523 unmanaged COM signature.
524 (cominterop_get_function_pointer): gets unmanaged function pointer via
526 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
527 (cominterop_get_method_interface): returns interface type that method is defined on
528 (mono_mb_emit_cominterop_call): emits native call to function pointer
530 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
531 that matches signature of unmanaged function.
532 (cominterop_get_native_wrapper): wrapper around adjusted method call.
533 (cominterop_get_invoke): forwards call from proxy to __ComObject
534 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
535 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
536 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
538 * marshal.h: Added Marshal icall declarations.
539 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
540 so we can access them in finalizer
542 2006-07-14 Dick Porter <dick@ximian.com>
544 * object.c (mono_type_initialization_cleanup): Fix a race
545 condition by temporarily commenting out the critical section
548 2006-07-14 Zoltan Varga <vargaz@gmail.com>
550 * reflection.c (create_custom_attr): Fix some warnings.
551 (create_custom_attr_data): Ditto.
552 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
555 2006-07-11 Zoltan Varga <vargaz@gmail.com>
557 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
559 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
561 2006-07-08 Zoltan Varga <vargaz@gmail.com>
563 * reflection.c (resolve_object): Add support for DynamicMethod.
565 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
566 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
568 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
570 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
571 don't leak GPtrArray's pdata has we have no use (nor free) for it.
573 2006-07-01 Zoltan Varga <vargaz@gmail.com>
575 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
578 2006-06-30 Raja R Harinath <rharinath@novell.com>
580 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
581 slightly: remove a shadow local variable.
583 2006-06-29 Raja R Harinath <rharinath@novell.com>
585 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
586 definition that introduces the virtual function slot.
587 Also fix Coverity #105.
589 2006-06-29 Zoltan Varga <vargaz@gmail.com>
591 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
592 for dynamic assemblies. Fixes #78724.
594 2006-06-28 Zoltan Varga <vargaz@gmail.com>
596 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
599 2006-06-21 Martin Baulig <martin@ximian.com>
602 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
605 2006-06-21 Zoltan Varga <vargaz@gmail.com>
607 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
609 2006-06-20 Raja R Harinath <rharinath@novell.com>
611 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
613 * class.c (mono_class_create_from_typespec): Add 'context' argument.
614 Inflate result if necessary.
615 (mono_class_get_full): Remove old version. Rename from
616 'mono_class_get' and add 'context' argument. Pass it to
617 ..._create_from_typespec.
618 (mono_class_get): New. Simple wrapper to mono_class_get_full.
619 (mono_ldtoken): Revert change below.
621 2006-06-20 Martin Baulig <martin@ximian.com>
623 * class.c (mono_ldtoken): Don't pass the generic context to
624 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
626 2006-06-15 Zoltan Varga <vargaz@gmail.com>
628 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
629 and later freeing it. Fixes #78638.
631 2006-06-15 Miguel de Icaza <miguel@novell.com>
633 * icall.c (mono_class_get_throw): Revert over-zealous error
634 throwing, the caller for mono_class_get_throw will cope with
635 errors when classes are not properly initialized already.
637 The code still copes with loader exceptions though.
639 Fixes the regression in reftype1 and reftype3 from the CAS tests.
641 2006-06-14 Miguel de Icaza <miguel@novell.com>
643 Fixes the `make run1' version of RuntimeAbort (to be commited,
644 source is in Bugzilla).
646 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
647 FALSE on class loading failure instead of returning true.
649 * class.c (mono_class_create_from_typedef): It is possible for
650 mono_metadata_interfaces_from_typedef_full to fail if a class is
651 not found, cope with this.
654 2006-06-14 Dick Porter <dick@ximian.com>
657 * process.c: Fix a bunch of signed/unsigned warnings from gcc
660 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
662 * culture-info-table.h : oops, forgot to make it nsync with r61548.
664 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
666 * icall.c: Another fix for building mono in Visual Studio.
668 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
670 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
672 2006-06-09 Martin Baulig <martin@ximian.com>
674 * debug-mono-symfile.c: Put this back and really fix it this
675 time. Sorry for all the trouble.
677 2006-06-08 Zoltan Varga <vargaz@gmail.com>
679 * icall.c (mono_class_get_throw): Fix a warning.
680 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
681 ReflectionTypeLoadException if needed. Fixes #78606.
683 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
684 (mono_class_init): Ditto.
686 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
688 (mono_loader_clear_error): Make this work even if there is no error.
690 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
692 * object-internals.h marshal.c marshal.h icall.c: Implement method
693 Marshal.GetComSlotForMethodInfo using internal call.
695 2006-06-07 Zoltan Varga <vargaz@gmail.com>
697 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
698 a function for signalling it.
700 * class.c (mono_class_from_typeref): Use the new kind of loader error when
701 a referenced assembly is not found.
703 * loader.c (mono_loader_error_prepare_exception): Add support for
704 LOADER_ERROR_ASSEMBLY. Fix formatting.
706 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
708 * domain.c appdomain.c class-internals.h marshal.c: Add support
709 for VARIANT marshalling on windows and increment corlib version
710 since Variant struct was added.
712 2006-06-03 Miguel de Icaza <miguel@novell.com>
714 * debug-mono-symfile.c: Revert Martin's previous patch which broke
715 stack trace line information:
717 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
718 (Martin) when looking up B which is between A and C, return A not C.
722 Thanks to Alexander Olk for tracking this down.
724 2006-06-02 Zoltan Varga <vargaz@gmail.com>
726 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
728 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
729 avoid clobbering its value.
730 (mono_string_to_lpstr): Fix a warning on windows.
732 2006-05-31 Zoltan Varga <vargaz@gmail.com>
734 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
736 * reflection.c loader.c: Removed references to 'dummy' flag.
738 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
740 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
743 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
746 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
748 * marshal.c threadpool.c: Update callers of mono_async_result_new.
750 * appdomain.c: Bump corlib version.
752 2006-05-30 Zoltan Varga <vargaz@gmail.com>
754 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
755 CEE_STIND_REF when working with object references.
757 2006-05-31 Zoltan Varga <vargaz@gmail.com>
759 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
762 2006-05-30 Miguel de Icaza <miguel@novell.com>
764 * loader.c (method_from_memberref): Fix argument value for
765 mono_loader_set_error_method_load (I was passing the MonoClass
766 instead of the class name char *).
768 2006-05-30 Zoltan Varga <vargaz@gmail.com>
770 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
771 CEE_STIND_REF when working with object references.
773 2006-05-30 Martin Baulig <martin@ximian.com>
775 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
776 mono_method_full_name() change and replace the ':' with a '.'
779 2006-05-30 Martin Baulig <martin@ximian.com>
781 * debug-mono-symfile.c
782 (mono_debug_symfile_lookup_location): Fix the algorithm:
783 when looking up B which is between A and C, return A not C.
785 2006-05-29 Martin Baulig <martin@ximian.com>
788 (MonoDebugMethodInfo): Make the typedef public.
789 (MonoDebugSourceLocation): New public struct.
792 (mono_debug_source_location_from_address): Removed.
793 (mono_debug_source_location_from_il_offset): Removed.
794 (mono_debug_il_offset_from_address): Removed.
795 (mono_debug_address_from_il_offset): Removed.
796 (mono_debug_lookup_method): New public function.
797 (mono_debug_lookup_source_location): New public function; replaces
798 the old mono_debug_source_location_from_*() functions; see the
799 inline documentation.
800 (mono_debug_free_source_location): New public function.
801 (mono_debug_print_stack_frame): New public function; see the
802 inline documentation.
804 * debug-mono-symfile.c
805 (mono_debug_find_source_location): Renamed into
806 mono_debug_symfile_lookup_location(); only take a
807 `MonoDebugMethodInfo *' and an `offset' argument; added inline
809 (mono_debug_find_method): Renamed into
810 mono_debug_symfile_lookup_method().
812 2006-05-27 Zoltan Varga <vargaz@gmail.com>
814 * assembly.c (mono_assembly_open_full): Dont overwrite the status
815 returned by mono_image_open_full ().
817 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
818 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
821 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
824 2006-05-27 Miguel de Icaza <miguel@novell.com>
826 * class.c (mono_class_from_typeref): handle missing images
827 earlier, deals with bug #78418. Refactor code;
829 Fix a warning introduced in my previous commit (some stale code
830 from before I revisited my patch).
832 * class.c (mono_class_create_from_typedef): On failure, remove the
833 class from the MonoImage->class_cache as the class is not
834 initialized; Fixes the leak pointed out by Paolo.
836 2006-05-25 Dick Porter <dick@ximian.com>
838 * threads.c (mono_thread_cleanup): Build fix. Comment out the
839 DeleteCriticalSections until I figure out which one may still be
840 sometimes locked when mono_thread_cleanup is called.
842 2006-05-24 Dick Porter <dick@ximian.com>
844 * threads.c (mono_thread_cleanup): Move the threading cleanup out
845 of mono_thread_manage and back into its own function, so it can be
846 called after the finalizer thread has finished.
848 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
850 2006-05-24 Zoltan Varga <vargaz@gmail.com>
852 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
855 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
856 with non-blittable elements.
857 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
859 2006-05-24 Martin Baulig <martin@ximian.com>
861 * mono-debug-debugger.h (MonoDebuggerEvent): Added
862 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
864 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
865 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
866 `mono_debugger_event_handler' to NULL.
868 2006-05-24 Martin Baulig <martin@ximian.com>
870 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
872 2006-05-24 Martin Baulig <martin@ximian.com>
874 * mono-debug-debugger.h
875 (mono_debugger_create_notification_function): Added
876 `MonoCodeManager *' argument.
878 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
880 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
882 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
884 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
885 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
888 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
890 * icall.c: precise GC support: objects can't be stored in unmanaged
891 memory anymore, even if they are kept alive by other references: since
892 they can move the GC needs to be able to always find them.
894 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
896 * object.c: precise GC support for static fields. Support
897 for moving GCs: write barriers and pinned allocation for interned
900 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
902 * domain.c, domain-internals.h: precise GC support for the MonoDomain
905 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
907 * class.c, gc.c: sgen and precise GC updates.
909 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
911 * marshal.h, marshal.c: added write barrier wrapper and precise type
914 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
916 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
919 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
921 * reflection.c: precise and sgen GC updates.
923 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
925 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
927 2006-05-22 Zoltan Varga <vargaz@gmail.com>
929 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
931 2006-05-20 Zoltan Varga <vargaz@gmail.com>
933 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
934 MONO_TYPE_OBJECT. Fixes #78462.
936 2006-05-18 Zoltan Varga <vargaz@gmail.com>
938 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
941 2006-05-17 Miguel de Icaza <miguel@novell.com>
943 * class.c (mono_class_get_exception_for_failure): Implement parts
944 of a TODO: if the loader error is set (instead of the class
945 error), we return a Loader exception that can be properly thrown
948 This was exposed by some Winforms 2.0 code that I tried to run
949 (Atsushi pointed me to it).
951 2006-05-17 Zoltan Varga <vargaz@gmail.com>
953 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
954 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
956 * marshal.c (emit_marshal_vtype): Add limited support for
957 UnmanagedType.LPStruct. Fixes #78427.
959 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
960 Applied a patch from kangaroo to fix #77523.
962 2006-05-17 Martin Baulig <martin@ximian.com>
965 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
966 (debugger_thread_created): Removed.
967 (debugger_thread_exited): Removed.
969 2006-05-15 Zoltan Varga <vargaz@gmail.com>
971 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
973 * object-internals.h (MonoReflectionResource): Sync with managed version.
975 2006-05-12 Wade Berrier <wberrier@novell.com>
977 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
979 2006-05-12 Zoltan Varga <vargaz@gmail.com>
981 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
982 functions try to allocate from the image mempool.
984 2006-05-12 Dick Porter <dick@ximian.com>
986 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
988 2006-05-12 Lluis Sanchez <lluis@ximian.com>
990 * object.c: The FieldGetter and FieldSetter methods require the full
991 name of the class, not only the name. Fixes bug #78277.
993 2006-05-11 Miguel de Icaza <miguel@novell.com>
995 * loader.c (method_from_memberref): Do not pass the NULL klass to
996 mono_loader_set_error_() methods. Pass the non-NULL value
999 2006-05-11 Zoltan Varga <vargaz@gmail.com>
1001 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1002 (mono_assembly_close): Null out assembly->image->references after freeing it.
1004 * image.c (mono_image_close): Free image->references.
1006 * reflection.c (mono_image_basic_init): Fix a small memory leak.
1008 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1010 * marshal.c: In function mono_mb_add_local don't use the mb pointer
1011 before checking if it's NULL (g_assert).
1013 2006-05-10 Martin Baulig <martin@ximian.com>
1015 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1016 I thought I already killed that two months ago, but now it somehow reappeared.
1018 2006-05-10 Martin Baulig <martin@ximian.com>
1020 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1022 2006-05-10 Zoltan Varga <vargaz@gmail.com>
1024 * reflection.c: Allocate memory for dynamically created methods in the image
1027 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1029 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
1030 don't use the ad pointer before checking if it's NULL (g_assert).
1032 2006-05-09 Zoltan Varga <vargaz@gmail.com>
1034 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1035 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1037 * marshal.c: Allocate all signatures from mempools.
1039 * marshal.c: Allocate some more signatures from mempools.
1041 2006-05-09 Miguel de Icaza <miguel@novell.com>
1043 * object.c (mono_load_remote_field): The code used to provide a
1044 temporary variable for returning results if the user did not
1045 provide a result pointer. But our temporary variable was allocted
1048 Fix calling code to always pass a result area. Coverity ID 103.
1050 2006-05-06 Zoltan Varga <vargaz@gmail.com>
1052 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1053 value, not the old. Fixes #78312.
1054 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1056 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1057 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
1060 * assembly.c (mono_assembly_close): Free image->references.
1062 * assembly.c (mono_assembly_names_equal): Fix a warning.
1063 (mono_assemblies_cleanup): Cleanup more global data.
1065 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1067 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1068 ptr_cache and image->modules.
1070 * image.c (mono_image_init): Allocate array_cache lazily.
1072 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1074 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1075 behavior was changed recently and has bad side effects.
1077 2006-05-05 Zoltan Varga <vargaz@gmail.com>
1079 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1081 * assembly.c (mono_assembly_close): Remove a debug printf.
1083 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1085 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1086 to also allow for temporary references between mono_image_open ()/close ().
1088 * domain.c (get_runtimes_from_exe): Add a FIXME.
1090 2006-05-04 Zoltan Varga <vargaz@gmail.com>
1092 * marshal.c: Fix support for dynamic methods.
1094 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1096 * marshal.c (mono_marshal_cleanup): New cleanup function.
1098 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
1101 * class.c (mono_class_init): Fix leaking class->nested_classes.
1103 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1105 * image.c (mono_image_init): Initialize the new cashes.
1107 * image.c (mono_image_close): Destroy the new cashes.
1109 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1111 * mempool.c (mono_mempool_strdup): New helper function.
1113 * class-internals.h: Add prototype for mono_loader_unlock ().
1115 * domain.c (mono_jit_info_table_find): Fix a warning.
1116 (mono_debugger_check_runtime_version): Ditto.
1118 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
1119 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1120 functions to these modules.
1122 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1125 * marshal.c (mono_free_bstr): Fix a warning.
1127 * assembly.c (mono_assembly_open_full): Fix another small leak.
1129 * object.c: Fix some unload leaks in the remoting code.
1131 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1134 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1136 * reflection.c: Fix some unload leaks in dynamic assemblies.
1138 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
1140 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1141 * marshal.h: Add BSTR support on Win32
1142 * icall.c: Add BSTR icalls
1143 * metadata.h: Add BSTR enums
1145 2006-04-28 Miguel de Icaza <miguel@novell.com>
1147 Work to catch the crash from #76795 and turn it into an
1148 exception. As I stubbed out pieces of the VisualBasic support,
1149 I found a number of places where the code was failing and I added
1150 checks to those places.
1152 * metadata.c (do_mono_metadata_parse_generic_class): Make this
1153 function return a status code. If we fail to parse the signature
1154 from mono_metadata_parse_generic_inst, return FALSE.
1156 * loader.c (mono_get_method_from_token): If we fail to load the
1157 method (mono_class_get) return NULL.
1159 * (method_from_memberref): Return NULL if we are unable to parse
1160 the method signature
1162 (mono_loader_error_prepare_exception): Since we now use the
1163 loader_error flag internally to stop processing, and obtaining
1164 exceptions that might be thrown will walk this code path the
1165 proper way of going from a MonoLoaderError into a
1166 MonoException was convoluted. This new routine encapsulates the
1167 process of turning the error into an exception and *clearing* the
1170 2006-04-27 Miguel de Icaza <miguel@novell.com>
1172 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1173 with missing assemblies), and to cope with:
1175 * Missing fieldref from a non-existing assembly.
1176 * Missing methodref from a non-existing assembly.
1178 The first batch of work to address *some* of the issues from 76661.
1180 * object.c (mono_class_create_runtime_vtable): If we fail to
1181 initialize the class raise the exception here.
1183 * metadata.c (mono_class_get_overrides_full): If any methods fail
1184 to load return the failure to the caller.
1186 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1187 flagging assemblies that failed to load.
1189 Do not crash if we are unable to load the assembly.
1191 (mono_assembly_close): Do nothing with REFERENCE_MISSING
1194 * loader.c (mono_loader_set_error_type_load): Change the
1195 convention to always pass unallocated strings, so we make our own
1196 copies (I know our own code had duplicated strings before, but
1197 this keeps the normal conventions).
1198 (method_from_memberref): Call mono_loader_set_error_method_load
1199 for all possible failures of loading the class.
1200 Remove assert, turn into a loader error.
1202 (mono_loader_error_to_exception): Move this routine from mini
1203 (mini_loader_error_to_exception) there was no need to have that in
1206 * class.c (mono_class_from_typeref): If we were not able to load
1207 the assembly with mono_assembly_load_reference, call the
1208 mono_loader_set_error_type_load to register the problem.
1210 (mono_class_setup_fields): If we fail to load the type from
1211 mono_metadata_parse_type_full, call mono_class_set_failure and
1212 break from the loop.
1214 If class->exception_type is set, we do not layout the fields as
1215 that might crash the runtime, and instead return (from breaking
1216 from the previous loop).
1218 (mono_class_setup_vtable): This now returns a boolean indicating
1219 whether the table was properly setup. The decision is driven by
1220 mono_class_get_overrides_full which might run into non-existing
1223 (mono_class_init): Returns TRUE on success or FALSE if there was a
1224 problem in loading the type (incorrect assemblies, missing
1225 assemblies, methods, etc).
1227 When we call mono_class_setup_fields we also check for a potential
1228 error inside this call (either a class exception or a general
1231 (mono_class_create_from_typedef): If the parent fails to load
1232 (calling mono_class_get_full) return NULL.
1236 calls to mono_metadata_parse_type_full should be checked
1237 everywhere and set the mono_class_set_failure
1238 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1240 The current patch checks the places where my manually constructed
1241 tests show the errors are showing up, but we should do it
1246 mono_class_init return values should be tested everywhere, like
1247 the previous case this is something that we should audit
1248 everywhere and not only on the cases exposed by the tests I
1251 2006-04-26 Miguel de Icaza <miguel@novell.com>
1253 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1254 boolean parameter and instead pass the information on `options'
1255 parameter (FileOptions).
1257 * icall.c: Register the new signature for MonoIO.Open.
1259 * debug-helpers.c (dis_one): Trying to understand how coverity
1260 works. Fix Run 5, item 78.
1262 2006-04-26 Dick Porter <dick@ximian.com>
1264 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1267 2006-04-25 Martin Baulig <martin@ximian.com>
1269 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1271 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1272 debugger_thread_created().
1273 (debugger_gc_push_all_stacks): Don't handle the main thread in any
1275 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1276 (mono_debugger_finalize_threads): New function; undo the effects
1277 of mono_debugger_init_threads().
1278 (mono_debugger_create_all_threads): Removed.
1280 2006-04-24 Zoltan Varga <vargaz@gmail.com>
1282 * image.c (mono_image_close): Tidy up trace messages.
1284 * assembly.c (mono_assembly_close): Ditto.
1286 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1287 no longer references an already freed assembly. Fixes #78168.
1289 2006-04-21 Dick Porter <dick@ximian.com>
1291 * threads.c (mono_thread_detach): Fix reference counting when
1294 2006-04-21 Zoltan Varga <vargaz@gmail.com>
1296 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1299 2006-04-19 Zoltan Varga <vargaz@gmail.com>
1301 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1302 (mono_type_to_stind): Ditto.
1304 * marshal.c: Use the new helper functions to simplify code.
1306 * image.c (mono_image_close): Add some code for help debug assembly unloading
1309 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1312 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1313 assembly was already loaded in another appdomain. Fixes #78083.
1315 2006-04-13 Zoltan Varga <vargaz@gmail.com>
1317 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1318 referenced assemblies.
1319 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1321 * domain.c (mono_domain_free): Add a trace message.
1323 * appdomain.c (add_assemblies_to_domain): Ditto.
1325 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1328 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1330 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1332 2006-04-12 Martin Baulig <martin@ximian.com>
1334 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1335 `USE_INCLUDED_LIBGC'.
1337 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1339 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1340 the patch contains ../ and a small directory name later. Hopefully fixes
1343 2006-04-10 Martin Baulig <martin@ximian.com>
1345 Clean up the debugger's thread-handling code.
1347 The debugger's thread-handling code has been moved from
1348 ../mini/debug-debugger.c to threads.c. We now iterate directly
1349 over the `threads' hash, keep track of exiting threads and also
1352 We can now debug XSP and XSP based applications with the debugger.
1354 * object-internals.h (MonoThread): Added `gpointer end_stack'.
1357 (MonoThreadCallbacks): Removed; this was only used by the debugger.
1358 (mono_install_thread_callbacks): Likewise.
1360 * threads.c (mono_thread_callbacks): Removed.
1361 (debugger_thread_created, debugger_thread_exited): New static functions.
1362 (start_wrapper): Call debugger_thread_created().
1363 (thread_cleanup): Call debugger_thread_exited().
1364 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1365 (mono_debugger_init_threads): New public function.
1366 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1367 iterate directly over the `threads' hash and also use proper locking.
1369 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1371 * mono-debug-debugger.h
1372 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1374 2006-04-10 Zoltan Varga <vargaz@gmail.com>
1376 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
1377 argument type=array. Fixes #78057.
1379 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
1381 * culture-info-table.h : regenerated. Fixed bug #69652.
1383 2006-04-07 Zoltan Varga <vargaz@gmail.com>
1385 * loader.c metadata.c: Reapply a variant r59116.
1387 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1389 * class.c (mono_class_setup_interface_offsets): New internal function.
1391 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1392 interfaces too. Fixes #77398.
1394 * reflection.c (encode_cattr_value): Add support for
1395 parameter type=object, argument type=array.
1396 (load_cattr_value): Ditto. Fixes #77916.
1398 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1399 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1401 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1402 a byval char array and CharSet is Ansi.
1404 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1406 2006-04-06 Zoltan Varga <vargaz@gmail.com>
1408 * metadata.c: Add some locking comments.
1410 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1412 (mono_metadata_free_method_signature): Don't free the signature itself.
1414 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
1416 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1417 reference the same MonoImage.
1418 (mono_assembly_load_from_full): Add an assert.
1420 2006-04-05 Zoltan Varga <vargaz@gmail.com>
1422 * image.c (mono_image_close): Don't put the image we are about to free into the
1423 loaded_images_guid_hash.
1425 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1426 to reduce code duplication.
1428 * marshal.c: Register the native functions called by this module as icalls, to
1429 somewhat centralize the creation of MonoMethodSignature's.
1431 * loader.c (mono_method_signature): Add a cache for method signatures.
1433 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1434 the parameter attributes of a method.
1435 (mono_metadata_parse_method_signature_full): Refactored the computation of
1436 parameter attributes into a separate function. Also avoid one allocation in
1439 * assembly.c (mono_assembly_close): Ditto.
1441 * image.c (mono_image_close): Log trace messages with INFO level.
1443 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1445 * image.c reflection.c: Correct reference counting of image modules.
1447 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1448 of this function from the image mempool.
1450 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1451 to allow more cached types to be used.
1453 * mono-debug.c (mono_debug_add_method): Appled patch from
1454 David S. Miller <davem@sunset.davemloft.net>: Access
1455 minfo->lexical_blocks[] entry elements using read32().
1457 2006-04-04 Zoltan Varga <vargaz@gmail.com>
1459 * loader.c (mono_free_method): No longer free the method header for non-dynamic
1460 methods as it is allocated from the mempool.
1462 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1465 * metadata-internals.h: Add comments describing the reference counting scheme
1466 used for MonoImage and MonoAssembly.
1468 * image.c assembly.c reflection.c: Rework reference counting of images and
1469 assemblies so they are freed when the runtime is shut down. Free some
1470 additional memory structures when an image is unloaded.
1472 2006-04-03 Zoltan Varga <vargaz@gmail.com>
1474 * class.c loader.c reflection.c: Allocate more data structures in
1477 2006-03-31 Miguel de Icaza <miguel@novell.com>
1480 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1481 build on pre glib 2.4 systems.
1483 2006-03-31 Zoltan Varga <vargaz@gmail.com>
1485 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1487 * icall.c: Fix some warnings.
1489 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
1491 * culture-info-table.h : regenerated.
1493 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1495 * threads.c, object-internals.h, verify.c: changed the culture caching
1496 code to use a normal MonoArray for storage so the GC can keep track of
1497 them easily. Fixed bits of the cache logic, too and simplified the
1500 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1502 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1503 thread for non-Boehm GCs.
1505 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1507 * domain.c, object.c, domain-internals.h: reduce the amount of memory
1508 needed to keep track of the data for static fields.
1510 2006-03-29 Raja R Harinath <rharinath@novell.com>
1513 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1514 for interface classes. Use 'num_methods' instead.
1515 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
1516 before using '->vtable_size' field.
1518 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1520 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1521 doesn't contain managed pointers, so use a normal hashtable.
1523 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1525 * reflection.c, class-internals.h, domain.c: fixed handling of types
1526 used as values for objects in custom attributes (bug #77915):
1528 2006-03-24 Martin Baulig <martin@ximian.com>
1530 * class.c (mono_class_setup_fields): Added support for generic
1531 instances; fixes #77580.
1533 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1535 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1537 2006-03-24 Dick Porter <dick@ximian.com>
1539 * file-io.c (get_file_attributes): More stat macro breakage.
1542 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1544 * profiler.c: added the file=filename option in the default profiler
1545 to output the profile data to filename.
1547 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1549 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1552 2006-03-22 Martin Baulig <martin@ximian.com>
1554 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1555 allocated `MonoClassField *' in `fb->handle'.
1557 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1559 * class.c, image.c, metadata-internals.h: implemented new mechanism to
1560 allocate interface ID to save memory and allow better ID reuse on
1561 appdomain unload. setup_generic_vtable () removal from Martin.
1563 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1565 * object.h, appdomain.c, domain.c, exception.c, icall.c,
1566 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1567 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1568 write barriers for reference stores with managed objects accessed with
1569 C structures in the runtime and in embedding programs.
1571 2006-03-20 Raja R Harinath <rharinath@novell.com>
1573 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1574 'interface_id' and 'max_interface_id' fields of MonoClasses
1575 representing open generic types.
1577 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1579 * object.h, object.c, icall.c: added functions to deal with
1580 storing valuetypes that contain references in managed objects.
1581 * reflection.c, string-icalls.c, threads.c, marshal.c: small
1582 fixes and comments around uses of mono_array_addr ().
1584 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1586 * object.h, icall.c, monitor.c: object.GetHashCode ()
1587 implementation that supports the moving garbage collector.
1589 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1591 * icall.c, threads-types.h, threads.c: implemented finalizer for
1594 2006-03-15 Zoltan Varga <vargaz@gmail.com>
1596 * metadata.c (mono_type_size): Add a fixme.
1597 (mono_type_stack_size): Ditto.
1599 * object-internals.h (MonoReflectionAssemblyBuilder): Added
1600 'type_forwarders' field.
1602 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1603 attribute from net 2.0.
1605 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1608 * class.c (mono_class_setup_fields): Fix a warning.
1610 * class.c (mono_class_from_name): Add support for assemblyref entries
1611 in the EXPORTEDTYPE table.
1613 * reflection.c: Add support for handling type forwarders under net 2.0.
1615 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1617 2006-03-14 Zoltan Varga <vargaz@gmail.com>
1619 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1620 overwriting entries in ModuleBuild->types, also clean up the code
1621 a little. Fixes #77774.
1623 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1625 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1626 load friend assembly info when present.
1628 2006-03-14 Raja R Harinath <rharinath@novell.com>
1630 Fix crasher on gtest-158.cs.
1631 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1632 the return value if the MonoClass we want is yet in an
1634 * class.c (mono_class_create_from_typedef): Add an comment
1635 explaining an order dependency between mono_class_setup_parent and
1636 mono_class_setup_mono_type.
1638 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1640 * class.c: documentation updates and events bug fix.
1642 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1644 * class.c: some cleanup, locking fixes.
1646 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1648 * class.c: fix the generics code to setup nested
1649 type info to the instantiated type (bug #77770).
1651 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1653 * marshal.c: fixed a few type correctness issues.
1655 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1657 * loader.c: the Set/Get/Addrtess array methods should be public.
1659 2006-03-11 Zoltan Varga <vargaz@gmail.com>
1661 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1663 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1666 2006-03-10 Zoltan Varga <vargaz@gmail.com>
1668 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1670 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1672 * mempool.c (mono_mempool_alloc): Speed this up a bit.
1673 (mono_mempool_alloc0): Ditto.
1675 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1678 (create_object_from_sockaddr): it was allocating 4 extra bytes
1679 for the AF_UNIX data. Fixes bug #77747.
1681 2006-03-09 Zoltan Varga <vargaz@gmail.com>
1683 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1685 2006-03-09 Dick Porter <dick@ximian.com>
1687 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1688 Fixes bug 76966 again.
1690 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
1692 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1694 * appdomain.c: Bumped corlib version to 48 (due to r57532)
1696 2006-03-07 Martin Baulig <martin@ximian.com>
1699 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1701 2006-03-07 Martin Baulig <martin@ximian.com>
1704 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1705 regression introduced in r56970; see gtest-252.cs.
1707 * loader.c (mono_get_method_constrained): Correctly handle generic
1708 methods; see gtest-253.cs.
1710 2006-03-04 Zoltan Varga <vargaz@gmail.com>
1712 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1714 2006-03-04 Martin Baulig <martin@ximian.com>
1716 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1717 compute the parent type at runtime, just like we're already doing
1721 (mono_reflection_bind_generic_parameters): Don't compute the
1722 parent type anymore.
1724 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1726 2006-03-04 Martin Baulig <martin@ximian.com>
1728 * mono-debug-debugger.h
1729 (mono_debugger_create_notification_function): Allocate memory at
1730 runtime and return a pointer to it.
1732 2006-03-03 Zoltan Varga <vargaz@gmail.com>
1734 * assembly.c: Fix windows build.
1736 * assembly.c: Fix build.
1738 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
1740 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1742 2006-03-03 Dick Porter <dick@ximian.com>
1745 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1746 Check parameters before dereferencing them. Fixes Aaron's part of
1749 2006-03-03 Raja R Harinath <rharinath@novell.com>
1751 Fix performance regression.
1752 * loader.c (find_method_in_class): Add 'from_class' argument.
1753 Rename 'klass' argument to 'in_class'. The signature is compared
1754 against the method in 'in_class', and the corresponding method is
1755 returned from 'from_class'.
1756 (find_method): Walk both 'in_class' and 'from_class' in parallel.
1757 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1758 type definition and generic instantiation in parallel.
1759 (mono_get_method_constrained): Update to changes.
1761 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1763 * threads.c: make sure the domain is correct, too when doing
1764 mono_thread_attach ().
1766 2006-03-01 Zoltan Varga <vargaz@gmail.com>
1768 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1769 windows. Fixes #77683.
1771 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1773 * object.h, *: introduced specific way to set elements of an array
1774 of references to be used as write barrier. Still need to audit the
1775 uses of mono_array_addr.
1777 2006-03-01 Miguel de Icaza <miguel@novell.com>
1779 * object-internals.h: New field to cache the assmebly name, patch
1780 from Tambet Ingo (tambet@ximian.com)
1782 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1784 * decimal.h, class-internals.h, metadata-internals.h,
1785 file-io.h: mark a few function declarations as internal, to
1786 reduce the number of PLT entries.
1788 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1790 * file-io.c: fix typo in warning message.
1792 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1794 * loader.c: on unix, lookup the "*A" version of a function
1795 if charset is auto as a second option before failing.
1797 2006-02-28 Raja R Harinath <rharinath@novell.com>
1799 * class.h (mono_class_inflate_generic_method): Revert to two
1801 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1802 (mono_class_inflate_generic_method_full): Add.
1803 * class.c (mono_class_inflate_generic_method_full): Rename from
1804 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
1805 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
1806 * loader.c, reflection.c: Update to changes.
1808 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1810 * icall.c: const fixes and small improvements.
1812 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1814 * threadpool.c: for asynchronous connect(), enable the same workaround
1815 for BSD 6 as for the Mac. Fixes bug #77637.
1817 2006-02-24 Zoltan Varga <vargaz@gmail.com>
1819 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1820 formatted classes. Fixes #77524.
1822 2006-02-24 Raja R Harinath <rharinath@novell.com>
1824 * class.c (inflate_generic_type): Add a couple more
1825 micro-optimizations.
1826 (inflate_generic_context): Don't use the 'gmethod' from
1828 (mono_class_inflate_generic_method): If the method has generic
1829 parameters, but the passed-in context doesn't have a 'gmethod',
1830 create one. Use the possibly simplified generic instantiation
1831 from the declaring class instead of the one passed in.
1833 2006-02-24 Raja R Harinath <harinath@gmail.com>
1835 Make generic method signature and method header handling lazy.
1836 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1837 (inflate_generic_header): Likewise.
1838 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
1839 parameter to avoid inflating types.
1840 (mono_get_inflated_method): Empty out.
1841 * class.h (mono_class_inflate_generic_method): Update to changes.
1842 * loader.c (mono_get_method_from_token): Don't parse signature for
1843 generic methods, nor methods of generic classes.
1844 (mono_method_signature): Rename from 'mono_method_signature'.
1845 Inflate signature on demand.
1846 (mono_method_get_header): Inflate method header on demand.
1847 * reflection.c: Update to changes.
1849 2006-02-23 Raja R Harinath <rharinath@novell.com>
1851 * metadata.c (mono_metadata_inflate_generic_inst): If the
1852 instantiation is closed, don't bother expanding it in the new
1854 * class.c (inflate_generic_class): If the generic instantiation
1855 doesn't change after inflation, return the argument itself.
1856 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1858 (inflate_generic_context): If neither the generic class nor the
1859 generic method instantiations change, return the original context.
1860 * reflection.c (mono_method_get_object): Do
1861 'mono_get_inflated_method' before accessing the ->klass field.
1862 (inflate_mono_method): Don't create a MonoGenericMethod unless
1864 (inflate_method): Don't pass a constructed type as the declaring
1865 type of a methodbuilder.
1867 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1869 * object.c: fix memory overwrite.
1871 2006-02-22 Dick Porter <dick@ximian.com>
1873 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1874 it doesn't work any more.
1875 (mono_threads_request_thread_dump): Fix unused variable warnings.
1877 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1879 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1880 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1881 the public header file.
1883 2006-02-21 Zoltan Varga <vargaz@gmail.com>
1885 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1887 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1889 * class-internals.h, object.c: reduce the size of MonoVTable
1890 and store the interface_offsets array at negative offsets.
1892 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1894 * metadata.c: tweak table descriptors data structures to reduce
1895 size and runtime relocations.
1897 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1899 * marshal.c: fix some types and opcodes to be type-safe
1900 in marshaling wrappers.
1902 2006-02-21 Ankit Jain <jankit@novell.com>
1904 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1906 2006-02-21 Raja R Harinath <rharinath@novell.com>
1908 * metadata.c (get_constraints): Relax debugging checks for monodis.
1910 2006-02-21 Ankit Jain <jankit@novell.com>
1912 * metadata.c (mono_metadata_load_generic_params): Move the code
1913 checking for ambiguous generic params from here to mono/dis/get.c
1914 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1916 2006-02-21 Raja R Harinath <harinath@gmail.com>
1918 Fix assertion triggered when compiling nemerle.
1919 * class.c (mono_get_shared_generic_inst): Rename from
1920 get_shared_inst and make non-static.
1921 * loader.c (mono_get_shared_generic_method): New. Used to create
1922 the MonoGenericContext-equivalent of a MonoGenericContainer.
1923 (mono_get_method_from_token): Initialize the 'context' field of
1924 the created MonoGenericContainer.
1925 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1926 * metadata.c (get_constraints): Add sanity check.
1927 * class-internals.h: Add new internal methods.
1929 * reflection.c (verify_safe_for_managed_space): New sanity check.
1930 Currently checks that owner-less generic parameters aren't allowed
1932 (mono_type_get_object): Use it.
1933 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1934 that are now in mono_type_get_object.
1935 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1937 2006-02-19 Raja R Harinath <harinath@gmail.com>
1939 * metadata.c (mono_type_create_from_typespec): Rename from
1940 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
1941 argument and caching of types in the generic container.
1942 (unwrap_arrays, find_generic_param): Remove.
1943 * metadata-internals.h: Update.
1944 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1946 2006-02-18 Zoltan Varga <vargaz@gmail.com>
1948 * class.c (mono_class_get_exception_for_failure): Fix a warning.
1950 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1951 return values. Fixes #77581.
1953 * class.c (mono_fnptr_class_get): Switch name and name_space.
1955 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1956 classes and add support for [In, Out] attributes.
1957 (mono_marshal_free_asany): Ditto. Fixes #77524.
1959 2006-02-18 Raja R Harinath <harinath@gmail.com>
1961 * class.c (mono_class_from_generic_parameter): Make more robust to
1962 incomplete MonoGenericContainers from monodis.
1964 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1966 * class-internals.h: added some more exception types.
1967 * class.c, metadata.c: added a few checks to handle missing
1970 2006-02-17 Raja R Harinath <rharinath@novell.com>
1972 Use owner-less generic-params some more.
1973 * class.c (my_mono_class_from_generic_parameter): Remove.
1974 (mono_class_from_generic_parameter): Handle null image,
1975 param->name and param->owner.
1976 (mono_class_from_mono_type): Update.
1977 (mono_class_create_from_typespec): Remove 'container' parameter.
1978 If that parameter is non-null, the result is always inflated by
1979 'mono_class_get_full' anyway.
1980 (mono_class_get): Rename from _mono_class_get. Remove 'container'
1982 (mono_class_get_full): Update.
1984 * class.c (inflate_generic_type) [GENERICINST]: If the generic
1985 instance is not open, don't bother inflating.
1986 (mono_class_setup_fields): Hoist some loop-invariants. Don't
1987 parse metadata for inflated classes.
1988 (_mono_class_get): Change GenericContext* parameter to
1990 (mono_class_create_from_typespec): Likewise. Simplify, and
1991 implement trivially. All the cases are handled in
1992 mono_class_from_mono_type. Don't inflate returned class.
1993 (mono_class_get_full): Delegate GENERICINST optimization to
1994 inflate_generic_type.
1995 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1997 2006-02-16 Dick Porter <dick@ximian.com>
1999 * socket-io.c (create_object_from_sockaddr): Fix typo.
2000 (create_sockaddr_from_object): Check array lengths before
2001 potentially accessing items off the end.
2002 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2003 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2004 (ves_icall_System_Net_Sockets_Socket_Send_internal)
2005 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2006 length checks to avoid wraparound overflows.
2007 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2008 contents of the array of sockets
2009 (hostent_to_IPHostEntry2)
2010 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2011 Check return value of inet_ntop ().
2012 (addrinfo_to_IPHostEntry): Fix typo
2014 2006-02-16 Raja R Harinath <rharinath@novell.com>
2016 Type metadata parsing doesn't use generic-instantiation information.
2017 * metadata.c (mono_metadata_parse_array_full): Change
2018 MonoGenericContext* parameter to MonoGenericContainer*.
2019 (mono_metadata_parse_type_full): Likewise.
2020 (mono_type_create_from_typespec_full): Likewise.
2021 (mono_metadata_parse_mh_full): Likewise.
2022 (mono_metadata_parse_generic_inst): Likewise.
2023 (do_mono_metadata_parse_generic_class): Likewise.
2024 (do_mono_metadata_parse_type): Likewise.
2025 * metadata-internals.h: Update to changes.
2026 * class.c (mono_class_find_enum_basetype): Likewise.
2027 (mono_class_setup_fields): Likewise.
2028 (mono_class_create_from_typespec): Likewise.
2029 * loader.c (method_from_methodspec): Likewise.
2030 (mono_get_method_from_token): Likewise.
2031 (mono_method_get_header): Likewise.
2033 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2035 * marshal.c: handle additional GENERICINST case (patch from
2036 Thong Nguyen <tum@veridicus.com>).
2037 Fix a few cases where LDIND_I/STIND_I was used for references.
2039 2006-02-16 Raja R Harinath <rharinath@novell.com>
2041 * reflection.c (mono_reflection_get_token): Remove unused variable.
2043 2006-02-16 Martin Baulig <martin@ximian.com>
2045 * reflection.c (mono_reflection_get_token): Add support for fields
2046 in instantiated generic types.
2049 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2051 2006-02-15 Martin Baulig <martin@ximian.com>
2054 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2055 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2056 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2057 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2059 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2061 * class.c, metadata.c, metadata.h, object.c, icall.c,
2062 marshal.c: changed mono_type_get_underlying_type () to do
2063 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2064 Fixed handling of instantiated generic valuetypes (bug #75479).
2066 2006-02-15 Raja R Harinath <rharinath@novell.com>
2068 * metadata.c (mono_metadata_decode_signed_value): Simplify.
2069 Delegate to mono_metadata_decode_value, and work on the returned value.
2071 * icall.c (ves_icall_MonoType_GetGenericArguments):
2072 Add consistency check here too.
2074 2006-02-15 Ankit Jain <jankit@novell.com>
2076 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2079 2006-02-15 Ankit Jain <jankit@novell.com>
2081 * metadata.c (mono_metadata_decode_signed_value): New function to decode
2082 signed values, used only for representing lower bounds of arrays.
2083 (mono_metadata_parse_array_full): Use new
2084 mono_metadata_decode_signed_value to decode lower bounds.
2086 2006-02-14 Martin Baulig <martin@ximian.com>
2089 (mono_reflection_get_token): Support "MonoGenericMethod" and
2090 "MonoGenericCMethod" and allow generic instances / methods.
2092 2006-02-11 Zoltan Varga <vargaz@gmail.com>
2094 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2095 to obtain the terminal size using an ioctl.
2097 * object.c (mono_nullable_init): Revert this as nullable reference
2098 types are not valid.
2099 (mono_nullable_box): Ditto.
2101 2006-02-09 Dick Porter <dick@ximian.com>
2103 * threads.c (mono_thread_detach): Drop a reference to the thread
2106 2006-02-09 Zoltan Varga <vargaz@gmail.com>
2108 * object.c (mono_nullable_init): Handle nullable reference types.
2109 (mono_nullable_box): Ditto. Fixes #77446.
2111 2006-02-07 Martin Baulig <martin@ximian.com>
2113 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2115 2006-02-07 Ankit Jain <jankit@novell.com>
2117 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2118 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2119 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2120 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2121 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2122 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2124 2006-02-02 Zoltan Varga <vargaz@gmail.com>
2126 * class.c (mono_class_create_generic): Set type_token as well.
2128 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2131 2006-02-02 Martin Baulig <martin@ximian.com>
2133 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2134 has never been used so far.
2136 2006-02-02 Martin Baulig <martin@ximian.com>
2138 * mono-debug-debugger.h: Changed comment at the top of this file;
2139 the header is not installed, but it's safe to #include it from
2142 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2143 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2145 2006-02-02 Martin Baulig <martin@ximian.com>
2148 (MonoSymbolTable): Removed the `metadata_info' field.
2151 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2153 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2154 (mono_debugger_add_builtin_types): Removed.
2155 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2156 (mono_debugger_create_notification_function): We now operate on a
2157 pre-allocated area; take a `gpointer' and return `void'.
2159 * mono-debug-debugger.c
2160 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2161 (mono_debugger_add_builtin_types): Removed.
2163 2006-02-02 Martin Baulig <martin@ximian.com>
2165 * threads.c (mono_debugger_create_all_threads): New public method.
2167 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2169 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2170 breaks on several platforms.
2172 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
2174 * assembly.c: the VS.NET build doesn't supply default values for
2175 MONO_ASSEMBLIES and MONO_CFG_DIR.
2177 2006-02-01 Zoltan Varga <vargaz@gmail.com>
2179 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2182 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2184 * loader.c (method_from_memberref): Fix a warning.
2186 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2188 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2189 with explicit layout. Fixes #77433.
2191 2006-01-31 Zoltan Varga <vargaz@gmail.com>
2193 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
2194 max_interface_id is initialized before using it. Fixes #77398.
2195 (ves_icall_Type_GetInterfaces): Ditto.
2197 2006-01-30 Raja R Harinath <rharinath@novell.com>
2199 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2200 allocate memory for parameter attributes when parsing memberref
2202 * loader.c (mono_loader_set_error_method_load): Don't warn.
2203 (method_from_memberref): Ensure MissingMethodException gets thrown
2204 if method is not found. Make warning more informative.
2206 2006-01-29 Raja R Harinath <harinath@gmail.com>
2209 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2210 return true if is byref.
2211 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2212 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2213 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2215 2006-01-27 Raja R Harinath <rharinath@novell.com>
2217 Fix tests/find-method.2.il
2218 * loader.c (find_method, find_method_in_class): Remove is_inflated
2219 argument. Revert 2006-01-18 change.
2220 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2221 is generic, search for method in its generic definition.
2222 * class.c (mono_class_setup_vtable_general): Print generic
2223 arguments of generic types in debugging printf.
2225 2006-01-26 Zoltan Varga <vargaz@gmail.com>
2227 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2229 * threads.c (mono_threads_request_thread_dump): New helper function.
2231 2006-01-25 Raja R Harinath <rharinath@novell.com>
2233 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2235 2006-01-25 Ankit Jain <jankit@novell.com>
2237 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2238 move definition to ..
2239 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2241 2006-01-25 Ankit Jain <jankit@novell.com>
2242 Raja R Harinath <rharinath@novell.com>
2244 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2245 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2248 2006-01-25 Martin Baulig <martin@ximian.com>
2250 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2251 `MonoDebuggerThread' into debug-debugger.c.
2253 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2255 * profiler.c: fix printing of data.
2257 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
2259 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2260 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2262 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2264 * object.c: fix deadlock related to string interning.
2266 2006-01-23 Martin Baulig <martin@ximian.com>
2268 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2270 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2272 2006-01-23 Martin Baulig <martin@ximian.com>
2274 * mono-debug.h: Moved the prototypes of some functions which are
2275 used by the JIT here from mono-debug-debugger.h.
2277 2006-01-21 Martin Baulig <martin@ximian.com>
2279 * Makefile.am: Don't install mono-debug-debugger.h.
2281 2006-01-21 Martin Baulig <martin@ximian.com>
2283 * mono-debug-debugger.h: Enforce the private status of this header
2284 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2285 Moved some stuff from mono-debugger-jit-wrapper.h here.
2287 2006-01-20 Raja R Harinath <rharinath@novell.com>
2289 * class.c (mono_class_from_typeref): Add a sanity test to help
2290 catch lack of assembly load/search hooks.
2292 2006-01-19 Zoltan Varga <vargaz@gmail.com>
2294 * marshal.c (emit_struct_conv): Relax the fields with same offset
2295 check even more. Fixes #77230.
2297 2006-01-18 Martin Baulig <martin@ximian.com>
2299 * loader.c (find_method_in_class): Added `gboolean is_inflated'
2300 argument; if false, we compare the uninstantiated signatures.
2301 (method_from_memberref): Compare the uninstantiated signatures;
2304 2006-01-18 Robert Jordan <robertj@gmx.net>
2306 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2307 Clear the weak link. Fixes bug #77170.
2309 * gc.c (mono_gchandle_free):
2310 Reflect *-gc.c changes (tiny optimization).
2312 2006-01-18 Zoltan Varga <vargaz@gmail.com>
2314 * metadata.c (mono_metadata_signature_dup): Applied patch from
2315 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2318 2006-01-17 Zoltan Varga <vargaz@gmail.com>
2320 * marshal.c (emit_struct_conv): Allow fields with the same offset when
2321 marshalling from native to managed code. Fixes #77230.
2323 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2325 * threadpool.c: fix problem (Mac only) when more than one asynchronous
2326 connect. Fixes bug #77020.
2328 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2330 * class.c: fixed id assignement for nested interfaces (bug #77275).
2331 Added also better info for --print-vtable debugging.
2333 2006-01-12 Martin Baulig <martin@ximian.com>
2335 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2336 interfaces on-the-fly; fixes #76625.
2339 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2340 don't need that anymore.
2342 2006-01-12 Miguel de Icaza <miguel@novell.com>
2345 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2346 To avoid initing the nested_classes when not needed I turned the
2347 PeerCredData as a toplevel internal class, as it has to be shared
2350 Fixes the CASA issue.
2352 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
2354 * domain.c: Accessors for MonoJitInfo
2356 * profiler-private.h: Add jitinfo to the end jit hook
2358 * profiler.[ch]: Define new hooks, called after jitting which give
2359 the MonoJitInfo that was compiled
2361 2006-01-10 Martin Baulig <martin@ximian.com>
2363 * class.c (mono_class_setup_events): Add support for generic
2364 classes; fixes #76440.
2366 2006-01-06 Raja R Harinath <rharinath@novell.com>
2369 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2370 on passed-in method.
2372 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2374 * object.c (mono_runtime_invoke_array): Add Nullable support.
2376 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2378 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
2380 * file-io.c: Don't consider sockets as directory and avoid an endless
2381 loop. Fix bug #76966.
2383 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2385 * object.c (mono_nullable_init): New helper function.
2386 (mono_nullable_box): Ditto.
2388 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2390 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2392 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2394 2006-01-02 Zoltan Varga <vargaz@gmail.com>
2396 * class.c (mono_class_is_assignable_from): Make T assignable to
2399 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
2401 * appdomain.c: Bump corlib version to 46.
2402 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2403 serialization purpose) and changed ves_icall_System_Reflection_
2404 Assembly_get_code_base signature to accept a boolean (to escape, or
2405 not, the assembly code base).
2407 2005-12-23 Dick Porter <dick@ximian.com>
2411 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2412 CreateEvent icall now returns "created" boolean parameter.
2414 2005-12-22 Zoltan Varga <vargaz@gmail.com>
2416 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2419 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
2420 when attr_klass is an interface. Fixes #77045.
2422 2005-12-20 Zoltan Varga <vargaz@gmail.com>
2424 * marshal.c (emit_struct_conv): Fix previous patch.
2426 * marshal.c (emit_struct_conv): Add a check for fields with the same
2429 2005-12-20 Raja R Harinath <rharinath@novell.com>
2431 Fix regression in Mono.C5.
2432 * class.c (mono_class_create_generic): If 'klass' is an interface
2433 set up the interface offsets.
2434 (mono_class_is_assignable_from): Don't throw away generic arguments.
2436 2005-12-19 Raja R Harinath <rharinath@novell.com>
2438 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2441 2005-12-15 Raja R Harinath <rharinath@novell.com>
2443 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2445 (do_mono_metadata_parse_generic_class): Don't pass the current
2446 generic context when parsing the type being instantiated: it
2447 cannot use it, anyway.
2449 * loader.c (method_from_memberref): Don't inflate a signature if
2450 it doesn't contain any type parameters.
2452 2005-12-15 Zoltan Varga <vargaz@gmail.com>
2454 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2456 2005-12-14 Martin Baulig <martin@ximian.com>
2459 (mono_type_get_name_recurse): Don't return null for type
2460 parameters and open generic classes.
2461 (mono_class_setup_methods): Don't exclude generic instances.
2462 (mono_get_unique_iid): Use different IDs for different
2463 instantiations of the same generic type.
2464 (mono_class_setup_vtable): Only use setup_generic_vtable() for
2465 open generic instances; create a normal vtable for closed generic
2467 (mono_class_setup_vtable_general): We're now also called for
2468 closed generic instances.
2471 (mono_reflection_bind_generic_parameters): Correctly use
2472 mono_metadata_lookup_generic_inst() everywhere.
2474 2005-12-14 Zoltan Varga <vargaz@gmail.com>
2476 * object.c (mono_class_create_runtime_vtable): Call
2477 mono_class_setup_vtable ().
2479 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2481 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2484 * loader.c (mono_loader_set_error_type_load): Print the type load
2485 warnings to the console so they are more visible to the user.
2486 (mono_loader_set_error_method_load): Ditto.
2488 * reflection.c (ensure_runtime_vtable): Revert the last change as it
2491 * reflection.c (ensure_runtime_vtable): Fix build.
2493 * reflection.c (ensure_runtime_vtable): Disable an optimization which
2494 doesn't work in all cases.
2496 2005-12-13 Zoltan Varga <vargaz@gmail.com>
2498 * object.c (mono_array_new_full): Treat a single dimensional array
2499 with 0 lower bounds as an szarray. Fixes #76973.
2501 * reflection.c (custom_attr_visible): Really fix this.
2503 2005-12-12 Zoltan Varga <vargaz@gmail.com>
2505 * reflection.c (custom_attr_visible): Allow nested public attributes
2508 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2511 2005-12-12 Raja R Harinath <harinath@gmail.com>
2513 * class.c (set_generic_param_owner): Delete.
2514 (mono_class_create_from_typedef): Don't set ->owner field of
2515 generic parameters to "param containers" of enclosing classes.
2516 * reflection.c (mono_reflection_initialize_generic_parameter):
2519 2005-12-11 Zoltan Varga <vargaz@gmail.com>
2521 * reflection.c (custom_attr_visible): Fix build.
2523 2005-12-10 Zoltan Varga <vargaz@gmail.com>
2525 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2528 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2529 handling of null parameter defaults.
2531 2005-12-09 Raja R Harinath <rharinath@novell.com>
2533 * class.c (mono_class_from_generic_parameter): Don't set
2534 klass->generic_container.
2535 (my_mono_class_from_generic_parameter): Likewise.
2537 2005-12-07 Zoltan Varga <vargaz@gmail.com>
2539 * reflection.c (load_public_key): Fix a warning.
2540 (method_encode_code): Fix unaligned accesses.
2542 2005-12-07 Martin Baulig <martin@ximian.com>
2544 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2547 (write_generic_param_entry): Encode our custom attrs.
2549 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2551 2005-12-07 Martin Baulig <martin@ximian.com>
2553 * reflection.c (encode_new_constraint): Removed; we don't use the
2554 `NewConstraintAttribute' anymore.
2556 2005-12-06 Zoltan Varga <vargaz@gmail.com>
2558 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2559 not fire a TypeResolve event when Assembly.GetType () is called.
2561 2005-12-05 Ben Maurer <bmaurer@ximian.com>
2563 Beginning of support for nullable types in the runtime. Parts of
2564 this patch are from Martin.
2566 * appdomain.c (MONO_CORLIB_VERSION): Bump
2568 * domain.c (mono_init_internal): get the nullable type
2570 * class.c (mono_class_is_nullable): New method
2571 (mono_class_get_nullable_param): New mehod
2572 (mono_class_create_generic): In types T? set cast_class to T
2574 * class-internals.h (MonoDefaults): new nullable default class
2575 (mono_class_get_nullable_param, mono_class_get_nullable_param):
2578 2005-12-05 Raja R Harinath <rharinath@novell.com>
2580 * metadata.c (select_container): New. Refactor code to select the
2581 appropriate GenericContainer given the type of generic parameter
2583 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2584 not a MonoGenericContext. Use select_container. Update parameters.
2585 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2587 (unwrap_arrays): Remove duplicate tests.
2588 (find_generic_param): Rename from 'has_same_context'. Now walks a
2589 generic instantiated class to find any arguments that are generic
2591 (mono_type_create_from_typespec_full): Use find_generic_param to
2592 avoid evicting some generic instantiations from the typespec
2595 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2597 * reflection.c: fixed writing of doubles on ARM FPA.
2599 2005-12-02 Robert Jordan <robertj@gmx.net>
2601 * icall.c: Fixed EventInfo.ReflectedType (#76829).
2603 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2605 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2606 least on SUSE 10 they are not the same (on debian, they are just the
2609 2005-12-01 Raja R Harinath <rharinath@novell.com>
2611 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2612 DeclaringType for VARs and MVARs.
2613 * class.c (set_generic_param_owner): Fix initialization of owner
2616 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2618 * icall.c: fixed Enum.ToObject() to correctly convert the values.
2620 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2622 * threadpool.c: workaround for a bug that shows up on the Mac:
2623 select()+connect() on a blocking socket is not like it should
2624 be, so we proceed to connect() in that case, wasting the I/O
2625 threadpool thread until connect succeedes. Fixes bug #75436.
2627 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2629 * threadpool.c: fix typo when setting file descriptor states.
2631 2005-11-28 Raja R Harinath <rharinath@novell.com>
2633 * class-internals.h (MonoGenericContainer.is_signature): Remove.
2634 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2635 create a temporary signature container.
2636 (mono_metadata_parse_generic_param): Update to changes.
2637 (mono_type_create_from_typespec_full): Update to changes.
2638 * loader.c (method_from_memberref): Don't use a
2639 MonoGenericContainer while parsing a memberref signature.
2640 (method_from_methodspec): Remove dead-store of the 'container'
2641 variable. It's overwritten before use.
2643 * metadata.c (mono_type_create_from_typespec_full): Make debugging
2645 (mono_metadata_parse_generic_param): Likewise.
2646 * loader.c (find_method_in_class): Does not need a
2647 MonoGenericContainer. Use 'mono_method_signature' rather than
2648 'mono_method_signature_full'.
2649 (find_method, mono_get_method_constrained, method_from_memberref):
2652 * metadata.c (mono_type_create_from_typespec_full): Ensure that
2653 owner-less generic-parameters are never evicted from the typespec
2656 * loader.c (method_from_memberref): Don't use the current context
2657 when parsing signatures.
2658 (method_from_methodspec, mono_get_method_from_token): Update to changes.
2660 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2661 side-effects in g_assert.
2662 * loader.c (mono_get_method_from_token): Resolve klass earlier so
2663 that we don't potentially lose information.
2665 2005-11-26 Dick Porter <dick@ximian.com>
2668 * threads.c: icalls to implement basic (ie, not named)
2669 System.Threading.Semaphore.
2671 2005-11-24 Dick Porter <dick@ximian.com>
2674 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2675 Use GetProcessId() if it's available.
2677 2005-11-23 Zoltan Varga <vargaz@gmail.com>
2679 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2681 2005-11-23 Raja R Harinath <rharinath@novell.com>
2682 Ankit Jain <jankit@novell.com>
2684 * loader.c (mono_get_method_from_token): Initialize 'method' field
2685 of all generic parameters before parsing the signature. Remove
2686 code that "fixed"-up MVAR references.
2688 2005-11-23 Ankit Jain <jankit@novell.com>
2690 * metadata.c (mono_metadata_has_generic_params):
2691 (mono_metadata_load_generic_param_constraints):
2692 (mono_metadata_load_generic_params): Move duplicate code ...
2693 (mono_metadata_get_generic_param_row): ... here. Returns the
2694 first row-id in GenericParam table for a given owner (token).
2695 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2698 2005-11-23 Raja R Harinath <rharinath@novell.com>
2699 Ankit Jain <jankit@novell.com>
2701 * metadata.c (mono_metadata_class_equal): Pass signature_only when
2703 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
2704 type->data.generic_param only if the type is an MVAR.
2705 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2706 leak owner-less VARs and MVARs into managed space.
2708 2005-11-21 Martin Baulig <martin@ximian.com>
2711 (MonoMethod): Moved the `generic_container' here from
2712 `MonoMethodNormal' since we now also need it for
2713 `MonoMethodPInvoke';
2714 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2715 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2716 an union containing both `MonoMethodNormal' and
2717 `MonoMethodPInvoke'.
2720 (mono_get_method_from_token): Allow implementing generic methods
2724 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2727 2005-11-17 Dick Porter <dick@ximian.com>
2731 * process.c: Split the Process Start_internal icall into
2732 ShellExecuteEx_internal and CreateProcess_internal, which are
2733 called depending on whether UseShellExecute is true. Fixes bug
2736 * appdomain.c (MONO_CORLIB_VERSION): Incremented
2738 2005-11-17 Zoltan Varga <vargaz@gmail.com>
2740 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2741 'msize' parameters, use the information in 'mspec' instead.
2742 (emit_object_to_ptr_conv): Ditto.
2744 * marshal.c (emit_struct_conv): Handle explicit layout structs with
2745 fields out of order. Fixes #76733.
2747 2005-11-17 Ankit Jain <jankit@novell.com>
2749 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2751 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
2753 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2756 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2758 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2759 for types with non-auto layout. Fixes #76717.
2761 2005-11-16 Ankit Jain <jankit@novell.com>
2763 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2764 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
2765 if generic_context is null.
2766 (mono_metadata_generic_param_equal): param->owner can be null.
2767 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2770 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2772 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2775 2005-11-15 Martin Baulig <martin@ximian.com>
2777 * object.c (set_value): Use mono_class_from_mono_type() instead of
2778 the hack for generic instances; fixes #76136.
2780 2005-11-15 Zoltan Varga <vargaz@gmail.com>
2782 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2785 * image.c (load_metadata_ptrs): Initialize the new fields.
2787 * reflection.c (create_dynamic_mono_image): Ditto.
2789 * reflection.c (build_compressed_metadata): Use the new fields.
2791 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2794 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2797 2005-11-15 Ankit Jain <jankit@novell.com>
2798 Raja R Harinath <harinath@gmail.com>
2800 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2801 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2802 new per-generic_container cache if the cached MonoType's context matches
2803 the current context.
2804 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2805 to the expected context.
2806 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2808 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2810 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2811 we changed the signature of an icall.
2812 * icall.c: Modify to mono_double_ParseImpl return true/false
2813 depending on the success, instead of throwing the exception. This will
2814 help us in Double.TryParse methods.
2816 2005-11-14 Zoltan Varga <vargaz@gmail.com>
2818 * marshal.c (emit_marshal_object): Throw an exception when
2819 marshalling 'object' instead of crashing. Fixes #76696.
2821 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2823 * class-internals.h: Add prototype for mono_type_get_full_name ().
2825 2005-11-11 Dick Porter <dick@ximian.com>
2827 * threads.c (mono_thread_manage): Make sure the main thread has
2828 abandoned all its mutexes when cleaning up. Fixes bug 74680.
2830 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2832 * loader.c (mono_loader_set_error_type_load): Log a warning to the
2833 console about the missing type.
2834 (mono_loader_set_error_method_load): Ditto.
2836 2005-11-09 Miguel de Icaza <miguel@novell.com>
2838 * mono-config.c (mono_get_config_dir): Set the system defaults if
2841 * assembly.c (mono_set_dirs): New API entry point to set the
2842 assembly and the config directory in one call
2844 2005-11-09 Zoltan Varga <vargaz@gmail.com>
2846 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2847 the ftnptr was created from a delegate in a domain other than the
2848 current domain. Fixes #75377.
2850 * exception.h exception.c: Add mono_get_exception_not_supported ().
2852 2005-11-08 Martin Baulig <martin@ximian.com>
2854 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2856 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
2858 * security-manager.h: Added definitions to deal with strongname key
2859 pairs bigger (and smaller) than 1024 bits.
2860 * reflection.c: Remove hardcoded strongname size (128 bytes) and
2861 adjust wrt the public key length being used.
2863 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
2865 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2866 Windows build (r51396-51397).
2868 2005-11-03 Martin Baulig <martin@ximian.com>
2870 * class.c (mono_class_setup_vtable_general): Also add generic
2871 methods to the vtable; fixes #76581.
2873 2005-11-01 Miguel de Icaza <miguel@novell.com>
2875 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2876 sure that we lookup GetString method from the System.Text.Encoding
2877 class, not the derived class or we get an empty method.
2881 2005-10-25 Miguel de Icaza <miguel@novell.com>
2883 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2884 if it has been previously set (embedders).
2886 Make mono_set_rootdir available also on Unix.
2888 005-10-24 Robert Jordan <robertj@gmx.net>
2890 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2892 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
2894 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2895 only calls which are made to native code use this flag.
2897 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2899 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
2901 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2902 Add support for FieldBuilders.
2904 2005-10-29 Martin Baulig <martin@ximian.com>
2907 (mono_debug_using_mono_debugger): New public method; returns
2908 whether we're running inside the debugger.
2910 2005-10-27 Zoltan Varga <vargaz@gmail.com>
2912 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2913 for Method/Constructor/FieldBuilders.
2915 2005-10-26 Zoltan Varga <vargaz@gmail.com>
2917 * reflection.c (module_add_cattrs): Save custom attributes for global methods
2920 2005-10-26 Martin Baulig <martin@ximian.com>
2922 * mono-debug-debugger.c
2923 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2925 2005-10-24 Raja R Harinath <harinath@gmail.com>
2927 * icall.c (base64_to_byte_array): Don't pass an out-of-range
2930 2005-10-21 Zoltan Varga <vargaz@gmail.com>
2932 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2933 when passing valuetypes byref. Fixes #76502.
2935 2005-10-19 Jackson Harper <jackson@ximian.com>
2937 * profiler.c: Don't put a . in front of types that are not in a
2940 2005-10-18 Zoltan Varga <vargaz@gmail.com>
2942 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2944 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
2946 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2948 (mono_marshal_get_ldflda_wrapper): Fix a warning.
2950 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2952 * assembly.c metadata-internals.h icall.c: Define an additional
2953 parameter for mono_assembly_name_parse_full, so we can avoid creating
2954 S.R.AssemblyName.Version when no version info wasn't passed.
2956 2005-10-09 Miguel de Icaza <miguel@novell.com>
2958 * class.c (mono_type_get_full_name): Reimplement method that was
2961 * image.c: Some docs
2963 2005-10-10 Zoltan Varga <vargaz@gmail.com>
2965 * profiler.c (output_newobj_profile): Fix printing of Total memory
2968 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2970 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2972 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
2974 * threads.c: remove debug output.
2976 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2978 * threads.c (mono_thread_manage): Fix crashes if more than 64
2979 threads need to be aborted. Hopefully fixes #75899.
2981 * assembly.c (mono_stringify_assembly_name): New helper function.
2983 * class.c: Use mono_stringify_assembly_name instead of the similar
2986 * assembly.h assembly.c: Add support for calling a postload search
2987 hook if an assembly cannot be loaded.
2989 * appdomain.c: Register new search hooks which call the AssemblyResolve
2990 events in AppDomain. Fixes #75231
2992 2005-10-07 Martin Baulig <martin@ximian.com>
2994 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2995 methods without debug info.
2997 2005-10-07 Zoltan Varga <vargaz@gmail.com>
2999 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3002 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3004 * file-io.c: now that we return symlinks, use lstat and, when the file
3005 is a symbolic link, stat, to get the file attributes. Also avoid the
3006 conversion to/from utf16/external.
3008 2005-10-06 Zoltan Varga <vargaz@gmail.com>
3010 * class.c (mono_class_layout_fields): Compute klass->has_references
3011 correctly if an embedded valuetype is not yet initialized. Fixes
3014 2005-10-04 Martin Baulig <martin@ximian.com>
3017 (mono_metadata_load_generic_param_constraints): New public
3018 function; splitted the constraints loading out from
3019 mono_metadata_load_generic_params().
3021 * class.c (mono_class_create_from_typedef): Call
3022 mono_metadata_load_generic_param_constraints() after setting up
3023 the type and creating our parent; fixes #75329.
3025 2005-10-04 Martin Baulig <martin@ximian.com>
3027 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3028 non-dynamic parent classes.
3030 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
3032 * file-io.c : win32 build fix (ETXTBSY seems not found).
3034 2005-10-04 Martin Baulig <martin@ximian.com>
3037 (mono_image_get_methodspec_token): Make the cache actually work;
3040 2005-10-04 Martin Baulig <martin@ximian.com>
3042 * class.c (mono_class_name_from_token): Removed the unneccessary
3043 `MonoGenericContext *' argument.
3045 2005-10-04 Martin Baulig <martin@ximian.com>
3048 (method_from_methodspec): Make the caching work again; fixes the
3049 performance regression from #76262.
3051 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3055 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3056 GetFileSystemEntries that performs the same work but without going
3057 into io-layer, locking, etc.
3059 2005-09-30 Zoltan Varga <vargaz@gmail.com>
3061 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
3062 ThreadState_Stopped as well. Fixes #76047.
3064 2005-09-29 Martin Baulig <martin@ximian.com>
3067 (inflate_generic_context): If the new context has a `gmethod', set
3068 its `container' that that gmethod's `container'.
3071 (mono_metadata_parse_generic_param): Simplify things;
3072 `generic_container = generic_context->container;' is just fine.
3074 * loader.c (method_from_methodspec): Code cleanups.
3076 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3078 * decimal.c: fix warning (and let gcc generate correct
3079 code on ARM with optimizations).
3081 2005-09-28 Martin Baulig <martin@ximian.com>
3084 (method_from_memberref): Added `MonoGenericContext *class_context'
3085 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3086 (method_from_methodspec): If we're a memberref, use the enclosing
3087 context when parsing its parent. Fixes #76262; see gtest-206.cs.
3089 2005-09-28 Martin Baulig <martin@ximian.com>
3091 * object.c (mono_runtime_invoke_array): Added support for
3092 MONO_TYPE_GENERICINST; fixes #75917.
3094 2005-09-27 Martin Baulig <martin@ximian.com>
3096 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3097 `k->byval_arg.type' to determine the actual type.
3099 * loader.c (method_from_methodspec): Removed some hacks.
3101 2005-09-27 Ben Maurer <bmaurer@ximian.com>
3103 * class-internals.h (mono_field_is_deleted): Do the test for
3104 rtspecialname before we check the actual name of the field. This
3105 prevents us from dereferencing a pointer into the string table,
3106 saving us from accessing a few pages
3108 * *.c: Replace the use of {Enter,Leave}CriticalSection with
3109 macros. This will allow a deadlock debugger to easily be plugged
3112 2005-09-27 Martin Baulig <martin@ximian.com>
3114 * loader.c (method_from_methodspec): Create a "signature"
3115 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
3117 2005-09-27 Martin Baulig <martin@ximian.com>
3120 (inflate_generic_class): Correctly set the new context's
3124 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3125 instead of a `MonoGenericContext *'.
3126 (mono_method_signature_full): Take a `MonoGenericContainer *'
3127 instead of a `MonoGenericContext *'.
3130 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3131 instead of a `MonoGenericContext *'.
3132 (mono_metadata_parse_method_signature_full): Likewise.
3134 2005-09-26 Martin Baulig <martin@ximian.com>
3137 (mono_class_from_generic_parameter): Set `klass->generic_container'
3138 (mono_class_from_generic_parameter): Likewise.
3139 (mono_bounded_array_class_get): We inherit the generic container
3140 from the element class.
3143 (find_method, find_method_in_class): Take a `MonoGenericContext *'
3144 argument rather than computing it here.
3145 (method_from_memberref): Correctly set the generic context before
3146 parsing the signature. Fixes #75681.
3148 2005-09-26 Zoltan Varga <vargaz@gmail.com>
3150 * object.c (mono_class_has_special_static_fields): Fix warnings.
3152 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3154 * assembly.c: Add parse_public_key function, to
3155 par the public keys. Also added mono_assembly_name_parse_full,
3156 to define it the parsed key should be freed or not.
3157 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3158 to parse a long format assembly name.
3159 * metadata-internals.h: Keep mono_assembly_name_parse_full as
3160 private, since calling it to preserve the key requires
3161 freeing it manually.
3163 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
3165 * locales.c : removed HAVE_ICU part.
3167 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
3169 * object.c (mono_class_create_runtime_vtable): Avoid calling
3170 field_is_special_static if the klass has no special static fields.
3172 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3173 (MonoCachedClassInfo): Likewise.
3175 * object.c (mono_class_has_special_static_fields): New helper function.
3177 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3179 * class.c (mono_class_create_from_typedef): Don't call
3180 interfaces_from_typedef_full for enums.
3181 (mono_class_create_from_typedef): Compute the base types of enums directly
3182 without calling mono_class_setup_fields ().
3183 (mono_class_find_enum_basetype): New helper function.
3185 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3186 one place inside the string heap.
3188 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3190 * class.c: locking fixes, code cleanups, some docs added.
3191 Allocate some data structures in the image mempool.
3193 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3195 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3198 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3200 * class-internals.h, class.c, reflection.c: reduce memory taken by
3203 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3205 * metadata.c, metadata.h, loader.h: documentation updates, code and
3208 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3210 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3213 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3214 page faults caused by the runtime while reading metadata.
3216 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3218 * socket-io.c: the field names were changed 3 months ago and no one
3219 realized until bug #76077 got filed!
3221 2005-09-20 Martin Baulig <martin@ximian.com>
3223 * icall.c (assembly_icalls): Removed some unused debugger icalls.
3225 2005-09-20 Martin Baulig <martin@ximian.com>
3227 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3228 write the rank into the class entry.
3230 2005-09-20 Martin Baulig <martin@ximian.com>
3232 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3234 2005-09-19 Zoltan Varga <vargaz@gmail.com>
3236 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3238 * icall.c (custom_attrs_defined_internal): New icall.
3240 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3242 (mono_custom_attrs_construct_by_type): New helper function.
3244 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
3246 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3247 terminate the resulting string. Fixes #76123.
3249 2005-09-16 Martin Baulig <martin@ximian.com>
3252 (mono_debug_add_method): Ignore inflated methods for the moment.
3254 2005-09-14 Martin Baulig <martin@ximian.com>
3256 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3258 2005-09-13 Zoltan Varga <vargaz@gmail.com>
3260 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3261 return a success/failure indication.
3262 (mono_metadata_interfaces_from_typedef_full): Ditto.
3263 (get_constraints): Ditto.
3265 2005-09-12 Zoltan Varga <vargaz@gmail.com>
3267 * marshal.c (emit_marshal_array): Fix handling of null arrays.
3269 * marshal.c (emit_marshal_array): Add support for returning string
3270 arrays from delegates. Fixes #76063.
3272 * marshal.c: Use the emit_ldloc/stloc macros where possible.
3274 2005-09-11 Zoltan Varga <vargaz@gmail.com>
3276 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3279 2005-09-09 Zoltan Varga <vargaz@gmail.com>
3281 * reflection.c icall.c: Fix after mono_get_exception_type_load
3284 * assembly.c (mono_assembly_get_assemblyref): New helper function.
3285 (mono_assembly_load_reference): Use the new helper.
3287 * class-internals.h (MonoLoaderError): New structure containing
3288 information about type loading errors.
3290 * class-internals.h loader.c: Add APIs to store per-thread loader
3293 * loader.c class.c: Set the loader error if needed.
3295 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3297 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3299 * decimal.c: fixed to handle the broken ARM fp format.
3301 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3303 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3306 2005-09-06 Martin Baulig <martin@ximian.com>
3308 * domain.c (supported_runtimes): Added v2.0.50727.
3310 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3312 * culture-info.h: reduce the size of some structures.
3314 2005-09-05 Martin Baulig <martin@ximian.com>
3316 Reflect latest API changes in the August CTP.
3319 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3320 ("MonoType.HasGenericArguments"): Removed.
3321 ("MonoMethod.BindGenericParameters"): Renamed to
3322 "MakeGenericMethod".
3323 ("MethodBuilder.BindGenericParameters"): Renamed to
3324 "MakeGenericMethod".
3326 2005-09-05 Martin Baulig <martin@ximian.com>
3328 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3330 2005-09-05 Martin Baulig <martin@ximian.com>
3332 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3334 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3335 generic_container is non-NULL.
3337 2005-09-05 Martin Baulig <martin@ximian.com>
3339 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3341 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3343 2005-08-29 Michal Moskal <malekith@nemerle.org>
3345 * reflection.c (encode_locals,
3346 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3347 for large generic types.
3349 2005-09-05 Martin Baulig <martin@ximian.com>
3351 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3353 * class.c (mono_dup_array_type): New public method.
3354 (mono_metadata_signature_deep_dup): New public method.
3355 (dup_type): Correctly duplicate array and function types.
3357 2005-09-05 Martin Baulig <martin@ximian.com>
3359 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3361 * reflection.c (get_default_param_value_blobs): Handle generic types
3362 and generic methods.
3364 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
3366 * class.c: Fixed error reporting (method/class were inversed) for
3367 inheritance demands.
3368 * security-manager.c|h: Added the AppDomain when calling the managed
3369 System.Security.SecurityManager.InheritanceDemand method.
3371 2005-09-01 Raja R Harinath <rharinath@novell.com>
3373 * reflection.c (encode_marshal_blob): 'marshaltype' and
3374 'marshaltyperef' are alternate sources for the custom marshaler
3377 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3379 * class.c: fix creation of array classes with rank == 1
3380 (patch by Ankit Jain <jankit@novell.com>).
3382 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3384 * object.c: fix check for creating the bound data for arrays vs
3387 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3389 * object.c: configuration file name is now based on the executable name,
3390 not the image name. Fixes bug #75931.
3392 2005-08-29 Zoltan Varga <vargaz@gmail.com>
3394 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3395 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3397 2005-08-25 Zoltan Varga <vargaz@gmail.com>
3399 * rand.c: Use wincrypt.h instead of WinCrypt.h.
3401 2005-08-24 Ankit Jain <jankit@novell.com>
3402 Raja R Harinath <rharinath@novell.com>
3404 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3405 called by it recursively.
3406 (mono_class_init): Remove special case in pending_init handling, since it's
3407 superseded by the fix to mono_class_from_typeref.
3409 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
3411 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
3412 BROKEN_THREAD_START stuff.
3414 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
3416 * class-internals.h object.c: Add a new kind of trampoline called a delegate
3419 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3421 * object.c (mono_delegate_ctor): Replace the original function address with
3422 a delegate trampoline.
3424 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3426 * icall.c: add boolean argument to base64_to_byte_array and
3427 InternalFromBase64String to control whether a whitespace-only string
3428 is allowed (or should casue a FormatException to be thrown). We need
3429 this as the behavior has changed between MS.NET 1.x and 2.0, and we
3430 to match the MS behaviour in both profiles.
3431 * appdomain.c: Bump corlib version.
3433 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3435 This patch implements a big portion of publisher policy
3436 support, used to bind assembly versions and redirect
3437 one assembly from version A to version B.
3440 New GSList loaded_assembly_bindings, for storing the cached
3442 (assembly_binding_maps_name): New static function for checking if a
3443 assembly binding information maps an assembly name.
3444 (mono_assembly_binding_info_free): New function for freeing
3445 assembly binding information resources.
3446 (get_publisher_policy_info): New static function for retrieving
3447 assembly binding information from a MonoImage.
3448 (compare_versions): New static function for comparing an assembly
3449 binding information data and the version of an assembly name.
3450 (check_policy_versions): New static function for checking if an
3451 assembly binding info mapping an assembly name is valid for it.
3452 (mono_assembly_load_publisher_policy): New static function for
3453 loading the 'policy.major.minor.MyAssembly' image for an assembly
3454 with an assembly name 'aname'.
3455 (mono_assembly_bind_version): New static function for updating
3456 assembly redirection.
3457 (mono_assembly_apply_binding): New static function for applying
3459 (search_binding_loaded): New static function for searching
3460 loaded assembly binding infos in the cache domain.
3461 (mono_assembly_load_full): Don't apply assembly binding for
3462 reflection only assemblies.
3464 * metadata-internals.h: Add MonoAssemblyBindingInfo,
3465 which contains information about assembly binding. Also
3466 declare signature for mono_config_parse_publisher_policy ()
3467 function, used to retrieve pub policy info.
3470 (publisher_policy_start): New static function used to parse publisher
3471 policy config files.
3472 (publisher_policy_parser): New static MonoParseHandler containing
3473 the functions used when parsing config files.
3474 (mono_config_parse_publisher_policy): New function for parsing
3475 publisher policy files.
3477 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
3479 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3481 * marshal.c (mono_delegate_free_ftnptr): Ditto.
3483 * object.c (mono_get_addr_from_ftnptr): New helper function.
3485 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3487 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3489 2005-08-19 Dick Porter <dick@ximian.com>
3491 * threads.c, threads.h, appdomain.c, appdomain.h,
3492 profiler-private.h, monitor.c, object.c, object-internals.h,
3493 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3494 store the thread ID, so it can hold a 64 bit value if needed.
3496 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
3498 * reflection.c (mono_reflection_create_dynamic_method): Store the
3499 handle class into the method references as well so ldtoken works in
3502 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3505 2005-08-19 Ankit Jain <jankit@novell.com>
3508 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
3509 here rather than using the method signature of a arbitrary function
3510 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
3512 Hack done with Harinath.
3514 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3516 * threadpool.c: disable printing stack traces when we get a exception
3517 in a threadpool thread. I need to do more testing to figure out which
3518 cases actually print this. Fixes bug #75828.
3520 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3522 * icall.c: there might be ignored whitespace after the last '='. This
3523 fixes length computation and bug #75840.
3525 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
3527 * assembly.c (mono_assembly_load_full): Consider .exe extension as
3530 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3533 * reflection.c (create_custom_attr_data): Ditto.
3535 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
3537 * locales.c, culture-info.h : removed RegionLCIDMap.
3538 * culture-info-tables.h : regenerated.
3540 2005-08-16 Martin Baulig <martin@ximian.com>
3542 * class.c (mono_type_get_name_recurse): Small fix.
3544 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
3546 * locales.c : indentation fixie.
3548 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
3550 * object-internals.h,
3554 icall.c : added RegionInfo table support.
3555 * culture-info-table.h : regenerated for region support.
3557 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
3559 * reflection.c (resolve_object): handle all kinds of MonoMethod
3560 including generic ones
3562 2005-08-12 Ankit Jain <jankit@novell.com>
3564 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3565 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
3567 2005-09-12 Lluis Sanchez <lluis@ximian.com>
3569 * process.c: Don't close a thread handle when it's NULL. This is a
3570 workaround for bug #75733.
3572 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
3574 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3576 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
3578 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3580 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3582 * threadpool.c: if a work item in the thread pool has a callback that
3583 catches a exception, don't propagate it after invoking the callback.
3586 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
3588 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3590 * class-internals.h (MonoCachedClassInfo): Add some new fields.
3592 * class.c (mono_class_init): Load field info lazily in the AOT case.
3594 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3596 2005-08-03 Ankit Jain <jankit@novell.com>
3599 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3600 PInvoke calling convention is 0.
3602 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
3604 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
3605 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3607 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3609 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3610 to handle threads not started by the GC (patch by Michael Meeks
3611 <michael.meeks@novell.com>).
3613 2005-07-31 Kamil Skalski <nazgul@omega.pl>
3615 * reflection.c: Make buffer used in emitting types larger for some
3616 big generic types (patch by Michal Moskal).
3618 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
3620 * mono-debug.c: Fix some (not all) alignment problems.
3622 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3624 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3625 Invoke mono_image_load_from_data_full passing the refonly
3629 (mono_assembly_open_from_bundle): Add the refonly argument,
3630 in order to pass it to other methods it calls to.
3631 (do_mono_assembly_open): Add the refonly argument, in order
3632 to pass it to other methods it calls to.
3633 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3634 the refonly parameter to it.
3636 * image.c: Add loaded_images_refonly_hash and
3637 loaded_images_refonly_guid_hash to cache the reflection
3639 (mono_images_init): Initialize the hash tables used for
3640 caching the reflection only images.
3641 (load_modules): Invoke mono_image_open_full passing the refonly
3642 parameter to load the modules the correct way.
3643 (build_guid_table): Add the refonly argument, to re-build the
3645 (do_mono_image_open): Added the refonly argument, in order to
3646 define it for the loaded image.
3647 (mono_image_loaded_full): New function, which receives an
3648 additional parameter to look for the image in the refonly or
3649 non-refonly section.
3650 (mono_image_loaded): Updated, using mono_image_loaded_full.
3651 (mono_image_loaded_by_guid_full): The same case that happens
3652 with mono_image_loaded_full.
3653 (mono_image_loaded_by_guid): Likewise.
3654 (register_image): Use the ref_only variable inside MonoImage
3655 to decide in which hash table store the current image.
3656 (mono_image_open_from_data_full): Rename
3657 mono_image_open_from_data to mono_image_open_from_data_full,
3658 adding the refonly argument, to define the ref_only variable
3660 (mono_image_open_from_data): Return
3661 mono_image_open_from_data_full.
3662 (mono_image_open_full): Rename mono_image_open to
3663 mono_image_open_full, receiving the new refonly argument,
3664 to pass it to inner methods.
3665 (mono_pe_file_open): Update this function, to open
3666 a MonoImage as a non-refonly image.
3667 (mono_image_close): Use the refonly variable inside
3668 MonoImage to remove the image from the correct caches.
3670 * image.h: Add the signatures of mono_image_open_full,
3671 mono_image_open_from_data_full, mono_image_loaded_full,
3672 mono_image_loaded_by_guid_full.
3674 * metadata-internals.h: Add the ref_only field to
3677 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3679 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3680 Fix the last behavior, which used to load the assemblies and
3681 extract MonoReflectionAssemblyName information, instead of
3682 extract it from the metadata tables. Needed for Reflection
3685 2005-07-29 Martin Baulig <martin@ximian.com>
3687 * mono-debug-debugger.c
3688 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3692 (mono_debug_address_from_il_offset): Check whether we have
3693 debugging support before attempting to take the lock.
3694 (mono_debug_source_location_from_address): Likewise.
3695 (mono_debug_source_location_from_il_offset): Likewise.
3696 (mono_debug_il_offset_from_address): Likewise.
3697 (mono_debug_address_from_il_offset): Likewise.
3699 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
3701 * class.c (mono_class_from_name_case): Add support for dynamic images.
3704 * object.c (mono_class_compute_gc_descriptor): Add a workaround
3707 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3709 * reflection.c (mono_method_get_object): Fix warning.
3711 2005-07-28 Martin Baulig <martin@ximian.com>
3714 (mono_debug_add_wrapper): Also write the wrapper type.
3716 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3718 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3720 * class.c (mono_class_init): Avoid reading nested classes if the AOT
3721 data indicates the class has none.
3723 2005-07-26 Ben Maurer <bmaurer@ximian.com>
3725 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3726 loader lock with the debugger lock. Prevents deadlocks for beagle.
3728 Beagle can now run on an smp box for a weekend without any
3731 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
3733 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3734 in a module. Fixes #75629.
3736 2005-07-26 Martin Baulig <martin@ximian.com>
3738 * mono-debug.c (mono_debug_add_wrapper): New static method.
3739 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3740 interncall or a wrapper.
3742 * mono-debug.h (MonoDebugWrapperData): New public typedef.
3743 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3744 (MONO_DEBUGGER_VERSION): Bump to 51.
3746 * mono-debug-debugger.c
3747 (mono_debugger_add_type): Removed this empty function.
3748 (mono_debugger_add_method): Likewise.
3750 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
3752 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
3753 before accessing method->slot.
3755 2005-07-21 Jb Evain <jbevain@gmail.com>
3757 * reflection.c (method_encode_clauses/class): Handle filters clauses.
3760 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
3762 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3765 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
3767 * image.h image.c: Add mono_image_get_guid () API function.
3769 2005-07-19 Ben Maurer <bmaurer@ximian.com>
3771 There were issues when multiple threads tried to load
3772 assemblies. A deadlock was created between assemblies_mutex and
3773 mono_domain_assemblies_lock. This fixes the issue by making the
3774 assembly ref counting be lock free. See bug 75586.
3776 * image.c (mono_image_close): The add ref function here was using
3777 Interlocked operations while the unref was using a mutex and a
3778 --. I don't think this was ever a bug that would be exposed in a
3779 non-pendantic way (ie, by an embedder doing a ref on one thread
3780 and an unref on another), but for the sake of correctness, this is
3783 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3784 (mono_assembly_load_reference): Call mono_assembly_addref rather
3785 than touching the refcount ourselves.
3786 (mono_assembly_close): Use InterlockedDecrement to unref the
3787 assembly. Don't acquire the lock unless it is actually needed.
3789 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3791 * class.c (mono_class_layout_fields): Fix calculation of has_references
3794 2005-07-12 Martin Baulig <martin@ximian.com>
3796 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3799 (mono_type_hash): Provide better hashing for generic instances.
3800 (mono_generic_inst_hash): Improve hashing.
3801 (mono_generic_class_hash): Likewise.
3803 * reflection.c (mymono_metadata_type_hash): Improve hashing for
3806 2005-07-12 Martin Baulig <martin@ximian.com>
3808 * reflection.c (mono_reflection_create_runtime_class): Remove the
3809 hack for generic type definitions and non-`Run' assemblies.
3810 (mono_reflection_bind_generic_parameters): Also use
3811 `klass->wastypebuilder' to check for TypeBuilders.
3813 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3815 * class.c (mono_class_layout_fields): Fix calculation of has_references
3818 * class.c (inflate_generic_class): Fix a leak.
3819 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3822 2005-07-11 Martin Baulig <martin@ximian.com>
3824 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3827 2005-07-11 Martin Baulig <martin@ximian.com>
3829 * loader.c (find_method): Also lookup in
3830 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3832 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3834 * appdomain.c (mono_domain_unload): Don't free the error message
3835 before passing it to mono_get_exception_...
3837 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3839 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3841 * threads.c: try to better guess an available RT signal (bug #75387).
3843 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3845 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3848 2005-07-07 Martin Baulig <martin@ximian.com>
3850 * class.c (mono_type_get_name_full): Return NULL for
3851 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3854 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3856 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3857 exit the appdomain as well being aborted.
3859 * threadpool.c: Create all threadpool threads inside the root appdomain, and
3860 change back to the root domain after calling managed code. This enables
3861 appdomains using threadpools to be unloaded.
3863 2005-07-07 Martin Baulig <martin@ximian.com>
3866 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3867 into `MonoDynamicGenericClass' since we only need it for dynamic
3870 * reflection.c (mono_class_bind_generic_parameters): We don't need
3871 to compute the `parent' here.
3873 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
3875 * culture-info-table.h : regenerated.
3877 2005-07-06 Martin Baulig <martin@ximian.com>
3880 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3882 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3884 2005-07-06 Martin Baulig <martin@ximian.com>
3886 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3887 we're doing a signature-only comparision; fixes #74945.
3889 2005-07-06 Martin Baulig <martin@ximian.com>
3891 * class-internals.h (MonoGenericClass): Moved some things out into
3892 a new `MonoInflatedGenericClass' type.
3893 (MonoInflatedGenericClass): New type; the `klass' of a
3894 `MonoGenericClass' is now computed lazyly in
3895 mono_get_inflated_generic_class().
3897 * class.c (mono_get_inflated_generic_class): New public function.
3898 (mono_class_inflate_generic_method): Removed the unused
3899 `MonoClass *' argument.
3900 (setup_generic_vtable): Don't call mono_get_inflated_method() on
3902 (mono_class_create_generic): Make this static and merge it with
3903 mono_class_create_generic_2(); we're now called automatically from
3904 mono_get_inflated_generic_class().
3906 * loader.c (mono_method_signature): Call
3907 mono_get_inflated_method() here.
3909 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
3911 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3912 type of fields with RVA.
3914 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3915 for this pseudo class.
3916 (my_mono_class_from_generic_parameter): Likewise.
3917 (mono_class_init): Allow interfaces to have cctors.
3919 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3921 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3922 lazily for AOT methods.
3924 2005-07-05 Martin Baulig <martin@ximian.com>
3926 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3927 returns FALSE for a successful match, not TRUE.
3929 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3931 * loader.c (mono_method_get_index): Optimize this a bit.
3933 2005-07-04 Martin Baulig <martin@ximian.com>
3936 (class_compute_field_layout): Move the check for generic type
3937 definitions into mono_class_layout_fields(). Fixes #74684.
3938 (mono_class_from_generic_parameter): Correctly compute
3939 `klass->parent'; fixes #75457.
3941 * reflection.c (register_assembly, register_module): Make sure
3942 `domain->rejobject_hash' is already created.
3944 2005-07-02 Martin Baulig <martin@ximian.com>
3947 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3948 `MonoDynamicGenericClass'.
3950 2005-07-01 Lluis Sanchez <lluis@ximian.com>
3952 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3953 returned by a field getter is null, since null is a valid value.
3955 2005-07-01 Martin Baulig <martin@ximian.com>
3957 * reflection.c (mono_reflection_generic_class_initialize): Update
3958 the `dgclass->fields [i].parent' to the correct class.
3959 (mono_image_get_fieldref_token): Use the declaring type, not the
3962 2005-07-01 Martin Baulig <martin@ximian.com>
3964 * loader.c (find_method): Also look in the interfaces; fixes #75429.
3966 2005-06-30 Ben Maurer <bmaurer@ximian.com>
3968 * threads.c (thread_cleanup): assert that thread != NULL
3969 (wait_for_tids_or_state_change): We were using the wrong variable
3970 when accessing wait->threads. `i' was always out of the bounds of
3973 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3975 * loader.c: map user32 and kernel32 to libMonoSupportW
3977 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
3979 * appdomain.c (unload_thread_main): Mark this as WINAPI.
3981 2005-06-28 Martin Baulig <martin@ximian.com>
3983 * loader.c (method_from_methodspec): Fix #75334.
3985 2005-06-28 Martin Baulig <martin@ximian.com>
3987 Fix #74953 - Arrays now implement the generic IList<T> interface
3988 on the 2.0 platform.
3990 * class-internals.h (MonoDefaults): Added `generic_array_class'.
3992 * reflection.c (mono_class_bind_generic_parameters): New public
3993 function; similar to mono_reflection_bind_generic_parameters(),
3994 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3996 * domain.c (mono_init_internal): Try to initialize.
3997 `mono_defaults.generic_array_class' here; this'll only succeed if
3998 we're using the 2.0 corlib.
4001 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4002 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4003 (mono_lookup_internal_call): Added support for nested classes.
4006 (mono_get_method_from_token): Set `result->signature->pinvoke' if
4007 we're an interncall and have generic arguments.
4010 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4011 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4012 instance of System.Array.InternalArray<T> for arrays, so they
4013 implement the generic IList<T> interface.
4015 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
4017 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4018 (chastamar@yahoo.com). Fixes #75374.
4020 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
4022 * culture-info-table.h: regenerated.
4024 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4026 * icall.c: handle spaces correctly for base64 strings.
4028 2005-06-26 Ben Maurer <bmaurer@ximian.com>
4030 * *.c: Kill some warnings.
4032 2005-06-23 Duncan Mak <duncan@novell.com>
4034 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4035 that this builds on Solaris 10 (x86).
4037 2005-06-23 Martin Baulig <martin@ximian.com>
4040 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4041 generic type definitions.
4043 2005-06-23 Martin Baulig <martin@ximian.com>
4047 * metadata.c (mono_class_get_overrides): Renamed to
4048 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4049 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4050 pass it to mono_get_method_full().
4052 2005-06-22 Ben Maurer <bmaurer@ximian.com>
4054 * reflection.c (mono_reflection_create_runtime_class): take the
4055 mono_domain_lock in this method. Prevents deadlocks
4057 2005-06-22 Martin Baulig <martin@ximian.com>
4059 * loader.c (method_from_methodspec): Fix #75330.
4061 2005-06-22 Martin Baulig <martin@ximian.com>
4063 * reflection.c (type_get_qualified_name): Use
4064 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4065 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4066 argument; use it if we don't have an assembly name.
4068 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
4070 * object.c: In mono_message_init, set "copy out" flag for in
4071 parameters with the [Out] flag.
4073 2005-06-21 Martin Baulig <martin@ximian.com>
4076 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4079 2005-06-21 Martin Baulig <martin@ximian.com>
4081 * class.c (mono_class_init): Don't initialize `class->fields' for
4082 generic instances since they're initialized again in
4083 compute_field_layout().
4084 (compute_field_layout): Set the field's `generic_info' here; fix
4087 2005-06-21 Martin Baulig <martin@ximian.com>
4090 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4092 * metadata.c (mono_metadata_generic_method_equal): Also
4093 distinguish the `generic_class'; fixes #75334.
4095 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4099 * domain-internals.h:
4100 * reflection.c: 'domain_assemblies' field is now protected by its own
4101 lock. Don't call into managed code to run the AssemblyLoad event if we
4102 now there are no registered delegates for it.
4104 2005-06-20 Martin Baulig <martin@ximian.com>
4106 * class.c (mono_class_is_assignable_from): Use a custom version of
4107 mono_class_has_parent() to make things work for generic instances;
4110 2005-06-20 Martin Baulig <martin@ximian.com>
4112 * loader.c (method_from_methodspec): Apply a patch from
4113 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4115 2005-06-20 Martin Baulig <martin@ximian.com>
4117 * class.c (mono_class_init): Reverted Zoltan's last change; it
4120 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
4122 * threads.c (wait_for_tids_or_state_change): Add missing locking.
4124 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4126 * socket-io.c: fix the index in the socket array for writable/error
4127 sockets. Fixes bug #75306.
4129 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
4131 * class.c (mono_class_init): Allow interfaces to have static ctors.
4133 2005-06-17 Martin Baulig <martin@ximian.com>
4135 * loader.c (method_from_methodspec): Use `context->container' when
4136 parsing the `gmethod->inst'.
4138 2005-06-17 Martin Baulig <martin@ximian.com>
4140 * class.c (mono_type_get_name_recurse): Don't add the assembly
4141 name for type arguments.
4143 2005-06-15 Martin Baulig <martin@ximian.com>
4145 * reflection.c (mono_image_get_inflated_method_token): Encode
4146 correct klass; fixes #75260.
4148 2005-06-13 Michal Moskal <malekith@nemerle.org>
4150 * icall.c: Make GetCorrespondingMethod/Constructor take
4151 MonoReflectionMethod method not MonoMethod. Removed
4152 MonoType.GetCorrespondingField, and make
4153 MonoGenericType.GetCorrespondingField take name not
4156 2005-06-13 Michal Moskal <malekith@nemerle.org>
4158 * reflection.c (field_encode_signature, encode_locals):
4159 Make sizes of buffers for types larger (for big generic types).
4160 (create_generic_typespec,
4161 mono_reflection_sighelper_get_signature_local,
4162 mono_reflection_sighelper_get_signature_field):
4163 Add asserts for too small buffers.
4165 2005-06-15 Martin Baulig <martin@ximian.com>
4167 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4168 if our parent is not a dynamic type.
4170 2005-06-15 Martin Baulig <martin@ximian.com>
4172 * class-internals.h (MonoTypeNameFormat): New enum.
4175 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4176 (mono_type_get_full_name): Removed.
4177 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4178 argument instead of the boolean's.
4180 * icall.c (ves_icall_System_MonoType_getFullName):
4181 Added `gboolean assembly_qualified'.
4184 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4186 * reflection.c (mono_reflection_parse_type): Parse the new type
4189 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4191 * icall.c: no need to convert from utf16 to utf8 and then back again
4192 after the call to GetLogicalDrives.
4194 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4196 * icall.c: frombase64. Fix problems exposed by new tests.
4198 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4200 * icall.c: added internal calls for converting char [] and strings in
4201 base64 into byte [].
4203 2005-06-10 Martin Baulig <martin@ximian.com>
4205 * class.c (mono_class_create_generic_2): Read the nested classes
4206 from the metadata rather than from `gklass->nested_classes' since
4207 `gklass' might not be initialized yet.
4209 2005-06-09 Duncan Mak <duncan@novell.com>
4211 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4212 all public headers. Fixes #74919.
4214 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
4216 * domain.c: The key for proxy_vtable_hash is now a pointer
4217 array. Added new GHashFunc and GCompareFunc functions for this.
4219 * class.h: The list of interfaces in MonoRemoteClass is known in
4220 advance and can't grow (we create a new MonoRemoteClass if needed),
4221 so now the interface array can be allocated together with
4224 * object.c: Added a new method create_remote_class_key.
4225 Fixed mono_remote_class so it does not depend on
4226 mono_upgrade_remote_class.
4227 Removed extend_interface_array.
4228 Added new method clone_remote_class(), which makes a copy of a remote
4229 class and adds a new interface or class to it.
4230 mono_upgrade_remote_class() now creates a new remote class (or gets
4231 it from the cache) if an vtable upgrade is needed. In this way
4232 we make sure that other objects sharing the same remote class
4233 don't get the new vtable with unwanted interfaces.
4235 * object-internals.h:
4236 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4238 * marshal.c: Track changes in mono_upgrade_remote_class().
4240 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
4241 * icall.c: Add runtime methods for obtaining members of inflated
4242 class, which were created from supplied non-inflated members. It
4243 is used in internal Get{Method,Constructor,Field} methods in
4246 2005-06-09 Martin Baulig <martin@ximian.com>
4249 (mono_reflection_bind_generic_method_parameters): Fix #75169.
4251 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4252 * reflection.c (mono_image_basic_init): Define
4253 Version in MonoDynamicAssembly.
4255 2005-06-08 Martin Baulig <martin@ximian.com>
4260 (mono_method_signature_full): New public method; takes a
4261 `MonoGenericContext *'.
4262 (find_method): Use mono_method_signature_full() and pass the
4263 klass'es context to it.
4265 * class.c (mono_class_is_inflated_method): Use
4266 mono_method_signature_full() and pass the context to it.
4268 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4270 * object.c: add proper locking in mono_remote_class_vtable(),
4271 fixes possible memory corruption.
4273 2005-06-08 Michael Meeks <michael.meeks@novell.com>
4275 * marshal.c (mono_remoting_marshal_init): set
4276 initialized after initialization.
4278 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
4282 2005-06-06 Michael Meeks <michael.meeks@novell.com>
4284 * object.c (extend_interface_array): fix really silly
4285 memory corrupting / comparison bug.
4287 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4289 * reflection.c: Functions added to support the creation
4290 of CustomAttributeData, which includes Attribute data
4291 used by ReflectionOnly methods.
4293 * reflection.h: mono_reflection_get_custom_attrs_data and
4294 mono_custom_attrs_data_construct added (functions exposed).
4296 * icall.c: Added mono_reflection_get_custom_attrs_data
4299 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
4301 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4304 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
4306 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4308 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4309 dynamic DllImportAttribute.
4311 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
4312 dynamic DllImportAttribute.
4314 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4317 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4319 * threads.c: avoid segfault when an unstarted thread is aborted.
4321 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
4323 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4324 Returns the name and version of the runtime for reporting.
4326 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4328 * appdomain.c: bump corlib version.
4329 * object-internals.h: new field in MonoReflectionAssembly.
4331 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4333 * object-internals.h: Carlos forgot to add this field.
4335 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4337 * icall.c: Added create_version to create instances
4338 of Version of MonoReflectionAssemblyName. This change helps
4339 the AssemblyName tests to keep running fine.
4341 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
4343 * object.c (mono_method_return_message_restore): A somehow less
4344 intrusive fix for #75138.
4346 2005-06-03 Raja R Harinath <rharinath@novell.com>
4348 * object.c (mono_method_return_message_restore): Fix computation
4349 of expected number of out args.
4351 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4353 * reflection.c (mono_image_get_method_info): Fix the case when the
4356 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4358 * object.c: Added missing null check in
4359 mono_method_return_message_restore.
4361 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4363 * reflection.c (mono_image_get_method_info): Handle the case when
4366 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4368 * object.c: When creating the vtable for a proxy, take into account
4369 all inherited interfaces, not only the ones registered in
4370 iclass->interfaces. This fixs bug #74996.
4371 Also, in mono_method_return_message_restore, verify that the array
4372 of out args has the expected lengh.
4374 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4376 * socket-io.c: update the timeout in Poll when the call is interrupte.
4378 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4380 * socket-io.c: support abort/suspend in Select_internal after last
4383 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4385 * threadpool.c: remove warning.
4387 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4390 * socket-io.[ch]: Select_internal uses poll() now when available, thus
4391 removing the 1024 limit from select(). Runtime part of the fix for
4394 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4396 * socket-io.c: when resolving the addresses for the same
4397 host returned by gethostname(), get the local IPs from the interface
4398 list. Loopback addresses are discarded if the are interfaces up with
4399 non-loopback ones. Fixes bug #63265.
4401 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
4403 * appdomain.c, verify.c, object-internals.h, reflection.c:
4404 bumped corlib number to 36, and added new extra_flags field
4405 to ReflectionMethodBuilder and friends. Fixes #75060.
4407 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4409 * gc.c: register a new weak link only if the object is non-null
4412 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4414 * culture-info.h : short time pattern too.
4416 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4418 * culture-info.h : expand long time pattern string length.
4420 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4422 * culture-info-table.h : update (more French date format; #72788).
4424 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
4426 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4427 the method is static. Fixes #75029.
4429 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
4431 * reflection.c: Update the table_idx field of method builders after
4432 saving the module, since it can change. This is a workaround for
4435 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4437 * culture-info-table.h : update (additional French date format).
4439 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
4441 * icall.c (ves_icall_type_Equals): Revert last change.
4443 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4445 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4447 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
4449 * class-internals.h: Added executioncontext_class field to
4450 MonoDefaults structure.
4451 * domain.c: Cache System.Threading.ExecutionContext class in
4453 * object.c: Capture the ExecutionContext for asynchroneous calls in
4454 mono_async_result_new.
4455 * object-internals.h: Added execution_context and original_context
4456 fields to MonoAsyncResult. Added execution_context to MonoThread.
4457 * security-manager.c|.h: Added mono_get_context_capture_method to
4458 return the capture method (if required by the security manager or by
4459 the framework version used).
4460 * threadpool.c: Apply capture (if present) ExecutionContext in
4461 mono_async_invoke and revert to original context after it completes.
4463 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
4465 * culture-info-table.h : updated (real hacky solution for zh-CHT).
4467 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
4469 * culture-info-table.h : zh-CHT related workaround.
4471 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4473 * marshal.c (emit_marshal_custom): Add some error checking and call the
4474 methods in the ICustomMarshaler interface. Fixes #74875.
4476 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4477 native->managed wrappers.
4479 2005-05-12 Martin Baulig <martin@ximian.com>
4481 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4482 here and use the loader lock.
4484 * mono-debug.c: Properly lock when the debugger is not attached.
4485 (mono_debug_init): Release the initial lock if we're not running
4488 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4490 * marshal.c (emit_marshal_custom): Pass through NULL values without
4491 calling the custom marshalling routines.
4493 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4494 conversion in structures. Fixes #74882.
4496 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
4498 * culture-info-table.h : zh-* cultures were missing.
4500 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
4502 * threads.c: Added a new event background_change_event which is signaled
4503 when a thread changes its background mode.
4504 Moved here several checks previously done in managed code. The checks
4505 require the thread lock, and using the thread lock in managed code
4506 can result in deadlocks.
4507 Merged Start_internal and Thread_internal into a single method. Now
4508 Thread_internal does all work of creating and starting a thread.
4509 Added icalls for setting and getting the state of the object. Moved from
4510 managed code to avoid locking there.
4511 Added wait_for_tids_or_state_change() which is called instad of
4512 wait_for_tids when waiting for non-backround threads to end. This method
4513 will return if one of the threads ends or the background_change_event
4515 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4516 the background mode. This method signals the background_change_event
4519 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4520 removed Start_internal.
4522 2005-05-11 Martin Baulig <martin@ximian.com>
4524 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4525 to order of some fields to get proper alignment on 64-bit machines.
4527 2005-05-11 Martin Baulig <martin@ximian.com>
4529 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4530 changes as they're broken and completely fuck up the debugger.
4532 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4534 2005-05-10 Martin Baulig <martin@ximian.com>
4536 * reflection.c (mono_reflection_generic_class_initialize): Don't
4537 call mono_class_setup_parent() here.
4539 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4541 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4542 send/receive timeout use an integer in milliseconds. We were using a
4545 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4548 (internal_get_cultures): reserve the first slot of the array for the
4549 InvariantCulture, which will be filled in managed code.
4551 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
4553 * reflection.c (mono_image_fill_module_table): Initialize the
4554 GENERATION field as well.
4556 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4558 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4559 Monitor.Enter on the object.
4561 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
4563 * threads.c: Enable the wait for running threads when exiting.
4564 * icall.c: Suspend all threads before exiting.
4566 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
4568 * assembly.c (mono_assembly_load_reference): Fix warning.
4570 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4572 * threadpool.c: changed the default number of threads per cpu. From now
4573 on, the default will be 20 + (5 * number of cpus) instead of 50.
4575 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
4577 * loader.c (mono_method_get_signature_full): Add locking here.
4579 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
4581 * appdomain.c: Moved methods for parsing and freeing assembly
4582 names to assembly.c.
4583 * assembly.c, domain-internals.h: Created public methods for parsing
4584 assembly names. Fixed mono_assembly_load_with_partial_name:
4585 it now finds the best match, taking into account the version,
4586 token and culture specified in the partial name. Also return
4587 the latest version if no version information is specified.
4589 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4591 * threadpool.c: replace check for SocketAsyncCall class.
4593 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4595 * threadpool-internals.h:
4596 * Makefile.am: added threadpool-internals.h
4598 * threadpool.c: call mono_unhandled_exception on exceptions not handled
4599 that happen in threadpool threads (tested on MS).
4600 (mono_thread_pool_remove_socket): new function that dispatch any pending
4601 AIO call on a socket that is closing. By now only epoll really needs it,
4602 as select/poll wake up when the socket closes.
4605 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4607 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
4609 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4611 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
4613 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4615 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
4617 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4618 has an abort request, convert it into a suspend request.
4620 2005-04-30 Ben Maurer <bmaurer@ximian.com>
4622 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4623 warning for the usage of `UnmanagedFunctionPointerAttribute' which
4624 is not supported yet.
4626 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4628 * image.c: register assemblies loaded from data (bundles) in the loaded
4629 assemblies hash. Fixes bug #74772.
4631 2005-04-29 Martin Baulig <martin@ximian.com>
4633 * class.c (mono_type_get_name_recurse): Update to the new naming
4634 schema from the latest .NET 2.x beta2.
4635 (mono_class_setup_vtable_general): If we're a generic instance,
4636 copy the vtable from our generic type definition and inflate all
4639 * loader.c (find_method): Update to the new naming schema from the
4640 latest .NET 2.x beta2.
4642 2005-04-29 Raja R Harinath <harinath@gmail.com>
4644 * class.c (mono_class_init): Add a mono_loader_unlock to the
4647 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
4649 * icall.c (ves_icall_System_Environment_Exit): Remove the
4650 suspend_all_other_threads () call for the time being, since it can hang.
4652 * threads.c (mono_thread_manage): Similarly, disable the waiting for
4653 the background threads to exit, since it can also hang.
4655 * class.c (mono_class_init): Applied patch from Ankit Jain
4656 (radical@gmail.com). Avoid pending init errors when a field refers
4657 to a nested class using a typeref. Fixes #74734.
4659 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4660 this for dynamic modules.
4662 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4664 * threads.c: don't wait for threads that are in the process of aborting
4665 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4666 and waiting for background threads to finish. This makes xsp and
4667 mod-mono-server exit without random length delays and/or hangs.
4669 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4671 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4673 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
4675 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4676 dynamic types to prevent infinite loops. Fixes #74727.
4678 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4679 ..._is_assignable_to.
4681 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
4683 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4685 2005-04-25 Martin Baulig <martin@ximian.com>
4687 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4690 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4692 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4694 * reflection.c (build_compressed_metadata): Set metadata header
4697 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
4699 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4700 number into an integral and a decimal part. Fixes #70473.
4702 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4704 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
4706 * culture-info-table.h : reflected the latest locale-builder output.
4708 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4710 * threadpool.c: check for SuspendRequested too when deciding if
4711 mono_thread_interruption_checkpoint should be called.
4713 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4715 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4716 * threads.c: remove interruption_mutex and use Interlocked instead. When
4717 suspending all the threads, wait for all the suspended events at once.
4718 If we're shutting down and get an APC that is going to be queued,
4719 call mono_thread_execute_interruption immediately, as the thread might
4720 be sleeping on a pthread condition or mutex.
4722 * icall.c: call mono_runtime_set_shutting_down before suspending the
4725 Fixes bug #74693. And now xsp is happier when exiting.
4727 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
4729 * loader.c (mono_stack_walk): Fix #74690.
4731 2005-04-22 Martin Baulig <martin@ximian.com>
4733 * mono-debug.h (MonoDebugMethodJitInfo): Added
4734 `MonoDebugMethodJitInfo *jit'.
4736 * mono-debug.c (mono_debug_read_method): Cache the
4737 MonoDebugMethodJitInfo in `address->jit'.
4738 (mono_debug_free_method_jit_info): New public method.
4740 2005-04-22 Martin Baulig <martin@ximian.com>
4742 * class.c (mono_class_is_assignable_from): Disallow
4743 type parameter -> interface.
4745 2005-04-21 Dick Porter <dick@ximian.com>
4747 * threads.c (mono_thread_create): Turn an assertion into an error.
4749 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
4751 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4753 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
4754 Fix some gcc 4.0 warnings.
4756 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4758 * file-io.c: fix alt dir separator char on unix systems
4759 and cleanup (fixes bug #71214).
4761 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
4763 * marshal.c: Use CALLVIRT instead of CALL when dispatching
4764 a call to a remote domain, since the method may be an
4765 interface method in the client domain. This fixes bug #74192.
4767 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4769 * threadpool.c: recv/send are now performed before going back to managed
4770 code to save one transition.
4772 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4774 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4776 * metadata/threadpool.c: removed hack to workaround the bug above.
4780 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
4782 * reflection.c reflection.h: Fix handling of parameter defaults in
4783 dynamic methods. Also fixes handling of parameter attributes.
4786 * mono-debug.c (mono_debug_close_image): Fix warning.
4788 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4790 * socket-io.h: replaced old unused field with new 'blocking'.
4791 * threadpool.c: restore socket blocking state on windows(tm).
4793 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
4795 * icall.c: don't return the codebase in the AssemblyName[] returned by
4796 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4797 * object-internals.h: Removed FIXME (fields were presents) and fixed
4798 versioncompat declaration.
4800 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4802 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4803 not closed, so don't cleanup when it happens.
4805 2005-04-13 Chris Toshok <toshok@ximian.com>
4807 * mono-debug-debugger.h: change prototype for
4808 mono_debugger_lookup_type.
4810 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4811 this function, although it should probably be named
4812 mono_debugger_init_type.
4814 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4816 * threadpool.c: fix non-AIO case.
4818 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
4820 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4821 the built-in profiler to measure just JIT compilation times.
4823 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4825 * threadpool.c: the epollfd might be closed by another thread at
4826 any time, so ignore EBADF at treat it as a "we're closing" sign.
4828 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4830 * threadpool.c: release the semaphores with a count equals to the number
4831 of working threads in both IO and regular pools. Fixed typo that messed
4832 up the count of IO pool threads. Don't initialize the pipe handles if
4835 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4837 * threadpool.c: some systems don't like a NULL when deleting the socket
4840 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4842 * threadpool.c: fix semaphore allocation.
4844 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4846 * threadpool.c: added epoll() based implementation for asynchronous IO
4847 that is used instead of the default poll() when available.
4848 It can be disabled by setting MONO_DISABLE_AIO.
4850 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4852 * threadpool.c: windows needs 'closesocket' and instead of returning
4853 0 when the stream is closed while in select, it returns -1. Fixes bug
4856 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
4858 * class.c (class_compute_field_layout): Fix the regression caused by
4861 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4863 * threadpool.c: separate pool for socket async. IO.
4864 * threadpool.h: mono_max_worker_threads is not a global any more.
4866 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
4868 * class.c (class_compute_field_layout): Fix #74549.
4870 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4872 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4873 use 2 connected sockets instead.
4875 2005-04-08 Miguel de Icaza <miguel@novell.com>
4877 * mono-config.c: Add new entry point for mkbundle
4878 mono_config_parse_memory.
4880 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4882 * threadpool.c: removed another unused function.
4884 2005-04-08 Ankit Jain <radical@corewars.org>
4886 * reflection.c (get_default_param_value_blobs): Add 'types'
4887 parameter to get the types encoded in the constant table.
4888 (mono_param_get_objects): Use the type from the constant table,
4889 not the type of the parameter, when creating default values.
4890 Handle null default values correctly.
4892 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4899 * socket-io.c: removed dead code for async IO.
4901 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4903 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4905 * threadpool.c: intercept socket async. calls and pass them to a thread
4906 that is polling and dispatching the job items to the threadpool as
4907 socket become ready. Fixes bugs #71217, #71933.
4909 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4910 between char and short/ushort arrays.
4912 * socket-io.c: remove dead code.
4914 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4917 icall.c : removed InternalToUpper_Comp() and
4918 InternalToLower_Comp().
4920 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4922 * char-conversions.h : The tables were incorrectly generated. Should
4923 be generated against invariant culture.
4925 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
4927 * object.c (mono_runtime_invoke_array): Fix return value when
4928 passing pre-created valuetype objects to ctors.
4930 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
4931 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4934 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
4936 * domain.c: removed g_assert for runtimesecurityframe_class. This is
4937 only used with --security and hides the wrong corlib version error.
4939 2005-03-30 Joshua Tauberer <tauberer@for.net>
4941 * class.c: Changed mono_class_name_from_token so that types
4942 outside of a namespace don't have an initial period. Improved
4943 the g_warning message used in _mono_class_get when loading
4945 * assembly.c: In mono_assembly_load_reference, when an assembly
4946 can't be found, "No such file or directory" is misleading and
4947 unhelpful because a few paths were checked for the presence of
4948 the assembly. When that happens (ENOENT), display a nicer
4949 message indicating the directories that were searched. In all
4950 cases, the warning is made easier to read for non-hackers.
4952 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
4954 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4956 * appdomain.h|domain.c: Removed inline from functions.
4957 * appdomain.c: Reduced warnings when compiling on windows.
4958 * icall.c: Fixed output_debug declaration to gunichar2*.
4959 * mono-config.c: Reduced warnings when compiling on windows.
4960 * rand.c: Added missing "windows.h". Added missing return value.
4961 * rawbuffer.c: Added missing winsock2.h for windows.
4962 * sysmath.h: Added mono-compiler.h header to allow/ease
4963 compilation with non-GCC compilers.
4964 * threads.c: Fixed declarations to compile with VS.NET C compiler.
4965 Removed cast warnings.
4967 Adapted from the work of J Lothian (for VC6).
4969 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
4971 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4974 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
4976 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4979 2005-03-27 Raja R Harinath <harinath@gmail.com>
4981 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
4982 has to be in $(exec_prefix). $(prefix) is for arch-independent
4983 stuff, and it would probably use $(prefix)/share rather than
4986 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4988 * console-io.c: added 2 includes that might be missing.
4990 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
4992 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4995 * reflection.c (create_custom_attr): Allocate the params array using
4996 alloca so it gets GC tracking.
4998 2005-03-23 Chris Toshok <toshok@ximian.com>
5000 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5003 2005-03-24 Raja R Harinath <rharinath@novell.com>
5005 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5006 changes to pick up any changes in prefix, etc.
5008 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5010 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5012 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5013 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5015 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5017 * class-internals.h object-internals.h class.c reflection.c: Extend the
5018 mono_lookup_dynamic_token () function to return the class of the
5021 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5024 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
5026 * security-manager.c: Skip inheritance checks for intra-corlib
5027 class inheritance and method overrides. This skips a lot of checks
5028 and (anyway) permissions cannot work until corlib is loaded.
5030 2005-03-23 Martin Baulig <martin@ximian.com>
5032 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5033 MONO_TYPE_GENERICINST.
5035 2005-03-23 Martin Baulig <martin@ximian.com>
5037 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5039 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5041 * class.c: added locking comments to some functions.
5042 Cache the interface offsets arrays (saves about 20 KB
5043 of runtime memory in a typical app).
5044 Reduce the time overhead in mono_class_setup_supertypes ().
5046 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5048 * icall.c: speedup and fix leaks in GetMethodsByName and
5049 GetPropertiesByName.
5051 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5053 * reflection.c: some locking fixes.
5055 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5057 * metadata.c: added missing break in case statement.
5059 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
5061 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5062 typedbyref return values. Fixes #73941.
5064 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
5066 * security-manager.c|h: Added demandunmanaged method and
5067 suppressunmanagedcodesecurity class to MonoSecurityManager.
5068 Renamed aptc class to allowpartiallytrustedcallers.
5070 2005-03-17 Martin Baulig <martin@ximian.com>
5072 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5074 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5076 * file-io.c: disabled file async. IO using aio_*. It uses the
5077 threadpool now. Workaround for bug #73718.
5079 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5081 * assembly.h, mono-config.c: added code to deal with bundled configs
5082 for bundled assemblies.
5084 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5086 * *.c, private.h: cleanup, removing old private.h header file.
5088 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
5090 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5091 and throw_on_unmappable_char attributes.
5093 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
5095 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5096 _ProcessName_internal.
5098 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
5100 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5103 * icall.c threads.c threads-types.h: Remove slothash icalls as they
5106 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
5108 * object.c (compute_class_bitmap): Add support for generics. Fixes
5111 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5113 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5115 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5117 * filewatcher.c: commented out the code for windows watcher, as we don't
5118 use it (we use the managed implementation instead).
5120 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5122 * object-internals.h (MonoThread): Remove 'unused1' field.
5124 * appdomain.c: Bump corlib version.
5126 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5128 * reflection.c (mono_reflection_create_runtime_class): Remove the
5129 AssemblyBuilder.Save optimization since it causes too many problems.
5131 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
5133 * exception.c|h: Added mono_get_exception_reflection_type_load to
5134 create a ReflectionTypeLoadException object.
5135 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5136 to return NULL is a InheritanceDemand fails during reflection. Updated
5137 ves_icall_System_Reflection_Assembly_GetTypes to throw a
5138 ReflectionTypeLoadException if an InheritanceDemand fails during
5139 reflection. Added icall mapping for GetLinkDemandSecurity.
5140 * security-manager.c|h: Added ves_icall_System_Security_
5141 SecurityManager_GetLinkDemandSecurity internal call to return the
5142 class and methods permissions set for a LinkDemand. Removed unused
5143 fields in MonoSecurityManager.
5145 2005-03-10 Martin Baulig <martin@ximian.com>
5147 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5148 it's a generic instance.
5150 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
5152 * reflection.c (mono_get_object_from_blob): Applied patch from
5153 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5155 * class.c (mono_class_is_assignable_from): Another try at fixing
5156 #73469 without breaking anything.
5158 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
5160 * class.c: (mono_class_is_assignable_from): Revert the last changes
5161 since they don't work with generics.
5163 * class.c (mono_class_is_assignable_from): Fix build bustage.
5165 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5166 the managed IsAssignableFrom method. Fixes #73469.
5168 * reflection.c (mono_reflection_call_is_assignable_from): New helper
5171 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
5173 * object.c (mono_load_remote_field_new): Fix returning uninitialized
5174 memory when the remoting callback does not sets the out arguments.
5177 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5180 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5182 * object-internals.h (MonoStackFrame): Sync with managed object layout.
5184 * appdomain.c: Bump corlib version.
5186 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
5188 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5191 * threads.c (mono_thread_attach): Detect threads which are not started
5192 by the GC pthread wrappers.
5194 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
5196 * icall.c: Added new icall for RNG.
5197 * rand.c|h: Added new icall to open the RNG. This allows to share a
5198 single handle on Linux to access /dev/urandom and fix #73183.
5200 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5202 * object.c: setting the new vtable in a transparent proxy object must
5203 not change the GC descriptor.
5205 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5207 * object.c: fixed compilation without GCJ support.
5208 * reflection.c: for runtime-created types ensure klass->has_references
5209 is correct (bug #73215).
5211 2005-03-02 Martin Baulig <martin@ximian.com>
5213 * class.c (mono_class_is_assignable_from): Make this work if
5214 `oklass' is a generic instance; fixes #72831.
5216 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5218 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5221 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5223 * marshal.c: Reorganize native->managed marshalling code to also use
5224 the emit_marshal_... functions.
5226 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5228 * object.c: typed allocs have issues with bitmap sizes > 30,
5229 so check for max_set >= 30.
5231 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5233 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5234 managed code. Fixes #73012.
5236 * metadata.h (MonoMarshalSpec): Add elem_mult field.
5238 * metadata.c reflection.c: Load/Emit elem_mult as well.
5240 * metadata.h (MonoMarshalSpec): Add comment.
5242 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5244 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5245 num_elem to -1 if not given.
5247 * object-internals.h (MonoReflectionMarshal): Add has_size field.
5249 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5252 2005-03-01 Marek Safar <marek.safar@seznam.cz>
5254 * null-gc.c (mono_gc_free_fixed): Was not compilable.
5256 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
5258 * reflection.c (encode_marshal_blob): Encode param_num field as well.
5260 * object-internals.h (MonoReflectionMarshal): Add param_num field.
5262 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5264 * object.c: generalized the reference bitmap creation
5265 and added hooks for the new GC.
5266 * class-internals.c: removed the gc_bitmap field from MonoClass.
5268 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5270 * domain.c: help the compiler to produce better code
5271 in mono_jit_info_table_find ().
5273 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5275 * object.c: make all allocations look typed.
5277 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5279 * socket-io.c: load Mono.Posix if it's not loaded already
5282 2005-02-24 Martin Baulig <martin@ximian.com>
5284 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5285 * reflection.c (dup_type): Likewise.
5287 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
5289 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5290 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5292 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5294 * domain.c, threads.c, object-internals.h: make the critical thread
5295 local vars use the fast access mode (even when we're compiled in
5296 a lib). Provide accessors to be used by the jit during codegen.
5298 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5300 * appdomain.c: Changed hook functios behavior to include
5301 support for the reflection only assemblies. Some icalls were changed
5302 to support the mentioned assemblies too. Signatures of static methods
5303 try_assembly_resolve and real_load now have an additional parameter:
5306 * assembly.c: General changes to mono_assembly_ methods to support
5307 reflection only api. Functions mono_assembly_open, mono_assembly_load,
5308 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5309 suffix, to support an additional gbool parameter to specify whether
5310 the assembli is reflection only or not. Created some new hook functions
5311 to add support for reflection only assemblies. Signatures of static
5312 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
5313 have now an additional parameter: refonly.
5315 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5316 indicating whether the assembly is reflection only or not.
5318 * exception.c: Add mono_get_exception_invalid_operation.
5320 * icall.c: Throw an InvalidOperationException when trying to invoke
5321 a property/method/event, or trying to set/get the value of a field.
5322 Also add an icall to retrieve the ref_only flag to the
5323 MonoReflectionAssembly.
5325 2005-02-23 Chris Toshok <toshok@ximian.com>
5327 Part of fix for #72827.
5328 * mono-debug.c (mono_debug_add_method): add lexical block data to
5329 the info we write. Kind of a hack at the moment - we copy the
5330 lexical block info from the MonoDebugMethodInfo to the
5331 MonoDebugMethodJitInfo here, before writing it.
5332 (mono_debug_read_method): read the lexical block info.
5334 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5336 * debug-mono-symfile.h: add lexical block support.
5338 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5341 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5343 * loader.c (mono_lookup_pinvoke_call): Fix warning.
5345 * object.c (mono_runtime_free_method): Call mono_free_method () and
5346 put the TODOs there.
5348 * loader.c (mono_free_method): Free up most memory allocated for
5351 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5353 * reflection.c: properly flag a Type argument to a
5354 named custom attr value (bug #72248).
5356 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5358 * reflection.c: reduce code duplication in named custom
5361 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5363 * reflection.c: properly encode custom attrs of type object
5366 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5368 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5370 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5372 * socket-io.c: load System.dll if it's not loaded already
5373 (bug #72850 and #70477).
5375 2005-02-21 Martin Baulig <martin@ximian.com>
5377 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5380 2005-02-21 Martin Baulig <martin@ximian.com>
5382 * reflection.c (mono_image_build_metadata): We also need to
5383 "fixup" the MethodImpl table after we computed the final method
5384 indices. Call fixup_methodimpl() to do that.
5385 (fixup_methodimpl): New private method.
5387 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5389 * assembly.c: special case mscorlib.dll (bug#72536),
5390 patch from Carlos Alberto Cortez.
5392 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
5394 * threads-types.h threads.c: Fix build bustage.
5396 * threads.c: Use a union for long<->double conversions.
5398 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5399 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5401 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
5402 containing the checkpoint call with NOT_TAKEN.
5404 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
5405 checkpoint before pushing the arguments, so they won't have to be
5408 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5410 * domain.c, assembly.c, domain-internals.h: make some data
5411 const and relocation-free.
5413 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5415 * object.c, appdomain.c, class-internals.h: introduce the
5416 MonoClassRuntimeInfo structure to hold the info needed to
5417 use a class at runtime. Made mono_class_vtable() lock-free
5418 for all the appdomains.
5420 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5422 * metadata-internals.h, image.c: introduce a per-image mempool to
5423 be used for memory that has the same lifetime as the image.
5425 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
5427 * domain.c: In mono_init_internal(), instead of selecting the first
5428 runtime version supported by an executable, get a list of all
5429 supported versions and select the one for which an mscorlib exists
5430 (since even if the runtime supports a given version, it doesn't mean
5431 that the framework for that version is installed).
5432 Modified get_runtimes_from_exe to support this behavior.
5433 In supported_runtimes, added information about additional system
5436 * assembly.c: Added support for more than one system assembly version
5437 per runtime version. Updated the assembly list.
5438 In mono_assembly_remap_version, removed the initial version check,
5439 since we don't know to which version we need to compare until we
5440 get the version set on which the assembly is based.
5441 Moved the code for loading corlib into the new method
5442 mono_assembly_load_corlib(), so it can be used by the initialization
5445 * domain-internals.h: Updated data structures and added declaration
5446 for mono_assembly_load_corlib.
5448 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5450 * reflection.c (resolve_object): Fix the creation of the signature in
5451 the SignatureHelper case.
5453 * assembly.c (mono_assembly_remap_version): Fix binary search.
5455 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
5457 * class.c: Added inheritance check when a method is overloaded (from a
5458 virtual method or when implementing an interface) and when a class is
5459 inherited. Added functions to set a failure for a class and to
5460 retreive the exception from a failure.
5461 * class-internals.h: Added fields to MonoClass to keep the exception
5462 information status for inheritance (or other exceptions) to be thrown
5463 later (i.e. not at load time).
5464 * object.c: Throw the inheritance SecurityException when a type is to
5465 be created with either class or method inheritance violations.
5466 * reflection.c|h: Fix when getting declsec from a class. Removed
5467 unrequired code for class. Improved sanity in parameter naming.
5468 * security-manager.c|h: Added functions to check for class and method
5471 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5473 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5474 and has_finalize in dynamic types as well.
5476 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
5478 * culture-info-table.h : fixed currency format for en-GB (and so on).
5480 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5482 * gc.c: ensure the GC handles never have 0 as a value.
5484 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5486 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5487 a pointer to a struct to unmanaged code. Fixes #72625.
5489 2005-02-16 Martin Baulig <martin@ximian.com>
5491 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5493 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5495 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5497 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5499 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5501 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
5502 UnmanagedFunctionPointerAttribute, use it for determining calling convention
5505 * reflection.c (mono_custom_attrs_get_attr): New helper function.
5507 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5509 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5511 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5512 changes to make the current context a field in MonoThread.
5514 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5516 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5519 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5520 extracted from mono_marshal_get_native_wrapper.
5522 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5523 to create wrappers around native functions.
5525 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
5526 delegates for arbitrary function pointers. Fixes #71472.
5528 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5530 * threads.c: cleaned up the code a little.
5532 2005-02-15 Martin Baulig <martin@ximian.com>
5534 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5537 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5538 allocate larger chunks if needed.
5540 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5542 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5545 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5547 * domain.c: keep the domains in an array and ensure the domain ids
5548 are kept small, so they can be used as indexes to domain-specific data
5549 with a small memory overhead.
5551 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5553 * icall.c: Handle byref types in Type icalls. Fixes #72544.
5555 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5557 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5559 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
5561 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5563 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5566 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5568 2005-02-12 Ben Maurer <bmaurer@ximian.com>
5570 * domain-internals.h: add the hashtable here.
5572 * class-internals.h: Remove `info' from MonoMethod
5574 * domain.c: Add a new hashtable, jit_trampoline_hash
5576 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5578 * object.c: don't set the value of static fields
5581 2005-02-11 Martin Baulig <martin@ximian.com>
5583 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5584 (mono_debug_add_method): Silently ignore the method if it's too big.
5585 (mono_debug_add_type): Likewise.
5587 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5589 * threads.c, appdomain.c: remove #ifdefs from the code.
5591 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
5593 * metadata-internals.h: Added flags to MonoAssembly to cache the most
5594 common security informations. This allows us to stay in unmanaged code
5595 when doing LinkDemand and it's special cases (except for the first
5596 time for initialization). The flags a very much used with --security.
5597 * reflection.c|h: Added code to get declarative security attributes
5598 for LinkDemand and InheritanceDemand. This required to refactor the
5599 existing code for Demand.
5600 * security-manager.c|h: Added new method fields for the special cases
5603 2005-02-10 Martin Baulig <martin@ximian.com>
5605 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5606 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5608 2005-02-10 Martin Baulig <martin@ximian.com>
5610 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5611 debugging code; this is almost a complete rewrite.
5613 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5615 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5617 * domain.c, object.h: expose mono_string_equal () and
5618 mono_string_hash ().
5619 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5620 it's implemented in managed code.
5622 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5624 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5625 lo leak objects between appdomains.
5627 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5629 * assembly.c: old compilers compilation fix from
5630 robertj@gmx.net (Robert Jordan).
5632 2005-02-09 Ben Maurer <bmaurer@ximian.com>
5634 * class-internals.h: Little reminder for the future.
5636 * debug-helpers.c: Fix up wrapper_type_names
5638 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5640 * image.c, metadata-internals.h: when loading an image from a file,
5641 mmap all of it and use the same codepaths as when using a
5642 in-memory image: the code is simpler and we use less memory
5643 (both writable and readonly).
5645 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5647 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5648 API to alloc runtime data structures that need to be tracked by the
5649 GC and contain pointers.
5650 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5651 make the code more readable and eventually use a different GC.
5653 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
5655 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5658 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
5660 * object.c: In release_type_locks(), don't release the cctor lock
5661 if it has already been released. This fixes a crash in the
5664 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5666 * gc.c, marshal.c, icall.c: register a delegate for finalization
5667 only when the native function pointer has been allocated for it.
5669 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5671 * object.c: cleaned up some code, allocate objects that are
5672 pointer free with the atomic malloc variant. Allocate memory
5673 for static data from the mempool if it's pointer-free.
5674 Allocate the bounds array at the end of the array data, when needed.
5675 * object-internals.h, object.h: move a private function in a private
5677 * class.c: handle missing case in tracking references in fields.
5679 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5681 * class.c, class-internals.h: keep track if a type has
5682 reference fields in either the instance or static fields.
5684 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
5686 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5687 and renamed to MonoRuntimeInfo. Added fields to store the expected
5688 framework assembly version. Changed mono_get_framework_version and
5689 mono_get_runtime_version for a single mono_get_runtime_info method.
5691 * assembly.c: Added method to remap system assembly versions to the
5692 current executing runtime version. Removed old mapping code.
5693 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5695 * icall.c, reflection.c: Track api changes.
5697 2005-02-06 Miguel de Icaza <miguel@novell.com>
5699 * loader.c (method_from_memberref): Improve error reporting,
5700 produce the class name instead of the typeref/typedef index.
5702 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
5704 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5706 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5708 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5709 stdcall and charset name mangling. Reorganize the code and add
5712 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5714 * monodiet.c: More iters!
5716 * marshal.c: Iter usage.
5718 * icall.c: Iter usage.
5720 * object.c: Use iters.
5722 * debug-helpers.c: More iters
5724 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5726 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5729 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5731 * mono-debug-debugger.c: use iters
5733 * class.c, class-internals.h: mono_class_setup_events is static
5736 * All callers: use iters
5738 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5740 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5741 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5743 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5745 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5747 * marshal.h: Add prototypes for ldfld/stfld_remote.
5749 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5750 this is called during startup.
5752 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5754 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5755 MonoThreadsSync struct private in monitor.c. Changed the way
5756 MonoThreadsSync is allocated so it's faster and there is no
5757 need to keep track of it with a finalizer and it uses less memory.
5758 This also finally allows us to allocate mono objects as ptrfree when
5759 there are no reference fields.
5761 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5763 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5764 disappearing link to the GC interface and use them to simplify
5767 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5769 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5770 stfld_remote which call mono_load/store_field_new. This allows methods
5771 calling ldfld/stfld wrappers to be AOTed.
5773 * console-io.c: Include sys/filio.h under solaris.
5775 * console-io.c: Include curses.h if needed correctly.
5777 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5779 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5780 method->klass as well.
5782 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5784 * class.c (mono_class_init): Switch on lazy initialization of
5787 * class.c (mono_class_get_finalizer): Handle the case when the
5788 finalizer is inherited.
5790 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5792 * console-io.c: <curses.h> is needed by term.h on solaris.
5794 2005-02-03 Ben Maurer <bmaurer@ximian.com>
5796 * icall.c, class-internals.h, monodiet.c, class.c: Remove
5797 mono_class_setup_properties where possible. Remove this ftn from
5798 the header file, and make it static.
5800 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5802 * loader.c: Add missing setup_... call.
5804 * class.c: Add missing setup_... calls.
5806 * class.c (mono_class_init): Switch on lazy initialization of
5809 * class.c (mono_class_init): Fix generics broken by the recent changes.
5811 * monodiet.c (handle_type): Add missing setup_... calls.
5813 * class.c: Back out garbage in previous patch.
5815 * class.c: Add missing setup_... calls.
5817 * class.c (mono_class_get_method_from_name_flags): Avoid calling
5818 mono_class_setup_methods () if possible.
5820 * class-internals.h (MonoClass): Add 'has_cctor' flag.
5822 * class-internals.h (MonoCachedClassInfo): New structure.
5824 * class.c: Initialize properties and events fields of MonoClass lazily.
5826 * class.c: Add infrastructure for lazily initializing the methods and
5827 vtable fields of MonoClass. Not yet used.
5829 * class.c (mono_class_get_finalizer): New helper function.
5831 * class.c: Add infrastructure for loading some class related data from
5834 * object.c: Add infrastructure for initializing the vtable from data
5837 * gc.c (run_finalize): Use mono_class_get_finalizer ().
5839 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5840 appropriate initialization function before accessing parts of the
5841 MonoClass structure.
5843 * marshal.c: Fix warnings.
5845 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5847 * mono-debug-debugger.c (get_exception_message): Use
5848 mono_class_get_method_from_name_flags ().
5850 2005-02-02 Ben Maurer <bmaurer@ximian.com>
5852 * reflection.c, appdomain.c: Replace a few manual searches that
5853 Zoltan missed. (Paolo approved this part of my initial patch).
5855 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5857 * profiler.c: disable recording statistical events at report time.
5859 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5861 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5862 to byteswap arrays of enum values, too (bug #72080).
5864 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
5866 * appdomain.c (set_domain_search_path): Allow this to be called if
5867 domain->setup is not yet set.
5869 * loader.c (mono_method_get_index): New helper function.
5871 * loader.c reflection.c: Use mono_method_get_index ().
5873 * class.c (mono_class_get_method_from_name_flags): New helper method.
5875 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5878 * class.c (mono_class_get_cctor): New helper method.
5880 * string-icalls.c object.c class.c marshal.c reflection.c: Use
5881 mono_class_get_method () to look up methods.
5883 2005-02-01 Miguel de Icaza <miguel@novell.com>
5885 * console-io.c: Fix the build, this should work on Windows.
5887 2005-01-31 Ben Maurer <bmaurer@ximian.com>
5889 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5890 be set to null to keep things valid
5892 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5894 * icall.c: added Console 2.0 icalls.
5895 * Makefile.am: added console-io.[ch]
5896 * console-io.[ch]: internal calls for Console 2.0 API.
5898 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5900 * class.c: make sure we consider all the interfaces
5901 when calculating max_interface_id (bug found by
5902 Jeroen Frijters running ikvm).
5904 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
5906 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5907 valuetype fields to null.
5909 * object.c (set_value): Ditto. Fixes #71669.
5911 2005-01-31 Martin Baulig <martin@ximian.com>
5913 * metadata.c (mono_metadata_has_generic_params): New public
5914 function; checks whether something is a generic method.
5916 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5918 * appdomain.c: fix infinite recursion when adding assemblies.
5920 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
5922 * object.c: Fix small typo to return all items for Environment.
5925 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5927 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5928 reflection.c: more domain and assembly-unload related fixes
5929 and memory leaks plugs.
5931 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
5933 * 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.
5935 2005-01-29 Ben Maurer <bmaurer@ximian.com>
5937 * loader.c (mono_method_signature): Make this method lazy
5938 (mono_get_method_from_token): Don't computate the signature here.
5940 Doing this saves quite a bit of memory. I got 90 kb on starting up
5941 monodoc. It should also save some disk reads on startup.
5943 * *: MonoMethod->signature might be NULL now. You *MUST* use
5944 mono_method_signature.
5946 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
5948 * object.c (mono_runtime_get_main_args): Return an array from the
5949 current domain here. Fixes #71938.
5951 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5953 * monitor.c: formatting changes to comply with the
5954 mono coding style and remove #ifdefs from the code.
5956 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5958 * metadata.c, private.h: remove some unneeded data
5959 and use a more compact representation for table schemas.
5961 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5963 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5964 to get a better distribution in hash tables.
5965 * *.c: use mono_aligned_addr_hash() where appropriate.
5966 * assembly.c: make var static.
5968 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
5970 * domain-internals.h: Put MonoJitInfo on a diet.
5972 * domain.c: Fix a warning.
5974 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5976 * gc.c: rework the gc handles code to reuse handles
5979 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5981 * domain.c: fixed long standing bug in mono_string_equal() which
5982 was brought to light with the ldstr changes.
5984 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
5986 * reflection.c: Remove warning by adding missing include for marshal.h
5988 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5990 * domain.c, object.c: change the ldstr_table to hold
5991 MonoString* as keys: makes the runtime isinterned lookup
5992 faster and simplifies memory management.
5994 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
5996 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5997 possible to add imperative security checks before calling the icall.
5998 * reflection.c: Return security attributes on the original MonoMethod
5999 (and not the wrapped one). This fix permissions on icalls.
6001 2005-01-25 Dick Porter <dick@ximian.com>
6003 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6004 the check for mktime() support actually test the mktime() return
6005 value. "Fixes" bug 71682, though the output is still different to
6008 2005-01-25 Martin Baulig <martin@ximian.com>
6010 * class.c (mono_class_is_assignable_from): Make this work for
6013 2005-01-24 Ben Maurer <bmaurer@ximian.com>
6015 * marshal.c (mono_string_utf8_to_builder)
6016 (mono_string_builder_to_utf16): We might not have ownership of the
6017 string. In thise case, we need to create a new buffer.
6019 * object-internals.h (mono_stringbuilder_capacity): sb->str might
6020 be null, in which case, use the default capacity.
6022 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6024 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6025 GC events to the profiler.
6027 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6029 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6030 if you don't want the GC to run.
6032 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6034 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6035 start providing a GC API and keeping different implementations in
6037 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6039 2005-01-22 Ben Maurer <bmaurer@ximian.com>
6041 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6042 mmap rather than allocating a huge buffer.
6043 (mono_debug_close_mono_symbol_file): Free the buffer allocated
6046 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
6048 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6049 and CheckExecutionRights.
6050 * reflection.c|h: Keep the index of the declarative security to be
6051 used, instead of the pointer, when AOT compiler is used. Also add
6052 class initialization when requesting demands.
6053 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6054 CheckExecutionRights. Both properties are now FALSE by default, and
6055 unmodifiable, unless the --security option is used.
6057 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6059 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6060 reflection.c: properly refcount images and assemblies, many leaks fixed.
6062 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6064 * threadpool.c: increase the timeout for threads in the thread pool to
6065 10s. Fixes bug #67159.
6067 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
6069 * class-internals.h: Sun's compiler insists on explicit
6070 signed on bit fields to handle then correctly.
6072 2005-01-19 Miguel de Icaza <miguel@ximian.com>
6074 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6075 Make the size of the array fit only the number of invalid path
6078 * class.c (_mono_class_get): Improve the error reporting when a
6079 class referenced is not found, to assist debugging.
6081 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6083 * threads.c: fix off-by-one error.
6084 * domain.c: free data allocated in the domain.
6086 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6088 * reflection.c (mono_method_body_get_object): Fill out exception info
6091 * object-internals.h: Add MonoReflectionExceptionHandlingClause
6094 2005-01-19 Martin Baulig <martin@ximian.com>
6096 * loader.c (mono_get_method_constrained): Make this work again.
6098 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6100 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
6101 guint16 to match the managed side.
6103 * reflection.c (mono_reflection_body_get_object): Fill out local
6106 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6109 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6110 'local_var_sig_token'.
6112 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
6114 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
6117 * reflection.c (mono_method_body_get_object): Handle abstract and
6120 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6122 * marshal.c, loader.c, class-internals.h, reflection.c:
6123 store the emthod data for a wrapper in an array instead of a list.
6125 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6127 * marshal.c: change the code to allocate memory more
6128 conservatively for method wrappers.
6130 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6132 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6133 fields from MonoClass to the marshal info structure where they belong.
6135 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6137 * class.c, object.c, class-internals.h, marshal.c: rearrange
6138 some fields and tweak some types to lower memory usage.
6140 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
6142 * threads.c (signal_thread_state_change): Handle the case when the
6143 target thread is the current thread.
6145 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6147 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
6148 emit_ptr_to_object_conv.
6150 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6151 marshalling. Fixes #71352.
6153 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6155 * metadata.h, blob.h: move table enum to blob.h so it can be included
6157 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6158 cut the size of MonoImage/MonoDynamicImage.
6160 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
6162 * profiler.c (mono_profiler_install_simple): Fix default arguments.
6164 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6166 * reflection.c, reflection.h, icall.c: add a function to check
6167 if an attribute type is defined for a metadata object.
6169 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
6171 * object-internals.h: Added some needed fields from StringBuilder class.
6172 * marshal.c: Set the maxCapacity when creating a StringBuilder.
6174 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
6176 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6177 threads before shutting down the runtime.
6179 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6181 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6183 * object-internal.h, threads.c: implement stacksize and
6184 parameterized thread start functionality (requires
6185 matching corlib). Marked broken code for later removal.
6187 2005-01-12 Martin Baulig <martin@ximian.com>
6189 * class-internals.h (MonoGenericClass): Moved the `initialized'
6190 flag to MonoDynamicGenericClass, removed `init_pending'.
6191 (MonoGenericInst): Added `is_reference' flag.
6193 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
6195 * reflection.c (mono_image_create_pefile): Only set the pe_offset
6196 inside the MSDOS header. Fixes #71201.
6198 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6200 (mono_domain_finalize): Ditto.
6202 2005-01-12 Martin Baulig <martin@ximian.com>
6204 * class.c (mono_get_shared_generic_class): Use the cache for
6205 non-dynamic generic classes.
6207 * class-internals.h (mono_class_create_generic_2): Removed
6208 function prototype, this function is now static inside class.c.
6210 * class.c (mono_class_create_generic_2): Made this static, only
6211 call it from mono_class_init() and mono_class_setup_parent().
6212 (collect_implemented_interfaces_aux): Call mono_class_init() on
6213 the interfaces we collect.
6214 (mono_class_setup_vtable): Call mono_class_init (class->parent).
6216 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6218 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6219 it a real thread handle.
6221 * domain-internals.h: Move exvar_offset from MonoJitInfo to
6222 MonoJitExceptionInfo, since each catch clause needs its own variable.
6224 2005-01-11 Dick Porter <dick@ximian.com>
6226 * image.c (mono_pe_file_open): New variant on mono_image_open()
6227 that does not set up the CLI metadata; used for FileVersionInfo so
6228 it can get the data for windows binaries too.
6230 * process.c (process_read_string_block): Don't read off the end of
6231 the StringTable block.
6233 These both fix bug 70766.
6235 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6237 * gc.c: set some fields to NULL at GC cleanup time.
6238 * threads.c: if we quit the main thread, call exit ().
6240 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6242 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6244 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6246 * threads.h, threads.c, object.c: added accessor and settor for
6247 main_thread. Handle it specially when exiting from it: wait
6248 for other foreground threads to exit.
6250 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6252 * process.c, verify.c: remove some bloat.
6254 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
6256 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6257 the calling convention to cdecl under win32.
6259 2005-01-08 Ben Maurer <bmaurer@ximian.com>
6261 * object.c (mono_object_get_size): New function to get the size of
6264 * profiler.c (simple_allocation): Use above.
6266 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
6268 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6269 ves_icall_System_AppDomain_getRootDomain (as it's not required to
6270 get an appdomain by it's id and we can't assume the root's id is 0).
6271 * domain-internals.h: Change the function prototype to match.
6272 * icall.c: Change the icall table for AppDomain.
6274 2005-01-08 Miguel de Icaza <miguel@ximian.com>
6276 * locales.c (string_invariant_compare_char): Only compute
6277 GUnicodeTypes in the case where we need them. Test for ordinality
6278 first and return if so.
6283 * FIXME: here we must use the information from c1type and c2type
6284 * to find out the proper collation, even on the InvariantCulture, the
6285 * sorting is not done by computing the unicode values, but their
6286 * actual sort order.
6289 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6291 * loader.c: for P/Invoke methods, allow the "Internal" shared
6292 library name to refer to the calling process symbol namespace.
6294 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
6296 * Makefile.am: Add the security manager to the build.
6297 * security-manager.c|h: New. Initialization of the security manager.
6299 2005-01-07 Dick Porter <dick@ximian.com>
6302 * monitor.c: Update thread state during Monitor and WaitHandle
6303 waits. Fixes bug 71031.
6305 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
6307 * reflection.c (property_encode_signature): Correctly handle when the
6308 property has no methods.
6310 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
6312 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6314 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6315 fields from mb, not rmb. Fixes #71017.
6317 * marshal.c (emit_ptr_to_str_conv): Add support for
6318 ByValTStr -> string conversion. Fixes #71015.
6320 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6322 * mempool.c (mono_mempool_contains_addr): New helper function.
6324 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6326 * metadata.c (mono_metadata_compute_size): Fix size calculation of
6327 HasSematics encoded fields.
6329 * metadata.c (mono_type_to_unmanaged): Improve error message for
6330 invalid string marshalling.
6332 * metadata.c: Fix warnings.
6334 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6336 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6339 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6341 * domain.c object.c domain-internals.h: Revert part of r38077 since the
6342 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6345 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
6347 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6348 so methods containing these can be AOTed.
6350 2005-01-03 Martin Baulig <martin@ximian.com>
6352 * loader.c (find_method): Removed the hack for generic instances.
6353 (method_from_memberref): If our parent is a generic instance, pass
6354 its generic type definition to find_method() and then inflate the
6356 (mono_get_method_constrained): Pass the generic type definition to
6357 find_method() and inflate the method later.
6359 * class-internals.h (MonoStats): Added `generic_class_count'.
6361 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6362 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6364 * reflection.c (mono_custom_attrs_from_params): Don't ignore
6365 generic type definitions.
6367 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
6369 * loader.c icall.c: Fix warnings.
6371 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
6373 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6374 blittable types. Fixes #70864.
6376 2004-12-29 Martin Baulig <martin@ximian.com>
6379 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6381 * reflection.c (mono_method_get_object): Create a
6382 "System.Reflection.MonoGenericMethod" for inflated methods; don't
6383 call mono_get_inflated_method().
6385 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6387 2004-12-27 Martin Baulig <martin@ximian.com>
6389 * class-internals.h (MonoMethod): Added `is_inflated' flag.
6390 (MonoMethodInflated): Added `inflated' field.
6392 * class.c (mono_class_inflate_generic_method): Don't really
6393 inflate the method here; just set the `is_inflated' flag in the
6395 (mono_class_get_inflated_method): Actually inflate the method here
6396 if it's not already inflated; we use the MonoMethodInflated's new
6397 `inflated' field as a cache.
6399 2004-12-26 Martin Baulig <martin@ximian.com>
6402 (inflate_generic_class): Moved some code out of inflate_generic_type().
6403 (mono_class_inflate_generic_method): If we're already inflated,
6404 inflate the context and use the declaring method; ie. make sure
6405 the declaring method of an inflated method is always the generic
6407 (mono_class_create_from_typedef): Create
6408 `class->generic_container->context->gclass'.
6410 2004-12-24 Ben Maurer <bmaurer@ximian.com>
6412 * metadata-internals.h, marshal.c, reflection.c: More
6413 MonoGHashTable->GHashTable.
6415 * domain-internals.h, class.c: Change MonoGHashTable's into
6416 GHashTables for some cases where no gc stuff is used
6418 All users: update apis
6420 2004-12-23 Ben Maurer <bmaurer@ximian.com>
6422 * metadata.c (builtin_types): Make this `const'. Makes this get
6423 put into the shareable section.
6424 (mono_metadata_init): Casts to make gcc happy.
6426 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
6428 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6430 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
6432 * icall.c: Added an internal call to retrieve the position and length
6433 of assembly-level declarative security attributes (RequestMinimum,
6434 RequestOptional and RequestRefuse). This is used by the Assembly class
6435 to re-create the corresponding permission sets.
6437 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6439 * marshal.c: fix the stelemref wrapper to be type correct
6442 2004-12-20 Ben Maurer <bmaurer@ximian.com>
6444 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6445 to do key & 0x7fffffff. Hashtable already does this. It just
6446 results in longer code.
6448 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
6450 * appdomain.c: Bump corlib version.
6451 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6452 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6453 * reflection.c|h: Add functions to get declarative security infos
6454 (blob position and length) for assemblies, classes and methods.
6456 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6458 * reflection.c: sort the constant table (bug #70693).
6460 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6462 * object-internals.h, threads.c, domain.c: add accessors for
6463 the MonoThread and MonoDomain tls keys.
6465 2004-12-18 Martin Baulig <martin@ximian.com>
6467 * class.c (inflate_generic_type): If we're inflating a generic
6468 instance, set `ngclass->context->container = context->container';
6469 ie. the container we inflated into.
6471 * metadata.c (mono_metadata_parse_generic_param): Reflect above
6472 inflate_generic_type() changes.
6474 2004-12-17 Martin Baulig <martin@ximian.com>
6477 (MonoGenericClass): Replaced `MonoType *generic_type' with
6478 `MonoClass *generic_class'. Removed `dynamic_info'; if
6479 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6480 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6482 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
6484 * exception.c (mono_exception_from_token): New helper function.
6486 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
6488 * assembly.c (mono_assembly_load_with_partial_name): Call
6489 mono_assembly_loaded before invoking the preload hooks. Fixes
6492 * object-internals.h (MonoThread): Change culture_info and
6493 ui_culture_info into an array.
6495 * threads.c: Cache culture info objects from more than one appdomain.
6497 * threads.c threads-types.h icall.c: Add icalls for manipulating the
6500 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
6502 * threads.h threads.c appdomain.c: Clear the culture_info field of
6503 all threads during unloading if they point to an object in the dying
6506 2004-12-13 Ben Maurer <bmaurer@ximian.com>
6508 * culture-info.h (TextInfoEntry): New struct
6509 * object-internals.h: sync with managed
6510 * locales.c: fill the `text_info_data' field
6511 * culture-info-tables.h: update
6513 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6515 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6518 2004-12-12 Ben Maurer <bmaurer@ximian.com>
6520 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6521 (ves_icall_ModuleBuilder_getMethodToken): Ditto
6523 2004-12-12 Martin Baulig <martin@ximian.com>
6525 * mono-debug-debugger.c (write_type): If we're an enum and the
6526 builtin types have already been initialized, call mono_class_init().
6528 2004-12-11 Martin Baulig <martin@ximian.com>
6530 * metadata.c (mono_metadata_load_generic_params): Added
6531 `MonoGenericContainer *parent_container' argument; automatically
6532 compute `container->is_method'; pass the correct owner to
6535 * reflection.c (compare_genericparam): Sort the GenericParam table
6536 according to increasing owners.
6538 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6540 * profiler.c: allow disabling the default profiler.
6542 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6544 * decimal.c, icall.c: allow disabling System.Decimal support.
6546 2004-12-09 Marek Safar <marek.safar@seznam.cz>
6548 * reflection.c: Add support for null attribute arguments.
6550 2004-12-09 Martin Baulig <martin@ximian.com>
6552 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6553 names to get rid of compiler warnings.
6555 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6557 * marshal.c (mono_marshal_get_struct_to_ptr): Call
6558 mono_marshal_load_type_info (). Fixes #69625.
6559 (mono_marshal_get_ptr_to_struct): Likewise.
6561 2004-12-08 Martin Baulig <martin@ximian.com>
6563 * mono-debug.h: Bumped version number to 47.
6565 * mono-debug-debugger.c
6566 (mono_debugger_event_handler, mono_debugger_event): Take two
6567 guint64 arguments insteed of a gpointer and a guint32.
6569 2004-12-08 Martin Baulig <martin@ximian.com>
6571 * debug-mono-symfile.h
6572 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6573 `address' to `native_offset'.
6575 2004-12-08 Martin Baulig <martin@ximian.com>
6577 * class.c (mono_class_create_from_typespec): Only inflate if we
6578 either have `context->gclass' or `context->gmethod'.
6580 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6582 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6584 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6586 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6588 * reflection.c (mono_assembly_get_object): Remove the workaround put
6591 * appdomain.c: Use the corlib_internal field from MonoAssembly.
6593 * appdomain.c: Bump corlib version.
6595 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6596 be visible in other appdomains.
6598 2004-12-07 Ben Maurer <bmaurer@ximian.com>
6600 * threads.c: Interlocked inc and dec for longs were messed up,
6601 use a KISS based impl for this. Fixes 70234
6603 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
6605 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6607 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6609 * icall.c: fix to follow policy not to allow struct
6610 arguments in icalls.
6612 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6614 * process.c: make the patch that handles spaces in file paths work
6615 on mono/windows too.
6617 2004-12-06 Martin Baulig <martin@ximian.com>
6619 * class.c (mono_class_create_generic): Call
6620 mono_class_setup_supertypes() if we're dynamic.
6621 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6623 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
6625 * object-internals.h: Add new fields to MonoThread.
6627 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6629 * icall.c threads-types.h threads.c: Add new icalls.
6631 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6633 * object-internals.h (MonoReflectionAssembly): Sync object layout with
6636 * appdomain.c: Bump corlib version.
6638 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6639 internal assemblies. Fixes #69181.
6641 2004-12-05 Martin Baulig <martin@ximian.com>
6643 * class.c (mono_class_inflate_generic_signature): Make this a
6644 no-op if `context' is NULL or we don't have any type parameters;
6645 also copy `sentinelpos'.
6647 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
6649 * image.c: Add unbox_wrapper_cache.
6651 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6653 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6656 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6659 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6661 2004-12-04 Martin Baulig <martin@ximian.com>
6663 * loader.c (mono_method_get_signature_full): New public function;
6664 like mono_method_get_signature(), but with an additional
6665 `MonoGenericContext *' argument.
6667 * class.c (mono_class_inflate_generic_signature): Formerly known
6668 as inflate_generic_signature(); make this public.
6670 2004-12-04 Martin Baulig <martin@ximian.com>
6673 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6674 instead of a `MonoGenericContainer *'.
6675 (mono_metadata_parse_array_full): Likewise.
6676 (mono_metadata_parse_signature_full): Likewise.
6677 (mono_metadata_parse_method_signature_full): Likewise.
6678 (mono_metadata_parse_generic_inst): Likewise.
6679 (mono_metadata_parse_generic_param): Likewise.
6680 (mono_metadata_parse_mh_full): Likewise.
6681 (mono_type_create_from_typespec_full): Likewise.
6683 2004-12-03 Martin Baulig <martin@ximian.com>
6685 * class-internals.h (MonoGenericContainer): Replaced the
6686 `MonoGenericContext * pointer with a `MonoGenericContext'
6687 structure and made it the first element.
6689 2004-12-03 Martin Baulig <martin@ximian.com>
6692 (inflate_generic_type): Set the `context->container' when creating
6693 a new MonoGenericContext.
6694 (mono_class_inflate_generic_method): Likewise.
6695 (mono_class_create_from_typespec): Just use `context->container'
6696 to get the container.
6698 * loader.c (method_from_methodspec): Set `context->parent' from
6699 `context->container' - and if that's a method container, use its
6700 parent. Also set the `context->container' when creating a new
6702 (mono_get_method_from_token): Use just `context->container' to get
6705 * metadata.c (do_mono_metadata_parse_generic_class): Also set
6706 `gclass->context->container'.
6708 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6709 the `context->container' when creating a new MonoGenericContext.
6711 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
6713 * reflection.c (compare_genericparam): Sort params with identical
6714 owner by their number. Fixes gen-111 on sparc.
6716 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6718 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6719 around the domain changes.
6721 * appdomain.c (mono_domain_unload): Handle the case when the thread
6722 calling Unload is itself being aborted during unloading. Fixes #70022.
6724 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6726 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
6727 checkpoint_func as an icall so it gets a wrapper.
6728 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6729 in the cross-appdomain wrappers too.
6731 * threads.c (mono_thread_has_appdomain_ref): Make this public.
6733 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6735 * reflection.c: Fix some memory leaks.
6737 2004-12-02 Martin Baulig <martin@ximian.com>
6739 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6741 * metadata.c (generic_class_cache): New static hashtable.
6742 (mono_metadata_lookup_generic_class): New public method.
6744 2004-12-02 Martin Baulig <martin@ximian.com>
6746 * class.c (mono_class_create_from_typedef): Call
6747 mono_class_setup_parent() and mono_class_create_mono_type() before
6748 parsing the interfaces.
6750 2004-12-02 Martin Baulig <martin@ximian.com>
6752 * metadata.c (generic_inst_cache): New static hashtable.
6753 (mono_metadata_lookup_generic_inst): New public function.
6754 (mono_metadata_inflate_generic_inst): New public function.
6755 (mono_metadata_parse_generic_inst): New public function.
6756 (do_mono_metadata_parse_generic_class): Use the new
6757 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6758 since this'll also use the cache.
6760 * reflection.c (mono_reflection_bind_generic_method_parameters):
6761 Use mono_metadata_lookup_generic_inst() to use the new cache.
6763 * class.c (inflate_mono_type): Use
6764 mono_metadata_inflate_generic_inst() to inflate a generic
6765 instance; this'll also use the new cache.
6767 * loader.c (method_from_methodspec): Use
6768 mono_metadata_parse_generic_inst() and
6769 mono_metadata_inflate_generic_inst() rather than parsing it
6770 manually, so we can use the new cache.
6772 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6774 * threads.c (wait_for_tids): Do not incorrectly free threads when
6777 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6779 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6780 iter->args based on whether parameters are passed in registers (i.e.
6781 MONO_ARCH_REGPARMS is defined)
6783 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
6785 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6786 the exception message. Fixes #70070.
6787 (method_from_methodspec): Fix warnings.
6789 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6791 * process.c: (complete_path) return the path quoted
6793 2004-12-01 Martin Baulig <martin@ximian.com>
6795 * class-internals.h (MonoGenericInst): New structure.
6796 (MonoGenericClass): Replaced `type_argc', `type_argv' and
6797 `is_open' with `MonoGenericInst *inst'.
6798 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6799 `is_open' with `MonoGenericInst *inst'.
6801 2004-11-30 Martin Baulig <martin@ximian.com>
6803 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6805 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6806 to `generic_class_cache'.
6809 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6810 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6811 (mono_generic_inst_is_valuetype): Renamed to
6812 mono_generic_class_is_valuetype().
6815 (MonoGenericInst): Renamed to MonoGenericClass.
6816 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6817 (MonoClass): Renamed `generic_inst' to `generic_class'.
6818 (MonoGenericContext): Renamed `ginst' to `gclass'.
6820 * object-internals.h
6821 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6823 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6824 mono_reflection_generic_class_initialize().
6826 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6827 now known as "System.Reflection.MonoGenericClass".
6828 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6830 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
6832 * class-internals.h: Added a flag field to MonoClass to cache the
6833 declarative security attributes actions associated with the class.
6834 * domain-internals.h: Added booleans to MonoJitInfo to cache the
6835 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6836 applicable to the JITted method.
6837 * reflection.c|h: Added functions to extract (as flags) which security
6838 actions are available (declaratively) for a method, class or assembly.
6839 * metadata.c|h: Added functions to search the declarative security
6840 table in the metadata.
6842 2004-11-29 Ben Maurer <bmaurer@ximian.com>
6844 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6845 EXPORTEDTYPES are already in the class name cache, so there is no
6846 need to add extra code here to look at them. Just removes a bit of
6849 (ves_icall_System_Environment_get_TickCount): No need for #if
6850 WINDOWS. We already have the code in io-layer.
6852 2004-11-28 Martin Baulig <martin@ximian.com>
6855 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6858 2004-11-27 Miguel de Icaza <miguel@ximian.com>
6860 * assembly.c (do_mono_assembly_open): Instead of having a
6861 conditional WITH_BUNDLE, incorporate support for bundles here, by
6862 having a global `bundles' variable holding a pointer to the actual
6865 (mono_register_bundled_assemblies): New API call used by the
6868 See mkbundle.1 for details.
6870 2004-11-27 Martin Baulig <martin@ximian.com>
6872 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6873 the vtable for generic methods.
6875 2004-11-26 Martin Baulig <martin@ximian.com>
6878 (mono_metadata_generic_method_hash): New public function.
6879 (mono_metadata_generic_method_equal): Likewise.
6882 (MonoGenericContainer): Added `GHashTable *method_hash'.
6884 * reflection.c (ReflectionMethodBuilder): Added
6885 `MonoGenericContainer *generic_container'.
6886 (reflection_methodbuilder_to_mono_method): Don't create a new
6887 MonoGenericContainer each time we're called.
6888 (mono_reflection_bind_generic_method_parameters): Use
6889 `container->method_hash' to cache the results so we don't create a
6890 different method if we're called several times with the same
6893 * loader.c (method_from_methodspec): Use the new
6894 `container->method_hash' here, too.
6896 2004-11-26 Martin Baulig <martin@ximian.com>
6898 * class.c (inflate_generic_signature): Correctly compute
6899 `res->has_type_parameters'.
6900 (mono_class_vtable): Use the `has_type_parameters' flag to
6901 determine whether we're a generic method.
6903 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6905 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
6907 * object.c (mono_runtime_run_main): Fix a small memory leak.
6909 2004-11-25 Martin Baulig <martin@ximian.com>
6911 * class.c (set_generic_param_owner): Fixed the loop.
6913 2004-11-25 Martin Baulig <martin@ximian.com>
6915 * object.c (mono_class_vtable): Don't create any JIT wrappers for
6918 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
6920 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6921 names. Fixes #69787.
6923 2004-11-24 Martin Baulig <martin@ximian.com>
6925 * class.c (mono_class_create_generic_2): If we don't have a
6926 `ginst->parent', inflate `gklass->parent' to get our parent.
6928 2004-11-24 Martin Baulig <martin@ximian.com>
6930 * reflection.c (compare_genericparam): Correctly sort the
6931 GenericParam table; fixes #69779.
6933 2004-11-23 Ben Maurer <bmaurer@ximian.com>
6935 * reflection.c: When writing a PE file, don't create a huge
6936 buffer in memory. Just write the arrays we have to the file.
6937 This reduces memory usage.
6939 * metadata-internals.h: MonoDynamicStream pefile is no longer used
6942 2004-11-17 Martin Baulig <martin@ximian.com>
6944 * class.c (mono_class_init): Don't setup `class->parent' for
6945 dynamic instances; moved this to mono_class_generic_2().
6946 (mono_class_create_generic): Also set `klass->inited' for dynamic
6948 (mono_class_create_generic_2): Don't do anything for dynamic
6949 generic instances. Set `klass->parent' here and also call
6950 mono_class_setup_parent() here.
6952 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6953 `MonoType *parent' argument; set `ginst->parent' before calling
6954 mono_class_create_generic_2(), so we set the correct parent.
6956 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6958 * reflection.c: allow getting attributes from ModuleBuilder
6961 2004-11-17 Martin Baulig <martin@ximian.com>
6963 * class.c (mono_class_create_from_typedef): If a type parameter is
6964 inherited from an outer class, set its owner to that class.
6966 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
6968 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6969 for (int*) written size. This fixes bug #69592.
6971 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
6973 * icall.c: Added IsAuthenticodePresnet internal call.
6974 * image.c|h: New function that check a MonoImage for an Authenticode
6975 signature in the certificate PE data directory.
6976 * security.c|h: New internal call to ask the runtime if an
6977 Authenticode signature seems referenced in the PE header.
6979 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
6981 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6983 * reflection.c (mono_image_create_pefile): Free the assembly streams
6984 after writing out the assembly file.
6986 * object.c (mono_runtime_run_main): Fix small memory leak.
6988 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6989 property access modifiers. Fixes #69389.
6991 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6993 * domain.c, object.c, object-internals.h, domain-internals.h,
6994 object.h, marshal.c: keep dynamic code info per domain.
6996 2004-11-15 Martin Baulig <martin@ximian.com>
6998 * class.c (mono_type_get_name_recurse): Put type arguments in
6999 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
7002 2004-11-15 Martin Baulig <martin@ximian.com>
7004 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7005 (mono_class_setup_vtable): When computing `the_cname' for a
7006 generic instance, don't include the namespace since we'd otherwise
7009 2004-11-15 Martin Baulig <martin@ximian.com>
7011 * class.c (mono_class_create_generic): Changed return type to void.
7012 (mono_class_create_generic_2): New public function; setup
7013 `class->method', `class->field' and `class->interfaces' here
7014 instead of in mono_class_init().
7016 * class.h (mono_class_create_generic): Moved to class-internals.h.
7018 2004-11-14 Ben Maurer <bmaurer@ximian.com>
7020 * reflection.c (mono_image_create_pefile): take a file HANDLE.
7021 rather than writing to memory, write to this file. Right now,
7022 we are just writting into a buffer, and copying that. However
7023 we can avoid the buffer later.
7025 (mono_dynamic_stream_reset): new function
7027 * icall.c, object-internals.h: update for the above.
7029 2004-11-13 Ben Maurer <bmaurer@ximian.com>
7031 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7032 have been using gc'd memory. First it is slower, unlikely
7033 the comment in the source code said, secondly, it increases
7034 our footprint to do it in the gc.
7036 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7037 the method so that it does not have to copy to managed code.
7039 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
7041 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7043 2004-11-12 Martin Baulig <martin@localhost>
7045 * reflection.c (mono_image_create_token): Allow generic method
7046 definitions here, since they may appear in an `.override'; see
7047 gen-98/gen-99 for an example.
7049 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
7051 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7054 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7057 2004-11-11 Martin Baulig <martin@ximian.com>
7059 * class.c (mono_class_setup_vtable): In an explicit interface
7060 implementation, the method name now includes the arity.
7062 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
7064 * object.c (mono_array_full_copy): Fix warning.
7066 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
7068 * appdomain.c: Removed look_for_method_by_name(). Use the new method
7069 mono_class_get_method_from_name() instead.
7071 * class-internals.h: Added two new types of wrappers.
7072 Added MonoRemotingTarget enum. Added new trampoline function type, which
7073 takes an additional MonoRemotingTarget value as parameter, so it is
7074 possible to request a trampoline for a specific target.
7076 * class.c: Added new mono_class_get_method_from_name() method.
7078 * class.h: In MonoRemoteClass, we can have now to vtables, one for
7079 general remoting sinks and one specific for cross domain calls.
7081 * debug-helpers.c: Added new wrapper names.
7083 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7086 * image.c: Porperly delete value objects form the remoting invoke hashtable.
7088 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7089 with several other methods (mono_marshal_get_xappdomain_dispatch,
7090 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7091 and others) can generate a fast remoting wrapper for cross domain calls.
7092 More information can be found in docs/remoting.
7093 Other changes: Removed mono_find_method_by_name, and used
7094 mono_class_get_method_from_name instead.
7095 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7096 is stored in the remoting invoke hashtable.
7098 * marshal.h: published the new method for getting the xdomain wrapper,
7099 and also added a method for getting the adequate wrapper for a given
7102 * object-internals.h, object.c: Added a couple of methods for capying and
7104 Modified mono_install_remoting_trampoline, which takes the new remoting
7105 trampoline that has a remoting target as parameter.
7106 mono_class_proxy_vtable now also takes a remoting target as parameter, and
7107 will return the most suitable vtable for the target.
7108 Added mono_remote_class_vtable, which returns the vtable of a remote class
7109 (which can be the normal remoting vtable or the xdomain vtable).
7111 * threads.c: the xdomain invoke and dispatch wrappers must also be
7112 protected against interruptions.
7114 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7116 * icall.c: use memmove in BlockCopyInternal when the source and
7117 destination arrays are the same.
7119 2004-11-09 Martin Baulig <martin@ximian.com>
7121 * class-internals.h (MonoGenericContainer): Removed `method' and
7122 `signature', replaced them with `is_method' and `is_signature'
7123 flags. Added `context'.
7125 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7126 instead of a `MonoGenericContainer *'.
7128 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7129 for dynamic type parameters.
7130 (mono_metadata_load_generic_params): Setup `container->context'.
7132 * reflection.c (mono_reflection_setup_generic_class): Setup
7133 `tb->generic_container->context'.
7134 (do_mono_reflection_bind_generic_parameters): Use
7135 mono_class_inflate_generic_type() to correctly inflate types,
7136 rather than using our own hack just for MONO_TYPE_VAR.
7138 2004-11-09 Martin Baulig <martin@ximian.com>
7140 * class.c (mono_class_inflate_generic_method): Small fix; don't
7144 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7145 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7146 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7147 (ves_icall_Type_BindGenericParameters): Likewise.
7148 (ves_icall_Type_get_IsGenericInstance): Likewise.
7149 (ves_icall_Type_GetGenericParameterPosition): Likewise.
7150 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7151 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7152 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7154 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
7156 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7157 assembly versions and public key tokens. Fixes #69113.
7159 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7161 * metadata.c: fix bug introduced with the type cache changes
7164 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7166 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7167 the MonoClass pointer instead of the token in exception clauses.
7168 * reflection.c: updates for the above and make the code not depend
7169 on the structure of MonoExceptionClause.
7171 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
7173 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7174 Add support for dynamic assemblies. Fixes #69114.
7176 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7178 2004-11-07 Ben Maurer <bmaurer@ximian.com>
7180 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7181 since most only those methods use it. the code member of
7182 MonoMethodPInvoke was dead, so that can be removed too. Also,
7183 remove inline_count (again, not used), and move slot so that it
7184 can share bits with some other flags. This saves 8 bytes in the
7185 structure and gives us about 50 kb back for mcs helloworld.cs
7187 * *.[ch]: Do naming changes for the above.
7189 * loader.c (mono_method_get_header): Lazily init the header
7191 (mono_get_method_from_token): don't init the header here
7192 (mono_free_method): the header may never be allocated
7194 Overall, this saves 150 kb of unmanaged allocations
7195 for mcs helloworld.cs. That accounts for 10% of the unmanaged
7198 * loader.c, loader.h (mono_method_get_header): new accessor.
7200 * *.[ch]: use the above method. Prepares us to lazily load
7203 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7204 three warnings, which are actual bugs (see 69206).
7206 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7207 unused. Saves a cool 4 bytes / method.
7209 2004-11-06 Ben Maurer <bmaurer@ximian.com>
7211 * metadata.c (builtin_types): Add types for System.Object here.
7212 (mono_metadata_parse_type_full): Cache MonoType*'s that are
7213 for a class or valuetype from klass->this_arg or klass->byval_arg.
7215 On mcs for a hello world, this gets us down from 21836 MonoType's
7218 (mono_metadata_free_type): Account for the above change.
7220 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
7222 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
7223 exception instead of asserting if name is null.
7224 (ves_icall_System_AppDomain_GetData): Ditto.
7226 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
7228 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7231 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
7232 Return NULL when the domain does not have entry_assembly set.
7234 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
7235 Add a 'resource_modules' argument.
7236 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7238 * reflection.c (mono_reflection_create_runtime_class): Move setting
7239 of wastypebuilder here, so mono_get_type_object () returns a MonoType
7242 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7243 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7244 Throw an ArgumentNullException if 'ptr' is null.
7246 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7247 assemblies here. Fixes #69020.
7249 2004-11-05 Geoff Norton <gnorton@customerdna.com>
7251 * reflection.c (build_compressed_metadata): Fix the previous patch for
7252 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
7255 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
7257 * assembly.c (mono_assembly_names_equal): Allow a match if one of
7258 the cultures is false. Fixes #69090.
7260 * reflection.c (build_compressed_metadata): Fix invalid memory read
7261 detected by valgrind.
7263 * reflection.c (mono_reflection_get_type): Avoid triggering a
7264 TypeResolve multiple times for the same type. Fixes #65577.
7266 2004-11-04 Ben Maurer <bmaurer@ximian.com>
7268 * marshal.c: Avoid using ldftn to call managed functions. It is
7269 much slower than just a call.
7271 * reflection.c (mono_module_get_object): free the basename we
7272 allocate here from glib.
7274 * reflection.c (ensure_runtime_vtable): make sure to free
7275 overrides. Also, we were allocating an array of MonoMethod not an
7276 array of MonoMethod*.
7278 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7280 * image.c (mono_image_close): free image->guid here.
7282 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
7284 * reflection.c: Fix some spec conformance issues with the PE file
7285 structures so mcs compiled apps run on the Net 2.0 beta.
7287 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
7289 * string-icalls.c (ves_icall_System_String_ctor_encoding):
7290 Implement this. Fixes #67264.
7292 * debug-helpers.h debug-helpers.c marshal.c: Move
7293 mono_find_method_by_name to debug-helpers.c.
7295 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
7297 * object.c (mono_release_type_locks): type_initialization_hash is
7300 * reflection.c object.c object-internals.h: Fix warnings.
7302 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7303 without accessors. Fixes #61561.
7305 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7306 application base from the root domain if not set. Fixes #65641.
7307 (mono_runtime_init): Fix warning.
7309 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7311 * appdomain.c: call mono_thread_pool_init.
7312 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7313 of worker threads based on the number of CPUs and the environment
7314 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7315 for non-windows (windows) systems.
7317 2004-10-27 Chris Toshok <toshok@ximian.com>
7319 * mono-debug-debugger.c (write_class): don't call mono_class_init
7320 here, as even with the check for (!klass->init_pending), we get
7321 into a situation where we're hitting cycles in class
7322 initialization. Fixes #68816.
7324 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
7326 * image.c: Avoid overwriting values in the loaded_images_hash when an
7327 assembly is loaded multiple times. Fixes #61152.
7329 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7330 so multiple satellite assemblies for the same name can be loaded.
7333 * mono_domain_assembly_preload: Actually return the loaded assembly,
7336 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7337 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7339 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7340 pending finalizers are not invoked after the appdomain has been
7341 unloaded. Fixes #67862.
7343 2004-10-22 Martin Baulig <martin@ximian.com>
7345 * mono-debug-debugger.c
7346 (mono_debugger_runtime_invoke): Don't box valuetypes.
7348 2004-10-22 Chris Toshok <toshok@ximian.com>
7350 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7351 don't hide private methods.
7353 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
7355 * icall.c: Allows the runtime to "share" (when known) the public key
7356 token of an assembly. This avoid the need to recalculate the token
7357 (from the public key) in managed code.
7359 2004-10-21 Chris Toshok <toshok@ximian.com>
7361 * debug-helpers.c (append_class_name): argh, revert last patch.
7363 2004-10-21 Chris Toshok <toshok@ximian.com>
7365 * debug-helpers.c (append_class_name): use '+' as the delimiter,
7366 not '/', so that it matches what the debugger uses to look up
7369 2004-10-21 Martin Baulig <martin@ximian.com>
7371 * mono-debug-debugger.c (mono_debugger_throw_exception): New
7372 public method; this is called each time an exception is thrown and
7373 allows the debugger to use exception catch points.
7375 2004-10-21 Martin Baulig <martin@ximian.com>
7377 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7378 the stack pointer and the exception object in some struct and pass
7379 that to the debugger.
7381 2004-10-21 Chris Toshok <toshok@ximian.com>
7383 * mono-debug-debugger.c (do_write_class): add instance/static
7384 event support. We don't expose "raise" or "other" yet.
7385 (event_is_static): new method.
7387 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
7389 * mono-debug-debugger.c
7390 (mono_debugger_handle_exception): Remove
7391 bogus return value for fussy compilers.
7393 2004-10-20 Martin Baulig <martin@ximian.com>
7395 * mono-debug-debugger.c
7396 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7397 (mono_debugger_handled_exception): Likewise.
7399 2004-10-20 Martin Baulig <martin@ximian.com>
7401 * mono-debug-debugger.h (MonoDebuggerEvent): Added
7402 MONO_DEBUGGER_EVENT_EXCEPTION.
7404 * mono-debug-debugger.c (mono_debugger_handle_exception): New
7405 public function to send the debugger a notification for an
7406 exception and inform it about a catch/finally clause.
7408 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
7410 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7411 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7414 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7416 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
7418 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7419 marshalled as [In,Out]. Fixes #58325.
7421 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
7423 * reflection.c (mono_method_body_get_object): Implement some fields.
7425 2004-10-12 Martin Baulig <martin@ximian.com>
7427 * reflection.c (mono_reflection_bind_generic_parameters): Small
7428 fix, correctly retrieve our parent from a generic instance.
7430 2004-10-12 Martin Baulig <martin@ximian.com>
7432 * metadata.c (mono_metadata_generic_param_equal): We always have
7436 (mono_class_from_generic_parameter): We need to have an owner.
7437 (my_mono_class_from_generic_parameter): Likewise.
7439 * reflection.c (mono_reflection_setup_generic_class): Renamed to
7440 mono_reflection_create_generic_class() and added a new
7441 mono_reflection_setup_generic_class().
7442 (mono_reflection_initialize_generic_param): If we're a nested
7443 generic type and inherited from the containing class, set our
7444 owner to the outer class.
7446 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
7448 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7450 * reflection.c (mono_method_body_get_object): New function to create
7451 a MethodBody object.
7453 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7455 2004-10-11 Martin Baulig <martin@ximian.com>
7457 * metadata.c (_mono_metadata_type_equal): Renamed to
7458 do_mono_metadata_type_equal() and made static.
7460 2004-10-11 Martin Baulig <martin@ximian.com>
7462 * appdomain.c: Bump corlib version number to 28.
7464 2004-10-10 Martin Baulig <martin@ximian.com>
7467 (MonoGenericInst): Added `MonoGenericContainer *container'.
7468 (MonoGenericMethod): Likewise.
7469 (MonoGenericContext): Likewise.
7470 (MonoGenericParam): Added `MonoGenericContainer *owner'.
7473 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7474 (do_mono_metadata_parse_generic_inst): Likewise.
7475 (mono_metadata_parse_type_full): New public method. This is the actual
7476 mono_metadata_parse_type() implementation - with an additional
7477 `MonoGenericContainer *' argument.
7478 (mono_metadata_parse_array_full): Likewise.
7479 (mono_metadata_parse_signature_full): Likewise.
7480 (mono_metadata_parse_method_signature_full): Likewise.
7481 (mono_metadata_parse_mh_full): Likewise.
7482 (mono_type_create_from_typespec): Likewise.
7483 (mono_metadata_interfaces_from_typedef_full): New public method;
7484 this is similar to the other _full() methods, but we take a
7485 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7486 (mono_metadata_parse_generic_param): Take an additional
7487 `MonoGenericContainer *' argument and lookup the MonoGenericParam
7488 from that container.
7489 (mono_metadata_generic_param_equal): New static method to compare
7490 two type parameters.
7491 (_mono_metadata_type_equal): New static method; takes an
7492 additional `gboolean signature_only' argument - if true, we don't
7493 compare the owners of generic parameters.
7494 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7495 with a TRUE argument - do a signature-only comparision.
7497 * loader.c: Use the new _full() methods and pass the
7498 MonoGenericContainer to them.
7500 * object-internals.h (MonoReflectionTypeBuilder): Added
7501 `MonoGenericContainer *generic_container' field.
7502 (MonoReflectionMethodBuilder): Likewise.
7504 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
7506 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7507 case initial images of dynamic assemblies.
7509 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7511 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7513 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7514 length of event->other array.
7515 (typebuilder_setup_events): Ditto.
7517 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7518 'assembly_by_name' and add an 'assemblies' list.
7520 * assembly.h assembly.c: Add a new search hook for determining whenever
7521 an assembly is already loaded. Use this instead of searching in the
7522 loaded_assemblies list.
7524 * domain.c appdomain.c: Implement the new search hook so loaded
7525 assemblies are now scoped by appdomain. Fixes #67727.
7527 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
7529 * threads.c (mono_thread_attach): Initialize synch_lock field so
7530 mono_thread_detach works again.
7532 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7533 'lib' too. Fixes #63130.
7535 2004-10-06 Jackson Harper <jackson@ximian.com>
7537 * culture-info-tables.h: regenerated.
7539 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
7541 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
7542 implemented by other interfaces in the result. Fixes #65764.
7544 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7545 Handle unloadable modules without crashing.
7547 * image.c (load_modules): Revert the previous patch since modules must
7548 have a fixed index inside the array.
7550 * image.c (load_modules): Don't include native modules in the modules
7553 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
7555 * reflection.h: Add param_defaults field.
7557 * reflection.c: Add support for parameter defaults in dynamic methods.
7560 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7561 an empty string when a type has no namespace. Fixes #64230.
7563 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
7565 * tabledefs.h: Added "internal" security actions to support non-CAS
7566 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
7567 Note: they do not seems to be used anymore in 2.0 (new metadata format)
7569 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
7571 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7572 constructor of abstract class. Fixes #61689.
7574 2004-10-04 Martin Baulig <martin@ximian.com>
7576 * class-internals.h (MonoGenericContainer): New type.
7577 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7578 `MonoGenericContainer *generic_container'.
7579 (MonoClass): Replaced `gen_params' and `num_gen_params' with
7580 `MonoGenericContainer *generic_container'.
7582 * metadata.c (mono_metadata_load_generic_params): Return a
7583 `MonoGenericContainer *' instead of a `MonoGenericParam *';
7584 removed the `num' argument.
7586 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
7588 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7591 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7594 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7596 * reflection.c: Save pe_kind and machine values into the generated
7599 * appdomain.c: Bump corlib version number.
7601 * object-internals.h: Reorganize layout of LocalBuilder.
7603 * class-internals.h class.c (mono_class_get_implemented_interfaces):
7604 New helper function.
7606 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7607 created MonoType for dynamic types. Fixes #66180.
7609 2004-10-02 Ben Maurer <bmaurer@ximian.com>
7611 * threadpool.c: the ares hashtable needs a critical section around it.
7612 this prevents some nasty segfaults
7614 2004-10-02 Massimiliano Mantione <massi@ximian.com>
7616 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7617 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7620 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7622 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7624 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
7626 * image.c: Always canonicalize image file names, to avoid loading
7627 the same assembly twice when referenced using a relative path.
7629 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7631 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7633 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7635 * marshal.c: Fix warnings.
7637 2004-09-29 Geoff Norton <gnorton@customerdna.com>
7639 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7640 attempting to marshal the delegate_trampoline as the method_addr.
7641 This patch has a static hashtable of marshalled delegates so that
7642 we can map delegate_trampoline addresses back to delegates. This
7643 allows a delegate passed to managed code to be passed back into native
7646 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7648 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7650 * reflection.c (method_encode_code): Align method headers properly.
7653 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7655 * marshal.c: In the runtime invoke wrapper, reset the abort
7656 exception if it is cached. This avoids the automatic rethrowal of
7657 the exception after the catch of the wrapper. Also check for pending
7658 interruptions before calling the managed method. This is done using
7659 the new method emit_thread_force_interrupt_checkpoint, since the
7660 normal checkpoint method is ignored when running the invoke wrapper.
7661 * object.c: If the abort exception is rethrown, set the abort_exc
7662 field of the thread, so it will be rethrown aftere every catch.
7663 * threadpool.c: Only run an interruption checkpoint if what has been
7664 requested is a stop of the thread (aborts will be ignored).
7665 * threads.c: By default, a thread will now never be interrumped while
7666 running the runtime invoke wrapper (this ensures that runtime_invoke
7667 will always return to the caller if an exception pointer is provided).
7668 There is a new special method mono_thread_force_interruption_checkpoint()
7669 to force an interruption checkpoint even if running a protected
7670 wrapper, which is used by the same runtime invoke wrapper to do a check
7673 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7675 * object.c, object-internals.h: Implemented mono_release_type_locks,
7676 which releases the cctor locks held by a thread.
7677 * threads.c, threads.h: In thread_cleanup, release cctor locks held
7678 by a thread. Added mono_thread_exit() method to be used to safely stop
7681 2004-09-28 Raja R Harinath <rharinath@novell.com>
7683 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7684 Move null check before dereference. Avoid indexing beyond the end
7685 of the 'modules' array.
7687 2004-09-28 Raja R Harinath <rharinath@novell.com>
7689 * metadata-internals.h (MonoImage): Add module_count field.
7690 * image.c (load_modules): Set image->module_count.
7691 (mono_image_load_file_for_image): Use image->module_count.
7692 * reflection.c (mono_image_load_module): Append to image->modules array
7693 of dynamic assembly.
7694 (mono_module_get_object): Fix loop to actually increment index.
7695 Use image->module_count.
7696 * assembly.c (mono_assembly_load_references): Use image->module_count.
7697 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7700 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7702 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7703 Avoid assert on generic types.
7705 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
7707 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7709 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7711 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
7712 function to convert a MarshalSpec structure to its managed counterpart.
7714 * reflection.c: Fix warnings.
7716 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7719 * icall.c (mono_create_icall_signature): Fix build.
7721 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
7723 * icall.c: Add MakePointType icall.
7725 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7728 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7730 * threadpool.c: reuse allocated slots in the queue.
7732 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
7734 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7736 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7738 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7741 * tabledefs.h: Add constants for pinvoke attributes BestFit and
7742 ThrowOnUnmappableChar.
7744 * icall.c (ves_icall_Type_GetPacking): New icall.
7746 2004-09-24 Martin Baulig <martin@ximian.com>
7748 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7750 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7753 (mono_domain_set): allow setting a domain that is being unloaded.
7754 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7757 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7759 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7760 the GetCustomAttributes icall.
7762 2004-09-23 Martin Baulig <martin@ximian.com>
7764 * object-internals.h (MonoReflectionGenericParam): Replaced
7765 'has_ctor_constraint', `has_reference_type' and `has_value_type'
7766 with `guint32 attrs'.
7768 2004-09-23 Martin Baulig <martin@ximian.com>
7770 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7772 2004-09-23 Martin Baulig <martin@ximian.com>
7774 * object-internals.h (GenericParameterAttributes): New enum.
7776 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7778 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7780 * class.c (init_events): Fill out event->other field.
7782 * class.c: Fix warnings.
7784 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7786 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7788 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7789 walk which doesn't supply the IL offset.
7791 2004-09-22 Martin Baulig <martin@ximian.com>
7793 * reflection.c (mono_reflection_setup_internal_class): If we're
7794 System.ValueType, System.Object or System.Enum, set
7795 `klass->instance_size' and create the vtable.
7796 (mono_reflection_create_internal_class): If we're an enum type,
7797 get the base class from our current corlib.
7799 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
7801 * reflection.h (MonoResolveTokenError): New type.
7803 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7806 * icall.c: Add an 'error' argument to the ResolveToken icalls.
7808 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
7810 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7811 Support also calling constructors, but only for already allocated objects.
7813 2004-09-17 Geoff Norton <gnorton@customerdna.com>
7815 * reflection.c (type_get_qualified_name): If the klass is null
7816 return the typename to avoid a NullRefEx.
7817 (encode_cattr_value): Get the qualified name of the boxed type,
7818 not the underlying enumtype. Fixes #62984.
7820 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
7822 * marshal.c: Fix problems with previous checkin.
7824 2004-09-21 <vargaz@freemail.hu>
7826 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7827 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7829 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7831 2004-09-21 Geoff Norton <gnorton@customerdna.com>
7833 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7834 should only return a type for pointers, arrays, and passbyref types.
7837 2004-09-21 Martin Baulig <martin@ximian.com>
7839 * domain.c (mono_debugger_check_runtime_version): New public
7842 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
7844 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
7846 * reflection.c: Added missing sort to the declarative security
7847 attributes table. MS implementation stops seeing the attributes if the
7848 token number regress in the table (as shown by ildasm and permview).
7850 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
7852 * object-internals.h (MonoReflectionModule): Add 'token' field.
7854 * reflection.c (mono_reflection_get_token): Add support for Module
7856 (mono_module_get_object): Set 'token' field.
7857 (mono_module_file_get_object): Set 'token' field.
7859 * icall.c: Add new Assembly and Module icalls.
7861 * appdomain.c: Bump corlib version.
7863 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
7865 * loader.h loader.c class.h class.c: Add helper functions for obtaining
7866 tokens of metadata objects.
7868 * reflection.h reflection.c (mono_reflection_get_token): New function
7869 to obtain the token of a metadata object.
7871 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7873 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
7875 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7877 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7879 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
7881 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7882 * object-internals.h: Added 3 MonoArray* members to MonoReflection
7883 AssemblyBuilder to access the permissions set in the class lib.
7884 * reflection.c: Added security attributes encoding step in
7885 mono_image_build_metadata.
7886 * tabledefs.h: Added new security actions defined in 2.0:
7887 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7889 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7891 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7894 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7896 * locales.c: nullify the ICU_collator member of CompareInfo when it is
7897 finalized. There where random SIGSEVs at program termination, when
7898 an object being finalized was trying to do a string comparison and
7899 the current culture was already finalized.
7901 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7903 * threads.c: call thread_cleanup before finishing the thread if we get
7906 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
7908 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7909 assemblies from the parent. Fixes #65665.
7911 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
7913 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7916 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
7918 * reflection.h: add prototype for mono_get_dbnull_object
7919 * reflection.c: add prototypes for get_default_param_value_blobs
7920 and mono_get_object_from_blob for fussier compilers
7922 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
7924 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7925 false deadlock checks in class initialization.
7927 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
7929 * image.c (mono_image_addref): Fix comment.
7931 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7934 2004-09-12 Jambunathan K <kjambunathan@novell.com>
7936 * reflection.c (mono_param_get_objects): Modified to return
7937 ParameterInfo.DefaultValue object.
7939 (get_default_param_value_blobs):
7940 (mono_get_object_from_blob):
7941 (mono_get_dbnull_object): New helper routines.
7943 * object.c (mono_get_constant_value_from_blob): New helper routine
7944 carved out from get_default_field_value ()
7946 * object-internals.h (mono_get_constant_value_from_blob): Added
7947 function declaration.
7949 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
7951 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
7952 referenced assemblies. Fixes #62135.
7954 * exception.h exception.c (mono_get_exception_file_not_found2): New
7957 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
7959 * class.h class.c: Add mono_type_get_underlying_type ().
7961 2004-09-09 Geoff Norton <gnorton@customerndna.com>
7963 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7964 Fix GetTypes() to support dynamically created assemblies.
7966 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
7968 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7970 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7973 * reflection.h reflection.c loader.c: Allow dynamic construction of
7974 pinvoke methods. Fixes #65571.
7976 * reflection.c (mono_reflection_get_type): Revert previous change since
7977 it causes regressions.
7979 2004-09-08 Martin Baulig <martin@ximian.com>
7981 * class.c (class_compute_field_layout): Don't call
7982 mono_class_layout_fields() for open generic instances.
7984 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7985 * threads.c appdomain.c: fix typo in GC macro
7987 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7989 * threads.c: don't call mono_thread_detach() in start_wrapper(),
7990 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7992 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
7994 * image.c (mono_image_close): Applied patch from
7995 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7996 assembly is loaded multiple times from data.
7998 * image.c (mono_image_open): Fix warning.
8000 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8002 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8005 * reflection.c (mono_reflection_create_runtime_class): Initialize
8006 klass->nested_classes. Fixes #61224.
8008 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8010 * threads.c: sched_yield() on exit, to allow threads to quit.
8012 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8014 * object.c (mono_unhandled_exception): Remove leftover debug code.
8016 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
8018 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8020 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8022 * marshal.c (emit_marshal_array): Really null terminate string arrays.
8024 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8026 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8028 * marshal.c (emit_marshal_array): Null terminate string arrays.
8030 * marshal.c (raise_auto_layout_exception): Fix warning.
8032 * reflection.c (mono_param_get_objects): Initialize the default value
8033 with DBNull.Value, not null. Fixes #62123.
8035 2004-09-01 Miguel de Icaza <miguel@ximian.com>
8037 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8038 throw an exception with a cute explanation.
8040 2004-09-06 Dick Porter <dick@ximian.com>
8042 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8043 Close the new process's thread handle, as we don't use it. The
8044 handle stays around forever otherwise.
8046 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8048 * object.c (arith_overflow): Fix warning.
8050 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8051 calling conventions in method refs. Fixes #65352.
8053 * reflection.c: Fix warnings.
8055 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8057 * icall.c: Add a new icall for Array.Clear
8059 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8061 * object.c: When allocating an array, we have to throw
8062 an overflow exception if any of the lengths are < 0.
8064 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8066 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8067 properly. Also move implementation of string array marshalling to
8068 managed code. Fixes #42316.
8070 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8072 * assembly.c: provide more information when loading an assembly fails.
8074 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8076 * filewatcher.c: don't expect the development fam package to be
8079 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
8081 * marshal.c: Make a copy of the signature cookie since it will be
8082 freed by the caller.
8084 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8086 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8088 * metadata.c (mono_metadata_free_marshal_spec): New function to free
8091 * marshal.c: More refactoring.
8093 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8096 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
8098 * object.c: In mono_message_invoke, fill the output parameter array after
8099 calling the managed method (it was done before the call). This fixes
8102 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8104 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8107 2004-09-02 Martin Baulig <martin@ximian.com>
8109 * class.c (mono_class_instance_size): Don't allow generic type
8110 definitions or open generic instances.
8111 (mono_class_array_element_size): If we're a value type, call
8112 mono_class_instance_size() on the original class.
8114 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8115 handle generic instances.
8117 * mono-debug-debugger.c (write_type): Handle generic instances
8120 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8122 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8123 the allocation request fails. Fixes #65089.
8125 * object.c (mono_runtime_free_method): Do not call mono_free_method.
8127 * object.c (mono_runtime_free_method): New function to free a dynamic
8130 * marshal.c (mono_delegate_free_ftnptr): New function to free the
8131 delegate trampoline.
8133 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8134 with hasthis as dynamic,
8136 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8138 * domain.c (mono_jit_info_table_remove): New function to remove an
8139 entry from the jit info table.
8141 * class-internals.h (MonoMethod): Add 'dynamic' field.
8143 * loader.c: Fix warnings.
8145 2004-09-01 Martin Baulig <martin@ximian.com>
8147 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8148 instead of mono_debugger_lock() because the latter one is a no-op
8149 unless running in the debugger.
8151 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8153 * class.c (class_compute_field_layout): Classes with auto-layout or
8154 reference fields are not blittable.
8156 2004-09-01 Dick Porter <dick@ximian.com>
8158 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8159 mono_image_get_filename() to get the assembly location.
8162 * metadata.h: Fix compile warnings
8164 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8166 * class.c (class_compute_field_layout): System.Object is blittable.
8168 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8169 as in/out. Fixes #59909.
8171 2004-09-01 Martin Baulig <martin@ximian.com>
8173 * metadata.h (MONO_TYPE_ISREFERENCE): Call
8174 mono_metadata_generic_inst_is_valuetype() if we're a generic
8175 instance to check whether our underlying type is a reference type.
8177 2004-09-01 Martin Baulig <martin@ximian.com>
8179 * metadata.c (mono_type_size): If we're a generic instance, call
8180 mono_class_value_size() for value types.
8182 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
8184 * marshal.c: Implement more custom marshalling functionality. Fixes
8187 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8189 * mono-debug.c, debug-mono-symfile.c: add some locking love.
8191 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
8193 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8195 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8197 * icall.c: Fix some warnings.
8199 * threads.c (abort_appdomain_thread): Fix unref errors.
8200 (mono_thread_current): Fix THREAD_DEBUG define.
8202 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
8204 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8206 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8208 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
8210 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
8213 2004-08-28 Martin Baulig <martin@ximian.com>
8216 (mono_metadata_generic_inst_is_valuetype): New public function.
8218 * metadata.h (MONO_TYPE_ISSTRUCT): Call
8219 mono_metadata_generic_inst_is_valuetype() if we're a generic
8220 instance to check whether our underlying type is a valuetype.
8222 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
8224 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8227 2004-08-25 Martin Baulig <martin@ximian.com>
8229 * loader.c (mono_get_method_from_token): Abstract methods can also
8230 be generic and thus have type parameters.
8232 * metadata-internals.h
8233 (MonoDynamicImage): Added `GPtrArray *gen_params'.
8235 * reflection.c (mono_image_get_generic_param_info): Don't create a
8236 metadata row, just add an entry to the `gen_params' array.
8237 (build_compressed_metadata): Sort the `gen_params' array and then
8238 actually create the metadata.
8240 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8242 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8244 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
8246 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8248 2004-08-24 Martin Baulig <martin@ximian.com>
8250 * class.cs (mono_class_is_subclass_of): Like an interface, a
8251 generic instance also derives from System.Object.
8253 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
8255 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8256 custom modifiers to be in any order. Fixes #61990.
8258 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
8260 * object.c: Register mono_object_new_fast icall.
8262 * object.c (mono_class_get_allocation_ftn): Return to calling
8263 mono_object_new_fast, since it seems faster to compute the object
8264 size in unmanaged code than passing it as a parameter.
8266 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8268 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8269 this function with Boehm as the oom handler, so we don't have to check
8270 the result of GC_malloc.
8272 * object.c: Remove checks for oom.
8274 * object.h object.c (mono_class_get_allocation_ftn): New function to
8275 return the icall which can be used to allocate an instance of a given
8278 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8280 * class-internals.h: Add 'enabled' field.
8282 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
8284 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8286 2004-08-18 Jambunathan K <kjambunathan@novell.com>
8287 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8290 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
8292 * appdomain.c: use the Tls function for appdomain too,
8293 at Zoltan's request. Actually return in mono_context_get
8295 * appdomain.c, profiler.c, threads.c: use __thread
8297 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
8299 * appdomain.c threads.c: Call GC_CreateThread on windows.
8301 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8302 multiple libraries since this don't work on windows.
8304 2004-08-18 Martin Baulig <martin@ximian.com>
8307 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8310 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8311 MonoMethodNormal since we also need it for abstract and interface
8315 (build_compressed_metadata): Sort the GenericParam table.
8316 (mono_image_create_token): Added `gboolean create_methodspec'
8317 argument; this is false when generating a MethodImpl token.
8318 (reflection_methodbuilder_to_mono_method): Abstract and interface
8319 methods may also have generic parameters.
8321 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
8323 * appdomain.c: thread local alloc
8325 2004-08-17 Martin Baulig <martin@ximian.com>
8327 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8330 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8333 * class.c (mono_type_get_full_name): New public function.
8334 (mono_type_get_name): Don't include the type arguments.
8336 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
8338 * Makefile.am: Build static versions of libmetadata and libmonoruntime
8339 for inclusion into the mono executable.
8341 2004-08-16 Martin Baulig <martin@ximian.com>
8343 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8344 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8346 2004-08-14 Martin Baulig <martin@ximian.com>
8348 * class.c (dup_type): Also copy the `byref' field.
8350 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
8352 * reflection.c (create_dynamic_mono_image): Revert the last change
8353 since it breaks bootstrap.
8355 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
8357 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8359 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8360 not free them with g_free.
8362 2004-08-11 Martin Baulig <martin@ximian.com>
8364 * reflection.c (mono_reflection_setup_internal_class): Also call
8365 mono_class_setup_mono_type() if we already have a `tb->type.type'.
8367 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
8369 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
8370 called during default (first) AppDomain creation. Keep track of
8371 Evidence when loading assemblies.
8373 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8375 * opcodes.c, opcodes.h: reduce runtime relocations.
8377 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8379 * culture-info.h, locales.c: fixes and chages to sue the new
8380 optimized format of the locale data.
8381 * culture-info-tables.h: regenerated.
8383 2004-08-06 Geoff Norton <gnorton@customerdna.com>
8385 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8387 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
8389 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8390 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8391 * domain-internals.h: icall declaration.
8392 * icall.c: icall registration.
8393 * object-internals.h: New fields in MonoAssembly for CAS.
8395 2004-08-05 Duncan Mak <duncan@ximian.com>
8397 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8400 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8402 * reflection.c: fix to deal with object[] arrays in custom ctors
8405 2004-08-05 Martin Baulig <martin@ximian.com>
8407 * class.c (mono_class_array_element_size): Added support for
8408 generic instances and correctly handle "recursive" types.
8410 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
8412 * assembly.c: Fix warnings.
8414 2004-08-04 Martin Baulig <martin@ximian.com>
8417 (mono_type_get_name_recurse): Added `gboolean include_arity'
8418 argument specifying whether or not we should include the generic
8419 arity in the type name.
8420 (_mono_type_get_name): New static function.
8421 (mono_class_setup_vtable): If we're a generic instance, don't
8422 include the generic arity in the names of explicit method
8425 2004-08-03 Martin Baulig <martin@ximian.com>
8427 * class.c (mono_type_get_name_recurse): Enclose the generic type
8428 arguments in `<', '>'.
8430 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8432 * gc.c: make GC warning messages use the trace API, they are just
8433 noise to most of the users.
8435 2004-08-03 Martin Baulig <martin@ximian.com>
8437 * debug-mono-symfile.c (read_string): Correctly read the string.
8439 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
8441 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8443 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8445 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8447 2004-07-30 Martin Baulig <martin@ximian.com>
8449 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8450 Reflect latest symbol writer changes.
8452 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8454 * object.c: always create an object if null is passed
8455 to Invoke() where a valuetype is expected.
8457 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
8459 * marshal.c (mono_marshal_init): make managed
8460 signatures match native ones better for 64bits.
8462 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8464 * appdomain.c: hack to build correctly the private bin path on windows.
8467 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
8469 * assembly.c: Load mscorlib from the correct framework directory
8470 (mono/<version>/mscorlib.dll).
8471 * appdomain.h: Added prototypes for new functions.
8472 * internals.h: Added some prototypes.
8473 * domain.c: When initializing the runtime, get from the executable and
8474 the configuration files the runtime version that the app supports.
8475 Added support methods for reading app.exe.config. Added list of versions
8476 supported by the JIT. Added two new methods: mono_init_from_assembly,
8477 which initializes the runtime and determines the required version from
8478 the provided exe file, and mono_init_version, which initializes
8479 the runtime using the provided version.
8480 * icall.c: Get machine.config from version-specific directory.
8481 * reflection.c: When generating an image, embed the version number
8482 of the current runtime.
8484 2004-07-28 Dick Porter <dick@ximian.com>
8487 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8488 returned sockaddr size before creating the remote address object.
8489 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8492 2004-07-28 Dick Porter <dick@ximian.com>
8494 * locales.c (string_invariant_compare_char): Fix invariant char
8495 compares between upper and lower cases. Fixes bug 61458.
8497 2004-07-27 Ben Maurer <bmaurer@ximain.com>
8499 * marshal.c: actually cache stelem.ref wrappers.
8501 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8503 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
8504 sections and remove the mono_cli_rva_map () function.
8506 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8508 * debug-mono-symfile.c: fix one more endianess issue, from a patch
8509 by Geoff Norton (<gnorton@customerdna.com>).
8511 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8513 * class.c: fix class loads for pointer types (typeof(int) !=
8516 2004-07-27 Martin Baulig <martin@ximian.com>
8518 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8519 reading the debugging information from an external ".mdb" file.
8521 2004-07-24 Martin Baulig <martin@ximian.com>
8523 * reflection.c (mono_image_get_type_info): Only write a class
8524 layout entry if we actually have a size or a packing size.
8526 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8528 * reflection.c (type_get_fully_qualified_name):
8529 insert cast to get type checking of ?: with non-gcc compilers
8531 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8533 * rand.c: use g_getenv for both lookups of
8536 2004-07-17 Martin Baulig <martin@ximian.com>
8538 * reflection.c (mono_reflection_bind_generic_method_parameters):
8539 Set `gmethod->reflection_info'.
8541 2004-07-17 Martin Baulig <martin@ximian.com>
8543 * class.c (mono_class_create_from_typedef): Insert the newly
8544 created class into the hash table before computing the interfaces
8545 since we could be called recursively.
8547 2004-07-16 Ben Maurer <bmaurer@ximain.com>
8549 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8550 function to implement stelem.ref in managed code
8551 * class-internals.h, debug-helpers.c: a new wrapper type
8554 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8556 * gc.c: allow GC handles to work even when no GC is compiled in.
8557 Fix part of bug #61134 (GetAddrOfPinnedObject).
8559 2004-07-13 Peter Williams <peter@newton.cx>
8561 * process.c (complete_path): Make sure we don't attempt to execute
8564 2004-07-12 Geoff Norton <gnorton@customerdna.com>
8566 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
8567 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
8568 and will add/subtract the hour if needed
8570 2004-07-12 Martin Baulig <martin@ximian.com>
8572 * reflection.c (mono_field_get_object): If we have
8573 `field->generic_info', take the attributes from
8574 `field->generic_info->generic_type'.
8576 2004-07-12 Martin Baulig <martin@ximian.com>
8578 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8579 This function must be called before initializing the runtime.
8580 (mono_debug_init_1): New function; call this after initializing
8581 the runtime, but before loading the assembly. It tells the
8582 debugger to load corlib and the builtin types.
8584 * mono-debug-debugger.c: Did some larger changes in the debugging
8585 code; support recursive class declarations, make sure we actually
8588 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8590 * debug-helpers.c: undo my previous patch and fixed the real issue in
8591 ../mini/exceptions-x86.c
8593 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8595 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8596 when no HOME env. variable was set and a NullRef was thrown in a .cctor
8597 called from other .cctors.
8599 2004-07-09 Miguel de Icaza <miguel@ximian.com>
8601 * loader.c: Removed the mono_loader_wine_init hack now that we are
8602 doing a managed version of Windows.Forms.
8604 2004-07-09 Ben Maurer <bmaurer@ximian.com>
8606 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8607 threadpool.c, threads.c: remove static data from rootset.
8609 2004-07-09 Dick Porter <dick@ximian.com>
8611 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8612 Don't do any more processing if the matched length was 0. It was
8613 increasing the size of the string before. Fixes bug 61167.
8615 2004-07-09 Dick Porter <dick@ximian.com>
8619 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8620 Add support for SO_PEERCRED if its available.
8622 2004-07-09 Peter Bartok <pbartok@novell.com>
8623 * loader.c: winelib.exe.so error message is now only displayed if
8624 MONO_DEBUG is set. To help us avoid questions when people are trying
8625 out the new Managed.Windows.Forms.
8627 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
8629 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
8630 for isinst and castclass wrappers.
8632 * class-internals.h icall.c: Move registration and lookup of JIT icalls
8633 to libmetadata from the JIT, so they could be used by the marshalling
8634 code and the interpreter.
8636 * marshal.c: Register marshalling related JIT icalls here instead of
8637 in mini.c. Use CEE_MONO_ICALL instead of the family of
8638 CEE_MONO_PROC<x> opcodes to call marshalling functions.
8640 * metadata.h: Remove unneeded marshalling conversions.
8642 * opcodes.c: Update for new opcodes.
8644 2004-07-08 Martin Baulig <martin@ximian.com>
8646 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8647 (mono_debug_get_domain_data): Make this function static.
8649 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8651 * gc.c, object.h: add nice GC handle API for embedders.
8653 2004-07-06 Ben Maurer <bmaurer@ximian.com>
8655 * reflection.c: more changes for the new api
8657 * object.c: When we reflect on a field w/ a constant value, it
8658 will not have a memory location, so we must access metadata. Also,
8659 allow easier reading of strings so that we can read them from
8662 * class.c (mono_class_layout_fields): no need for literal fields here.
8664 * class-internals.h: api changes for const fields
8666 * icall.c (ves_icall_get_enum_info): use new apis for const fields
8668 2004-07-06 Martin Baulig <martin@ximian.com>
8670 * mono-debug.h: Increment version number to 44.
8672 * mono-debug.c (mono_debug_add_wrapper): The second argument is
8673 now a gpointer, rewrote this whole method.
8675 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8676 function. Add information about the wrapper in a new "misc table".
8678 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8679 for the new misc table.
8681 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
8683 * metadata-internals.h image.c: Add a cache for helper signatures.
8685 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8687 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
8689 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8690 delegates from a delegate. Fixes #61033.
8692 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8693 marshalling of stringbuilder arrays. Fixes #59900.
8695 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
8697 * icall.c: Add EnumBuilder:setup_enum_type icall.
8699 2004-06-30 Ben Maurer <bmaurer@ximian.com>
8701 * icall.c: Added a new icall for the property version of
8704 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
8706 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8707 it has a constant size across platforms.
8709 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8712 2004-06-29 Martin Baulig <martin@ximian.com>
8714 * mono-debug.c (mono_debug_add_method): Protect the whole function
8715 in mono_debugger_lock(), not just parts of it.
8717 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8719 * reflection.c: make sure padding bytes in heaps are zeroed.
8721 2004-06-24 David Waite <mass@akuma.org>
8723 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8724 image.c, loader.c, locales.c, marshal.c, metadata.c,
8725 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8726 string-icalls.c, threads.c: change to C90-style comments from C99 /
8729 2004-06-24 Dick Porter <dick@ximian.com>
8732 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8733 return createdNew. Fixes bug 60412.
8736 * icall.c: Add createdNew parameter to CreateMutex icall
8738 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8740 * reflection.c, object-internals.h: save default value in params.
8742 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8744 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8745 no need to build a new path combining that with the application base.
8748 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8750 * reflection.c: fixed minor standard compliance issues.
8752 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8754 * reflection.c: fixed issue with encoding some custom attributes
8755 (arrays in properties and fields, bug #60411).
8757 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8759 * reflection.c: fix start address when copying the public key token.
8761 2004-06-23 Martin Baulig <martin@ximian.com>
8763 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8764 the `exc' object in a static object to put it into the GC's root set.
8766 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8768 * reflection.c: make mono_reflection_setup_internal_class ()
8769 callable a second time to setup a new parent class.
8771 2004-06-23 Dick Porter <dick@ximian.com>
8773 * threads.c: Check for WAIT_IO_COMPLETION return values.
8775 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
8777 * appdomain.c: Removed the g_free on the public key token. Now copy
8778 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8779 * assembly.c: Added public key token string value when loading
8780 assemblies. Fix bug #60439.
8781 * icall.c: Added missing informations (like public key) in
8782 GetReferencedAssemblies. Fix #60519.
8783 * image.h: Changed definition for public key token from const char*
8784 public_tok_value to guchar public_key_token [17];
8785 * reflection.c: Updated for changes to public key token.
8787 2004-06-22 Lluis Sanchez Gual
8789 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
8790 for the field in base classes.
8792 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8794 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8795 mark headers as not supported, they are installed only for use by the
8798 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8800 * *.c, *.h: avoid namespace pollution in public headers.
8802 2004-06-21 Martin Baulig <martin@ximian.com>
8804 * exception.c (mono_get_exception_security): It's in
8805 "System.Security", not in "System".
8807 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8808 the exception classes.
8810 2004-06-21 Martin Baulig <martin@ximian.com>
8812 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8813 Protect the exception object from being finalized.
8815 2004-06-21 Martin Baulig <martin@ximian.com>
8817 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8820 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
8822 * reflection.c: Load the assembly in mono_reflection_type_from_name,
8823 if it was not loaded before. Fix parts of #60439.
8825 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8827 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8828 code that was broken since Ben's change: wrappers are now
8829 dependent on the method signature only again.
8831 2004-06-21 Martin Baulig <martin@ximian.com>
8833 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8834 added interface support.
8836 2004-06-21 Martin Baulig <martin@ximian.com>
8838 * class.c (mono_vtable_get_static_field_data): New public method.
8840 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
8842 * filewatcher.c : Windows build fix to be compliant with API changes.
8844 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8846 * class.h, class.c: more accessors.
8847 * metadata.h, metadata.c: prepare for hiding MonoType and
8848 MonoMethodSignature: people should use the accessors from now on
8849 outside of the tree.
8851 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8853 * *.c, *.h: more API cleanups.
8855 2004-06-18 Jackson Harper <jackson@ximian.com>
8857 * assembly.c: Trace loading assemblies.
8858 * loader.c: Trace loading native libraries.
8859 * mono-config.c: Trace loading config files.
8861 2004-06-18 Dick Porter <dick@ximian.com>
8863 * locales.c: Tell ICU the lengths of strings, it can cope with
8864 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
8866 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8868 * image.c: swapped name/filename;
8870 2004-06-18 Martin Baulig <martin@ximian.com>
8872 * mono-debug-debugger.c (write_class): Write the parent class at
8873 the end of the header.
8875 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8877 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8879 2004-06-17 Raja R Harinath <rharinath@novell.com>
8881 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
8882 (bundle_obj): New conditional define.
8883 (BUILT_SOURCES): Remove.
8884 ($(bundle_srcs)): Make parallel-make safe.
8885 (libmonoruntime_la_LIBADD): Make unconditional.
8886 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
8887 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8889 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
8891 * culture-info-tables.h: It was inconsistent with the latest
8894 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
8896 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8899 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8902 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8904 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8905 cleaned up public header threads.h.
8907 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8909 * Makefile.am, *.c, *.h: more API cleanups.
8911 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8913 * Makefile.am: removed monosn from compilation.
8914 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8915 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8916 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8917 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8918 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8919 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8921 2004-06-15 Jackson Harper <jackson@ximian.com>
8923 * assembly.c: Make locales lower case when searching the GAC for
8924 assemblies. gacutil will always make locales lowercase when
8925 installing so this effectively makes them case insensitive.
8927 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
8929 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8930 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8931 parameter which allows to choose whether the wait can be interrupted or
8932 not. Also added the method mono_monitor_enter(), which locks the monitor
8933 using an infinite wait and without allowing interruption.
8934 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8936 * object.h: Added new fields in MonoThread. suspend_event holds the event
8937 used to susped/resume the thread. synch_lock is the lock object to use for
8938 modifying the thread state.
8939 * threads.c: Use the new synch_lock object for locking, instead of "this",
8940 which can generate deadlocks.
8941 Moved thread state change in Thread.Sleep and Thread.Join from managed
8942 to unmanaged code. This avoids a deadlock when the thread was suspended
8943 just after acquiring the thread lock.
8944 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8945 Implemented Thread.Suspend using an event instead of ThreadSuspend,
8946 which is not fully implemented in the io-layer.
8947 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8949 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8951 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8952 threads-types.h: more API cleanups.
8954 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8956 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8957 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8958 threadpool.c, threads.c: first pass at the exported API cleanup.
8960 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8962 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8964 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8966 * icall.c: added internalGetHome.
8968 2004-06-14 Dick Porter <dick@ximian.com>
8970 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8971 possible to return successfully when '.' or '..' were the only
8972 entries in a directory, but were skipped. The MonoIOStat was not
8973 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
8976 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8978 * reflection.c: make binaries run on .Net 1.1 by default.
8980 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8982 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8984 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8986 * marshal.c: keep track of struct size with explicit layout
8989 2004-06-12 Martin Baulig <martin@ximian.com>
8991 * mono-debug-debugger.c: Comment out a debugging g_message().
8993 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8995 * reflection.c, reflection.h: do not free custom attrs that are cached.
8996 * icall.c: use braces to make code clearer.
8998 2004-06-11 Martin Baulig <martin@ximian.com>
9000 * class.h (MonoInflatedField): New type.
9001 (MonoClassField): Replaced `MonoType *generic_type' with
9002 `MonoInflatedField *generic_info'.
9005 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9007 2004-06-11 Martin Baulig <martin@ximian.com>
9009 * reflection.c (mono_image_create_method_token): Correctly encode
9012 2004-06-11 Martin Baulig <martin@ximian.com>
9014 * metadata.c (mono_metadata_parse_method_signature): When parsing
9015 a MethodDef which has VarArgs, also set sentinelpos if we don't
9016 have any parameters.
9018 2004-06-11 Martin Baulig <martin@ximian.com>
9020 * verify.c (mono_method_verify): In CEE_CALL, use
9021 mono_method_get_signature() to get the method's signature, unless
9022 we're a PInvoke method.
9024 2004-06-10 Jackson Harper <jackson@ximian.com>
9026 * assembly.c: Use <path>/lib/mono/gac for the extra paths
9027 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9028 logical name as the supplied path is just a prefix to the gac not
9029 the direct path to it.
9031 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9033 * reflection.c: make the token for a created method match
9034 the token of the MethodBuilder it was created from
9035 (IKVM requires this behaviour now).
9037 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9039 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9040 reflection.c, socket-io.c: leak fixes.
9042 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9044 * icall.c: handle sentinel pos in vararg methods in position different
9047 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9049 * culture-info-tables.h: freshly generated.
9051 2004-06-09 Martin Baulig <martin@ximian.com>
9053 * loader.c (mono_get_method_constrained): Call `mono_class_init
9054 (constrained_class)'.
9056 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
9058 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9059 any methods. Fixes #59629.
9061 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9063 * culture-info-tables.h: reflecting locale-builder updates.
9065 2004-06-08 Dick Porter <dick@ximian.com>
9068 * locales.c: Fixed compile warnings, including a real bug in
9069 CompareInfo_internal_compare.
9071 2004-06-08 Dick Porter <dick@ximian.com>
9074 (ves_icall_System_Globalization_CompareInfo_internal_index):
9075 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9076 Double-check the resuls of usearches, because ICU currently
9077 ignores most of the collator settings here. Fixes bug 59720.
9079 2004-06-08 Dick Porter <dick@ximian.com>
9082 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9083 Fix memory leak and segfault-causing typo. No idea how this one
9084 lasted so long without being noticed.
9086 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
9088 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9089 any methods. Fixes #59629.
9091 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9094 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9095 own the critical section before). Removed dead code (that's done
9096 in the preload hook).
9098 (mono_assembly_load_with_partial_name): call the preload hook.
9100 2004-06-08 Martin Baulig <martin@ximian.com>
9102 * metadata.c (mono_metadata_signature_alloc): Default
9103 `sentinelpos' to -1.
9105 * reflection.c (mono_image_get_array_token): Likewise.
9107 2004-06-08 Martin Baulig <martin@ximian.com>
9109 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9111 * metadata.c (mono_metadata_parse_method_signature): When parsing
9112 a MethodDef which has VarArgs, set sentinelpos.
9114 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9115 `gint16' since we're using -1 for non-varargs methods.
9118 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9119 (method_encode_signature): Added varargs support.
9120 (method_builder_encode_signature): Likewise.
9121 (mono_image_get_varargs_method_token): New static method.
9122 (mono_image_create_method_token): New public method; this is
9123 called via an icall instead of mono_image_create_token() when
9124 calling a varargs method.
9126 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
9128 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9130 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9132 * culture-info-tables.h : Reflecting the latest locale-builder that
9133 fixed empty array representation ({} to {0}).
9135 2004-06-07 Jackson Harper <jackson@ximian.com>
9137 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9138 looking up extra gac paths. This allows MONO_GAC_PATH to act
9139 exactly like a prefix.
9141 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9143 * reflection.c (mono_reflection_type_from_name): Make a copy of the
9144 type name before modifying it. Fixes #59405.
9146 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9148 * culture-info.h: added fields for "all datetime patterns".
9149 * locales.c: ( ves_icall_System_Globalization_CultureInfo
9150 _construct_datetime_format ()): fill xxx_patterns fields.
9151 * object.h: added fields for "all datetime patterns" to
9152 MonoDateTimeFormatInfo.
9153 * culture-info-tables.h: reflecting locale-builder updates.
9155 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9157 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9158 the event has no add and remove methods. Fixes #59629.
9160 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
9162 * object.c: Fixed possible integer overflow when allocating large
9165 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9167 * culture-info-tables.h: reflecting locale-builder updates.
9169 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9171 * culture-info-tables.h: reflecting locale-builder updates.
9173 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
9175 * culture-info-tables.h: reflecting locale-builder updates.
9177 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
9179 * threads.c: Made Thread.Sleep abortable.
9181 2004-06-02 Martin Baulig <martin@ximian.com>
9183 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9185 * debug-mono-symfile.h: Bumped symbol file version number to 37.
9187 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
9189 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9191 2004-05-30 Jackson Harper <jackson@ximian.com>
9193 * reflection.c: Do not hardcode assembly versions or public key
9194 tokens anymore. All of this except the corlib section was dead
9197 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
9199 * object.c (mono_runtime_invoke_array): Automatically create boxed
9200 objects for byref valuetypes if needed. Fixes #59300.
9202 * object.c (mono_method_return_message_restore): Handle
9203 MONO_TYPE_OBJECT as well.
9205 2004-05-28 Jackson Harper <jackson@ximian.com>
9207 * reflection.c: The modified type encoding was causing build
9208 problems. Reverted for now.
9210 2004-05-28 Jackson Harper <jackson@ximian.com>
9212 * reflection.c/h: Take an assembly ref so that we dont create
9213 fully qualified names when encoding types in the same assembly as
9214 the custom attribute being emitted.
9215 * appdomain.c: Increment version number.
9217 2004-05-26 Duncan Mak <duncan@ximian.com>
9220 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9221 Set the full version number (major, minor, build, revision).
9223 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
9225 * marshal.c (emit_struct_conv): increment src/dst after blit
9226 (mono_marshal_get_managed_wrapper,
9227 mono_marshal_get_native_wrapper): make sure we have marshalling
9228 info before marshalling params (info computation affects
9231 * class.c (class_compute_field_layout): correctly deal with
9233 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9234 value types (as per what windows dows by default)
9235 (mono_class_setup_mono_type): System.ValueType is blittable
9236 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9239 * marshal.c (mono_marshal_load_type_info): flag types as
9240 non-blittable if the native layout doesn't match the managed
9243 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9245 * appdomain.c: don't add stuff in the private search path that is
9246 above the application base. If application base is not set, there's
9247 no private search path.
9249 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
9251 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9252 byref struct arguments in native->managed marshalling.
9254 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
9256 * marshal.c (mono_marshal_get_runtime_invoke): correctly
9257 cache methods using signature (special case for methods
9258 that are value type or string class)
9260 * image.c (mono_image_close): clean up allocated GSList's
9261 in runtime_invoke_cache.
9263 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9265 * mono-config.c: set the correct path for mono_cfg_dir on windows when
9266 there's no MONO_CFG_DIR environment variable defined.
9268 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9270 * threads.c: windows version must be >= 0x0500 to include OpenThread.
9272 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
9274 * threadpool.c: Really wait for 500ms after the async call, even if the wait
9276 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9277 before waiting for it, and call CloseHandle after the wait to unref it.
9278 This will make sure that handles are not disposed too early.
9280 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9285 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9288 * object.c: se the application_base only for the domain that runs
9289 Main. Fixes bug #59216,
9291 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9294 * object.c: only the domain in which Main is run have
9295 SetupInformation.ConfigurationFile set, so moved a few lines from
9296 appdomain.c to object.c.
9298 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9300 * appdomain.c: we tried to load [name].(dll|exe), but according
9301 to bug #57710, we must also try [culture]/[name].(dll|exe) and
9302 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9303 There's a test case attached to bug #58922.
9305 2004-05-27 Dick Porter <dick@ximian.com>
9308 * file-io.c: Implemented icalls for locking and unlocking regions
9310 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9311 FALSE on error (fixes both compiler warning and real bug.)
9313 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
9315 * culture-info-tables.h: reflecting locale-builder updates.
9317 (Added missing ChangeLog entry for 05/26)
9319 2004-05-27 Jackson Harper <jackson@ximian.com>
9321 * locales.c: Fix some cut and paste errors.
9323 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9325 * mono-config.c: set the correct path for config. directory on windows.
9327 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9329 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9332 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9334 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9335 from pinvoke functions.
9337 * marshal.c (mono_ftnptr_to_delegate): Implement this.
9339 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9341 * culture-info-tables.h: reflecting locale-builder updates.
9343 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9345 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9348 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
9350 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9351 * icall.c: Modified icalls for RNG.
9352 * rand.c|h: Changed RNG interface to allow thread-safe usage under
9353 Windows (CryptoAPI).
9355 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9357 * locales.c: Fix build.
9359 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
9361 * culture-info-tables.h: reflecting locale-builder updates.
9363 2004-05-25 Jackson Harper <jackson@ximian.com>
9365 * locales.c: When creating the current culture use the $LANGs
9366 specific culture. So DateTimeFormat and NumberFormat entries are created.
9368 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9370 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9371 a char array as parameter.
9373 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
9375 * image.c: In mono_image_open(), always use an absolute path name to
9376 look for already loaded images.
9378 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
9380 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9381 missing in the windows build (like older cygwin include files).
9383 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
9385 * icall.c: Fixed check for possible integer overflow in Buffer_
9386 BlockCopy icall. Replaced comments style // by /* */.
9388 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
9390 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9392 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9393 check after MONO_VTADDR. Fixes pinvoke2.exe.
9395 * marshal.h marshal.c metadata.h: Add beginnings of support for
9396 ftnptr -> delegate marshalling.
9398 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
9400 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9401 * threads.c: Fix warnings.
9403 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
9405 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9406 * icall.c: Registered icalls for Suspend and Resume.
9407 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9409 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9410 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9411 * process.c: Use WaitForSingleObjectEx.
9412 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
9414 * threads.c, threads.h: Make use of new Ex wait methods. Improved
9415 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9416 for Suspend and Resume. Added new mono_thread_stop, used for stoping
9417 background threads. Added basic support for Abort in Windows.
9418 Start new threads using a managed delegate invoke wrapper. This wrapper
9419 has an interruption checkpoint that is needed since an interruption
9420 can be requested before the thread leaves the unmanaged code that starts
9422 * marshal.c: Added interruption checkpoint after every native call, and
9423 also before managed calls for wrappers called from unmanaged code to
9424 go into managed code.
9425 * object.h: Added new field in MonoThread to keep track of interruption
9428 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
9430 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9433 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9440 * rand.c: getenv -> g_getenv (windows!)
9442 * process.c: complete_path is also used on non-windows platforms.
9444 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9446 * icall.c: new signature for Process_Start.
9448 * process.[ch]: new signature for Process_Start. If we're on windows
9449 and UseShellExecute is false, we have to search for the program by
9450 ourselves if we don't get a full path.
9452 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
9454 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
9455 marshalling and call CleanUpNativeData if needed. Fixes #58646.
9457 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9459 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9462 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9464 * process.c: use double quotes to quote program name and arguments on
9465 windows. Fixes bug #58575.
9467 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9469 * file-io.c: don't return "." and ".." when using windows Find*File.
9471 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
9473 * marshal.c: Don't pass wrappers to message init because method
9474 addressed used to lookup metadata. part of remoting[2|3] fix.
9476 2004-05-15 Jackson Harper <jackson@ximian.com>
9478 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9479 path is essentially the same as MONO_PATH except that it points to
9480 GACs instead of lib directories.
9481 * loader.h: The user gac is gone so we dont need function to
9483 * mono-config.c: user gac option is now gone.
9485 2004-05-15 Jackson Harper <jackson@ximian.com>
9487 * culture-info.h: Make defines more consistent, add calendar data
9488 to the culture info table.
9489 * culture-info-tables.h: Add basic calendar data. Basically
9490 everyone gets default gregorian until all the data is
9492 * locales.c: Use the new consistent defines. Set calendar data for
9493 culture info objects.
9494 * object.h: add a field for calendar data to CultureInfo
9496 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
9498 * image.c: image->runtime_invoke_cache is keyed on signatures now.
9499 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9501 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9502 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9503 an extra param that is the pointer of the method to invoke. The IL for
9504 the invoke method is no longer specific to the method, but to the
9505 signature of the method. Thus, we can share the same code for multiple
9506 methods. This reduces the number of methods that have to be compiled.
9508 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
9510 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9512 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9514 * icall.c: Optimize Buffer.BlockCopy.
9516 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9518 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9519 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9520 quote). Changed them to "MMMM yyyy".
9522 2004-05-12 Miguel de Icaza <miguel@ximian.com>
9525 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
9527 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
9529 * reflection.h: Updated after changes to managed structures.
9531 * appdomain.c: Bump corlib version.
9533 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9535 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9538 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9540 * Makefile.am: link to ../os/libmonoos.la on windows.
9543 -If MONO_DEBUG, warn about non-existing directories in
9545 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9546 compile time variable.
9547 -Removed init_default_path and call mono_set_rootdir from
9548 libmonoos.a instead (windows only).
9550 * assembly.h: declare mono_assembly_getrootdir().
9553 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9555 * loader.c: s/getenv/g_getenv/
9557 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
9559 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9561 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9563 * metadata.h: Add new marshalling conversions.
9565 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9568 * reflection.c (mono_reflection_get_type): Lookup the type in all
9569 modules of a multi-module assembly. Fixes #58291.
9571 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
9573 * threads.c: Before aborting a background, set the StopRequested
9574 state. This avoids throwing the Abort exception.
9575 In mono_thread_manage, don't continue with the shutdown until all
9576 aborted threads have actually stopped.
9578 2004-05-10 Jackson Harper <jackson@ximian.com>
9580 * locales.c: Remove the modifier from culture names.
9582 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9584 * Makefile.am: monosn is not installed any more. It has been deprecated
9587 2004-05-07 Jackson Harper <jackson@ximian.com>
9590 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9591 Fix array construction, add bailout if the length is 0.
9593 2004-05-07 Dick Porter <dick@ximian.com>
9595 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9596 machine doesn't have a DNS entry. Patch by Urs Muff
9597 (umuff@quark.com), fixes bug 57928.
9599 2004-05-06 Jackson Harper <jackson@ximian.com>
9601 * reflection.c: Handle null PublicTokens properly. alloc mem for
9602 assembly names culture so we dont crash when freeing it.
9604 2004-05-06 Jackson Harper <jackson@ximian.com>
9606 * assembly.c: Check the usergac when loading with partial names.
9608 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9610 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
9611 does nothing for now (not required for Linux/Windows) but the class
9612 library can call it (and a newer or modified runtime could need it).
9613 * icall.c: Registred icall.
9615 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9617 * loader.c: prints a message on module loading error we set MONO_DEBUG
9618 environment variable.
9620 2004-05-05 Jackson Harper <jackson@ximian.com>
9622 * appdomain.c: Handle PublicKeyToken=null properly.
9624 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9626 * environment.c|h: Added icall ves_icall_System_Environment_
9627 GetOSVersionString to get the current OS version as a string.
9628 * icall.c: Registred icall.
9630 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
9632 * object.c: in mono_object_get_virtual_method(), take into account that
9633 non-virtual methods don't have a slot in the vtable. Check needed when
9634 the object is a proxy.
9636 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
9638 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9639 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9641 * object.c (mono_class_compute_gc_descriptor): Fix warning.
9643 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9644 passed when a valuetype is expected.
9646 * object.c (mono_unhandled_exception): Only set the exit code if the
9647 exception happens in the main thread. Fixes thread5.exe.
9649 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9650 invalid names. Fixes #58047.
9652 2004-05-03 Jackson Harper <jackson@ximian.com>
9654 * assembly.c: This line was committed accidently and is unneeded.
9656 2004-05-03 Jackson Harper <jackson@ximian.com>
9658 * icall.c: Add new icall for Assembly::LoadWithPartialName
9659 * assembly.c/.h: new function that probes the GAC to load partial
9660 assembly names by Paolo Molaro.
9662 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9664 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9665 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9666 (type_get_fully_qualified_name): Added PublicKeyToken when building a
9669 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9671 * appdomain.c: fixed check for 'neutral' culture and removed warning.
9672 * reflection.c: fix bug when parsing a full type name and Version is not
9673 the last thing in the string.
9675 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
9677 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9678 crashes when it is freed.
9680 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9682 * assembly.c: print the compat warning to stderr.
9684 2004-05-01 Miguel de Icaza <miguel@ximian.com>
9686 * assembly.c (mono_assembly_load_references): Add a compatibility
9687 hack to run old applications that might be still referencing the
9688 3300-based assemblies, only do this for System.xxx.
9690 2004-05-01 Jackson Harper <jackson@ximian.com>
9692 * appdomain.c: If the culture is neutral we set it to "".
9694 2004-04-29 Jackson Harper <jackson@ximian.com>
9696 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9698 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9700 * string-icalls.c: added low overhead function for copying chars
9701 * icall.c: added needed icall for the above function
9703 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9705 * icall.c: fix return value of get_global_assembly_cache. Implemented
9706 Environment.GetLogicalDrives.
9708 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
9710 * rand.c: try and talk to egd or prngd
9711 for random bytes if opening devices fail.
9713 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
9715 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9716 alignment for the type using the native alignment of its members
9717 instead of using klass->min_align.
9719 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9721 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9724 * socket-io.c: added check for sys/aio.h.
9726 2004-04-28 Dick Porter <dick@ximian.com>
9728 * threads.c: Don't abort a thread thats already aborting, when
9729 terminating everything.
9731 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9733 * icall.c: added 2 new async calls for Socket.
9735 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9738 * threadpool.c: removed unused variable.
9740 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
9742 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9744 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9746 * locales.c: put back string_invariant_tolower () and
9747 string_invariant_toupper ().
9749 2004-04-26 David Waite <mass@akuma.org>
9754 * unicode.h: remove comma from end of enumeration declarations
9756 2004-04-26 David Waite <mass@akuma.org>
9758 * debug-mono-symfile.h:
9761 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9764 2004-04-26 Jackson Harper <jackson@ximian.com>
9766 * appdomain.c: Increment version number.
9768 2004-04-26 Jackson Harper <jackson@ximian.com>
9770 * appdomain.c: Set assembly references public token value when
9771 PublicKeyToken is specified, not the hash_value. Free public token
9772 values when free assembly name data. Previously the public key
9773 token was hex decoded, however we are using hex encoded public key
9774 tokens, so this is not neccasary.
9775 * assembly.c: Lookup assemblies in the gac if their public token
9776 value is set. Add function to allow enabling user gac
9777 lookups. Specify whether or not the assembly was loaded from the
9778 GAC. Compare full assembly names when checking the cache for
9779 assemblies (Temporarily disabled see comment in code). Remove
9780 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9781 specifies trace-loader they get extra info to stdout on the
9782 loading of assemblies.
9783 * image.h: Add a field for an assembly references public token
9784 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9785 whether an assembly has been loaded from the GAC.
9786 * image.c: Remove a corlib -> mscorlib name mapping.
9787 * loader.h: Add function to enable/disable the user gac.
9788 * mono-config.c: Check if the usergac is enabled in the config
9790 * icall.c: New icall to determine whether or not an assembly has
9791 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9792 * tabldefs.h: Add constant for assemblyref flag that specifies a
9793 full public key is used instead of a public token.
9794 * reflection.c: Remove mscorlib -> corlib mappings. Set
9795 PublicTokenValue instead of hash value. This value is a hex
9796 string so it does not need to be expanded.
9798 2004-04-26 Martin Baulig <martin@ximian.com>
9800 * mono-debug-debugger.c (mono_debugger_initialize): Set
9801 `mono_debugger_initialized' before calling mono_debug_lock().
9803 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
9805 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9806 InternalToUpper/InternalToLower.
9807 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9808 removed invariant culture shortcut. This is now done in managed code.
9809 * locales.c: (string_invariant_toupper/tolower) removed.
9811 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9813 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9814 Added Poll internal call.
9816 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9817 call for Poll. Select was too heavy for polling a single socket.
9819 * threadpool.[ch]: added mono_threadpool_cleanup.
9820 * threads.c: use it. Don't use Thread_Abort on windows.
9822 2004-04-23 Martin Baulig <martin@ximian.com>
9824 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9826 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
9828 * icall.c: Registred new icalls for key pair protection and added an
9829 icall for Environment.GetFolderPath on Windows.
9830 * security.c|h: Added new icalls for key pair protection.
9832 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9834 * socket-io.c: don't display the non-supported family warning for known
9835 families. Now this is not displayed on windows when checking support
9838 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9840 * class.c: don't display the layout warning for static fields.
9842 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
9844 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9845 * locales.c, locales.h: Added new icalls for culture-specific
9846 Char.ToLower and Char.ToUpper.
9848 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9850 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9853 2004-04-20 Martin Baulig <martin@ximian.com>
9855 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9856 of the type name before passing it to mono_reflection_type_from_name().
9858 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
9860 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9861 encodings here. Fixes #56965.
9863 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
9865 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9866 fix test on strstr result not that I can see anything that
9867 relies on the result.
9869 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
9871 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9874 * marshal.c (mono_marshal_get_string_encoding): New helper function.
9876 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9877 function to determine which marshalling to use for strings. Fixes
9880 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9882 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9884 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
9886 * icall.c: #include mono-config.h
9888 2004-04-15 Jackson Harper <jackson@ximian.com>
9890 * culture-info-tables.h: Fix date formats for en-US culture.
9892 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
9894 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
9895 ThreadPool.SetMinThreads.
9896 * threadpool.c: Implemented ThreadPool.GetMinThreads and
9897 ThreadPool.SetMinThreads.
9899 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9901 * mono-config.c: also load the .config file in the directory
9902 where the assembly was found.
9904 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9906 * assembly.c: load per-assembly config files.
9907 * icall.c: decrapified code to get the config dir and moved to
9909 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9910 per-assembly config files. When doing a dll map lookup give precedence
9911 to the per-assembly data.
9913 2004-04-14 Martin Baulig <martin@ximian.com>
9915 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9916 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9917 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9919 * mono-debugger-debugger.c: While the debugger is locked, remember
9920 whether the symbol tables have changes and send one single
9921 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9923 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
9925 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9927 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
9930 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9931 account when marshalling string arrays. Fixes #56965.
9933 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
9935 * icall.c: Add new icalls mapping for security.
9936 * security.c|h: Add internal calls for WindowsIdentity,
9937 WindowsImpersonationContext and WindowsPrincipal.
9939 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
9941 * class.c: Added comment to ensure the System.MonoDummy class
9942 is removed when no longer necessary
9944 2004-04-13 Miguel de Icaza <miguel@ximian.com>
9946 * appdomain.c: Pass arguments to the bootstraping exceptions to
9947 minimize JITed methods at boot
9949 * metadata.c (mono_exception_from_name_two_strings): Allow for the
9950 second string to be null.
9952 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9953 Change the protocol to minimize the JIT methods at startup. Now
9954 it Returns the internal codepage, if the value of "int_code_page"
9955 is 1 at entry, and we can not compute a suitable code page
9956 number, returns the code page as a string.
9958 2004-04-13 Jackson Harper <jackson@ximian.com>
9960 * culture-info-tables.h: Fix number of decimal digits for all
9963 2004-04-13 Jackson Harper <jackson@ximian.com>
9965 * icall.c: Clairfy out of sync error message. It is not always
9966 your corlib that is out of sync.
9968 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
9970 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9971 properties when only the set accessor is overriden. Fixes #55874.
9973 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
9975 * assembly.c (mono_assembly_load_references): Make this thread safe.
9978 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
9980 * monosn.c: Add missing initialization calls.
9982 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
9985 ves_icall_System_Globalization_CultureInfo_construct_number_format
9986 Fix g_assert so it compiles on fussier compilers re int/ptr
9989 2004-04-08 Dick Porter <dick@ximian.com>
9992 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
9993 53992. Also rearrange the code so that the internal calls return
9994 an error value and exceptions are thrown from managed code.
9996 * icall.c: Add type info to the socket icalls.
9998 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10000 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10003 2004-04-07 Martin Baulig <martin@ximian.com>
10005 * class.c (mono_class_from_generic_parameter): Don't default
10006 `klass->parent' to `mono_defaults.object_type'.
10008 2004-04-07 Martin Baulig <martin@ximian.com>
10010 * reflection.c (mono_reflection_initialize_generic_parameter): Set
10011 `param->pklass->reflection_info'.
10013 2004-04-07 Jackson Harper <jackson@ximian.com>
10015 * culture-info-tables.h: Fix date separator symbol.
10017 2004-04-07 Martin Baulig <martin@ximian.com>
10019 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10020 from System.Type to System.MonoType.
10022 2004-04-07 Martin Baulig <martin@ximian.com>
10025 (MonoReflectionGenericParam): Added `has_reference_type' and
10026 `has_value_type' fields.
10028 * reflection.c (mono_image_get_generic_param_info): Encode the
10029 correct flags if we have the `class' or `struct' constraint.
10031 2004-04-07 Martin Baulig <martin@ximian.com>
10034 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10036 2004-04-07 Jackson Harper <jackson@ximian.com>
10038 * appdomain.c: Revert extra patches, just wanted to bump the
10041 2004-04-07 Jackson Harper <jackson@ximian.com>
10043 * Makefile.am: Add culture-info private headers.
10044 * icall.c: Add new icalls for contructing locales.
10045 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10046 * locales.h: Declare new culture info construction methods.
10047 * object.h: Add new fields used to avoid the CultureMap to
10049 * culture-info.h: Definition of structs used in the culture info
10051 * culture-info-tables.h: Autogenerated tables that contain culture
10052 info data. This file was generated with the locale-builder tool.
10053 * appdomain.c: Incement corlib version number.
10055 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
10057 * appdomain.c: (mono_runtime_init) move mono_thread_init
10058 to before mono_object_new calls so critical sections
10059 are initialized before use.
10061 2004-04-07 Martin Baulig <martin@ximian.com>
10064 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10065 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10066 (ves_icall_MonoGenericParam_initialize): Removed.
10067 (monogenericparam_icalls): Removed.
10068 (generictypeparambuilder_icalls): Added new table for
10069 System.Reflection.Emit.GenericTypeParameterBuilder.
10072 (mono_reflection_define_generic_parameter): Removed.
10073 (mono_reflection_initialize_generic_parameter): This is now called
10074 from GenericTypeParameterBuilder's .ctor.
10076 2004-04-06 Martin Baulig <martin@ximian.com>
10078 * class.c (mono_class_init): Don't inflate nested classes in a
10080 (mono_type_get_name_recurse): Include the generic arguments for
10081 generic instances and generic type declarations.
10082 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10083 (_mono_class_get_instantiation_name): Removed.
10084 (mono_class_create_generic): Always use `gklass->name' as our name.
10086 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10088 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10089 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10090 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10091 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10092 closed generic methods here.
10095 (mono_reflection_generic_inst_get_nested_types): Removed.
10096 (inflate_mono_method): Copy the generic parameters from the
10097 MonoMethodHeader into out MonoGenericMethod.
10099 2004-04-06 Martin Baulig <martin@ximian.com>
10102 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10104 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10106 * reflection.c (build_compressed_metadata): If we have any entries
10107 in the GenericParam, MethodSpec or GenericParamConstraint tables,
10108 set the header version to 1.1.
10110 2004-04-06 Martin Baulig <martin@ximian.com>
10112 * class.c (mono_class_init): If we're a generic instance,
10113 initialize our nested classes, too.
10114 (_mono_class_get_instantiation_name): Deal with the new `!%d'
10117 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10119 * process.c: quote the argument passed to the shell on windows.
10121 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
10123 * threads.c (mono_alloc_special_static_data): Allow this to be
10124 called during startup.
10126 2004-04-02 Martin Baulig <martin@ximian.com>
10129 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10131 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
10133 * icall.c: Fix build.
10135 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
10137 * Makefile.am: Added security.c|h.
10138 * icall.c: Added icall for get_UserName;
10139 * security.c: New file for security related icalls. Added function
10140 get_UserName for System.Environment (fix #56144).
10141 * security.h: New. Header file for security.c
10143 2004-04-02 Dick Porter <dick@ximian.com>
10145 * icall.c: Deleted the icalls that were obsoleted some time ago
10146 by the ICU string code, and which were mixed into the icall
10147 rearranging. Fixes bug 55969.
10150 * string-icalls.c: Deleted the code that those icalls reference.
10152 2004-04-01 Martin Baulig <martin@ximian.com>
10154 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10156 * class.c (mono_class_from_generic_parameter): Don't set
10157 TYPE_ATTRIBUTE_INTERFACE.
10158 (my_mono_class_from_generic_parameter): Likewise.
10160 2004-04-01 Martin Baulig <martin@ximian.com>
10162 * loader.c (find_method): Added an optional `MonoClass *ic'
10163 argument to search in a specific interface.
10164 (mono_get_method_constrained): New public function.
10166 2004-04-01 Martin Baulig <martin@ximian.com>
10168 * reflection.c (mono_image_get_generic_field_token): Use the
10169 `handleref' cache here.
10171 2004-04-01 Martin Baulig <martin@ximian.com>
10173 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10175 * reflection.c (create_generic_typespec): Use the `typespec' hash
10176 here, not the `typeref' one.
10178 2004-04-01 Martin Baulig <martin@ximian.com>
10180 * class.c (mono_class_inflate_generic_type): Moved the
10181 functionality into a new static inflate_generic_type() which
10182 returns NULL if it didn't do anything. Only increment the
10183 `mono_stats.inflated_type_count' if we actually inflated
10185 (mono_class_get_full): Check the classes type to see whether we
10186 need to inflate it; also inflate MONO_TYPE_(M)VAR.
10188 2004-04-01 Jackson Harper <jackson@ximian.com>
10190 * reflection.c: Set culture for assembly references.
10192 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
10194 * reflection.[ch], icall.[ch], Fix support for pinning variables.
10196 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10199 (do_mono_assembly_open): the critical section also covers
10200 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10202 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10205 (mono_manage_threads): abort the background threads when finishing.
10208 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10210 * gc.c: only close the done_event handle if there was no timeout.
10213 2004-03-30 Martin Baulig <martin@ximian.com>
10215 * icall.c (icall_entries): It's called "System.Activator", not
10216 "System.Activation".
10218 2004-03-30 Martin Baulig <martin@ximian.com>
10220 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10221 (mono_class_create_from_typespec): Likewise.
10223 2004-03-30 Martin Baulig <martin@ximian.com>
10225 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10226 `has_ctor_constraint' and `initialized'.
10228 2004-03-30 Martin Baulig <martin@ximian.com>
10230 * reflection.c (encode_new_constraint): New static function to add
10231 the constructor constraint attribute to a type parameter.
10232 (encode_constraints): Call encode_new_constraint() if necessary.
10235 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10237 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10239 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
10241 * reflection.c, icall.c: add support for pinning variables.
10243 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
10245 * marshal.c (mono_marshal_get_managed_wrapper):
10246 init bool local with zero rather than null.
10248 2004-03-29 Martin Baulig <martin@ximian.com>
10250 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10251 the "official" behavior here.
10252 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10254 2004-03-29 Martin Baulig <martin@ximian.com>
10256 * icall.c: Reflect latest API changes.
10258 2004-03-29 Martin Baulig <martin@ximian.com>
10260 * loader.c (mono_get_method_from_token): Also call
10261 mono_metadata_load_generic_params () for abstract and interface
10262 methods; replace the type arguments in the method signature with
10263 the ones which are loaded from the metadata.
10265 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
10267 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10268 of the lock is not the current thread. MS.NET don't do it, in spite of
10269 what the documentation says. See bug #56157.
10271 2004-03-28 Martin Baulig <martin@ximian.com>
10273 * class.c (mono_class_init): Don't call init_properties() and
10274 init_events() for generic instances; set `prop->parent' when
10275 inflating properties.
10277 * reflection.c (mono_generic_inst_get_object): Call
10278 `mono_class_init (ginst->klass)'.
10279 (mono_type_get_object): Only create a MonoGenericInst if your
10280 generic type is a TypeBuilder.
10281 (do_mono_reflection_bind_generic_parameters): Only set
10282 `ginst->is_dynamic' if our generic type is a TypeBuilder.
10284 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
10286 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10289 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10291 * icall.c: added Kill_internal icall.
10292 * process.[ch]: added Kill_internal icall.
10294 2004-03-25 Martin Baulig <martin@ximian.com>
10296 * class.h (MonoStats): Added `generic_instance_count',
10297 `inflated_method_count', `inflated_type_count' and
10298 `generics_metadata_size'.
10300 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10302 * reflection.c: no warnings now.
10304 2004-03-25 Martin Baulig <martin@ximian.com>
10306 * class.c (mono_class_get_full): New public function; does a
10307 mono_class_get(), but also takes a `MonoGenericContext *'.
10309 * loader.c (mono_field_from_memberref): Renamed to
10310 `field_from_memberref', made static and added `MonoGenericContext *'
10312 (mono_field_from_token): Added `MonoGenericInst *' argument.
10313 (method_from_memberef): Likewise.
10314 (mono_get_method_from_token): Likewise.
10315 (mono_get_method_full): New public function; does a
10316 mono_get_method(), but also takes a `MonoGenericContext *'.
10318 * verify.c (mono_method_verify): Get the method's generic context
10319 and pass it to mono_field_from_token(), mono_get_method_full() and
10320 mono_class_get_full().
10322 2004-03-25 Martin Baulig <martin@ximian.com>
10324 * class.c (mono_class_inflate_generic_type): Take a
10325 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10326 `MonoGenericMethod *'.
10328 2004-03-25 Martin Baulig <martin@ximian.com>
10330 * loader.h (MonoMethodInflated): Store the MonoGenericContext
10331 instead of the MonoGenericMethod here.
10333 2004-03-25 Martin Baulig <martin@ximian.com>
10335 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10336 each time we create a new MonoGenericInst, we also create a new
10337 context which points back to us.
10339 * class.c (inflate_method): Use `ginst->context' instead of
10340 creating a new context.
10342 * loader.c (method_from_memberref): Use
10343 `klass->generic_inst->context' instead of creating a new context.
10345 2004-03-25 Martin Baulig <martin@ximian.com>
10347 * class.h (MonoGenericContext): New struct.
10348 (MonoGenericMethod): Removed `generic_inst'.
10350 * class.c (mono_class_inflate_generic_method): Take a
10351 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10353 2004-03-25 Martin Baulig <martin@ximian.com>
10355 * loader.h (MonoMethodInflated): New typedef.
10357 * metadata.h (MonoMethodSignature): Removed `gen_method', make
10358 `generic_param_count' consume just 30 bits, added `is_inflated'
10359 and `has_type_parameters' flags (one bit each).
10361 * class.c (mono_class_inflate_generic_method): Create a
10362 MonoMethodInflated instead of a MonoMethodNormal and set
10363 `is_inflated' in the method signature.
10365 * class.h (MonoGenericMethod): Removed `generic_method'.
10367 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
10369 * image.c: Make sure the name of a MonoImage is always an absolute path.
10370 This fixes bug #54415.
10372 2004-03-24 Martin Baulig <martin@ximian.com>
10374 * class.c (mono_class_setup_vtable): If we're a generic instance,
10375 use our generic type's vtable size.
10377 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
10379 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10380 MONO_NO_UNLOAD env var as a temporary workaround for unloading
10383 2004-03-23 Martin Baulig <martin@ximian.com>
10385 * class.h (MonoDynamicGenericInst): Added `int count_events' and
10386 `MonoEvent *events'.
10388 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10389 (typebuilder_icalls): Added "get_event_info"; calls
10390 mono_reflection_event_builder_get_event_info().
10392 * reflection.c (mono_reflection_generic_inst_initialize): Added
10393 `MonoArray *events'.
10394 (mono_reflection_event_builder_get_event_info): New function.
10396 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
10398 * object.h: add mono_type_initialization_init
10400 * object.c (mono_runtime_class_init):
10401 implement class constructor synchronization rules
10402 to cope with threading issues.
10403 add mono_type_initialization_init
10405 * appdomain.c (mono_runtime_init): call
10406 mono_type_initialization_init
10408 * class.h: removing initializing field from MonoVTable
10410 2004-03-23 Martin Baulig <martin@ximian.com>
10412 * class.c (my_mono_class_from_generic_parameter): Use
10413 `param->name' if it's not NULL.
10415 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
10417 * class.c: do not insert non-virtual methods in the vtable.
10418 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10419 that means the method is non-virtual. This never would have
10422 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
10424 * profiler.c: Added lock for accessing coverage_hash.
10426 2004-03-22 Martin Baulig <martin@ximian.com>
10428 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10429 `method->method->signature->generic_param_count != 0' to make it
10430 work for interface methods.
10432 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10434 * process.c: quote the string passed to the shell using g_shell_quote.
10436 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10439 (mono_threads_manage): don't remove the finalizer thread and self
10440 from the threads hash table so that mono_thread_manage can be called
10443 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10445 * process.c: quote the arguments when UseShellExecute is true. Fixes
10448 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10450 * threads.c: set mono_thread_detach as a cleanup routine for every
10451 thread. This way it's always executed upon thread termination, either
10452 aborted or finished normally. No more xsp hangs!
10454 2004-03-17 Martin Baulig <martin@ximian.com>
10456 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10457 `int count_nested' and a `MonoType **nested'.
10459 * reflection.c (mono_reflection_bind_generic_parameters): Moved
10460 most of the functionality into a new static
10461 do_mono_reflection_bind_generic_parameters() and don't take a
10462 `MonoType *nested_in' argument any more. Don't compute nested
10464 (mono_reflection_generic_inst_get_nested_types): New public method
10465 to get nested types.
10467 * class.c (mono_class_create_generic): Set `klass->nested_in' if
10468 we're a nested class.
10470 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10471 mono_reflection_generic_inst_get_nested_types() to compute the
10474 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10476 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10477 descriptive error message under windows.
10479 2004-03-17 Martin Baulig <martin@ximian.com>
10481 * class.c (dup_type): Added `const MonoType *original' argument;
10482 copy the attrs from the original type.
10484 2004-03-17 Martin Baulig <martin@ximian.com>
10486 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10487 `m->generic_inst_cache' here.
10489 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10491 * exception.h exception.c: Add stack_overflow_exception.
10493 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10496 (overlapped_callback): call SetEvent *after* invoking the callback.
10497 No need to call CloseHandle.
10499 2004-03-16 Martin Baulig <martin@ximian.com>
10501 * reflection.c (mono_image_get_fieldref_token): Take a
10502 `MonoReflectionField *' instead of a `MonoClassField *' and a
10503 `MonoClass *'; store the `MonoReflectionField *' in the hash.
10505 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10507 * appdomain.c: don't add the culture to the filename we're looking for
10508 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10510 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10512 * locales.c: don't ignore symbols when doing case insensitive compares.
10513 Thanks Dick! Fixes bug #54046.
10515 * threads.c: surround 'threads' usage with enter/leave in
10516 mono_thread_manage.
10518 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
10520 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
10521 implicitly marshalled as [Out]. Fixes #55450.
10523 (mono_marshal_get_runtime_invoke): Zero out the result if there is
10526 2004-03-16 Martin Baulig <martin@ximian.com>
10528 * class.c (mono_class_from_generic_parameter): Use the actual
10531 2004-03-16 Martin Baulig <martin@ximian.com>
10533 * reflection.c (type_get_signature_size): New static function.
10534 Compues the size of the type in a method signature.
10535 (method_get_signature_size): New static function; calls
10536 type_get_signature_size() to compute the actual size of the
10537 method's signature.
10538 (method_encode_signature): Use method_get_signature_size() to get
10539 the signature's size rather than using `nparams * 10'.
10541 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10543 * file-io.h: define here WapiOverlapped on windows. I don't want the
10544 regular OVERLAPPED one.
10547 * threadpool.c: somehow, BindIoCompletionCallback is not found.
10548 Disabling AIO on windows.
10550 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10552 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10555 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10557 * appdomain.c: upgraded corlib version.
10559 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10560 and BeginWrite. Allow opening files for asynchrnous operations.
10562 * file-io.h: new struct that maps FileStreamAsyncResult.
10563 * icall.c: added new icalls.
10564 * process.[ch]: support setting child process environment variables
10565 and use the SHELL or COMSPEC when UseShellExecute is true.
10567 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10568 callback for async. IO is here and also BindHandle.
10570 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10573 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
10575 * reflection.c (create_custom_attr): Allow len == 0.
10577 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10578 computation on big-endian machines.
10580 2004-03-13 Martin Baulig <martin@ximian.com>
10582 * class.h (MonoGenericInst): Added `int count_ifaces'.
10584 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10585 `ginst->count_ifaces' instead `klass->interface_count' since we
10586 may get called before the vtable is created.
10588 * loader.c (mono_method_get_param_names): If we're a generic
10589 instance, return and don't initialize the class.
10591 * reflection.c (mono_reflection_setup_generic_class): Don't call
10592 ensure_runtime_vtable().
10593 (mono_reflection_bind_generic_parameters): Set
10594 `ginst->count_ifaces'.
10596 2004-03-11 Jackson Harper <jackson@ximian.com>
10600 * unicode.h: Remove unused System.Char icalls.
10602 2004-03-11 Miguel de Icaza <miguel@ximian.com>
10604 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10605 code when we P/Invoke the first library in Windows.Forms, instead
10606 of when we first open the assembly.
10608 * assembly.c: Drop the lookup from here.
10610 2004-03-10 Martin Baulig <martin@ximian.com>
10612 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10613 class for properties, fields and events. Finally fixes #54945.
10615 2004-03-10 Martin Baulig <martin@ximian.com>
10617 * metadata.c (mono_metadata_class_equal): New static function;
10618 checks whether two generic instances or two generic parameters are
10620 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10623 2004-03-10 Martin Baulig <martin@ximian.com>
10625 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10627 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10628 argument and write it into the `reflection_info' field.
10631 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10632 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10634 2004-03-09 Jackson Harper <jackson@ximian.com>
10636 * char-conversions.h: use 8 bits for numeric data its all we need
10637 * icall.c: numeric data is only 8 bits now.
10639 2004-03-09 Martin Baulig <martin@ximian.com>
10641 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10643 * class.c (init_properties, init_events): Initialize the new
10646 * reflection.c (typebuilder_setup_properties): Likewise.
10647 (typebuilder_setup_events): Likewise.
10649 * reflection.h (MonoEventInfo): Replaced `parent with
10650 `declaring_type' and `reflected_type'.
10652 * icall.c (ves_icall_get_property_info): Distinguish between
10653 declaring and reflected type.
10654 (ves_icall_get_event_info): Likewise.
10656 2004-03-09 Martin Baulig <martin@ximian.com>
10658 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10659 (ves_icall_Type_GetField): Correctly set field->klass.
10661 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
10663 * loader.h: Fix warning.
10665 2004-03-08 Miguel de Icaza <miguel@ximian.com>
10667 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10668 library routine if present. Notice that it will still continue
10669 executing even if its missing, for those working on the Gtk#
10670 edition of Windows.Forms.
10672 * assembly.c (do_mono_assembly_open): If loading the
10673 System.Windows.Forms call mono_loader_wini_init.
10675 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
10677 * class.h: Added MonoRemoteClass struct.
10678 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10679 function for MonoStrings.
10680 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10681 Added internal call for getting the proxy type.
10682 * marshal.c: Get the type of transparent proxies from its remote_class.
10683 Added methods that generate the IL for type checks and casts:
10684 mono_marshal_get_isinst, mono_marshal_get_castclass,
10685 mono_marshal_get_proxy_cancast.
10686 * marshal.h: Declaration of the previous new methods.
10687 * object.c: Added new moethods for creating and updating MonoRemoteClass
10688 instances: mono_remote_class, mono_upgrade_remote_class,
10689 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10690 * verify.c: FIx transparent_proxy_fields layout.
10691 * appdomain.c: Bump corlib version.
10693 2004-03-04 Jackson Harper <jackson@ximian.com>
10695 * icall.c: Add icall to access char conversion tables.
10696 * char-conversions.h: Character conversion tables.
10697 * Makefile.am: Add char-conversions.h private header file.
10699 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
10701 * appdomain.c (unload_thread_main): Increase unloading timeout to
10702 10 sec as a temporary workaround for Nant problems.
10704 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
10706 * gc.c: Add checks for GC_enable and GC_disable.
10708 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10709 (jaak@zd.com.pl). Fix memory corruption in String.Replace
10712 2004-02-27 Martin Baulig <martin@ximian.com>
10714 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10715 `MonoReflectionType *' instead of a `MonoType *'.
10717 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
10719 * gc.c (run_finalize): Avoid finalizing the object representing the
10721 (finalizer_thread): Fix warning.
10723 2004-02-25 Martin Baulig <martin@ximian.com>
10725 * class.c (_mono_class_get_instantiation_name): Added `int offset'
10726 argument for nested types.
10727 (mono_class_create_generic): Added support for nested generictypes.
10729 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10732 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10734 * reflection.c (method_encode_signature): Increase the minimum
10735 value of `size' from 10 to 11.
10736 (mono_reflection_bind_generic_parameters): Take `int type_argc'
10737 and `MonoType **types' arguments instead of the `MonoArray
10738 *types'; added `MonoType *nested_in'. Recursively instantiate
10741 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
10743 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
10744 stack_overflow_ex members which are used by exception handling.
10746 * appdomain.c (mono_runtime_init): Initialize the new members.
10748 * gc.c (mono_gc_enable): New helper function.
10749 * gc.c (mono_gc_disable): New helper function.
10751 2004-02-23 Martin Baulig <martin@ximian.com>
10753 * icall.c: I must have been really stupid - make it actually work
10756 2004-02-23 Martin Baulig <martin@ximian.com>
10758 * loader.c (method_from_memberref): Only inflate the method if
10759 it's in another klass.
10761 2004-02-23 Martin Baulig <martin@ximian.com>
10763 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10764 (mono_class_init): If we're a generic instance and an interface,
10765 compute `class->interface_id'; also create `class->interfaces'
10766 here and inflate them.
10768 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10770 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10772 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10774 2004-02-15 Miguel de Icaza <miguel@ximian.com>
10776 * reflection.c (method_encode_code): Improved the error message
10777 generated by the exception.
10779 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10781 * icall.c: Martin did not do what he said in the ChangeLog for
10782 2004-02-18, but put back the changes for properties and events.
10783 Commenting those changes out again and adding comment to bug #54518.
10785 * process.c: removed warning.
10787 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
10789 * marshal.c (emit_struct_conv): Print an error message instead of
10790 asserting when a type does not have the StructLayout attribute.
10792 2004-02-20 Martin Baulig <martin@ximian.com>
10794 * reflection.c (mono_type_get_object): Also use the cache for
10796 (mono_reflection_bind_generic_parameters): Always compute
10799 2004-02-20 Martin Baulig <martin@ximian.com>
10801 * class.h (MonoGenericMethod): Removed `klass'.
10803 * class.c (mono_class_inflate_generic_method): Added `MonoClass
10806 2004-02-20 Martin Baulig <martin@ximian.com>
10808 * reflection.c (method_encode_methodspec): Actually use the
10809 uninflated signature for the memberref.
10811 2004-02-20 Martin Baulig <martin@ximian.com>
10813 * class.h (MonoGenericMethod): Removed `declaring'.
10815 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10816 is NULL, compute it here.
10818 2004-02-20 Martin Baulig <martin@ximian.com>
10820 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10822 * metadata.c (mono_metadata_generic_inst_hash): New method.
10823 (mono_metadata_generic_inst_equal): New method.
10825 * reflection.c (mono_reflection_bind_generic_parameters): Use the
10826 `klass->image->generic_inst_cache' cache to avoid creating
10827 duplicate MonoGenericInst's.
10829 * class.c (mono_class_inflate_generic_type): Use the cache.
10831 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10833 * object.c: fixed gc descriptor calculation for embedded valuetypes.
10835 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10837 * icall.c: added Socket.WSAIoctl icall.
10839 * socket-io.[ch]: implemented
10840 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10842 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
10844 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10846 2004-02-18 Urs C Muff <umuff@quark.com>
10848 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10849 this work on PPC and other big-endian architectures.
10851 * debug-mono-symfile.h: Prepended the names of all the `guint32'
10852 fields with an underscore to make sure they're only accessed by
10853 the read32() macro.
10855 2004-02-18 Martin Baulig <martin@ximian.com>
10857 * icall.c: Put the klass->refclass changes back for methods and
10858 fields, but not for properties and events. We're currently not
10859 distinguishing between DeclaringType and ReflectedType for
10860 properties and events, that's what caused the regressions.
10862 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10865 (mono_async_result_new): the handle can be NULL.
10867 * threadpool.c: Use an event instead of a semaphore, don't initialize
10868 it until needed. This saves quite a few semaphores from being created
10869 when using the threadpool.
10871 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
10873 * object.c (mono_string_is_interned_lookup): Fix interning of long
10874 strings. Fixes #54473.
10876 * domain.c (ldstr_equal): Optimize if the two strings are equal.
10878 * icall.c: Revert the klass->refclass changes since they introduce
10879 regressions (bug #54518).
10881 2004-02-18 Martin Baulig <martin@ximian.com>
10883 * class.c (mono_class_init): If we're a generic instance and don't
10884 come from a TypeBuilder, inflate our members here.
10885 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10886 (mono_class_create_generic): New public method.
10887 (mono_class_initialize_generic): Removed.
10888 (get_instantiation_name): Renamed to
10889 _mono_class_get_instantiation_name() and made it public.
10891 2004-02-18 Martin Baulig <martin@ximian.com>
10893 * class.c (mono_class_inflate_generic_type): Clear the new
10894 instance's `nginst->klass' when inflating a generic instance.
10895 (mono_class_is_subclass_of): Added (basic) support for generic
10898 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10900 * appdomain.h, domain.c: use a MonoCodeManager instead of a
10901 MonoMempool to hold compiled native code.
10903 2004-02-17 Martin Baulig <martin@ximian.com>
10905 * class.h (MonoDynamicGenericInst): Added `count_properties' and
10908 * reflection.c (mono_reflection_generic_inst_initialize): Added
10909 `MonoArray *properties' argument.
10911 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
10913 2004-02-17 Martin Baulig <martin@ximian.com>
10915 * icall.c (ves_icall_Type_GetFields): Renamed to
10916 ves_icall_Type_GetFields_internal() and added a
10917 `MonoReflectionType *rtype' argument; pass it to
10918 mono_field_get_object() to set the field's "reflected" type.
10919 (ves_icall_Type_GetConstructors): Likewise.
10920 (ves_icall_Type_GetEvents): Likewise.
10921 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10922 argument; pass it to mono_method_get_object() to set the method's
10925 2004-02-17 Martin Baulig <martin@ximian.com>
10927 * class.h (MonoDynamicGenericInst): New type.
10928 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10930 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10931 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10932 (ves_icall_MonoGenericInst_GetFields): New interncall.
10934 * class.c (mono_class_from_generic): Don't call
10935 mono_class_initialize_generic() if this is a dynamic instance;
10936 ie. it's being created from a TypeBuilder.
10937 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10938 `class->byval_arg.type'.
10940 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10941 to `inflate_method' and made static.
10942 (mono_reflection_inflate_field): Removed.
10943 (mono_reflection_generic_inst_initialize): New public method.
10945 * reflection.h (MonoReflectionGenericInst): Removed `methods',
10946 `ctors' and `fields'; added `initialized'.
10948 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
10950 * debug-helpers.c (mono_method_full_name): Fix output for empty
10953 2004-02-12 Martin Baulig <martin@ximian.com>
10955 * class.h (MonoClassField): Added `MonoType *generic_type'.
10957 * reflection.c (mono_image_get_fieldref_token): Added support for
10958 instantiated generic types.
10959 (field_encode_inflated_field): Removed.
10960 (mono_image_get_inflated_field_token): Removed.
10961 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10963 * reflection.h (MonoReflectionInflatedField): Removed.
10965 2004-02-12 Martin Baulig <martin@ximian.com>
10967 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10968 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10970 * reflection.c (mono_image_get_methodspec_token): Take a
10971 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10972 (mono_image_create_token): Check whether we have a
10973 `method->signature->gen_method' and call
10974 mono_image_get_methodspec_token() if appropriate.
10975 (inflated_method_get_object): Removed.
10976 (mono_reflection_bind_generic_method_parameters): Return a
10977 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10978 (mono_reflection_inflate_method_or_ctor): Likewise.
10980 * reflection.h (MonoReflectionInflatedMethod): Removed.
10982 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
10984 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10985 for custom valuetype marshalling.
10987 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10989 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10991 * icall.c: fixed WSAGetLastError_internal name.
10993 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
10995 * threads.c (mono_thread_attach): Allow this to be called multiple
10996 times for a thread.
10998 * threads.c (build_wait_tids): Do not wait for ourselves.
11000 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
11001 appdomain list is empty.
11003 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11004 memory returned by mono_string_builder_to_utf16, since it points into
11005 managed memory. Thanks to Bernie Solomon for noticing this.
11007 * icall.c: Add AppDomainSetup icalls.
11009 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11011 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11014 * reflection.c (reflection_methodbuilder_to_mono_method): Save
11015 custom attributes to the method_aux struct. Also fix array indexes etc.
11017 * loader.c (mono_method_get_param_names): Make dynamic case work again.
11019 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11021 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11022 (both static and runtime) and reduce startup time.
11024 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
11026 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11027 AsAny marshalling conversion instead of crashing.
11029 * marshal.c: Fix warnings.
11031 2004-02-09 Martin Baulig <martin@ximian.com>
11033 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11035 * reflection.h (MonoReflectionInflatedMethod): Removed the
11036 `declaring' field, it's now in the unmanaged MonoGenericMethod.
11038 * reflection.c (method_encode_methodspec): Removed the `method'
11039 argument; we get it from `gmethod->declaring'.
11040 (inflated_method_get_object): Removed the `declaring' argument.
11042 2004-02-09 Martin Baulig <martin@ximian.com>
11044 * class.h (MonoGenericMethod): New type.
11045 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11048 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11049 a `MonoGenericMethod *gen_method' one.
11051 * class.c (mono_class_inflate_generic_type): Take an additional
11052 `MonoGenericMethod * argument. This is only non-NULL if we're
11053 inflating types for a generic method.
11054 (mono_class_inflate_generic_signature): Renamed to
11055 inflate_generic_signature() and made static; take a
11056 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11057 (inflate_generic_header): Take a `MonoGenericMethod *' argument
11058 instead of a `MonoGenericInst *' one.
11059 (mono_class_inflate_generic_method): Likewise.
11061 * reflection.c (encode_generic_method_sig): Take a
11062 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11063 (method_encode_methodspec): Likewise.
11064 (inflated_method_get_object): Likewise.
11066 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11067 field with a `MonoGenericMethod *gmethod' one.
11069 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
11071 * class.h (mono_class_has_parent): add parens to expansion
11074 2004-02-08 Martin Baulig <martin@ximian.com>
11076 * image.h (MonoImage): Removed `generics_cache'.
11078 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11079 instead of a `MonoType *' argument; removed the `inflate_methods'
11080 argument. Don't inflate methods here.
11082 * loader.c (find_method): If it's a generic instance, call
11083 mono_class_init() on the `sclass->generic_inst->generic_type'.
11085 * metadata.c (mono_type_size): Make this work on uninitialized
11086 generic instances; call it on the `ginst->generic_type's class.
11088 * reflection.c (mono_reflection_bind_generic_parameters): Call
11089 mono_class_from_generic() to create the `ginst->klass'.
11091 2004-02-08 Martin Baulig <martin@ximian.com>
11093 * class.h (MonoClass): Changed type of `generic_inst' from
11094 `MonoType *' to `MonoGenericInst *'.
11096 2004-02-08 Martin Baulig <martin@ximian.com>
11098 * icall.c (ves_icall_Type_BindGenericParameters): Just call
11099 mono_type_get_object(), this is now creating a `MonoGenericInst'
11100 for MONO_TYPE_GENERICINST.
11101 (ves_icall_MonoGenericInst_GetParentType): Likewise.
11102 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11104 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11105 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11106 (inflated_method_get_object): Added `MonoClass *refclass' argument.
11107 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11108 and reflected type.
11110 * reflection.h (MonoReflectionInflatedMethod): Removed
11111 `declaring_type' and `reflected_type'.
11113 2004-02-08 Martin Baulig <martin@ximian.com>
11115 * class.h (MonoGenericInst): Added `MonoType *parent' and
11116 `MonoType **ifaces'.
11118 * reflection.h (MonoReflectionGenericInst): Removed `klass',
11119 `parent' and `interfaces'.
11121 * reflection.c (mono_reflection_bind_generic_parameters): Take a
11122 `MonoType *' argument and return a `MonoType *'.
11125 (ves_icall_MonoGenericInst_GetParentType): New interncall.
11126 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11128 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11130 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11131 valuetype marshalling.
11133 2004-02-06 Martin Baulig <martin@ximian.com>
11136 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11137 (my_mono_class_from_generic_parameter): Likewise.
11139 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11141 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11142 contents of the symbol files lazily.
11144 * object.h (MonoThread): Add 'name' and 'name_len' fields.
11146 * threads.h threads.c icall.c: New icalls for getting and setting the
11149 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
11151 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
11152 Raise an exception when the domain is not found.
11154 2004-02-03 Martin Baulig <martin@ximian.com>
11156 * reflection.c (mono_image_get_methodspec_token): Use the
11157 uninflated signature; fixes gen-33.
11159 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
11161 * gc.c threads.c: Make the finalizer thread a normal managed thread so
11162 the finalizer code can use thread functionality.
11164 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
11165 the finalizer thread.
11167 * threads.c: Make some functions more robust.
11169 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11171 * metadata.h: Add new marshalling conventions.
11173 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11174 stringbuilder marshalling. Fixes #53700.
11176 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11178 * reflection.c (mono_image_get_type_info): Save declarative security
11181 * reflection.c (mono_image_get_field_info): Handle uninitialized
11182 unmanaged fields as well.
11184 * appdomain.c: Bump corlib version.
11186 2004-02-01 Martin Baulig <martin@ximian.com>
11188 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11189 method type arguments.
11191 2004-01-30 Duncan Mak <duncan@ximian.com>
11193 * marshal.h: Add prototype for
11194 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11196 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11199 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
11201 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11202 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11204 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11206 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11207 custom marshalling of valuetypes.
11209 * marshal.c: Fix some warnings.
11211 2004-01-29 Martin Baulig <martin@ximian.com>
11213 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11214 for generic method parameters.
11216 * reflection.c (method_encode_methodspec): Write the uninflated
11217 signature into the methodspec table.
11218 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11219 is always the uninflated method.
11220 (reflection_methodbuilder_to_mono_method): Copy the generic
11221 parameters from the MethodBuilder into `header->gen_params'.
11223 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11225 * class.c (mono_class_from_generic_parameter): Fix warning.
11227 2004-01-27 Martin Baulig <martin@ximian.com>
11229 * class.c (mono_class_from_generic_parameter): Don't create
11230 `klass->methods' here.
11232 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
11234 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11235 extension since it does not work with libraries named lib<FOO>.dll.so.
11237 2004-01-25 Martin Baulig <martin@ximian.com>
11239 * class.c (mono_class_inflate_generic_type): Added support for
11240 MONO_TYPE_GENERICINST.
11242 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11243 inflate methods on open constructed types.
11245 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11247 * object.c: fire ProcessExit event in the root AppDomain after running
11248 Main. Fixes bug #53299.
11250 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11252 * socket-io.c: include the new socket-wrappers.h header.
11253 Use the wrappers instead of the unix socket functions to make the code
11256 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
11258 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11260 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11263 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
11265 * reflection.c (mono_image_create_pefile): Handle the case when the
11266 entry point is not a MethodBuilder.
11268 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11269 field to ReflectionMethod since it is not allways a builder.
11271 * reflection.c (type_get_fully_qualified_name): New helper function to
11272 return the fully qualified name of a type.
11274 * reflection.c (encode_marshal_blob): Always emit the fully qualified
11275 type name for custom marshallers.
11277 * reflection.c (mono_marshal_spec_from_builder): Ditto.
11279 * class.c (mono_class_setup_vtable): If a parent class already
11280 implements an interface, use the implementing methods from that class.
11283 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11285 * threadpool.c: just return instead of ExitThread to allow for thread
11288 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
11290 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11291 when closing resource modules.
11293 * reflection.c (mono_image_create_pefile): Handle the case when the
11294 entry point is not a MethodBuilder.
11296 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11297 field to ReflectionMethod since it is not allways a builder.
11299 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
11301 * marshal.c (mono_marshal_get_managed_wrapper):
11302 mono_marshal_alloc takes native int so CONV_I
11303 the arg for 64bits.
11305 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
11307 * reflection.c (fixup_cattrs): New function to fixup the methoddef
11308 tokens in the cattr table. Fixes #53108.
11310 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11312 * loader.c: don't trim ".dll" before looking up in the config file.
11313 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11315 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
11317 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11318 Return the module which contains the resource as well.
11319 (ves_icall_System_Reflection_Module_Close): New icall.
11321 * appdomain.c: Bump corlib version number.
11323 * image.c (mono_image_addref): New public function.
11325 * assembly.c: Call mono_image_addref.
11327 * reflection.c (mono_module_get_object): Increase reference count of
11330 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11333 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11334 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
11335 proper exceptions on DllImport problems.
11337 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11339 * class.c, metadata.c: eliminate CSIZE macro.
11341 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
11343 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11344 * object.h: Added async_callback field in MonoAsyncResult.
11345 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11346 * verify.c: Added async_callback in MonoAsyncResult layout.
11348 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
11350 * reflection.c (mono_reflection_get_custom_attrs): Add support
11353 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11355 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
11357 (mono_marshal_method_from_wrapper): Add null pointer check.
11359 2004-01-16 Martin Baulig <martin@ximian.com>
11361 * debug-mono-symfile.h: Set version number to 36 and reflect
11362 latest symbol writer changes.
11364 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11366 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11367 multi-dimensional arrays.
11368 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11369 (mono_class_from_mono_type): Use bounded_array_class_get.
11371 * class.c (mono_bounded_array_class_get): New function which takes
11372 a 'bounded' bool argument to distinguish vectors from one dimensional
11375 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
11376 bounded_array_class_get if the array has bounds.
11378 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11379 Search modules loaded using AssemblyBuilder:AddModule as well.
11381 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11383 * appdomain.c: increased corlib version.
11384 * filewatcher.c: removed g_print.
11386 (get_property_info): only allocate what is actually requested.
11387 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11389 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11391 * Makefile.am: added filewatcher.[ch]
11392 * filewatcher.[ch]: FileSystemWatcher runtime support.
11393 * icall.c: added new FSW icalls.
11395 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11397 * string-icalls.c: fix stringbuilder regression as suggested by
11398 Iain McCoy <iain@mccoy.id.au>.
11400 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
11402 * process.c (process_read_stringtable_block): Recognize '007f' as
11403 a language neutral stringtable block.
11405 2004-01-12 Patrik Torstensson
11407 * object.h (MonoStringBuilder) : Changed layout to support our
11408 new stringbuilder class.
11409 * marshal.c: Change marshalling to support the new layout of
11411 * appdomain.c: increased version number because new layout of
11414 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
11416 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11417 assembly name as an string instead of an AssemblyName, since it is
11418 easier to extract info from it.
11420 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11421 the culture subdirectories too. Fixes #52231.
11423 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11425 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11426 It takes 2 new parameters with an optional name for the method to look
11427 for and case ignoring info.
11429 * threadpool.c: removed unused variable.
11431 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11433 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11434 It takes 2 new parameters with an optional name for the property to look
11435 for and case ignoring info.
11438 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
11440 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11443 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11446 * assembly.c: escape the uri before passing it to g_filename_from_uri.
11449 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
11451 * reflection.c: Add support for more than one unmanaged resource.
11453 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11454 in field->def_value, as done in all other cases.
11456 * reflection.c (mono_reflection_get_custom_attrs): Add support for
11459 * reflection.c (mono_reflection_create_runtime_class): Remove
11460 errorneous assignment to klass->element_class, since it is already
11461 done in mono_reflection_setup_internal_class.
11463 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11465 * gc.c: added missing LeaveCriticalSection.
11466 * icall.c: indented a couple of lines.
11467 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11468 if we call EndInvoke inside a callback. Fixes bug #52601.
11470 2004-01-07 Martin Baulig <martin@ximian.com>
11472 * mono-debug-debugger.h
11473 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11475 2004-01-06 Miguel de Icaza <miguel@ximian.com>
11477 * appdomain.c: Use messages in NotImplementedException.
11479 * exception.c (mono_get_exception_not_implemented): Now this takes
11480 a message argument.
11482 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11483 exception instead of g_asserting an aborting when something is not
11486 Add some inline docs.
11488 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
11490 * reflection.h: Update after changes to object layout.
11492 * reflection.c: Implement saving of unmanaged aka win32 resources.
11494 * appdomain.c: Bump version number.
11496 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
11497 Handle missing domains gracefully.
11499 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
11501 * file-io.c : On Windows, there are much more invalid_path_chars.
11503 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11505 * class.h, object.c: prepare for GetType () speedup.
11507 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
11509 * profiler.c: workaround for --profile null reference exception on
11510 cygwin. Patch by Patrik Torstensson.
11512 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
11514 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11515 make work for unaligned access.
11517 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11519 * class.c: small cleanup (class->fields [i] -> field).
11520 * image.c: check address of metadata is valid.
11522 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
11524 * assembly.h assembly.c (mono_assembly_loaded): New public function to
11525 search the list of loaded assemblies.
11527 * reflection.c (mono_reflection_type_from_name): Use
11528 mono_assembly_loaded instead of mono_image_loaded.
11530 * reflection.c: Fix warnings.
11532 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
11534 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
11535 is dynamic. This is needed since an assembly can contain both dynamic and
11536 non-dynamic images.
11538 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
11541 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11543 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11544 to store modules loaded using AddModule.
11546 * reflection.c (mono_image_fill_file_table): Generalize this so it works
11549 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11551 * reflection.c (mono_image_fill_export_table_from_module): New function to
11552 fill out the EXPORTEDTYPES table from a module.
11554 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11555 into a separate function. Also handle loaded non-dynamic modules.
11557 * reflection.c (mono_image_basic_init): Fix memory allocation.
11559 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11561 * assembly.c (mono_assembly_load_references): Make this public.
11563 2003-12-19 Martin Baulig <martin@ximian.com>
11565 * class.c (mono_class_initialize_generic): Made this static, take
11566 a `MonoGenericInst *' instead of a `MonoClass *'.
11567 (mono_class_from_generic): Call mono_class_initialize_generic()
11568 unless we're already initialized or being called from
11569 do_mono_metadata_parse_generic_inst().
11571 * class.h (MonoGenericInst): Added `initialized' and
11572 `init_pending' flags.
11574 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11575 `mono_class_init (gklass)' or mono_class_initialize_generic()
11576 here; set `generic_inst->init_pending' while parsing the
11579 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
11581 * locales.c: include string.h for memxxx prototypes
11583 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
11585 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11586 constructor when accessing literal fields.
11588 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
11590 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11592 * reflection.c (assembly_add_resource_manifest): New function to fill
11593 the MANIFESTRESOURCE table.
11595 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11597 * reflection.h: Update to changes in class layout.
11599 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
11600 Reenable call to mono_runtime_is_shutting_down ().
11602 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11603 determine if the runtime is shutting down.
11605 2003-12-16 Jackson Harper <jackson@ximian.com>
11607 * icall.c: comment out call to mono_runtime_is_shutting_down to
11610 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
11612 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11613 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11615 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
11617 * reflection.c: move definition of swap_with_size
11618 to before its first call
11620 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
11622 * appdomain.c (mono_runtime_is_shutting_down): New public function.
11624 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11627 * object.c: Fix warnings.
11629 * icall.c (ves_icall_Type_Get...): Only consider inherited static
11630 members if FlattenHierarchy is set.
11632 * reflection.c (mono_image_add_decl_security): New function to emit
11633 declarative security.
11635 * reflection.h reflection.c: Add support for declarative security.
11637 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11639 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
11641 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11643 * appdomain.c verify.c: Moved corlib version checking into its own
11644 function in appdomain.c since it needs to create vtables etc.
11646 2003-12-13 Patrik Torstensson <p@rxc.se>
11648 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
11649 instead of unwrapped server.
11651 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
11653 * verify.c (check_corlib): Fix field index.
11655 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
11657 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11660 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
11662 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11663 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11664 cope with sizeof(size_t) != sizeof(guint32).
11666 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11668 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11669 in case of failure.
11671 2003-12-10 Mark Crichton <crichton@gimp.org>
11673 * icall.c: removed the GetNonZeroBytes. We now handle this case
11676 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
11678 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11680 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11683 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
11685 * verify.c (check_corlib): Handle the case when the version field is
11686 initialized by a static constructor.
11688 2003-12-08 Patrik Torstensson <p@rxc.se>
11690 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11692 2003-12-08 Martin Baulig <martin@ximian.com>
11694 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11695 a MonoReflectionGenericParameter, also take the parameter index
11696 and name as arguments.
11697 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11698 (ves_icall_MonoGenericParam_initialize): New interncall.
11699 (ves_icall_Type_make_byref_type): New interncall.
11701 * reflection.h (MonoReflectionGenericParam): Derive from
11702 MonoReflectionType, not just from MonoObject. Added `refobj' and
11705 * reflection.c (mono_reflection_define_generic_parameter): Create
11706 and return a new MonoReflectionGenericParam; don't initialize the
11708 (mono_reflection_initialize_generic_parameter): New public method;
11709 initializes the constraints and creates the `param->pklass'.
11711 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
11713 * reflection.h reflection.c: Use the new fields 'num_types',
11714 'num_fields' and 'num_methods' to track the number of types etc.
11716 * verify.c (check_corlib): Check corlib version number.
11718 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
11720 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11721 function works on all methods.
11723 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
11725 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11726 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11727 the custom_type_info flag of the transparent proxy.
11728 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11729 objects that supports IRemotingTypeInfo.
11730 * object.h: Added custom_type_info field in transparent proxy.
11732 2003-12-06 Martin Baulig <martin@ximian.com>
11734 * class.c (mono_class_create_from_generic): Removed.
11735 (mono_class_from_generic): Check `ginst->klass' before doing
11736 anything else. This is important to fully support "recursive"
11739 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11740 empty `generic_inst->klass' before doing anything else.
11742 2003-12-06 Dick Porter <dick@ximian.com>
11747 * locales.c: Use C structs to access class fields. Don't do a
11748 conversion between MonoString and UChar because both are
11749 platform-endian UTF-16. Compare now takes startindex and count
11750 parameters. Add a char overload for IndexOf. Speed up the
11751 invariant string IndexOf.
11753 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
11755 * Makefile.am (monosn_LDADD): Fix parallel build.
11757 2003-12-04 Martin Baulig <martin@ximian.com>
11760 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11761 (ves_icall_Type_make_array_type): New interncall.
11763 2003-12-04 Martin Baulig <martin@ximian.com>
11765 * locales.c: also change it in the !HAVE_ICU case.
11767 2003-12-04 Dick Porter <dick@ximian.com>
11770 * locales.c: construct_compareinfo is now in CompareInfo, not
11773 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
11775 * image.c (mono_image_load_file_for_image): Cache loaded images in the
11776 image->files array.
11778 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11781 * assembly.c (mono_assembly_load_references): Only load references
11784 * class.c (mono_class_from_name): Avoid linear search of the
11785 EXPORTEDTYPE table.
11787 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11789 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
11791 * image.h (MonoImage): Add 'field_cache' field.
11793 * loader.c (mono_field_from_token): Cache field lookups.
11795 * reflection.c (mono_module_get_object): Fix name property.
11797 * icall.c (ves_icall_get_enum_info): Update after changes to
11798 mono_metadata_get_constant_index ().
11800 * icall.c: Get rid of get_type_info icall, use a separate icall for
11801 each type property to avoid needless memory allocations. Fixes #51514.
11803 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11804 to avoid needless binary searches.
11806 * class.c (class_compute_field_layout): Move the initialization of
11807 field->def_value to mono_class_vtable ().
11809 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11812 * object.c (mono_object_allocate): Make it inline.
11814 * object.c (mono_object_allocate_spec): Make it inline.
11816 2003-12-02 Dick Porter <dick@ximian.com>
11818 * locales.c (create_NumberFormat): NumberFormatInfo construction.
11819 Patch by Mohammad DAMT (mdamt@cdl2000.com).
11821 2003-12-01 Dick Porter <dick@ximian.com>
11823 * threads.c: Fix signature and call in CreateMutex and
11826 2003-12-01 Dick Porter <dick@ximian.com>
11829 * locales.c: Implement string compares and searching
11831 * object.h: Add extra Thread field
11833 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
11835 * reflection.c (fixup_method): Add support for MonoCMethod.
11837 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
11839 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11841 * reflection.c (assembly_name_to_aname): Allow extra characters in
11842 assembly names. Fixes #51468.
11844 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
11846 * exception.c (mono_exception_from_name_domain): New helper function.
11848 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11849 exception object in the correct domain.
11851 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
11852 formatting + make a copy a the input data.
11854 * loader.c (mono_get_method_from_token): Methods which contain
11855 native code do not have entries in the ImplMap.
11857 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11858 Thanks to Gonzalo for spotting this.
11860 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11861 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11863 * assembly.h (mono_assembly_load_from): Split the second part of
11864 assembly loading into a new public function.
11866 * exception.h (mono_get_exception_bad_image_format): New function.
11868 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
11870 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11871 Enumerate all modules inside a dynamic assembly. Fixes #51293.
11873 * icall.c: Add new icall for creating dynamic methods.
11875 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11877 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11879 * reflection.c (mono_reflection_create_dynamic_method): New icall to
11880 create a dynamic method.
11882 * reflection.c (resolve_object): New helper function.
11884 * reflection.c: Generalize ReflectionMethodBuilder and the functions
11885 which manipulate it so they can also work on dynamic methods.
11887 * reflection.c (reflection_method_builder_to_mono_method): Avoid
11888 creating the MonoReflectionMethodAux structure if it is not needed.
11890 * reflection.h verify.c: Update after changes to object layout.
11892 * reflection.c (method_builder_encode_signature): Fix compilation on
11895 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
11897 * appdomain.h: Added support for context static fields. Added static_data
11898 field to MonoAppContext and renamed thread_static_fields to a more
11899 generic special_static_fields in MonoAppDomain, since it can now contain
11900 context static fields.
11901 * domain.c: Updated hashtable name.
11902 * object.c: Replaced field_is_thread_static() for a more generic
11903 field_is_special_static() which also checks for context static attribute.
11904 In mono_class_vtable(), added support for static context fields.
11905 * threads.c: Changed methods that manage thread static fields to more
11906 generic methods so they can be reused both for thread and context static
11908 * threads.h: Declared some new methods.
11910 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
11912 * reflection.h: Update after changes to the managed types.
11914 * reflection.c (encode_custom_modifiers): New helper function.
11916 * reflection.c (method_encode_signature): Emit custom modifiers.
11918 * reflection.c (field_encode_signature): Emit custom modifiers.
11920 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
11922 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11924 * icall.c (ves_icall_System_ValueType_Equals): New optimized
11927 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
11930 * object.c (mono_field_get_value_object): New function.
11932 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11935 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
11937 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11938 return a preallocated out-of-memory exception instance.
11940 * object.c (out_of_memory): Use the new function.
11942 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11943 flag is before the custom modifiers. Fixes #49802.
11945 2003-11-16 Martin Baulig <martin@ximian.com>
11947 * class.c (mono_class_is_open_constructed_type): Implemented the
11948 MONO_TYPE_GENERICINST case.
11950 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
11952 * assembly.c (mono_assembly_fill_assembly_name): New function to
11953 fill out the MonoAssemblyName structure.
11954 (mono_assembly_open): Use the new function.
11956 * icall.c (fill_reflection_assembly_name): New helper function.
11958 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11961 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11963 2003-11-15 Martin Baulig <martin@ximian.com>
11965 * class.c (mono_class_is_open_constructed_type): New public
11966 function; checks whether a type is an open constructed type,
11967 ie. whether it still contains type parameters.
11968 (mono_class_inflate_generic_type): If we're a type parameter and
11969 the inflated type is also a MONO_TYPE_(M)VAR, return the original
11972 * class.h (MonoGenericInst): Added `guint32 is_open'.
11974 * loader.c (method_from_methodspec): Check whether we're an open
11975 or closed constructed type and set `ginst->is_open'.
11977 * reflection.c (mono_reflection_bind_generic_parameters): Check
11978 whether we're an open or closed constructed type and set
11980 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11981 from open constructed types.
11983 2003-11-15 Martin Baulig <martin@ximian.com>
11985 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11986 a generic instance (instead of a generic type declaration) with
11987 unbound generic parameters, bind them to our actual types.
11989 2003-11-14 Martin Baulig <martin@ximian.com>
11991 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11993 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11994 an interface type, populate `res->interfaces' with instantiated
11995 versions of all the interfaces we inherit.
11997 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
11999 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12000 when MONO_PATH is set but doesn't contain the install dir.
12002 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12005 (ves_icall_Type_GetInterfaces): don't return an interface twice when
12006 it's also implemented in base classes. Fixes bug #50927.
12008 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
12010 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12011 if this method is called from a finalizer. Fixes #50913.
12013 2003-11-12 Miguel de Icaza <miguel@ximian.com>
12015 * threads.c: Implement VolatileRead/VolatileWrite
12017 * icall.c: Add new icalls for VolatileRead/VolatileWrite
12019 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12021 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
12022 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12025 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
12026 from Peter Ross (pro@missioncriticalit.com).
12028 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
12030 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12032 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12034 * assembly.c (mono_assembly_load_references): Disable check because it
12035 triggers on older corlibs which lots of people have.
12037 2003-11-12 Jackson Harper <jackson@ximian.com>
12039 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12040 load corlib.dll if mscorlib.dll is not found.
12041 * assembly.h: Remove corlib name define.
12044 * image.c: Change corlib name to mscorlib.
12046 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12048 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12050 2003-11-11 Miguel de Icaza <miguel@ximian.com>
12052 * appdomain.h: Added loader_optimization here to sync with the C#
12053 code, and add disallow_binding_redirects field.
12055 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12057 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12059 * reflection.c (mono_image_build_metadata): Fix crash on modules
12062 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12064 * icall.c (ves_icall_get_method_info): Return callingConvention as
12067 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
12068 namespaces from the EXPORTEDTYPE table as well.
12070 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12071 from all modules inside the assembly.
12073 2003-11-11 Martin Baulig <martin@ximian.com>
12075 * reflection.c (mono_reflection_bind_generic_parameters): Make
12076 this work for interfaces.
12078 2003-11-11 Martin Baulig <martin@ximian.com>
12080 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12082 2003-11-11 Martin Baulig <martin@ximian.com>
12084 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12085 "MonoInflatedMethod" and "MonoInflatedCtor".
12087 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12089 * reflection.c (resolution_scope_from_image): Use the assembly table
12090 from the manifest module, since other modules don't have it.
12092 * debug-helpers.c (mono_type_full_name): New helper function.
12094 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12096 * image.c (mono_image_load_file_for_image): New public function which
12097 is a replacement for the load_file_for_image in class.c.
12099 * assembly.c (mono_assembly_load_module): A wrapper for the function
12100 above which does assembly association and reference loading too.
12102 * class.c (mono_class_from_name): Call mono_assembly_load_module.
12104 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12106 * appdomain.c: not all of the attributes for the full assembly name
12107 are required and the order doesn't matter. Fixes bug #50787.
12109 2003-11-10 Dick Porter <dick@ximian.com>
12111 * locales.c: Use platform-endian UTF16
12113 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12115 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12117 2003-11-10 Martin Baulig <martin@ximian.com>
12120 (mono_metadata_load_generic_params): Make this actually work.
12122 * reflection.c (mono_reflection_bind_generic_parameters): If our
12123 parent is a generic instance, pass all the `types' to it, no
12124 matter whether it has the same number of type parameters or not.
12126 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12128 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12130 * assembly.c (mono_assembly_load_references): Move the image<->assembly
12131 assignment code to this function so it gets called recursively for all
12134 * image.c (load_modules): Remove the assembly assignment since it is
12135 now done by mono_assembly_load_references.
12137 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12138 Add 'module' argument.
12139 (mono_module_get_types): New helper function.
12140 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12142 2003-11-08 Martin Baulig <martin@ximian.com>
12144 * class.c (mono_class_inflate_generic_method): Interface method
12145 don't have a header.
12147 * reflection.c (mono_image_get_methodspec_token): Take an
12148 additional `MonoGenericInst *' argument instead of reading it from
12149 the header; this is necessary to support interfaces.
12150 (mono_image_create_token): Pass the `MonoGenericInst *' from the
12151 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12152 (inflated_method_get_object): Take an additional `MonoGenericInst *'
12155 * reflection.h (MonoReflectionInflatedMethod): Added
12156 `MonoGenericInst *ginst'.
12158 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
12160 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12162 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
12164 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12166 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
12169 (reflection_methodbuilder_from_method_builder):
12170 (reflection_methodbuilder_from_ctor_builder): New helper functions to
12171 initialize a ReflectionMethodBuilder structure.
12172 (mono_image_get_methodbuilder_token):
12173 (mono_image_get_ctorbuilder_token): New functions to emit memberref
12174 tokens which point to types in another module inside the same assembly.
12176 * reflection.c: Use the new helper functions.
12178 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12180 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
12181 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12183 * reflection.c (resolution_scope_from_image): Emit a moduleref if
12186 * reflection.c (mono_image_build_metadata): Emit metadata only for the
12187 current module. Emit the manifest only for the main module.
12189 * reflection.c (mono_image_create_token): Add assertion when a
12190 memberref needs to be created.
12192 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12194 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
12195 larger buffer for the custom attribute blob. Fixes #50637.
12197 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12199 * threadpool.c: notify listener on async processing handles after
12200 invoking the async callback. Thanks to Zoltan.
12202 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12204 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
12205 avoid code duplication.
12207 * reflection.h (MonoDynamicImage): New type which is currently unused,
12208 but will be used through the ref.emit code in place of
12209 MonoDynamicAssembly.
12211 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12214 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12215 a MonoDynamicImage instead of just a MonoImage.
12217 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12218 icalls to ModuleBuilder but keep their semantics, so they will work
12219 with moduleb->assemblyb. This will change later.
12221 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12223 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12226 * reflection.c (mono_image_build_metadata): Avoid creation of a default
12227 main module, since it is now done by the managed code.
12229 2003-11-03 Martin Baulig <martin@ximian.com>
12231 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12232 `ginst->klass' here.
12233 (method_encode_methodspec): Don't use the `ginst->generic_method's
12234 klass if it's a generic instance, use `ginst->klass' in this case.
12236 2003-11-03 Martin Baulig <martin@ximian.com>
12238 * reflection.c (mono_image_get_generic_method_param_info):
12239 Removed, use mono_image_get_generic_param_info() instead.
12240 (mono_image_get_type_info): Write the GenericParam table before
12241 the Method table. This is neccessary because in the GenericParam
12242 table, type parameters of the class (ie. '!0' etc.) must come
12243 before the ones from its generic methods (ie. '!!0' etc).
12245 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12247 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12249 2003-11-02 Martin Baulig <martin@ximian.com>
12251 * reflection.c (create_generic_typespec): Take a
12252 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12253 the generic parameters from it.
12255 2003-11-02 Martin Baulig <martin@ximian.com>
12257 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12258 instead of a `MonoClassField *' since we just need the type.
12259 (create_generic_typespec): New static function. Creates a
12260 TypeSpec token for a generic type declaration.
12261 (mono_image_get_generic_field_token): New static function.
12262 (mono_image_create_token): If we're a FieldBuilder in a generic
12263 type declaration, call mono_image_get_generic_field_token() to get
12266 2003-11-02 Martin Baulig <martin@ximian.com>
12269 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12270 `MonoReflectionGenericInst *declaring_type' and
12271 `MonoReflectionGenericInst *reflected_type' fields.
12273 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12274 `MonoReflectionGenericInst *declaring_type' and a
12275 `MonoReflectionGenericInst *reflected_type' argument instead of a
12276 single `MonoReflectionGenericInst *type' one. Set
12277 `res->declaring_type' and `res->reflected_type' from them.
12278 (mono_reflection_inflate_field): Likewise.
12280 2003-11-02 Martin Baulig <martin@ximian.com>
12282 * class.c (mono_class_setup_vtable): Don't store generic methods
12285 2003-11-02 Martin Baulig <martin@ximian.com>
12287 * reflection.h (MonoReflectionGenericInst): Added
12288 `MonoReflectionType *declaring_type'.
12290 * reflection.c (mono_reflection_bind_generic_parameters): Use
12291 `if (tb->parent)' instead of `klass->parent'.
12293 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
12295 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12296 with an empty ASSEMBLY table.
12298 * reflection.c (mono_image_build_metadata): Avoid using the same loop
12299 variable in the inner and outer loops.
12301 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
12303 * metadata.h (mono_metadata_make_token): Put parentheses around macro
12306 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12308 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
12309 icalls. Instead, do everything in managed code. This is needed since
12310 it is hard to restore the original domain etc. in unmanaged code in the
12311 presence of undeniable exceptions.
12313 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
12314 New icalls to push and pop appdomain refs.
12316 2003-10-31 Martin Baulig <martin@ximian.com>
12318 * class.c (inflate_generic_type): Renamed to
12319 mono_class_inflate_generic_type() and made it public.
12321 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12324 * loader.c (mono_field_from_memberref): Also set the retklass for
12327 * fielder.c (mono_image_get_inflated_field_token): New static
12328 method; creates a metadata token for an inflated field.
12329 (mono_image_create_token, fixup_method): Added support for
12330 "MonoInflatedField".
12331 (fieldbuilder_to_mono_class_field): New static function.
12332 (mono_reflection_inflate_field): New public function.
12335 (MonoReflectionGenericInst): Added `MonoArray *fields'.
12336 (MonoReflectionInflatedField): New typedef.
12338 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
12340 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12341 for Solaris and other platforms without s6_addr16
12343 2003-10-30 Martin Baulig <martin@ximian.com>
12345 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12346 argument instead of two.
12347 (mono_class_inflate_generic_signature): Likewise.
12348 (inflate_generic_header): Likewise.
12349 (mono_class_inflate_generic_method): Likewise. In addition, if
12350 `ginst->klass' is set, it becomes the new `method->klass'.
12352 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12355 * reflection.c (encode_generic_method_sig): Write a 0xa as the
12356 first byte. [FIXME]
12357 (method_encode_methodspec): If we have generic parameters, create
12358 a MethodSpec instead of a MethodRef.
12359 (fixup_method): Added support for "MonoInflatedMethod" and
12360 "MonoInflatedCtor".
12361 (mono_image_create_token): Added support for "MonoInflatedMethod"
12362 and "MonoInflatedCtor".
12363 (inflated_method_get_object): New static function; returns a
12364 managed "System.Reflection.MonoInflatedMethod" object.
12365 (mono_reflection_bind_generic_method_parameters): Return a
12366 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12367 (mono_reflection_inflate_method_or_ctor): Likewise.
12368 (mono_image_get_generic_method_param_info): Initialize unused
12370 (mono_image_get_generic_param_info): Likewise.
12372 * reflection.h (MonoReflectionInflatedMethod): New public
12373 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
12374 "S.R.MonoInflatedCtor" classes.
12376 * loader.c (method_from_memberref): If we're a TypeSpec and it
12377 resolves to a generic instance, inflate the method.
12379 2003-10-28 Dick Porter <dick@ximian.com>
12381 * object.c (mono_runtime_run_main): Convert command-line arguments
12382 into utf8, falling back to the user's locale encoding to do so.
12384 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
12386 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12389 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12391 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12392 up icalls at method definition time. Partially fixes #33569.
12394 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
12396 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12397 marshalling of arrays. Fixes #50116.
12399 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12401 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12402 points to a vtable in the dying appdomain.
12404 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12405 listeners into unmanaged code inside the lock.
12407 * object.c (mono_class_vtable): Turn off typed allocation in non-root
12408 domains and add some comments.
12410 2003-10-25 Martin Baulig <martin@ximian.com>
12412 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12414 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12416 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12417 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12418 currently parsing. Create the generic class and store it in
12419 `generic_inst->klass' before parsing the type arguments. This is
12420 required to support "recursive" definitions; see mcs/tests/gen-23.cs
12422 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12423 to support recursive typespec entries.
12425 * class.c (mono_class_setup_parent): If our parent is a generic
12426 instance, we may get called before it has its name set.
12427 (mono_class_from_generic): Splitted into
12428 mono_class_create_from_generic() and mono_class_initialize_generic().
12430 2003-10-25 Martin Baulig <martin@ximian.com>
12432 * icall.c (ves_icall_Type_BindGenericParameters): Return a
12433 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12434 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12435 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12437 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12438 (create_typespec): Likewise.
12439 (mono_reflection_bind_generic_parameters): Return a
12440 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12441 (mono_reflection_inflate_method_or_ctor): New public function.
12443 * reflection.h (MonoReflectionGenericInst): New typedef.
12445 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
12447 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12448 inside the domain lock. Fixes #49993.
12450 * object.c (mono_class_vtable): When typed allocation is used,
12451 allocate vtables in the GC heap instead of in the mempool, since the
12452 vtables contain GC descriptors which are used by the collector even
12453 after the domain owning the mempool is unloaded.
12455 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12457 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12458 reflect what it does. Also invalidate mempools instead of freeing
12459 them if a define is set.
12461 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12464 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12465 hold the finalizable objects in this domain.
12467 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12470 * appdomain.c (mono_domain_set): New function to set the current
12471 appdomain, but only if it is not being unloaded.
12473 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12474 appdomain which is being unloaded.
12476 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12477 unloading of the root appdomain.
12479 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12480 icall to execute a method in another appdomain. Intended as a
12481 replacement for InternalSetDomain, which can confuse the code
12482 generation in the JIT.
12484 * appdomain.c (mono_domain_is_unloading): New function to determine
12485 whenever an appdomain is unloading.
12487 * appdomain.c (mono_domain_unload): New function to correctly unload
12490 * assembly.c (mono_assembly_load_references): Check that an assembly
12491 does not references itself.
12493 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12494 domain manually, it asks the finalizer thread to do it, then waits for
12495 the result. Also added a timeout.
12497 * icall.c: Register the new icalls.
12499 * threads.h threads.c: Export the mono_gc_stop_world and
12500 mono_gc_start_world functions.
12502 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
12503 function to fill out the mempool with 0x2a.
12505 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
12507 * reflection.h (MonoReflectionMethodAux): New structure to store
12508 information which is rarely used, thus is not in the MonoMethod
12511 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12512 store the aux info.
12514 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12515 and marshalling info into the aux structure.
12517 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12518 from the aux structure.
12520 * loader.c (mono_method_get_param_names): Retrieve the param names from
12523 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
12525 * exception.h exception.c: Add AppDomainUnloadedException && fix
12528 2003-10-21 Dick Porter <dick@ximian.com>
12531 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12532 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12534 2003-10-21 Martin Baulig <martin@ximian.com>
12536 * reflection.c (mono_reflection_bind_generic_parameters):
12537 `klass->parent' is NULL for interfaces.
12539 2003-10-21 Martin Baulig <martin@ximian.com>
12541 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12543 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
12545 * exception.c (mono_exception_from_name_msg): New helper function for
12546 creating exceptions and initializing their message field.
12548 * exception.c: Simplify functions using the new helper.
12550 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12553 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12554 mono_raise_exception, since otherwise gcc doesn't generate the function
12555 epilog for raise_exception, confusing the stack unwinding in the JIT.
12558 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12559 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12562 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12564 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12567 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
12569 * icall.c: Removed GetUninitializedObject method because
12570 AllocateUninitializedClassInstance does the same.
12572 2003-10-18 Martin Baulig <martin@ximian.com>
12574 * class.c (inflate_generic_signature): Renamed to
12575 mono_class_inflate_generic_signature() and made it public.
12576 (my_mono_class_from_generic_parameter): New static function; if we
12577 don't already have the generic parameter's MonoClass, create a
12578 very simple one which is just used internally in the runtime and
12579 not passed back to managed code.
12581 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12583 * metadata.h (MonoMethodSignature): Moved the
12584 `MonoGenericParam *gen_params' to the MonoMethodHeader.
12585 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12587 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12588 ves_icall_MonoMethod_GetGenericArguments(); this is now an
12589 interncall on the MonoMethod class, not on MethodInfo.
12590 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12591 calling mono_reflection_bind_generic_method_parameters() directly.
12593 * loader.c (mono_method_get_signature): If this is a MethodSpec;
12594 return the already computed `method->signature'.
12595 (method_from_methodspec): New static function to load a method
12596 from a MethodSpec entry.
12597 (mono_get_method_from_token): Call the new method_from_methodspec()
12598 for MethodSpec tokens.
12599 (mono_get_method_from_token): If we're a generic method, load the
12602 * reflection.c (mono_image_get_memberref_token): Allow
12603 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12605 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12606 (mono_image_create_token): First check whether it's a generic
12607 method (so we'd need to create a MethodSpec), then do the other
12609 (mono_reflection_bind_generic_method_parameters): Return a
12610 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12611 called directly from the interncall.
12613 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
12615 * reflection.c (load_public_key): Move loading of the public key
12618 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12620 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12623 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12624 culture, hash_alg and public_key. Fixes #49555.
12626 2003-10-17 Martin Baulig <martin@ximian.com>
12628 * class.h (MonoGenericInst): Moved this declaration here and added
12629 `MonoMethod *generic_method'.
12632 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12633 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12635 * metadata.c (mono_metadata_type_equal): Two types of
12636 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12637 index; ie. don't compare the address of the `MonoGenericParam'
12639 (mono_metadata_load_generic_params): Removed the `MonoMethod
12642 * metadata.h (MonoGenericInst): Moved declaration to class.h.
12643 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12645 * reflection.c (method_encode_signature): Encode the number of
12646 generic parameters.
12647 (encode_generic_method_sig): New static function.
12648 (method_encode_methodspec): New static function; creates an entry
12649 in the MethodSpec table for a generic method.
12650 (mono_image_get_methodspec_token): New static function.
12651 (mono_image_create_token): Call mono_image_get_methodspec_token()
12652 for generic methods.
12653 (mono_reflection_bind_generic_method_parameters): New public
12654 function. Instantiates a generic method.
12656 2003-10-16 Martin Baulig <martin@ximian.com>
12658 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12659 *gen_params' here from MonoMethodHeader.
12661 * metadata.c (mono_metadata_parse_method_signature): If we have
12662 generic parameters, initialize `method->gen_params' and then set
12663 the correct `type->data.generic_param' in all the parameters.
12665 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
12667 * threads.c (mono_threads_get_default_stacksize): New function to
12668 return the default stacksize.
12670 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12671 termination of the finalizer thread, since the previous method had
12672 race conditions. Fixes #49628.
12674 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12675 as for the other managed threads.
12677 2003-10-16 Martin Baulig <martin@ximian.com>
12679 * class.c (inflate_generic_signature): Copy `generic_param_count'
12682 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12685 * metadata.c (mono_metadata_parse_method_signature): Actually set
12686 the `method->generic_param_count' here.
12687 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12689 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
12691 * object.h: Add a new field to TypedRef to simplify the implementation
12692 of the REFANY opcodes in the JIT.
12694 * icall.c: Make use of the new field.
12696 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12699 2003-10-15 Martin Baulig <martin@ximian.com>
12701 * class.c (mono_class_from_gen_param): Renamed to
12702 mono_class_from_generic_parameter() and moved most of the
12703 functionality from mono_reflection_define_generic_parameter()
12704 here; ie. we create a "real" class here.
12705 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12706 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12707 previously been called.
12709 * class.h (MonoGenericParam): Moved the declaration of this struct
12710 here from metadata.h and added `MonoMethod *method'.
12712 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12715 * loader.c (mono_get_method_from_token): If we have any generic
12716 parameters, call mono_metadata_load_generic_params() to read them
12717 from the MONO_TABLE_GENERICPAR.
12719 * metadata.c (mono_metadata_load_generic_params): Added
12720 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12722 * metadata.h (MonoMethodSignature): Replaced
12723 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12724 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12726 * reflection.c (mono_reflection_define_generic_parameter): Moved
12727 most of the functionality into the new
12728 mono_class_from_generic_parameter(); set the `method' field if
12729 we're a method parameter.
12731 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
12733 * marshal.c (emit_struct_conv): if native size is 0
12736 2003-10-14 Martin Baulig <martin@ximian.com>
12738 * icall.c: The generics API has changed in the spec since it was
12739 added to System.Type; these modifications make it match the spec
12741 (ves_icall_Type_GetGenericParameters): Renamed to
12742 `ves_icall_Type_GetGenericArguments'.
12743 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12744 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12745 `ves_icall_MonoType_get_HasGenericArguments'.
12746 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12747 `ves_icall_MonoType_get_IsGenericParameter'.
12748 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12749 this is no interncall anymore.
12750 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12751 `ves_icall_TypeBuilder_get_IsGenericParameter'.
12753 2003-10-14 Martin Baulig <martin@ximian.com>
12755 * reflection.c (mono_reflection_bind_generic_parameters): Also
12756 inflate generic methods if we're reading the class from IL.
12758 2003-10-13 Martin Baulig <martin@ximian.com>
12760 * reflection.c (mono_reflection_define_generic_parameter): This
12761 method isn't called directly from the icall anymore; take a
12762 `MonoReflectionAssemblyBuilder *' so we can use this for type and
12763 method generic parameters.
12764 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12765 (method_builder_encode_signature): Encode generic parameters.
12766 (mono_image_get_method_info): Write generic params to the
12767 MONO_TABLE_GENERICPARAM table.
12769 * reflection.h (MonoReflectionMethodBuilder): Added
12770 `MonoArray *generic_params'.
12772 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12774 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12775 wrapper for mono_reflection_define_generic_parameter().
12776 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12778 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
12780 * marshal.h: Add missing function to fix build.
12782 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12783 the SetLastError pinvoke attribute.
12785 * marshal.c (mono_marshal_set_last_error): New helper function called
12786 by the generated code.
12788 * marshal.c (mono_mb_emit_branch): New helper function.
12790 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12792 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12793 classes as parameters and return values of delegates. Fixes #29256.
12795 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
12797 * locales.c: use gint32 in non HAVE_ICU case
12799 2003-10-11 Martin Baulig <martin@ximian.com>
12801 * mono-debug.c (mono_debug_add_method): Added a workaround for
12804 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
12806 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12807 delegates passed to native code must use the STDCALL calling
12808 convention. Fixes #35987.
12810 2003-10-10 Martin Baulig <martin@ximian.com>
12812 * class.c (inflate_generic_type): If we're inflating for a generic
12813 type instance (and not for a generic method), return
12814 MONO_TYPE_MVAR unchanged.
12816 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12818 * string-icalls.c: Join ignores null strings in the source array.
12819 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12820 * threads.c: GetAvailableTheads is slightly more accurate.
12822 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
12824 * threads.h threads.c : add mono_threads_set_default_stacksize
12825 and pass default to CreateThread calls.
12827 2003-10-09 Dick Porter <dick@ximian.com>
12831 * locales.c: Internal calls for constructing CultureInfo and
12832 related objects from libicu (if its available.)
12834 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
12836 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12838 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12840 * threadpool.c: added an argument to async_invoke_thread that is the
12841 item to process, pass the MonoAsyncResult to the thread start function
12842 when creating a new thread. This way we don't need to acquire any lock
12843 when we're creating a new thread. Readded a semaphore for faster
12844 response times (instead of that Sleep i added).
12846 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
12848 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12849 get daylight change dates better on Windows, fix handling
12850 of platforms without tm_gmtoff.
12852 2003-10-06 Martin Baulig <martin@ximian.com>
12854 * class.c (inflate_generic_method): Renamed to
12855 mono_class_inflate_generic_method() and made public.
12856 (mono_class_init): Don't inflate the generic methods here.
12857 (mono_class_from_generic): Added `gboolean inflate_methods'
12858 argument. Inflate the methods here.
12860 * loader.c (mono_method_get_param_names): Ignore instances of
12861 generic types for the moment.
12863 * reflection.c (fixup_method): Added support for inflated methods.
12864 (mono_image_create_token): Use mono_image_get_methodref_token()
12865 for inflated methods.
12866 (mono_custom_attrs_from_param): Ignore instances of generic types
12868 (mono_reflection_bind_generic_parameters): New public function.
12869 Moved all the functionality from
12870 ves_icall_Type_BindGenericParameters() here and added support for
12872 (mono_reflection_define_generic_parameter): Initialize
12873 `klass->methods' here.
12875 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12876 functionality into mono_reflection_define_generic_parameter().
12877 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12878 TypeBuilder, return that TypeBuilder.
12880 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12882 * appdomain.c: removed mono_delegate_semaphore.
12885 (mono_thread_pool_add): moved hash table creation inside and the thread
12886 creation outside of the critical region.
12887 (mono_thread_pool_finish): removed obsolete code.
12888 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12889 continue or exit the thread depending on the queue.
12891 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
12893 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12894 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12895 handle more bool marshalling options
12897 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
12899 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12900 arrays of structs. Also add a more descriptive error message when
12901 a structure member is marshalled as LPArray.
12903 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
12905 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12906 marshalling arrays of complex types. Fixes #29098. Also remove an
12907 usused and incomplete function.
12909 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12911 * gc.c: report heap_size - free_bytes as total memory allocated
12914 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
12916 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
12917 fix timezone handling problems on Windows.
12919 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12920 asserts when the year is outside the range handled by ms the functions.
12922 * class.c (setup_interface_offsets): If the class is an interface,
12923 fill out its interface_offsets slot.
12925 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12927 * threadpool.c: mark threadpool threads as background.
12929 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
12931 * decimal.c - define DECINLINE to nothing if not using GCC
12933 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
12935 * assembly.c: More refcount fixes.
12937 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12939 * string-icalls.c: if we're not trimming, return the same string.
12940 When not splitting, don't create a new string.
12942 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12945 (mono_image_open): increment the ref_count inside the critical section.
12947 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
12949 * image.c (mono_image_open): Fix reference counting bug.
12951 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
12953 * marshal.c (mono_marshal_type_size) struct alignment changed for
12954 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
12955 64bits. Avoid leak in mono_marshal_get_native_wrapper when
12956 mono_lookup_pinvoke_call throws.
12958 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
12960 * reflection.c (mono_reflection_parse_type): Fix #49114.
12962 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12963 temporary workaround for cygwin header problem.
12965 * object.c (mono_object_isinst): Synchronize this with the code
12966 generated by the JIT for casts.
12968 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
12970 * reflection.c (encode_type): Fix #38332.
12972 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
12974 * marshal.c (mono_marshal_method_from_wrapper): New function to return
12975 the original method from the wrapper method.
12977 2003-09-25 Martin Baulig <martin@ximian.com>
12979 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12980 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12981 (ves_icall_Type_get_IsGenericInstance): New interncall.
12983 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12985 * object.c: fix cast warning in big endian code.
12987 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12989 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12991 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12993 * assembly.c: don't call check_env from mono_assembly_load. It's
12994 already done once in mono_assemblies_init and may cause headaches when
12995 multiple threads are loading assemblies.
12997 2003-09-19 Martin Baulig <martin@ximian.com>
12999 * reflection.c (mono_reflection_define_generic_parameter): Don't
13000 allocate `klass->methods', set `klass->flags' to
13001 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13003 2003-09-18 Martin Baulig <martin@ximian.com>
13005 * class.c (mono_class_init): Don't create `class->methods' if it's
13006 already initialized.
13008 * metadata.c (mono_metadata_load_generic_params): Make this
13011 * reflection.c (mono_reflection_define_generic_parameter): Set
13012 parent class and interfaces from the constraints.
13014 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13015 to keep this struct in sync with the declaration in TypeBuilder.cs.
13017 2003-09-17 Martin Baulig <martin@ximian.com>
13019 * metadata.h (MonoType): Replaced the data's `int type_param'
13020 field with `MonoGenericParam *generic_param'.
13021 (MonoGenericParam): Added `MonoClass *klass'.
13023 * class.c (mono_class_from_gen_param): Removed the
13024 `MonoImage *image' and `int type_num' arguments.
13026 * metadata.c (mono_metadata_parse_generic_param): New static
13027 method; creates a MonoGenericParam which just contains the index.
13028 (do_mono_metadata_parse_type): Call
13029 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13032 * reflection.c (mono_image_typedef_or_ref): Generic type
13033 parameters may be in the same assembly, but never use a typedef
13035 (mono_reflection_define_generic_parameter): We're now creating a
13036 "real" class for the type parameter; it's now safe to call
13037 mono_class_from_mono_type() on the class'es type, it'll do the
13040 2003-09-16 Martin Baulig <martin@ximian.com>
13042 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13043 `symfile->range_entry_size' and `symfile->class_entry_size' here;
13044 the `symfile' data structure must be fully initialized before it
13045 gets added to the table.
13047 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
13049 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13051 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13052 class init trampolines.
13054 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
13056 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13057 to the built-in profiler to turn off time and allocation profiling
13060 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
13062 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13065 * debug-helpers.c (mono_method_full_name): Print the wrapper type
13066 in human readable form.
13068 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
13070 * reflection.c icall.c: Fixed warnings.
13072 * image.c (load_class_names): Use a temporary hash table to hold the
13073 namespaces in order to avoid doing many string comparisons.
13075 * image.h: Fix typo.
13077 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13078 Pass NULL instead of g_direct_equal to the GHashTable constructor
13079 since the NULL case is short-circuited inside g_hash_table_lookup,
13080 leading to better performance.
13082 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13083 obtain the first custom attribute for a given index. Depends on the
13084 CustomAttribute table being sorted by the parent field.
13086 * reflection.c (mono_custom_attrs_from_index): Use the new function
13087 for better performance.
13089 2003-09-07 Martin Baulig <martin@ximian.com>
13091 * class.c (mono_class_init): If we're a generic instance, inflate
13092 all our methods instead of loading them from the image.
13093 (mono_class_from_generic): Set `class->methods = gklass->methods'.
13095 2003-09-07 Martin Baulig <martin@ximian.com>
13097 * mono-debug-debugger.c: Added support for constructors.
13099 2003-09-06 Martin Baulig <martin@ximian.com>
13101 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13104 * reflection.c (mono_reflection_setup_generic_class): Call
13105 ensure_runtime_vtable() to create the vtable.
13107 2003-09-05 Martin Baulig <martin@ximian.com>
13109 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13112 2003-09-04 Martin Baulig <martin@ximian.com>
13114 * reflection.c (mono_reflection_define_generic_parameter): Generic
13115 parameters start with zero.
13117 2003-09-04 Martin Baulig <martin@ximian.com>
13119 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13121 * reflection.h (MonoReflectionGenericParam): New typedef.
13122 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13123 the generic parameters from the managed TypeBuilder.
13125 * reflection.c (mono_reflection_define_generic_parameter): New function.
13126 (mono_reflection_create_runtime_class): Encode generic parameters.
13127 (mono_reflection_setup_generic_class): New function; this is
13128 called after adding adding all generic params to the TypeBuilder.
13129 (encode_type): Added MONO_TYPE_VAR.
13131 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
13133 * class.h class.c (mono_class_needs_cctor_run): Moved this method
13136 * assembly.h assembly.c: Moved the AOT loading code into an assembly
13139 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
13141 * reflection.h reflection.c class.h class.c: Delete duplicate
13142 definition of mono_type_get_name () from reflection.c and export the
13145 * class.c: Class loading fixes from Bernie Solomon
13146 (bernard@ugsolutions.com).
13148 * reflection.c: Endianness fixes from Bernie Solomon
13149 (bernard@ugsolutions.com).
13151 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
13153 * assembly.h assembly.c: Define a file format version for AOT
13156 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13158 * appdomain.h (MonoJitInfo): New field to determine whenever the
13159 code is domain neutral.
13161 2003-08-31 Miguel de Icaza <miguel@ximian.com>
13163 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13165 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
13167 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
13168 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13169 Avoid caching the result since strings must be domain specific. Fixes
13172 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
13174 * marshal.c (mono_marshal_init): Make this callable multiple times
13175 since it is hard to find a correct place to call it.
13177 * object.c (mono_runtime_class_init): Execute static constructors in
13178 the correct appdomain.
13180 * image.c (build_guid_table): Handle the case when multiple images have
13183 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13185 * icall.c: added a couple of icalls for System.Web.
13187 2003-08-28 Martin Baulig <martin@ximian.com>
13189 * icall.c (ves_icall_Type_BindGenericParameters): Use
13190 `klass->generic_inst' instead of `&klass->byval_arg' in the
13191 mono_type_get_object() call. The returned type must be
13192 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13194 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
13198 * object.c (mono_class_proxy_vtable): Make it thread safe.
13200 * pedump.c: Fix warning.
13202 * object.c appdomain.h: Get rid of metadata_section.
13203 It is no longer needed and it was causing deadlocks with domain->lock.
13205 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13207 2003-08-26 Martin Baulig <martin@ximian.com>
13209 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13211 2003-08-26 Martin Baulig <martin@ximian.com>
13213 * pedump.c (main): Call mono_metadata_init(),
13214 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13215 and mono_loader_init().
13217 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
13219 * loader.h: Add missing include to fix build.
13221 * image.h: mono_image_load_references is no more.
13223 * assembly.c: Reworked assembly loading to make it really thread safe.
13224 After these changes, the assembly returned by mono_assembly_open is
13225 fully initialized, i.e. all its references assemblies are loaded.
13227 * assembly.c (mono_image_load_references): Renamed to
13228 mono_assembly_load_references, and made private, since clients no
13229 longer need to call it.
13231 * class.c: Removed calls to mono_assembly_load_references, since it was
13232 a source of deadlocks.
13234 * loader.h loader.c class.h class.c: Protect data structures using a
13235 new lock, the loader lock.
13237 * class.c (mono_class_setup_vtable): Create temporary hash tables and
13238 GPtrArrays only when needed.
13240 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
13241 into empty structures by mcs. Fixes pinvoke7.cs.
13243 * domain.c (mono_init): Call a new initialization function.
13245 * appdomain.c (mono_runtime_init): Call the new initializer function
13246 of the marshal module.
13248 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13249 inserted into empty structures by mcs. Fixes pinvoke7.cs.
13251 * marshal.h marshal.c: Added locks around the wrapper caches to make
13252 this module thread safe.
13254 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13255 this argument. Fixes pinvoke1.exe.
13257 2003-08-25 Lluis Sanchez <lluis@ximian.com>
13259 * object.h: Added call_type field to MonoMethodMessage and the corresponding
13260 enumeration of values. Removed fields to store remote call output values in
13261 MonoAsyncResult. Not needed any more.
13262 * object.c: Initialize call_type and async_result fields in mono_message_init.
13263 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13264 dispatching the message.
13265 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13266 async call to finish. To do it use a message with EndInvoke call type.
13268 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
13270 * loader.h loader.c (mono_method_hash_marhal_info): New function which
13271 determines whenever a method has marshalling info.
13273 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13275 * assembly.c: fix the build on windows.
13277 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13279 * object.cs: Fixed bug #47785.
13281 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13283 * string-icalls.c (StringReplace): If their are no occurances of
13284 the old string found return a reference to the supplied
13285 string. This saves some memory and matches MS behavoir.
13287 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13289 * socket-io.c: fixed compilation for systems that define AF_INET6
13290 and don't define SOL_IP/SOL_IPV6.
13292 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
13294 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13295 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13297 * rawbuffer.c rawbuffer.h: Make this module thread safe.
13299 * domain.c: Make this module thread safe.
13301 * domain.c (mono_init): Call new initialization function.
13303 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13304 reference types too. Fixes #38812.
13306 * image.c (mono_image_init): Fixed warnings.
13308 * class.c (mono_class_from_typeref): Handle assembly load failure
13311 * appdomain.c (add_assemblies_to_domain): Handle the case when
13312 the references of an assembly are not yet loaded.
13314 * metadata.c image.c assembly.c: Moved initialization of global
13315 variables to a separate function called at startup since lazy
13316 initialization of these variables is not thread safe.
13318 * image.c assembly.c: Made this module thread safe by adding locks in
13319 the appropriate places.
13321 * domain.c (mono_init): Call the new initialization functions of the
13324 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
13326 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13327 make a direct call. It is proxy's work to make the call asynchronous.
13328 mono_delegate_end_invoke(): If the targe is a proxy, just collect
13330 * object.cs: mono_method_call_message_new(): read AsyncResult and
13331 state object from parameters list, if this info is requested.
13332 * object.h: Added fields to store remote call output values in
13333 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13335 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13337 * object.h: add needed fields to MonoThread.
13338 * threads.c, threads.h: allow registering a function to cleanup data
13339 allocated per thread by the JIT.
13341 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13343 * loader.h: portability fix by Bernie Solomon
13344 * <bernard@ugsolutions.com>.
13346 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
13348 * reflection.h reflection.c (mono_param_get_objects): Changed this to
13349 return a MonoArray. This simplifies the code and also ensures that
13350 the cache allways contains an object reference as a value.
13352 * icall.c (ves_icall_get_parameter_info): Simplified using the new
13355 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13357 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13358 fixes a problem with byte ordering when getting the address family for
13361 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
13363 * .cvsignore: Added monosn.
13365 * reflection.h reflection.c loader.c: Added support for parameter
13366 marshalling to dynamically created types. Fixes #47295.
13368 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13370 * rand.c: remove useless warnings.
13372 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13374 * class.c: implemented ldtoken for methods and fieldrefs.
13376 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13378 * threadpool.c: when mono_async_invoke was called, no one took care of
13379 monitoring the queue. So if the method invoked took some time and we
13380 got new async invoke requests after 500 ms (the thread created waited
13381 that long in WaitForSingleObject), the new async invoke was not called
13382 until the previous one finished.
13384 This is fixed now. Thanks to Totte for helping with it.
13386 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13388 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13390 2003-08-11 Martin Baulig <martin@ximian.com>
13392 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13394 2003-08-06 Martin Baulig <martin@ximian.com>
13396 * mono-debug-debugger.c: Added support for static fields,
13397 properties and methods.
13399 2003-08-06 Martin Baulig <martin@ximian.com>
13401 * mono-debug-debugger.c: Don't store the MonoString's vtable to
13402 make this work for applications with multiple application domains.
13404 2003-08-04 Martin Baulig <martin@ximian.com>
13406 * mono-debug-debugger.c: Completely reworked the type support; the
13407 most important thing is that we're now just using one single
13408 `MonoType' instance per type.
13410 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13412 * mono-endian.h, mono-endian.c, icall.c: Added icall
13413 ves_icall_System_Double_AssertEndianity to assert double word endianity
13414 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13416 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13418 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13419 support, icalls and fixes.
13421 2003-07-31 Miguel de Icaza <miguel@ximian.com>
13423 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13424 classes that are a punctuation character in .NET is not the same a
13427 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13429 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13431 2003-07-29 Miguel de Icaza <miguel@ximian.com>
13433 * icall.c: Add new MemCopy internalcall.
13434 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13435 Simplified code; It is not necessary to handle all the cases here,
13436 as the C# code takes care of it. Only handle the case of the name
13437 resource embedded into the assembly.
13439 Changed signature to return the data pointer and the size of the
13442 2003-07-26 Miguel de Icaza <miguel@ximian.com>
13444 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13445 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13447 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13449 * socket-io.c: ignore EINTR error in select.
13451 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13453 * class.h, class.c: removed unused subclasses field in MonoClass.
13455 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13457 * icall.c: improve fix of get_base_definition(). If the parent class
13458 doesn't have the mehod, look at the parent of the parent.
13459 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13460 to check if a parameter is an in or out parameter
13461 (PARAM_ATTRIBUTE_IN is not set by default).
13462 mono_method_return_message_restore(): Use mono_class_value_size to
13463 get the size of a value type. mono_type_stack_size (parameterType)
13464 does not return the correct value if parameterType is byRef.
13465 mono_load_remote_field(), mono_load_remote_field_new(),
13466 mono_store_remote_field(), mono_store_remote_field_new():
13467 raise exception if the remote call returns an exception.
13469 2003-07-28 Martin Baulig <martin@ximian.com>
13471 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13472 method. This is a wrapper around mono_runtime_invoke() which
13473 boxes the instance object if neccessary.
13475 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13477 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13478 metadata.h, row-indexes.h, verify.c: first cut of generics support.
13480 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13482 * icall.c: disable mcs bug workaround.
13484 2003-07-21 Miguel de Icaza <miguel@ximian.com>
13486 * object.c (mono_runtime_class_init): Take the metadata_section
13487 mutex before obtaining the domain mutex.
13489 * appdomain.h: Added definition of metadata_section mutex here.
13491 * object.c: define metadata_mutex here.
13493 2003-07-24 Ravi Pratap <ravi@ximian.com>
13495 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13498 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
13500 * reflection.c: Fix bug #46669
13502 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13507 * object.h: fill in the type name for TypeLoadException.
13509 2003-07-23 Ravi Pratap <ravi@ximian.com>
13511 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13512 relationship between TypeBuilders while compiling corlib) and bug
13513 45993 (Array types returned from the runtime while compiling
13514 corlib were from the loaded corlib).
13516 2003-07-22 Martin Baulig <martin@ximian.com>
13518 * mono-debug-debugger.c: Reworked the type support a bit more;
13519 distinguish between types and classes.
13521 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13523 * icall.c: add IsArrayImpl icall.
13525 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
13527 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13528 initializing real_size only once. Also fix bug #46602.
13530 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
13532 * object.c: Renamed mono_metadata_section to metadata_section.
13534 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
13536 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13537 empty array if the type is an array. Fixed.
13538 ves_icall_MonoMethod_get_base_definition: if the base method
13539 is abstract, get the MethodInfo from the list of methods of
13541 * reflection.c: ParameterInfo.PositionImpl should be zero-based
13542 and it was 1-based. Fixed in mono_param_get_objects.
13544 2003-07-20 Martin Baulig <martin@ximian.com>
13546 * mono-debug.h: Set version number to 31.
13547 (mono_debug_init): Added `MonoDomain *' argument.
13549 * mono-debug-debugger.c: Reworked the type support; explicitly
13550 tell the debugger about builtin types; pass the `klass' address to
13553 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13555 * image.c: Allow new metadata tables to be loaded without a
13556 warning. Also update the warning message to give the new constant value.
13558 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13560 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13561 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
13562 array type representation changes.
13564 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13566 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13567 on Environment.Exit () call.
13569 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13571 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13572 requires a matching corlib.
13574 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13576 * Changelog: My editor decided to add a CR to each line. Sorry about that.
13577 Committed again without the CRs.
13579 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13581 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13582 getting it from the "this" socket instance. Did not work
13583 if the socket is a subclass of Socket.
13584 Also fixed bug #35371.
13586 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13588 * metadata.c: fixed size for TypedByRef.
13589 * loader.c: when searching for a method, consider the vararg amrker.
13590 * unicode.c, decimal.c: constify some arrays.
13592 2003-07-15 Dick Porter <dick@ximian.com>
13594 * socket-io.c: Fixed compilation for gcc < 3.2.
13596 Fixed compilation for machines that don't have AF_INET6 (thanks to
13597 Bernie Solomon <bernard@ugsolutions.com> for that part.)
13599 Fixed compile warnings.
13601 Fixed formatting and line endings.
13603 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
13606 * socket-io.c: Added IPv6 support.
13608 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
13610 * class.c (mono_class_is_assignable_from): New function to implement
13611 the is_assignable_from logic. Used by mono_object_isinst,
13612 Type::IsAssignableFrom () and the interpreter.
13614 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13615 Object, even interfaces.
13617 * object.c (mono_object_isinst): Implement in terms of
13618 is_assignable_from.
13620 * icall.c (ves_icall_type_is_assignable_from): New icall.
13622 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
13624 * domain.c (foreach_domain): fix compiler warning.
13626 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
13628 * image.c (load_metadata_ptrs): use g_strndup because strndup is
13629 not available on all plattforms
13631 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
13633 * image.h image.c: Store the metadata version string in MonoImage.
13634 * icall.c: New icall to retrieve the image version.
13635 * reflection.c (create_dynamic_image): Fill in the image version field
13636 * reflection.c (build_compressed_metadata): Use the image version
13637 from the image structure.
13639 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13641 * appdomain.c: modified comment.
13642 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13643 That will be its last iteration when mono_gc_cleanup is called from
13644 mono_runtime_cleanup and before the domain is unloaded.
13648 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
13650 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13653 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13655 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13656 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13657 Bernie Solomon <bernard@ugsolutions.com>.
13659 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13661 * object.c, object.h: provide mono_object_new_fast() for faster
13662 allocation in some special cases.
13664 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13666 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13667 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13669 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13671 * threadpool.c: fix leaks.
13673 2003-07-01 Dick Porter <dick@ximian.com>
13675 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13676 using MonoGHashTables. Fixes threadpool bug posted to list.
13678 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13680 * image.h, image.c: added support to load an assembly from a byte array.
13681 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
13682 assembly bundle support.
13684 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
13686 * threadpool.c (mono_thread_pool_add): keep a reference to the
13687 AsyncResult to prevent GC
13689 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13691 * class.c: leak fix.
13693 2003-06-25 Dick Porter <dick@ximian.com>
13695 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13696 for the async object, the WaitHandle object will close the handle.
13699 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13701 * class.c: in mono_array_class_get (), lookup from the hash with the
13702 same type we insert: this works around a bug in
13703 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13704 lluis. The real fix will have to wait for after the release.
13706 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13708 * icall.c: fix memory leak when getting type members.
13710 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13712 * reflection.c: added more pubtoken special cases.
13714 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13716 * class.c: handle field offset correctly when class size
13717 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13719 2003-06-20 Martin Baulig <martin@ximian.com>
13721 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13724 2003-06-20 Martin Baulig <martin@ximian.com>
13726 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13728 2003-06-20 Martin Baulig <martin@ximian.com>
13730 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
13731 just distinguish between variables in registers and variables at
13732 an offset relative to a register.
13734 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13736 * icall.c: #ifdef out latest changes until mcs is fixed.
13738 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13740 * icall.c: return members in metadata order.
13742 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13744 * icall.c: avoid infinite loop in GetTimeZoneData.
13746 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13748 * icall.c: added Marshal.Prelink/All icalls.
13750 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13752 * object.c, object.h: fix warnings and do some overflow checking
13753 when creating arrays.
13755 2003-06-17 Dick Porter <dick@ximian.com>
13758 * file-io.c: File attributes need to be tweaked slightly when
13759 passed from the managed to the w32 world.
13761 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13762 * profiler.h profiler-private.h profiler.c: Rework last patch
13763 based on suggestion by Paolo.
13765 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13767 * profiler.h profiler-private.h profiler.c: Added infrastructure for
13768 instruction level coverage data collection.
13769 * profiler.h profiler.c (: Added new callback function which can be
13770 used by the profiler to limit which functions should have coverage
13772 * profiler.c (mono_profiler_load): Call g_module_build_path to
13773 generate the file name of the profiler library.
13775 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13777 * profiler.c, profiler.h, profiler-private.h: added basic block
13778 coverage profiling API.
13780 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
13782 * reflection.c (mono_reflection_create_runtime_class): Add support
13783 for events in dynamically generated code.
13785 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13788 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13790 * icall.c: when getting timezone info, return reasonable values if we
13791 can't get the actual data.
13793 2003-06-14 Dick Porter <dick@ximian.com>
13795 * threads.c (start_wrapper): Remove the reference to the thread
13796 object in the TLS data, so the thread object can be finalized.
13797 This won't be reached if the thread threw an uncaught exception,
13798 so those thread handles will stay referenced :-( (This is due to
13799 missing support for scanning thread-specific data in the Boehm GC
13800 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13802 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13804 * reflection.c: ensure streams and tables are first allocated with
13805 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13807 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13809 * icall.c: fixed GetElementType for byrefs (bug# 44792).
13811 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
13813 * reflection.c (mono_reflection_create_runtime_class): Add support for
13814 properties to dynamically created classes.
13815 * reflection.c: Fix a few places where non-MonoObjects were inserted
13816 into the tokens hashtable.
13818 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13820 * object.c: some support to handle out of memory exceptions.
13822 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
13824 * marshal.c (mono_marshal_get_native_wrapper): support reference
13827 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13829 * object.h, object.c: more portability stuff from Bernie Solomon.
13830 Unexport mono_object_allocate(). Added mono_object_unbox ().
13831 Set exitcode when an unhandled exception is thrown.
13833 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
13835 * marshal.c (mono_marshal_get_native_wrapper): use custom
13836 marshaler for return types.
13838 2003-06-10 Dick Porter <dick@ximian.com>
13840 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13841 ip_mreq is available
13843 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13845 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13846 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13847 by Bernie Solomon <bernard@ugsolutions.com>.
13849 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
13851 * gc.c (mono_gc_init): Avoid error message on shutdown when
13852 GC_DONT_GC=1 is used.
13854 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
13855 New icall to return the GUID of a module.
13857 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13859 * class.c: ensure instance size always includes the parent's size
13860 even whem class size is set explicitly (fixes bug#44294).
13862 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13864 * profiler.h, profiler.c: made the simple profiler thread-safe,
13865 get more accurate timing info. Allow the loading of an
13866 externally-developed profiler module.
13868 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
13870 * marshal.c (mono_marshal_get_native_wrapper): improved
13871 class/byref arguments.
13872 (mono_marshal_get_native_wrapper): better string marshaling support.
13874 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13876 * class.c: ensure .pack and .size are handled correctly and
13877 simplified layout of static fields.
13879 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
13882 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13884 * loader.c (mono_lookup_pinvoke_call): look for modules in the
13885 current directory (fix bug 44008)
13887 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
13889 * marshal.c (mono_marshal_get_native_wrapper): started support for
13891 (mono_delegate_to_ftnptr): consider marshalling specifications
13893 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13895 * reflection.c, reflection.h: emit custom marshal info.
13897 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13899 * object.c: free the GError.
13900 * icall.c: added CloseEvent_internal.
13902 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13905 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
13907 * loader.c (mono_method_get_signature): Add support for dynamic
13910 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13912 * reflection.c: fixed bug #43905.
13914 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13916 * class.c, domain.c, icall.c, metadata.h, object.h: support for
13917 handling TypedReference and ArgIterator.
13918 * loader.c, loader.h: added function to get signature at call site.
13920 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13922 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
13923 data readonly. Buglets and warning fixes. Some MethodSpec support.
13925 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13927 * class.h, class.c, object.c: remove relative numbering support.
13929 2003-05-26 Miguel de Icaza <miguel@ximian.com>
13931 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13932 free the string, until we get a chance to fix Gtk#
13934 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13936 * marshal.c: revert last patch.
13938 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13940 * icall.c: updates for new mono_class_vtable() not calling
13941 the type constructor anymore.
13943 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13945 * object.h, object.c: separate vtable creation from type
13946 initialization. Make running the .cctor thread safe.
13948 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
13950 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13952 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
13954 * loader.c (mono_get_method): consider calling convention
13956 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
13958 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13959 to return the invisible global type for a module.
13961 * reflection.c (mono_image_build_metadata): Emit global fields too.
13963 2003-05-20 Peter Williams <peterw@ximian.com>
13965 * loader.c (mono_lookup_internal_call): Add a few newlines.
13967 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
13969 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13972 * appdomain.c (set_domain_search_path): Recalculate search path when
13973 AppDomainSetup.PrivateBinPath changes.
13975 * object.c (mono_class_compute_gc_descriptor): It turns out some
13976 parts of the class libs (like System.Thread) holds pointers to
13977 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13978 to treat native int a pointer type here.
13980 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13982 * appdomain.h, domain.c: add hashtable for jump target resolution.
13984 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
13986 * reflection.h reflection.c icall.c: Added new icalls
13987 GetManifestResourceInfoInternal, GetModulesInternal and support
13990 2003-05-16 Dick Porter <dick@ximian.com>
13994 * file-io.c: Implement System.IO.MonoIO::GetTempPath
13996 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
13998 * object.c: mono_store_remote_field: little fix to previous patch.
14000 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14002 * class.c: add constructors to array classes.
14003 * icall.c: special case array construction for InternalInvoke (),
14005 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
14007 * class.h class.c reflection.c object.c: Added support for field
14008 defaults in dynamically generated classes.
14010 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14012 * reflection.c: properly encode charset for ddlimport.
14014 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14016 * threads.c: allow compiling without GC.
14018 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14020 * appdomain.h, object.c, object.h, threads.c, threads.h: added
14021 handling of thread static data.
14023 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14025 * reflection.h, reflection.c: added mono_custom_attrs_free ().
14027 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
14029 * class.c (mono_array_class_get): always set the serializable flags
14030 (mono_array_class_get): always set the SEALED attribute for array types
14032 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
14034 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14035 attributes (fix for bug 42021).
14037 2003-05-12 Dick Porter <dick@ximian.com>
14039 * gc.c: Don't run finalizers when the finalizer thread is
14040 finishing up, because the default domain has already been
14043 2003-05-11 Miguel de Icaza <miguel@ximian.com>
14045 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14046 value is null, we should throw an exception. This is slightly
14047 different than the other conventions used for the constructor.
14049 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14051 * socket-io.c: fixed windows build.
14053 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14055 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14057 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
14059 * object.c (mono_string_new_wrapper): Compatibility fix for MS
14062 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
14064 * class.c (mono_class_layout_fields): Add experimental GC aware
14065 auto layout facility. Requires class library changes to work correctly.
14067 (mono_class_setup_vtable): Avoid overriding explicit interface
14068 method implementations. Fixes iface3.exe test.
14070 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14072 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14073 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14075 * metadata.h: Add new type classification macro which determines
14076 whenever the type holds an object reference.
14078 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
14080 * marshal.c (mono_marshal_get_native_wrapper): cleanups
14082 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
14084 * gc.c (finalizer_thread): Work around a GC bug.
14086 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
14088 * marshal.c (emit_struct_conv): allow unions
14090 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14092 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
14094 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14096 2003-05-06 Martin Baulig <martin@ximian.com>
14098 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14100 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14103 (Select_internal): allow NULLs, don't create arrays if not needed.
14104 Coupled with Socket.cs changes.
14107 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14108 register a finalizer for it that will close the semaphore handle. This
14109 fixes the leak and make Lupus' test run with > 4080 loops.
14111 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
14113 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14114 Jerome Laban (bug #42287)
14116 2003-05-02 Martin Baulig <martin@ximian.com>
14118 * debug-mono-symfile.h
14119 (MonoSymbolFile): Moved declaration into mono-debug.h.
14120 (MonoDebugMethodJitInfo): Likewise.
14121 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14123 (_mono_debug_address_from_il_offset): Take a
14124 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14127 (MonoDebugDomainData): New struct.
14128 (mono_debug_get_domain_data): New function.
14129 (mono_debug_add_method): Take an additional `MonoDomain *'
14131 (mono_debug_source_location_from_address): Likewise.
14132 (mono_debug_il_offset_from_address): Likewise.
14133 (mono_debug_address_from_il_offset): Likewise.
14135 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14137 * reflection.c: one more check for null type in custom attrs.
14139 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14141 * reflection.c: avoid warning (comparison is always false due to limited
14142 range of data type).
14144 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14146 * icall.c: throw an exception in Type.GetField if the argument 'name'
14149 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14151 * reflection.c: fixed handling of enums in named arguments to custom
14152 attributes (bug #42123).
14154 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14156 * reflection.c: use the right array element type and handle
14157 a null for a Type argument, too.
14159 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14161 * reflection.c: handle arrays as arguments to custom attributes.
14163 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14165 * reflection.c: handle a string value in a custom attr
14166 ctor that takes an object.
14168 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
14170 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14173 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
14175 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14177 2003-04-27 Martin Baulig <martin@ximian.com>
14179 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14180 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14181 MONO_DEBUGGER_EVENT_BREAKPOINT.
14182 (mono_breakpoint_trampoline_code): Removed.
14183 (mono_debugger_event_handler): The last argument is now a
14185 (mono_debugger_insert_breakpoint_full): Removed the
14186 `use_trampoline' argument.
14187 (mono_debugger_method_has_breakpoint): Likewise.
14188 (mono_debugger_trampoline_breakpoint_callback): Renamed to
14189 mono_debugger_breakpoint_callback(); take the method and
14190 breakpoint number as arguments.
14192 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14194 * metadata.c: fix off by one when loading parameters attributes.
14196 2003-04-24 Martin Baulig <martin@ximian.com>
14198 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14200 2003-04-24 Martin Baulig <martin@ximian.com>
14202 * mono-debug-debugger.c: Moved all code which interacts with the
14203 Mono Debugger here.
14205 * debug-mono-symfile.c: This code now just deals with the symbol
14206 file itself, the debugger code is now in mono-debug-debugger.c.
14208 2003-04-23 Martin Baulig <martin@ximian.com>
14210 * mono-debug.c (mono_debug_source_location_from_il_offset):
14211 New method; like mono_debug_source_location_from_address(), but
14212 takes an IL offset instead of a machine address.
14214 2003-04-23 Martin Baulig <martin@ximian.com>
14216 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14217 `line' field; this is now computed by the debugger.
14219 2003-04-23 Martin Baulig <martin@ximian.com>
14221 * mono-debug.[ch]: New files. This is the new debugging interface.
14223 * mono-debug-debugger.[ch]: New files. Moved all code which
14224 interacts with the Mono Debugger here.
14226 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
14228 * domain.c (mono_init): initialize mono_defaults.monitor_class
14230 2003-04-21 Miguel de Icaza <miguel@ximian.com>
14232 * reflection.c (method_encode_code): Add a spicy exception to help
14233 future compiler authors.
14235 2003-04-21 Martin Baulig <martin@ximian.com>
14238 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14239 Make this work with relative pathnames; g_filename_to_uri() needs
14240 an absolute filename.
14242 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
14244 * icall.c: Track name changes in Object and ValueType.
14246 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
14248 * metadata.c (mono_type_stack_size): size should be a multiple of
14251 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14254 (internal_domain_finalize): moved into mono_domain_finalize. No need
14255 to create another thread because the finalizers will be run in the
14258 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14259 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14260 to be run (MS does this too).
14262 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
14264 * object.c (mono_class_compute_gc_descriptor): Update comment.
14266 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14268 * image.h: Add synchronized wrapper cache.
14270 * image.c (do_mono_image_open): Initialize cache.
14272 * reflection.c (create_dynamic_mono_image): Initialize cache.
14274 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14276 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14277 ves_icall_System_Buffer_ByteLengthInternal.
14279 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14281 * reflection.c: setup klass->nested_in earlier. Allow
14282 a dash in the assembly name.
14284 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
14286 * metadata.c (mono_type_to_unmanaged): dont access
14287 type->data.klass for MONO_TYPE_OBJECT
14288 (mono_type_to_unmanaged): consider System.Delegate class
14290 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14292 * class.c: just setup supertypes in the proper place instead of
14293 initializing the full element class for arrays.
14295 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14297 * class.c: ensure the element class of arrays is initialized.
14298 Setup the supertype info for array classes, too.
14300 2003-04-14 Miguel de Icaza <miguel@ximian.com>
14302 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14304 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14306 * Makefile.am: re-added -m option when running cygpath. This way,
14307 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14309 * mono-config.c: same codepath for locating mono config file for WIN32
14311 * assembly.c: if mono_assembly_setrootdir is called, don't override
14314 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14316 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14317 MONO_ASSEMBLIES variable.
14319 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14321 * icall.c: added Assembly::GetNamespaces() icall.
14323 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14325 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14327 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
14329 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14330 * object.c: fixed bug in the construction of vtable for proxies
14332 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
14334 * object.c (mono_array_new): Mark mono_array_new as an icall.
14336 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14338 * class.c: fixed test for public method when overriding interfaces.
14341 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14343 * appdomain.h, domain.c: added mono_domain_foreach() to
14344 be able to access the currently loaded appdomains.
14345 * object.c: make string interning work across sppdomains.
14346 Mark some functions for use as icalls.
14348 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
14350 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14352 * reflection.h reflection.c: Allocate long living data using
14353 GC_MALLOC_ATOMIC so the collector does not need to scan it.
14355 * reflection.c: Double the allocation size in streams instead of
14356 increasing it, to prevent unneccesary copying on large assemblies.
14358 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14359 creation if the assembly does not have the Run flag set.
14361 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14363 * class.h: avoid the C++ keywords in header files (Jerome Laban
14364 spotted and fixed this).
14366 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14369 (mono_unhandled_exception): fill in the arguments for the
14370 UnhandledException event. Only trigger that event for the default
14371 domain (as MS does).
14373 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
14375 * object.c: Improve typed allocation stuff based on suggestions from
14376 Paolo. Also turn it on if the GC library supports it.
14378 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14380 * object.c object.h class.h: Added experimental typed allocation
14381 facility using the interfaces in gc_gcj.h.
14383 * os/gc_wrapper.h: Added new include files.
14385 2003-04-03 Martin Baulig <martin@ximian.com>
14387 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14388 which is not yet enabled by default.
14390 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14392 (mono_gc_lock, mono_gc_unlock): New static functions.
14394 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14395 functions; stop/start the world for the garbage collector. This
14396 is using the windows API; we need to complete the SuspendThread()/
14397 ResumeThread() implementation in the io-layer to make this work on Unix.
14398 (mono_gc_push_all_stacks): New public function; tells the garbage
14399 collector about the stack pointers from all managed threads.
14401 2003-04-03 Martin Baulig <martin@ximian.com>
14403 * object.h (MonoThread): Added `gpointer stack_ptr'.
14405 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14407 2003-04-03 Martin Baulig <martin@ximian.com>
14409 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14411 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14413 * reflection.c (typebuilder_setup_fields): Initialize field.first and
14416 2003-04-02 Miguel de Icaza <miguel@ximian.com>
14418 * loader.c (mono_lookup_internal_call): Report the corlib that is
14421 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
14423 * icall.c (ves_icall_type_GetTypeCode): fixed check for
14424 System.DBNull (it's class not valuetype).
14426 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14428 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
14429 if the array method was already assigned a token (fixes bug#40646).
14431 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
14433 * reflection.c (mono_reflection_get_type): Attempt type resolve even
14434 if no assembly is given.
14436 2003-04-01 Miguel de Icaza <miguel@ximian.com>
14438 * metadata.h: Added the new tables.
14440 * row-indexes.h: Added definitions for new tables.
14442 * metadata.c: Add schemas for new tables, and add support for
14443 computing the sizes of them.
14445 * class.c: Update for handling the new type cases.
14447 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
14449 * metadata.h (MONO_TYPE_IS_VOID): new macro
14451 2003-03-31 Martin Baulig <martin@ximian.com>
14453 * threads.h (MonoThreadCallbacks): Added `thread_created'.
14455 * threads.c (mono_thread_new_init): Call `thread_created' in the
14456 mono_thread_callbacks.
14458 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
14460 * loader.h: added marshalbyrefobject_class to mono_defaults
14461 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
14462 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14463 generation of output parameters.
14464 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14465 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14466 contextbound and the target object belongs to the context of the caller.
14467 * object.h: added context and unwrapped_server variables in MonoRealProxy.
14468 * object.c: Implemented support for interfaces and abstract classes
14469 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14470 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14472 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
14474 * class.h class.c (mono_class_is_subclass_of): New function.
14476 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14477 routines for most common case (calls from ArrayList::ToArray).
14479 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
14480 routine so programs which call Environment::Exit() can be profiled.
14482 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14483 Added MONO_ARCH_SAVE_REGS.
14485 * icall.c (ves_icall_type_is_subtype_of): Use new function.
14487 2003-03-29 Miguel de Icaza <miguel@ximian.com>
14489 * blob.h: Add a couple of new MonoType types definitions.
14491 * tabledefs.h: Add a couple of new call convs.
14493 2003-03-27 Zoltan Varga <vargaz@freemail.h>
14495 * reflection.h (MonoReflectionDynamicAssembly): track changes in
14496 the layout of the class.
14498 * reflection.c (alloc_table): double the size on overflow to avoid
14499 unnecessary copying.
14501 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14502 avoid filling out metadata tables and blobs. Also set mb->ilgen to
14503 null so it can be garbage collected.
14505 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
14507 * reflection.c (mono_reflection_get_type): Return the resolved type
14508 only if it is in the assembly we searched.
14510 * reflection.c (ensure_runtime_vtable): Initialize method slots.
14512 * class.c (mono_class_setup_vtable): Set the slot of the overriding
14515 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14518 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14519 the right one is 'file:///blah', but MS allows it.
14521 (mono_assembly_open): allow 'file://blah'
14523 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14525 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
14527 * socket-io.c: fixes bug #40310.
14529 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
14531 * reflection.c (mono_reflection_parse_type): handle deeply nested
14534 * reflection.c (mono_image_create_token): Use unique token values
14535 since they will be put into a hash table.
14537 * class.c (mono_class_setup_vtable): If a method occurs in more than
14538 one place in the vtable, and it gets overriden, then change the
14539 other occurances too.
14541 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14542 object as return type.
14544 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14546 * icall.c: Deleted "ToString" implementation for double and float
14547 because they are full implemented in managed code.
14549 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14551 * reflection.c, reflection.h: implemented and exported functions
14552 to retrieve info about custom attributes.
14554 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14556 * appdomain.c: moved Uri handling to assembly.c
14557 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14558 work when using a file Uri in *nix and windows.
14560 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14561 GetReferencedAssemblies.
14563 2003-03-18 Dick Porter <dick@ximian.com>
14565 * icall.c: Rename a couple of internal calls
14567 * threads.c: Set the thread state to Stopped when a thread exits.
14570 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14572 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14575 * object.c (mono_class_vtable): fix warning.
14577 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14579 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14581 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14583 (method_encode_clauses): Create exception info structures in the right
14585 (mono_reflection_setup_internal_class): Initialize supertypes field.
14587 * class.c object.c: Handle interfaces which implement other interfaces
14590 * class.h class.c: Move the supertypes array initialization code into
14591 a separate function so it can be used for dynamic types too. Also call
14592 it earlier, in mono_class_init(), since it can be used before the
14593 type is initialized.
14595 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14599 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14604 * object.c: remove warnings.
14606 2003-03-13 Martin Baulig <martin@ximian.com>
14608 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14609 (MonoDebugLexicalBlockEntry): New types.
14611 * debug-mono-symfile.c
14612 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14614 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14616 * process.c: ret can be any non-zero value accroding to MS doc.
14618 2003-03-07 Miguel de Icaza <miguel@ximian.com>
14620 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
14621 fixing a warning for a miss-used prototype, would have cause
14622 random memory corruption.
14624 2003-03-07 Martin Baulig <martin@ximian.com>
14626 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14627 getting really annoying ....
14629 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
14631 * reflection.c (fixup_method): added support for array methods.
14633 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14635 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
14636 (pointed out by Michael Adams).
14638 2003-03-04 Dick Porter <dick@ximian.com>
14640 * icall.c: Temporarily reverted the Double and Single ToString()
14641 change, because it broke nunit.
14643 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14645 * object.h, threads.h: make include files compatible with C++
14646 (patch by Jerome Laban <jlaban@wanadoo.fr>).
14648 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14650 * icall.c: Erased ToString helper functions for Double and Single.
14651 Now, that implementations ar all in managed code (Double and Single
14654 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
14656 * appdomain.c: Added method for initializing the default context of
14657 a domain. Added internal call for getting the default context.
14658 * appdomain.h: Added context variable in MonoDomain struct.
14659 * domain.c: mono_domain_set also sets the default context of the domain
14660 * icall.c: Mapped internal method InternalGetDefaultContext.
14661 * object.c: mono_object_get_virtual_method returns always a remoting
14662 wrapper if the object is a transparent proxy.
14663 mono_runtime_invoke_array: when creating an object by calling the
14664 constructor, if the created object is a proxy, then the constructor should
14665 be called using the a remoting wrapper.
14667 2003-03-03 Dick Porter <dick@ximian.com>
14669 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14670 variable so it compiles on solaris. Problem spotted by
14671 Christopher Taylor <ct@cs.clemson.edu>
14673 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14676 (get_info_from_assembly_name): don't leak value.
14679 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14682 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14684 * assembly.c: export mono_image_load_references ().
14685 * class.c: handle function pointers. mono_class_from_name() now
14686 supports nested type names directly.
14688 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
14690 * reflection.h reflection.c: Encode already created dynamic methods
14691 and fields correctly as a DEF instead of a REF.
14693 * reflection.c: Get rid of the force_ref argument to
14694 mono_image_typedef_or_ref since it was wrong in the first place.
14696 * string-icalls.c: add error checking to string constructors according
14699 * reflection.c: Emit types in the order their TypeBuilders were
14700 created. Previously, a new table index was assigned to each type before
14701 the tables were emitted. This was wrong because the signature blob
14702 might already refer to a type by its original table index.
14704 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14706 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14709 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14711 * Makefile.am: make assemblies dir have \ instead of / on windows.
14713 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14715 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14716 iterate over the NESTEDCLASS table using a linear search since the
14717 table is not guaranteed to be sorted by the secondary key.
14719 * class.c (mono_class_create_from_typedef): fixed up call to
14720 mono_metadata_nesting_typedef.
14722 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
14724 * marshal.c (mono_string_to_byvalstr): clear the memory as
14725 suggested by Jerome Laban <jlaban@wanadoo.fr>
14727 2003-02-26 Dick Porter <dick@ximian.com>
14729 * process.c: Cope with padding in .rsrc blocks
14731 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14733 * metadata.h: reverted the filter_len change, it breaks reflection
14735 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14737 * metadata.h: added a new field to store the filter_len
14740 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14742 * reflection.c: handle custom attributes for types and members
14743 created with Reflection.Emit (bug#38422).
14745 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
14747 * reflection.c: define RTSpecialName automatically for constructors for
14748 compatibility with MS.NET.
14750 * reflection.c (mono_reflection_create_runtime_class): initialize
14751 nested_in field of dynamically created classes.
14753 2003-02-22 Martin Baulig <martin@ximian.com>
14755 * debug-mono-symfile.h: Incremented version number.
14757 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14759 * object.h icall.c process.c: fix warnings.
14761 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14763 * appdomain.h appdomain.c:
14764 (mono_domain_try_type_resolve): split the
14765 name_or_tb argument into a name and a tb argument.
14766 (mono_domain_has_type_resolve): new function to check whenever the
14767 application has registered a TypeResolve event handler.
14769 * icall.c reflection.h reflection.c: move the type resolve logic into
14770 mono_reflection_get_type () so it will be invoked when
14771 Assembly::GetType () is called.
14774 (mono_reflection_get_type): renamed to get_type_internal.
14775 (mono_reflection_get_type): fixed type name generation so it works
14776 for nested types too.
14777 (mono_reflection_get_type): call has_type_resolve () to avoid the
14778 costly type name generation if there is no resolve event handler.
14780 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14782 * class.c, image.c: load exported types from file references.
14784 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
14786 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14787 used to cache the managed methods used to create proxies and make
14788 remote invocation of methods.
14789 * class.h: Added in MonoVTable a flag to indicate that a class needs
14790 to be remotely created.
14791 * object.c: Modified the method mono_class_vtable(). It now initializes
14792 the remote flag of the vtable. Modified mono_object_new_specific(),
14793 so now it checks the remote flag.
14794 * icall.c: Added a couple of internal methods, one for enabling instance
14795 creation interception for a type, and one for creating objects bypassing
14798 2003-02-18 Martin Baulig <martin@ximian.com>
14800 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14801 New interncall to get a method's metadata token.
14803 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14804 New interncall for the debugger.
14806 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
14808 * class.c (mono_class_setup_vtable): allocate supertype array
14810 2003-02-18 Martin Baulig <martin@ximian.com>
14812 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14814 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14817 (assembly_name_to_aname): jump over unknown properties (i've found
14818 something like: 'type, assembly, version=xxx, custom=null, public...',
14819 so now will ignore custom=null and still get the rest of the values).
14821 2003-02-17 Dick Porter <dick@ximian.com>
14823 * threads.c: Have Thread.Start() wait for a semaphore to signal
14824 that the thread has set up all its local data. This fixes bug
14825 34323, where Abort() raced the new thread's TLS data.
14827 Also removes the handle_store() call from start_wrapper, because
14828 threads are now always created suspended and there is no longer a
14829 race between the parent and child threads to store the info.
14831 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14833 * image.c: explain the #- heap issue in a message, hopefully
14834 avoiding FAQs on mono-list.
14836 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14839 (GetEntryAssembly): if the domain has not invoked
14840 AppDomain.ExecuteAssembly yet, return the assembly of the default
14843 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
14845 * class.c (mono_ldtoken): make it work in dynamic assemblies.
14847 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14849 * metadata.c, reflection.c: simple speedup to type hash
14852 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14854 * image.c, image.h, class.c, assembly.c: move module loading
14855 to MonoImage. When loading metadata, consider alignemnet from
14856 the start of metadata, not from the metadata address in memory.
14858 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
14860 * reflection.c (mono_reflection_get_custom_attrs): Added support for
14861 AssemblyBuilder objects. Factored out custom attribute creation into
14862 a separate function.
14863 (create_custom_attr): new function to create custom attributes.
14865 2003-02-12 Miguel de Icaza <miguel@ximian.com>
14867 * Makefile.am: Got tired of typing the full pathname to pedump.
14868 Until there is another option, am installing this.
14870 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
14872 * class.c (class_compute_field_layout): always set field->parent
14873 (mono_ldtoken): use mono_defaults.fieldhandle_class;
14875 2003-02-11 Dick Porter <dick@ximian.com>
14878 * monitor.c: Rewrote Monitor, making lock much faster and
14879 Pulse/Wait work as specified. Also uses much fewer handles, and only
14880 creates them as needed.
14882 * exception.c: Added SynchronizationLockException
14884 * threads.c: Deleted old Monitor implementation. The new one is
14887 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14889 * class.c: handled TypedReference type code. Set the correct size for
14890 class data. Setup interface_offsets for interface classes, too.
14892 2003-02-09 Martin Baulig <martin@ximian.com>
14894 * debug-mono-symfile.h: Reflect latest symbol writer changes.
14896 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14898 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14899 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14900 * object.c: fixed mono_object_get_virtual_method () for interfaces.
14901 * verify.c: check for code that runs after the end of the method.
14903 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14905 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14906 "System.Math::Round2".
14907 * sysmath.h: Added Floor, Round and Round2 definitions.
14908 * sysmath.c: Modified certain functions that were not 100% compliant
14909 with MS.NET (math precision) and added the implementation of Floor,
14912 2003-02-07 Martin Baulig <martin@ximian.com>
14914 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14916 2003-02-07 Martin Baulig <martin@ximian.com>
14918 * debug-mono-symfile.c: Reflected latest symwriter changes.
14919 (mono_debug_create_mono_symbol_file): Removed.
14920 (mono_debug_open_mono_symbol_file): Take an argument which
14921 specifies whether to create a dynamic symbol file.
14923 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
14925 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14927 2003-02-05 Martin Baulig <martin@ximian.com>
14929 * reflection.c (mono_image_build_metadata): Make this public,
14930 protect it against being called multiple times, don't create
14931 resources and don't build the compressed metadata here.
14932 (mono_image_create_pefile): Do this here.
14935 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14937 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14939 * socket-io.c: fixed bug #36322.
14941 2003-02-06 Piers Haken <piersh@friskit.com>
14945 * debug-mono-symfile.c:
14951 * socket-io.c: warning cleanups
14953 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
14955 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14956 function. works like remoting invoke, but does a check for the Proxy first.
14958 2003-02-05 Miguel de Icaza <miguel@ximian.com>
14960 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14962 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
14964 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14966 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14967 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14969 * object.c (mono_store_remote_field_new): used by the new jit
14970 instead of mono_store_remote_field
14971 (mono_load_remote_field_new): used by the new jit
14972 instead of mono_load_remote_field
14974 2003-02-05 Patrik Torstensson
14976 * appdomain.c: changed unload to take the domain id instead
14979 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14982 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14984 * appdomain.c: don't look for assemblies in ApplicationBase if
14985 PrivateBinPathProbe is set.
14987 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14989 * object.c: make the first argument in main_args contain the absolute
14990 path to the assembly. Fixes bug #37511.
14992 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14994 * icall.c: get correct UTC offset for countries not using daylight
14995 time saving. Fixes bug #30030.
14997 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14999 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15000 and 1 are the family).
15002 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
15004 * icall.c (ves_icall_InternalExecute): removed wrong assertion
15006 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15008 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
15010 * reflection.c: added support for SignatureHelper tokens, which is
15011 needed by the Calli opcode.
15013 * reflection.h: track changes to SignatureHelper class.
15015 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15017 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15019 * appdomain.c: fixed loading assemblies from PrivateBinPath.
15021 2003-02-03 Patrik Torstensson
15022 * appdomain.[c|h], domain.c :
15023 - Added support for getting a domain via domain id
15024 - Support for setting and getting domain from System.AppDomain
15025 (used in cross appdomain channel)
15026 - Added support for get/set for a MonoAppContext on a thread
15027 (Context class in System.Runtime.Remoting.Contexts),
15028 - Removed hack in Get/SetData and ExecuteAssembly.
15030 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15031 the managed world to get control when a proxy is created.
15033 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15035 2003-02-03 Miguel de Icaza <miguel@ximian.com>
15038 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15039 Populate the codebase field as well.
15041 2003-02-02 Martin Baulig <martin@ximian.com>
15043 * debug-mono-symfile.c
15044 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15045 (mono_debug_symfile_add_method): Allow interncalls.
15047 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15049 * icall.c: throw parse exception if strtod fails or the string is empty.
15051 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15053 * marshal.c: handle object type separately from defined
15056 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15058 * marshal.c: handle NATIVE_LPSTR for strings when it's
15059 explicitly specified.
15061 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15063 * reflection.c, reflection.h, icall.c: setup the reflection
15064 handle cache for ModuleBuilders and AssemblyBuilders.
15066 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
15068 * reflection.c (reflection_methodbuilder_to_mono_method): set
15071 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15073 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15075 2003-01-29 Dick Porter <dick@ximian.com>
15077 * threads.c: No need for the fake_thread kludge now that Thread
15078 doesn't run a class constructor
15080 2003-01-29 Dick Porter <dick@ximian.com>
15082 * threads.c: Use g_direct_hash instead of the rather bogus
15085 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
15087 * marshal.c (mono_marshal_get_native_wrapper): add check for null
15088 (fix pinvoke12.exe)
15089 (mono_marshal_get_struct_to_ptr): generate valid IL code
15090 (mono_marshal_get_ptr_to_struct): generate valid IL code
15091 (*): correctly set sig->pinvoke, we need to memdup the signature
15094 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15096 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15097 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15099 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15101 * profiler.c: provide more callers information.
15103 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
15105 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15107 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15109 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15111 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15113 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15114 exception instead of going into an infinite loop on dates which it
15117 * string-icalls.c (ves_icall_System_String_get_Chars): raise
15118 out-of-range exception if needed.
15120 * class.c (mono_class_setup_vtable): allow a virtual method to provide
15121 an implementation for an interface method and to override an inherited
15122 method at the same time.
15123 Imagine a scenario when a virtual method is used to override a
15124 virtual abstract method in a parent class, and this same method
15125 provides an implementation for an method inherited from an interface.
15126 In this case, the interface resolution code will set im->slot, which
15127 means that the virtual method override pass will skip this method
15128 which means a pointer to the abstract method inherited from the parent
15129 will remain in the vtable of this non-abstract class.
15131 * class.c: (mono_class_setup_vtable): continue search for a real
15132 method if only an abstract method is found.
15134 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15136 * reflection.c: add size to encoding for ByValStr and ByValArray
15137 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15139 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15141 * class.c (mono_class_setup_vtable): pass the override info as an
15144 * class.c (mono_class_setup_vtable): set the slot of overriding methods
15147 * reflection.c (ensure_runtime_vtable); add support for method
15150 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15152 * reflection.c (resolution_scope_from_image): Hack to work to work with
15153 dynamic assemblies.
15155 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
15156 added a 'force_ref' argument to force this function to allways return
15157 a TypeRef. This is needed by mono_image_get_memberref_token ().
15159 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15161 * reflection.c (mono_image_get_type_info): interfaces really don't have
15164 * reflection.c (mono_image_basic_init): fill out missing fields of
15167 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
15168 dynamic assemblies. This is required so dynamic assemblies show up in
15169 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15170 Type::GetType() etc. This is consistent with MS behaviour.
15172 * image.c image.h reflection.c: add newly created classes to the name
15173 cache so mono_class_get () will find them.
15175 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15177 First part of changes to get IKVM.NET running under mono.
15179 * appdomain.h, appdomain.c: added new function
15180 mono_domain_try_type_resolve() which will emit TypeResolve events.
15181 This function will call AppDomain::DoTypeResolve to do the actual work.
15183 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
15184 moved existing code dealing with dynamic tokens to a new function
15185 called mono_reflection_lookup_dynamic_token (). This function will
15186 raise TypeResolve events when appropriate. Since reflection.c is not
15187 part of libmetadata, a new hook function called
15188 mono_lookup_dynamic_token() is added to class.c which will call this.
15190 * assembly.h assembly.c: make the invoke_load_hook function public,
15191 so it can be called for dynamic assemblies.
15193 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15195 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
15198 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
15199 MonoGHashTable, since it contains pointers to objects which the GC
15202 * assembly.c (search_loaded): remove unused variable.
15204 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15206 * object.c: fixed issue exposed by gcc-generated IL programs
15207 that use RVA data for pointers.
15209 2003-01-25 Martin Baulig <martin@ximian.com>
15211 * threads.c (start_wrapper): Moved the initialization of
15212 `start_func' above the mono_new_thread_init() call to which we
15213 pass it as argument.
15215 2003-01-24 Martin Baulig <martin@ximian.com>
15217 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15218 the MonoThread pointer.
15220 2003-01-21 Miguel de Icaza <miguel@ximian.com>
15222 * icall.c: Rename `PowImpl' to Pow.
15224 2003-01-23 Dick Porter <dick@ximian.com>
15226 * threads.c (start_wrapper): Create a Thread object if needed, so
15227 the Main() thread can do the class initialisation in a subthread
15228 that has been set up to allow managed code execution.
15230 Pass the thread ID instead of the MonoThread pointer to the thread
15231 start and attach callbacks. This change is required, because the
15232 jit thread start callback must be called _before_ the Thread
15233 object can be created.
15235 (mono_thread_init): Removed much object creation code that is no
15236 longer needed. No managed code is called from here now.
15238 * object.c (mono_runtime_exec_managed_code): Create a subthread
15239 for Main, and call back to the runtime to use it.
15240 Set the exit code when Main exits.
15242 * gc.c: Make sure domain finalisation happens in a subthread.
15243 Re-enable threaded GC, fixing bug 31333 (again).
15245 * environment.c: System.Environment internall calls (so far just
15246 ExitCode is here, the others are still in icall.c)
15248 * appdomain.c (mono_runtime_cleanup): All threads running managed
15249 code should have finished before mono_runtime_cleanup() is
15250 reached, so no need to clean up threads.
15252 2003-01-22 Martin Baulig <martin@ximian.com>
15254 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15255 `gpointer func' arguments.
15256 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15257 but added `MonoThread *thread' argument.
15258 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15260 * threads.c (mono_new_thread_init): Added `gpointer func' argument
15261 and pass it to the mono_thread_start_cb callback.
15262 (mono_install_thread_callbacks): New public function to install a
15263 set of callbacks which are set by the debugger.
15264 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15266 2003-01-22 Martin Baulig <martin@ximian.com>
15268 * Makefile.am: Install debug-mono-symfile.h.
15270 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
15272 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15274 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
15276 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15277 * class.c (mono_ptr_class_get): correctly set access levels of pointers
15278 (mono_array_class_get): correctly set access levels of arrays
15280 2003-01-20 Patrik Torstensson
15281 * image.h (MonoAssemblyName): changed major, minor, build, revision
15282 from signed to unsigned.
15284 2003-01-20 sean kasun <skasun@azstarnet.com>
15286 * reflection.c (load_cattr_value): Now this handles
15287 MONO_TYPE_SZARRAY. Fixes bug #35629
15289 2003-01-20 Miguel de Icaza <miguel@ximian.com>
15291 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15294 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15296 * decimal.c: fixed bug #26056.
15298 2003-01-17 Martin Baulig <martin@ximian.com>
15300 * gc.c: Raise an ExecutionEngineException instead of using g_error().
15302 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15305 (mono_get_exception_type_initialization): new function.
15307 * object.c: throw a TypeInitializationException when an exception is
15308 thrown invoking the class constructor.
15310 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15312 * reflection.c: fixed attribute reading.
15314 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15317 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15318 provided, look for the type in the calling assembly and then in
15319 mscorlib; if the assembly name is provided, only try that one.
15321 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15323 * object.c: register the vtable before there is a chance it's
15324 queried again recursively.
15326 2003-01-13 Duncan Mak <duncan@ximian.com>
15328 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15331 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
15333 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15335 2003-01-11 Martin Baulig <martin@ximian.com>
15337 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15338 this to 20 for the release.
15340 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
15342 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15344 * loader.c (mono_method_get_marshal_info): bug fix
15346 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15347 structures with explicit layout
15349 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15351 * profiler.c: made the output more readable (and sorted).
15352 Added caller information for the allocation profiler.
15354 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
15356 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15358 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15360 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15361 to get value types.
15363 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15365 * object.c, profiler.h, profiler.c, profiler-private.h:
15366 Added object allocation profiler.
15368 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15370 * reflection.h, reflection.c: handle global methods.
15371 Compress blob entries.
15373 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15375 * marshal.c: fix compilation.
15377 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
15379 * loader.c (mono_method_get_marshal_info): impl.
15381 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15383 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15385 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15386 for reference types.
15388 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15390 * loader.c: fixed off by one error in loaded parameter names.
15392 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
15394 * marshal.c (mono_marshal_get_icall_wrapper): like
15395 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15396 instead of a MonoMethod.
15398 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15400 * decimal.c: fixed bug #36537.
15402 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15404 * marshal.c: throw a missing method exception if a
15405 P/Invoke method is not found.
15407 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15409 * icall.c: allow a null this for constructors.
15411 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15413 * icall.c: raise the proper exceptions if the arguments to the
15414 internal Invoke are incorrect.
15416 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
15418 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15420 2003-01-03 Martin Baulig <martin@ximian.com>
15422 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15424 2002-12-31 Martin Baulig <martin@ximian.com>
15426 * debug-mono-symfile.c: Completely rewrote the type section.
15427 Instead of using individual malloc()ed fields, we use one big
15428 continuous memory area and offsets into this area.
15429 See the comments in the source code for details.
15431 2002-12-30 Martin Baulig <martin@ximian.com>
15433 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15435 2002-12-30 Martin Baulig <martin@ximian.com>
15437 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15438 line number table in this data blob instead of using an external
15441 2002-12-28 Martin Baulig <martin@ximian.com>
15443 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15445 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
15447 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15448 as a boxed return type.
15450 2002-12-21 Miguel de Icaza <miguel@ximian.com>
15453 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15454 g_build_filename to properly get separators on the filename created.
15456 * object.h: Small change, introduce MonoMarshalByRefObject to
15457 track the layout of that structure in the C# universe as we make
15460 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15462 * object.c: removed assert to allow static fields on interfaces.
15463 * loader.c: a TypeSpec may be used for any type, not just arrays.
15465 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15467 * class.c, class.h: added mono_class_array_element_size ().
15468 Ignore static methods in interfaces.
15470 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15472 * threads.c: fixed the build under cygwin.
15474 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15476 * reflection.c: handle nullref constants. Allocate keys for
15477 reflection handles with the GC.
15479 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15481 * threads.c, threads.h: added mono_thread_get_abort_signal()
15482 to get a suitable signal for thread abort.
15484 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15486 * metadata.c: fix handling of ExportedType table.
15488 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15490 * icall.c: added WriteWindowsDebugString internal call.
15492 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15494 * reflection.h: added fields to match C# implementation.
15496 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15498 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15500 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
15502 * gc.h, gc-internal.h: Rename header for GC internal calls to
15503 gc-internal.h from gc.h as to not clash with Boehm GC having its
15504 header installed as <gc.h> in outside include paths.
15505 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15506 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15508 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15510 * icall.c: assign minor, build and revision in FillName.
15512 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
15514 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15515 Added support for running code generated by Reflection.Emit.
15517 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15519 * appdomain.c: check for NULL argument in LoadFrom.
15521 2002-12-10 Dick Porter <dick@ximian.com>
15523 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15525 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15527 * appdomain.c: fix buglet when building exe file name. Handle full
15528 assembly name (needed after latest changes to AssemblyName).
15530 (mono_image_close): free some hashtables.
15532 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
15534 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
15535 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
15536 on some systems (redhat 7.3)
15538 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15540 * threads.c: delete the critical section of a sync block,
15541 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15543 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15545 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15547 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15549 * appdomain.[ch]: handle the assembly preload event to try loading the
15550 assemblies using the paths we have in the current domain.
15552 * assembly.[ch]: created an assembly preload hook that is called to try
15553 loading the assembly by other means that the ones provided here.
15555 * domain.c: initialize the domain search path.
15557 From now on, assemblies (TODO: except corlib and System) are loaded
15558 according to these rules when using mono_assembly_load ():
15560 1. It tries to load the assembly from the ApplicationBase
15561 of the current domain appending .dll and .exe (TODO: have to
15562 try loading from name/name.dll and name/name.exe).
15564 2. It tries the search path specified in PrivateBinPath for the
15565 current domain (if any).
15567 3. Previous behavior.
15569 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15571 * icall.c: implemented GetInterfaceMap() related icall.
15572 * domain.c, loader.h: load MethodInfo in mono_defaults.
15574 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15576 * gc.c: disable the finalizer thread for now, untill all the issues
15577 with it are resolved.
15579 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15581 * string-icalls.c: handle embedded nulls in string ctor when the
15582 length is specified.
15584 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15586 * class.c: look for explicit interface implementation in parent
15589 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
15591 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
15593 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15595 * gc.c: protect handles with a critical section.
15597 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15600 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15601 parameters. If no assembly specified, try getting the type from all
15602 the assemblies in the current domain, else, load the assembly and get
15605 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15607 * marshal.c: applied patch from Aleksey Demakov that fixes
15608 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15610 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15612 * icall.c: fixed get_location.
15614 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
15616 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15617 declarations to make it work with older gcc.
15619 * loader.c (mono_get_method): set signature->pinvoke for native calls
15621 2002-11-20 Dick Porter <dick@ximian.com>
15623 * threads.c (mono_thread_init): Set the main thread's handle
15625 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15627 * gc.c: allow compilation without GC support. Changed to match the
15630 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15632 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15634 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15636 * reflection.c: set a public key token on the core assemblies.
15638 2002-11-18 Dick Porter <dick@ximian.com>
15640 * threads.c: Split out some thread initialisation so that other
15641 files can set the start callback function.
15643 * gc.c: Run finalisers in a separate thread, to avoid stack
15644 overflow. Fixes bug 31333.
15646 * appdomain.c: Set up GC finalisation thread.
15650 * domain.c: Use gc.h macros for GC_malloc
15652 2002-11-15 Dick Porter <dick@ximian.com>
15656 * appdomain.c: Removed mono_runtime_init_with_attach(),
15657 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15658 merging the extra parameter with the existing function. Removed
15659 unneeded code in mono_thread_attach().
15661 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
15663 * image.c (mono_image_loaded_by_guid): a method to get loaded
15665 (load_metadata_ptrs): we store the guid as string.
15667 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
15669 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15671 * metadata.c (mono_guid_to_string): imported method form Zoltan
15672 Varga (slightly modified)
15674 * assembly.c (mono_assembly_open): load precompiled code
15676 * loader.h (MonoMethod): we store the method token for use in the
15679 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15681 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15682 the hook function called when an assembly is loaded.
15684 * domain.c: Modified file.
15685 (mono_domain_assembly_load): removed hash table insertion of assemblies.
15689 2002-11-07 Miguel de Icaza <miguel@ximian.com>
15691 * reflection.c: Map PEFileKind to the value expected by the WinNT
15694 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15696 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15697 Read until the buffer is filled completely.
15699 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15701 * icall.c: implemented MonoType.InternalGetEvent ().
15703 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15705 * appdomain.c: implemented InitAppDomainSetup. Delayed
15706 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15707 the entry_assembly.
15709 * assembly.c: base_dir is now an absolute path ending with
15712 * icall.c: modified get_location according to the above changes.
15714 * object.c: init AppDomain.SetupInformation for the default domain after
15715 we have the entry assembly.
15717 * domain.c: when unloading a domain, setup = NULL.
15719 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
15721 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15723 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15725 * object.h, object.c: introduced mono_object_get_virtual_method ()
15726 to lookup the method invoked on an object when a callvirt is done on
15728 * icall.c: make MethodInfo::Invoke() always do a virtual call.
15730 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15732 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15733 current domain when loaded an assembly and failed to load it.
15735 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15737 2002-10-31 Dick Porter <dick@ximian.com>
15741 * file-io.c: Return the error status in a parameter, as the
15742 GetLastError() value has long since been blown away if we try and
15743 look it up in a subsequent internal call invocation. Delete the
15744 GetLastError() internal call, because it's useless.
15746 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
15748 * class.[ch]: added cast_class to fix bug 29517
15750 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15752 * marshal.c: create valid IL code in the filter clause:
15753 the new JIT is less forgiving:-)
15755 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15757 * icall.c: removed get_property internal call.
15759 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
15761 * appdomain.h domain.c: Added an ID to appdomains.
15763 * threads.c threads.h icall.c: Implement icall
15764 Thread:GetDomainID(), and remove unused icall
15765 CurrentThreadDomain_internal.
15767 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15769 * icall.c: Don't recurse through the base types in GetConstructor.
15772 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15774 * mempool.h, mempool.c: added mono_mempool_empty() and
15775 mono_mempool_stats().
15777 2002-10-23 Dick Porter <dick@ximian.com>
15781 * icall.c: Added MonoIO.GetFileType internal call
15783 2002-10-17 Dick Porter <dick@ximian.com>
15785 * appdomain.c (mono_runtime_cleanup): Don't signal the async
15786 delegate semaphore before waiting for all threads to finish,
15787 because new threads can also call async delegates. Fixes bug
15790 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15791 of 3 seconds, in case another async job is queued. (This part is
15792 needed because the bug fix reintroduced the 3s exit lag.) This
15793 makes the mono_runtime_shutdown flag superfluous.
15795 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15797 * reflection.c: include ehader size in method section headers.
15798 Really check for suplicated modules entries.
15800 2002-10-17 Martin Baulig <martin@gnome.org>
15802 * debug-mono-symfile.c: Added back support for locals.
15804 2002-10-14 Martin Baulig <martin@gnome.org>
15806 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15809 2002-10-14 Martin Baulig <martin@gnome.org>
15811 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15812 mono_class_get() instead of looking in the class cache.
15814 2002-10-13 Martin Baulig <martin@gnome.org>
15816 * debug-mono-symfile.c: Set version number to 28, include the
15817 signature in method names.
15819 2002-10-13 Martin Baulig <martin@gnome.org>
15821 * debug-mono-symfile.h: Set version number to 27.
15823 2002-10-11 Martin Baulig <martin@gnome.org>
15825 * gc.c: Don't register/unregister NULL pointers as disappearing links.
15827 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15829 * metadata.c, metadata.h: added helper function to allocate signatures.
15831 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15833 * icall.c: added internal call to get the location of machine.config.
15835 2002-10-08 Martin Baulig <martin@gnome.org>
15837 * debug-mono-symfile.c: Ignore classes with a pending init for the
15840 2002-10-03 Dick Porter <dick@ximian.com>
15842 * threads.c: Freebsd pthread_t is a pointer
15844 2002-10-03 Dick Porter <dick@ximian.com>
15846 * socket-io.c: Implemented GetHostName_internal
15848 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15851 (mono_config_parse_file): don't leak the text.
15853 2002-10-02 Martin Baulig <martin@gnome.org>
15855 * debug-mono-symfile.c: Added support for methods.
15857 2002-10-01 Martin Baulig <martin@gnome.org>
15859 * debug-mono-symfile.c: Don't emit methods and line numbers for
15860 the dynamic symbol file, just write the type table. We can easily
15861 have an external helper program which creates a symbol file for an
15864 2002-10-01 Dick Porter <dick@ximian.com>
15866 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15867 Only add the handle to the cleanup array when we're about to
15868 launch the thread. Bug 31425 deadlocked when the test was run on
15871 2002-10-01 Martin Baulig <martin@gnome.org>
15873 * debug-mono-symfile.c: Added support for properties.
15875 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15877 * reflection.c: unaligned store fix from Mark Crichton
15878 <crichton@gimp.org>.
15880 2002-09-27 Martin Baulig <martin@gnome.org>
15882 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15885 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15887 * assembly.h, assembly.c: use a sane API to hook into the assembly
15888 loading process instead of a useless special-purpouse hack
15889 (ngen needs a hook, too, for example).
15891 2002-09-27 Dick Porter <dick@ximian.com>
15893 * threads.c (mono_thread_init): Call GetCurrentProcess() so
15894 io-layer can set up some process handle info. Not needed on w32,
15895 but doesn't hurt either.
15897 * process.c: Pass the program name in the second parameter to
15898 CreateProcess, so the path is searched. Include the working
15899 directory. Implemented process name, process enumeration, and some
15900 process detail internal calls.
15902 * icall.c: Added internal calls for process lookup, and some
15905 2002-09-26 Martin Baulig <martin@gnome.org>
15907 * assembly.c (mono_install_open_assembly_hook): New global
15908 function to install a function to be invoked each time a new
15909 assembly is loaded.
15910 (mono_assembly_open): Run this callback function if set.
15912 * debug-mono-symfile.c: Put back line numbers for the dynamic
15913 symbol file and also record the .il file as source file. This
15914 allows us to install the temporary symbol file as `file.dbg' just
15915 like a compiler-generated one.
15917 2002-09-26 Nick Zigarovich <nick@chemlab.org>
15919 * Corrected typo in gc.c (BOHEM vs BOEHM).
15921 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15923 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15924 GetProperties. Also avoid calling g_slist_length in GetProperties and
15927 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15929 * reflection.c: avoid unaligned stores (bug spotted by
15930 Mark Crichton <crichton@gimp.org>).
15932 2002-09-25 Martin Baulig <martin@gnome.org>
15934 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15935 instead of guint64 for addresses and added prologue/epilogue info.
15937 2002-09-25 Martin Baulig <martin@gnome.org>
15939 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15940 store line number info. For the dynamic symbol file, we only need
15941 to provide the JIT generated dynamic line number info for the dynamic
15944 2002-09-25 Martin Baulig <martin@gnome.org>
15946 * debug-mono-symfile.h: Incremented version number.
15948 2002-09-24 Martin Baulig <martin@gnome.org>
15950 * class.c (mono_debugger_class_init_func): New global function
15952 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15955 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15956 function. This is called via the mono_debugger_class_init_func
15957 hook to add all types to the dynamic type table.
15958 (ves_icall_MonoDebugger_GetType): New interncall to get a class
15959 from its metadata token.
15961 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15962 New interncall for the debugger.
15964 2002-09-24 Nick Drochak <ndrochak@gol.com>
15966 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15967 before using it in case it is null.
15969 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15971 * metadata.c: allow custom modifiers in local var signatures
15972 (bug spotted by Zoltan Varga).
15974 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15976 * class.c: deal with the <Module> class that may have a NULL vtable.
15977 Eliminate warnings.
15979 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15981 * image.c, image.h: more strong name helpers.
15982 * monosn.c: more work: convert pem keys to cryptoapi format.
15984 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15986 * string-icalls.c: speedup IndexOf.
15988 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15990 * icall.c: updates from Zoltan.2.Varga@nokia.com.
15992 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15994 * icall.c: cleanup: use mono_object_domain ().
15996 2002-09-23 Martin Baulig <martin@gnome.org>
15998 * debug-mono-symfile.c: Improved type support.
16000 2002-09-22 Martin Baulig <martin@gnome.org>
16002 * debug-mono-symfile.c: Added support for reference types and strings.
16004 2002-09-22 Martin Baulig <martin@gnome.org>
16006 * debug-mono-symfile.c: Started to work on the type table.
16008 2002-09-21 Martin Baulig <martin@gnome.org>
16010 * debug-mono-symfile.c: Largely reworked the symbol table format.
16011 The symbol table is now incrementally updated each time a new
16012 method is added. We're now also using our own magic and version
16013 so that you don't need to recompile all your classes if the
16014 dynamic table changes.
16015 (mono_debug_update_mono_symbol_file): Removed.
16016 (mono_debug_symfile_add_method): New function to add a method.
16018 2002-09-21 Martin Baulig <martin@gnome.org>
16021 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16024 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16025 New interncall to get a method from its metadata token.
16027 2002-09-21 Martin Baulig <martin@gnome.org>
16029 * debug-mono-symfile.c: Create type table.
16031 2002-09-20 Martin Baulig <martin@gnome.org>
16033 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16035 2002-09-20 Martin Baulig <martin@gnome.org>
16037 * debug-mono-symfile.c: Provide information about params and locals.
16039 2002-09-20 Martin Baulig <martin@gnome.org>
16041 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16044 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16045 interncall to get a method from its metadata token.
16047 2002-09-20 Martin Baulig <martin@gnome.org>
16049 * debug-mono-symfile.c: Added a few checks for method->header
16050 being non-NULL. This should never happen, but for the moment
16051 let's use a g_warning() rather than a g_assert().
16053 2002-09-19 Mark Crichton <crichton@gimp.org>
16055 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16056 even if support for it isn't present. Added an #ifdef to fix this.
16058 * socket-io.c: Added checks back for Solaris support.
16060 2002-09-19 Martin Baulig <martin@gnome.org>
16062 * debug-mono-symfile.c (read_string, write_string): Reflect latest
16063 changes in the symbol file format.
16065 2002-09-18 Martin Baulig <martin@gnome.org>
16067 * debug-mono-symfile.c: Set version number to 21.
16069 2002-09-18 Dick Porter <dick@ximian.com>
16071 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16072 on netbsd. Fixes bug 30051.
16074 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16077 (set_version_from_string): little fix.
16079 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16081 * monosn.c, Makefile.am: added strong name utility.
16082 * reflection.h, reflection.c: implemented delayed signing,
16083 locale, version and hash id assembly attributes.
16085 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16087 * loader.c, metadata.c: load param attributes in signatures.
16089 2002-09-16 Martin Baulig <martin@gnome.org>
16091 * debug-mono-symfile.c: Added string table with all method names.
16093 2002-09-14 Martin Baulig <martin@gnome.org>
16095 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16096 fast method lookup.
16098 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16100 * reflection.c: record the public key token of referenced assemblies.
16102 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16104 * image.c, image.h: added functions to get the strong name and the
16105 public key of an assembly.
16106 * pedump.c: use them.
16108 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
16110 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16112 2002-09-12 Miguel de Icaza <miguel@ximian.com>
16114 * marshal.c (mono_marshal_get_managed_wrapper): Added
16117 2002-09-11 Martin Baulig <martin@gnome.org>
16119 * gc.c: Call GC_unregister_disappearing_link() on all links when
16120 finalizing them, this is necessary to aviod a crash in boehm's
16123 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16125 * gc.c: handle GetTarget for finalized objects spotted and fixed by
16128 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16130 * icall.c: implemented MonoType::Module.
16131 * reflection.c, reflection.h: mono_module_get_object () from
16132 Tomi Pakarinen <tomi.pakarinen@welho.com>.
16134 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16136 * icall.c: ignore overridden methods in GetMethods ().
16137 Fix for FieldInfo::SetValue().
16138 * object.c: handle float/double in runtime invoke.
16140 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16142 * object.c: allow a constructor to be called again on an object.
16144 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16146 * class.h, class.c: move field layout code to it's own function and
16147 export it. Get an interface id earlier. Move fields in MonoClass
16148 so they are more cache friendly and align the bitfields.
16149 * loader.c: temporary handle get_param_names() for a runtime method.
16150 * reflection.c, reflection.h: more code to handle runtime creation of
16153 2002-09-09 Martin Baulig <martin@gnome.org>
16155 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16156 signature with the pinvoke field being set for the actual call.
16158 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16160 * icall.c: removed some unused icalls. Start of map of glib charsets
16161 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16163 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16165 * debug-helpers.c: break infinite loop (found and fixed by
16166 Holger Arnold <harnold@gmx.de>).
16168 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16170 * icall.c: target may be null in create_delegate.
16172 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16174 * marshal.c: handle a boolean return type.
16176 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16178 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16180 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16182 * gc.c: fix weakreferences.
16184 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16186 * icall.c: added icall to get default codepage.
16188 2002-09-03 Dick Porter <dick@ximian.com>
16191 * threads.c: Use MonoThread instead of MonoObject where
16194 Store running thread objects in a hash table, so that we have all
16195 the info to hand when waiting for them to finish
16196 (means we don't need OpenThread() any more, so mingw builds should
16197 be fully functional again.)
16200 * object.h: Added thread ID to MonoThread
16202 2002-09-03 Martin Baulig <martin@gnome.org>
16204 * icall.c (System.Reflection.Assembly::get_location): New interncall.
16206 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16208 * icall.c: fixed leak in get_temp_path. Thanks lupus.
16210 2002-09-03 Martin Baulig <martin@gnome.org>
16212 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16213 argument to store the end address of the disassembled instruction.
16215 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16216 here from debug-symfile.h.
16217 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16218 JIT into this struct.
16219 (MonoSymbolFile): Added `char *image_file' field.
16220 (MonoDebugGetMethodFunc): Removed.
16221 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16222 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16223 (mono_debug_find_method): New method.
16225 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16226 create a full symbol file.
16227 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16228 and static symbol files.
16229 (mono_debug_find_method): The symbol file keeps an internal method hash,
16230 call this to get a MonoDebugMethodInfo from a MonoMethod.
16232 * debug-symfile.[ch]: Removed.
16234 2002-08-29 Miguel de Icaza <miguel@ximian.com>
16236 * image.c (do_mono_image_open): Remove linker version check.
16238 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
16240 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16241 wrappers for instance methods.
16243 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16245 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16247 2002-08-28 Dick Porter <dick@ximian.com>
16249 * Makefile.am: Export HOST_CC for w32 builds
16251 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16253 * file-io.c process.c: MonoString are null terminated, no
16254 need for mono_string_to_utf16() anymore.
16256 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16258 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16260 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16262 * icall.c, reflection.h: speedup System.MonoType.
16264 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16266 * reflection.c: allow null as the value of a string argument in
16267 custom attributes constructors.
16269 2002-08-27 Martin Baulig <martin@gnome.org>
16271 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16272 `trampoline_address' field.
16274 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
16276 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16277 check (fixes bug #29486)
16279 2002-08-27 Martin Baulig <martin@gnome.org>
16281 * debug-mono-symfile.c: Changed the file format in a way that allows us
16282 open it read-only and to use a specially malloced area for all the
16283 dynamic data. We can now also generate a symbol file on-the-fly if we're
16284 debugging IL code and there is no MCS generated symbol file for it.
16286 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16288 * object.c: added a define for a good string and array
16289 creation speedup (not enabled by default because we need to deal with
16292 2002-08-26 Martin Baulig <martin@gnome.org>
16294 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16295 function to create a dynamic symbol file. This is used by the
16296 debugger to create a symbol file for IL code on-the-fly.
16298 2002-08-26 Martin Baulig <martin@gnome.org>
16300 * loader.c (mono_lookup_pinvoke_call): Include the error message
16301 from g_module_error() in the error message.
16303 2002-08-24 Martin Baulig <martin@gnome.org>
16305 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16306 function to update the symbol file. The symbol file is mmap()ed
16307 writable, but private. This allows us to install the symbol file
16308 together with the assembly.
16310 2002-08-24 Martin Baulig <martin@gnome.org>
16312 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
16313 but they can read the new symbol file format which mcs is now creating.
16315 * debug-symfile.c (mono_debug_find_source_location): Moved to
16316 debug-mono-symfile.c; this is now operating on the new symbol file.
16318 2002-08-23 Martin Baulig <martin@gnome.org>
16320 * debug-helpers.c (mono_method_desc_from_method): New function to get
16321 a MonoMethodDesc from a MonoMethod.
16323 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16325 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16326 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16328 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16330 * string-icalls.[ch]: make helper methods static.
16332 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16334 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16335 types to it and to SetValueInternal.
16337 * object.c: Moved handle_enum label to its proper place. This was the
16340 This time i compiled mcs and gtk-sharp and they both work.
16342 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16344 * icall.c: reverted partially my previous patch until
16345 object.c:set_value handles enums correcly.
16347 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16350 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16351 (ves_icall_System_Environment_get_MachineName): removed warning when
16352 compiling under cygwin.
16354 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16356 * object.c: fixed field_get_value() for reference types.
16358 2002-08-22 Dick Porter <dick@ximian.com>
16360 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16361 Don't free a buffer while it's still needed. Patch from Jonathan
16362 Liger <Jonathan.liger@wanadoo.fr>
16364 2002-08-21 Miguel de Icaza <miguel@ximian.com>
16366 * icall.c (ves_icall_System_Environment_get_Platform): Add new
16369 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
16371 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16372 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16374 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16375 we call unmanaged code which throws exceptions.
16377 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16379 * appdomain.h: added per-domain entry_assembly.
16380 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16382 * icall.c: Assembly::GetEntryAssembly icall.
16383 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16384 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16386 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16388 * appdomain.h, gc.c: added mono_domain_finalize ().
16390 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16393 (mono_print_unhandled_exception): changed g_warning by g_printerr
16394 because g_log has a 1024 characters limit (yeah, i got a big stack
16395 trace). Don't print exception name, that should be in ToString
16398 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16400 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16401 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16403 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16406 (mono_print_unhandled_exception): after previous commit, i realized
16407 that MS calls ToString on the exception. I changed this function to
16408 do that. This way we get stack_trace for free.
16410 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16413 (mono_print_unhandled_exception): invoke Message property instead of
16414 getting 'message' field from Exception. Don't allocate memory for
16415 'trace' and 'message' if not needed.
16417 2002-08-18 Dick Porter <dick@ximian.com>
16419 * unicode.c: Fix asserts to match Encoder.cs checks
16421 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16423 * marshal.c: fix unaligned store issue and a few wrong
16424 opcode argument types.
16426 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16428 * icall.c: added GetUninitializedObjectInternal internal call.
16430 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
16432 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16433 to the right domain.
16435 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
16437 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16439 * class.c (class_compute_field_layout): set blittable to false for Strings
16441 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16443 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16445 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16446 first chunk of code to create types at runtime. Code to
16447 handle ReflectedType/DeclaringType. Make reflection handles
16450 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16452 * class.c: set correct name in arrays.
16454 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
16456 * appdomain.c (mono_domain_transfer_object): make it work with
16457 valuetypes. bug fixes.
16459 2002-08-12 Dick Porter <dick@ximian.com>
16461 * object.h: Rename some parameters to avoid c++ keywords (Patch
16462 from Joseph Wenninger <kde@jowenn.at>)
16464 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16466 * icall.c: added icall to implement Assembly.GetFile*.
16468 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16470 * reflection.h, reflection.c: code to embed managed resources.
16472 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16474 * class.c: move all the type size stuff into
16475 class_compute_field_layout().
16477 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16479 * class.c: ensure enums have always the correct instance size.
16480 * unicode.c: remove wrong assert.
16482 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16484 * assembly.c: fix mem corruption issue.
16485 * image.h, image.c: added mono_image_get_resource () to access
16487 * icall.c: implemented Assembly.EntryPoint property and some
16488 Managed Resources related internalcalls.
16491 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16493 * image.c, image.h: impemented mono_image_get_entry_point ().
16494 * appdomain.c: use mono_image_get_entry_point.
16496 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16498 * reflection.c: support the object type argument when loading
16501 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
16503 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16504 String as return type.
16506 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16508 * reflection.c: fix encoding of named args for custom attrs to match
16509 the ms implementation. Read them back when instantiating custom
16512 2002-08-02 Radek Doulik <rodo@ximian.com>
16514 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16515 by Dietmar as quick fix
16516 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16517 16 as stack size, used on more places as quick fix before Dietmar
16518 will fix it properly
16520 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16522 * object.h, object.c: added accessors for fields and properties.
16524 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16526 * class.c, class.h: made mono_class_get_field_from_name ()
16527 loop on parent types.
16528 Added mono_class_get_property_from_name ().
16530 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16532 * class.c, class.h: move the code to setup the type vtable in its own
16533 function so that it can be reused also for types created at runtime.
16534 Eliminate the "class" identifier from the header file.
16535 * reflection.c: setup the vtable for enums so that we can create
16536 objects for use in SetConstant ().
16538 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
16540 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16541 instead of the delegate itself as this pointer (bug #28383)
16543 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
16545 * marshal.c (mono_marshal_get_managed_wrapper): added return type
16548 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16550 * loader.c: don't set the pinvoke bit on icalls.
16552 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
16554 * debug-helpers.c (mono_method_full_name): only print a number to
16555 indicate wrapper type (so that the output is more readable in traces).
16557 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
16559 * class.c (mono_class_init): include method override patch from Paolo
16561 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16563 * icall.c: fixed GetTypeCode().
16565 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
16567 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16568 use real delegate invoke function to make it work with multicast
16569 delegates (fix bug# 28291).
16571 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16573 * object.c: load constant strings.
16575 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16577 * reflection.c: no magic numbers.
16578 * tabledefs.h: security action enum.
16580 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16582 * assembly.c: fix possible memory corruption.
16584 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16586 * reflection.h, reflection.c: added support for linking resources.
16587 * verify.c: check we have an updated corlib.
16589 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
16591 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16593 (mono_marshal_string_array): null terminate unmanaged string arrays.
16594 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16596 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16598 * icall.c: Type.GetType () can now return also types from the
16601 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16603 * loader.h, loader.c: stack walking support.
16604 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16605 GetCallingAssembly.
16607 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
16609 * marshal.c: added optimisations for blittable types
16611 * class.c (mono_array_class_get): do not set blittable attribute on arrays
16612 (mono_class_setup_mono_type): set blittable attribute for single
16615 * marshal.c (mono_string_utf8_to_builder): impl.
16616 (mono_string_builder_to_utf8): impl.
16617 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16619 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
16621 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16622 (mono_marshal_get_managed_wrapper): impl. byref types
16624 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16627 (search_method): don't display debug message.
16629 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16631 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16633 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16635 * appdomain.c: set the missing filename when throwing exception.
16637 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16639 * metadata.c (mono_type_size): code cleanup
16640 (mono_type_stack_size): removed some test code
16642 2002-07-21 Miguel de Icaza <miguel@ximian.com>
16644 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16645 mono_get_exception_file_not_found now.
16647 * exception.c (mono_exception_from_name_two_strings): New version
16648 that will call a constructor with two string arguments.
16649 (mono_get_exception_file_not_found): New helper routine, used to
16650 report file-not-found errors.
16652 2002-07-20 Dick Porter <dick@ximian.com>
16655 * process.c: Pass file handles to CreateProcess
16659 * file-io.c: Implemented CreatePipe
16661 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16663 * metadata.c (mono_get_param_info): set alignment for value types
16665 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16667 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16668 Constify mono_domain_assembly_open().
16669 * loader.c: handle null namespace in icalls.
16671 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16673 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16674 (emit_str_to_ptr_conv): marshal object as structs
16676 * metadata.c (mono_type_to_unmanaged): marshal object as structs
16678 * marshal.c (mono_marshal_get_runtime_invoke): support value types
16680 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
16682 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16683 (mono_marshal_get_native_wrapper): we an now return value types
16685 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16687 * verify.c: more checks implemented.
16689 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
16691 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16693 (mono_marshal_get_native_wrapper): allow byref arguments
16694 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16695 impl. PtrToStringXXX methods
16696 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16697 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16698 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16699 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16700 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16702 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16704 * reflection.c: fix buglet in parsing an assembly name.
16706 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16708 * marshal.c (emit_ptr_to_str_conv): first impl.
16710 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16712 * object.c, class.h: cache the vtable in the class as suggested by
16713 vargaz@freemail.hu (Zoltan Varga).
16715 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16717 * class.h, loader.c: added mono_field_from_token().
16718 * verify.c: first cut of type checking code.
16720 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16722 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16724 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
16726 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16728 (mono_marshal_get_remoting_invoke): impl.
16729 (mono_delegate_begin_invoke): impl.
16730 (mono_mb_emit_save_args): impl.
16731 (mono_delegate_end_invoke): impl.
16732 (mono_marshal_get_delegate_begin_invoke):
16733 (mono_marshal_get_delegate_end_invoke):
16734 (mono_marshal_get_delegate_invoke): generate a special name for
16735 those methods (including the signature) and associate them whith
16736 the delegate class.
16738 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16741 (mono_reflection_type_from_name): now it has a MonoImage parameter
16742 which is used as the default image to search the type in. If the image
16743 is NULL or getting the type from it fails, it defaults to corlib.
16745 * icall.c: changed 1 call to mono_reflection_type_from_name to match
16748 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16750 * reflection.c: update the parameter table index.
16752 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16754 * domain.c: don't include the mark byte in the string hash.
16756 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16758 * icall.cs: icall for Type.GetTypeCode ().
16759 * verify: a couple of fixes and disabled local initialization checks.
16761 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
16763 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16765 * debug-helpers.c (mono_method_full_name): print the type of the
16768 * metadata.c (mono_signature_hash): a hash function for signatures
16769 (mono_signature_hash): better hash algorithm
16771 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16773 * debug-helpers.c (mono_method_full_name): this can now generate
16774 method names with signatures
16776 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16777 method dont have this pointers.
16779 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16781 * reflection.c: fixup typebuilder tokens.
16782 * image.c: fix buglet.
16783 * marshal.h: remove whitespace.
16784 * metadata.h, metadata.c: reinstate code that was removed.
16785 * verify.c: handle catch directives and fix another couple of bugs.
16787 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
16789 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16790 (mono_marshal_get_native_wrapper): make it comp. with the old code
16791 (mono_marshal_get_native_wrapper): support boolean
16792 (mono_marshal_get_managed_wrapper): support more types
16794 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
16796 * class.c (class_compute_field_layout): compute class->blittable attribute.
16798 2002-07-09 Dick Porter <dick@ximian.com>
16800 * threads.c: Make the thread cleaning up cope with threads that
16803 2002-07-08 Radek Doulik <rodo@ximian.com>
16805 * reflection.c (method_encode_code): use non-translated values to
16806 compute finally_start, this fixes exception handling on ppc, yay!
16808 * decimal.h (struct signscale): fix endianess
16810 2002-07-07 Radek Doulik <rodo@ximian.com>
16812 * reflection.c: swap box_val and not val
16814 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16816 * reflection.c, reflection.h: handle full assembly info in type name.
16817 Handle Type arguments when loading custom attributes.
16818 * icall.c: updated to use new mono_reflection_type_from_name () method.
16820 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16823 (method_from_memberref): also print assembly name when method not found.
16825 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16828 (ves_icall_TypeGetProperties): fixed bug #27473.
16830 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16832 * reflection.c: display image name and token when cannot find the
16833 .ctor for an attribute.
16835 2002-07-05 Martin Baulig <martin@gnome.org>
16837 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16839 2002-07-04 Dick Porter <dick@ximian.com>
16841 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16842 compile on mingw. This will cause mingw builds to not wait for
16843 subthreads to terminate after the main thread does. I've lodged a
16844 bug with the mingw developers for them to wrap OpenThread().
16846 2002-07-03 Dick Porter <dick@ximian.com>
16848 * threads.c: Store thread IDs instead of handles, because
16849 GetCurrentThread() returns a pseudohandle and therefore stores
16850 useless values. mono_thread_cleanup() continues checking the
16851 array of threads until it is empty, to cope with subthreads
16852 spawning new threads after the main thread has finished.
16856 * profiler-private.h: Pass the thread ID to thread profiler
16857 functions, instead of a handle
16859 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16861 * verify.c: fixes to make it more usable.
16862 * pedump.c: added --verify code to verify IL code in an assembly.
16864 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16866 * reflection.c: turn errors into warnings to allow compiling corlib.
16868 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16870 * reflection.c: add special cases to compile corlib.
16872 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16874 * reflection.c: handle properties with only a set method.
16876 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16878 * opcodes.h: add enum with opcodes in opval order.
16880 2002-07-01 Dick Porter <dick@ximian.com>
16883 * object.c (mono_runtime_run_main): Removed unneeded argument
16885 2002-06-28 Martin Baulig <martin@gnome.org>
16887 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16889 2002-06-27 Dick Porter <dick@ximian.com>
16891 * threads.c: Store the handle in both the parent thread and in the
16892 subthread, to minimise the time between starting a new thread and
16895 2002-06-26 Dick Porter <dick@ximian.com>
16897 * appdomain.c (mono_runtime_cleanup): Close the socket library
16898 after all the threads have finished, not before
16900 2002-06-26 Martin Baulig <martin@gnome.org>
16902 * debug-symfile.c (mono_debug_find_source_location): Added
16903 `guint32 *line_number' argument. If it's not NULL, store the line number
16904 there and return the file name without the line number.
16906 2002-06-25 Dick Porter <dick@ximian.com>
16910 * process.c: Process forking and other support functions
16912 2002-06-25 Dick Porter <dick@ximian.com>
16914 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16915 things dont happen when the image is closed.
16916 (mono_image_lookup_resource): Walk the resource section looking
16917 for a particular entry
16919 * cil-coff.h: PE resource section decoding
16921 2002-06-25 Dick Porter <dick@ximian.com>
16925 (mono_assembly_foreach): Accessor functions to walk the list of
16927 (mono_assembly_set_main):
16928 (mono_assembly_get_main): Process methods need to know which
16929 assembly is the "main" one
16931 * object.c (mono_runtime_run_main): Record the main assembly
16933 * debug-helpers.c: Fix typo
16935 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
16937 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16938 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16940 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16942 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16944 2002-06-21 Miguel de Icaza <miguel@ximian.com>
16946 * image.c (do_mono_image_open): Initialize reference count,
16947 otherwise we leak the MonoImage.
16949 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16951 * reflection.c: small tweak to handle self-hosting.
16953 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16955 * reflection.c: fix type name parse code.
16957 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16959 * reflection.c: break out of the loop.
16960 * image.c: special case corlib.
16962 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16964 * reflection.c: add all the custom attrs at the end to ensure the
16965 ctors have been properly initialized when the attributes are defined
16966 in the current assembly.
16968 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16970 * reflection.c: handle correctly multiple-nested types.
16972 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16974 * row-indexes.h: fix typos.
16975 * reflection.c: adjust for typos and fix method_def_or_ref
16976 encoding in MethodImpl table.
16978 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16980 * reflection.c: fix entry point patching (thanks Serge!).
16982 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
16984 * verify.c: add check for System.Exception
16986 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16988 * image.c, class.c: minifix for code just c&p'ed.
16989 * reflection.c: warning fix.
16990 * object.h, loader.h, domain.c: load also StringBuilder.
16992 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16994 * marshal.h, marshal.c: some support code to handle complex marshaling.
16996 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16998 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16999 Better signatures with vtable error dump.
17001 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17003 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17005 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
17007 * icall.c (ves_icall_Type_GetField): impl.
17009 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17011 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17012 to retrieve a marshal description blob for a field or param.
17014 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17016 * reflection.h, reflection.c: change order of nested type emission
17017 to avoid table corruption. The NestedTypes table is sorted.
17018 * icall.c: change order of GetConstructor results to workaround mcs bug.
17020 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17022 * reflection.h, reflection.c: handle field and param marshal
17025 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17027 * icall.c, marshal.c marshal.h: more Marshal class implementation.
17029 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17031 * reflection.c: fix call convention.
17033 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17035 * reflection.h, reflection.c: mono_image_get_memberref_token()
17036 takes a type instead of a class, now. Added
17037 mono_image_get_array_token() to create tokens for the special
17038 multi-dim array methods.
17040 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17042 * assembly.c: handle modules (no assembly table). Split
17043 loading references in its own function.
17044 * class.c: handle moduleref resolution scope.
17045 * image.c, image.h: cache module name in image.
17047 2002-06-07 Martin Baulig <martin@gnome.org>
17049 * reflection.c (mono_image_get_type_info): Only add a class layout entry
17050 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17052 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17054 * icall.c: more signature fixes that used uint instead of int.
17056 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17058 * reflection.c: fixed signature of field refs.
17060 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17062 * class.c, reflection.c: handle typerefs of nested types
17063 (both on read and when writing files).
17065 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17067 * icall.c: fix method signatures that tried to workaround the previous
17070 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17072 * debug-helpers.c: fix typo.
17074 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17076 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17077 rewrote the PE/COFF writing code (our programs are understood by the
17080 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17082 * gc.c, gc.h, icall.c: weakreference support.
17084 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17086 * Makefile.am, mono-config.c: use $(sysconfdir).
17088 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17090 * icall.c: changed default precision of Double.ToString() to 15.
17091 Fixed memory leak. Unified with Single.ToString.
17093 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17095 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17097 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17099 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17100 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17101 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17104 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17106 * debug-symfile.c, sysmath.c: yet more compilation fixes.
17108 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17110 * reflection.c, socket-io.c: more compilation fixes.
17112 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17114 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17115 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17116 unicode.c: warning and compiler compatibility fixes.
17118 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17120 * class.h, metadata.c: fixed warnings/compilation errors.
17122 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17124 * Makefile.am, mono-config.c, mono-config.h: configuration file
17126 * loader.c, loader.h: make Dll mapping configurable at runtime in the
17127 config file. Export methods to insert and lookup mappings.
17129 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17131 * reflection.c: handle types and boxed objects in custom attr
17134 2002-05-30 Martin Baulig <martin@gnome.org>
17137 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17139 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17141 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17142 to lookup the implmap row for a P/Invoke method.
17143 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17144 P/Invoke method from the runtime on an as needed basis.
17146 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
17148 * metadata.c (mono_metadata_parse_signature): impl.
17150 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17152 * class.c: handle .pack directive.
17154 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17156 * object.c: initialize static fields with RVA data.
17158 2002-05-25 Martin Baulig <martin@gnome.org>
17161 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17163 2002-05-24 Martin Baulig <martin@gnome.org>
17166 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17167 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17168 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17170 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17172 * object.c: special case string ctros in invoke.
17173 * gc.c: silly whitespace changes.
17175 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
17177 * threadpool.[ch]: impl. a threadpool that can
17178 be used by mint and mono.
17180 2002-05-22 Martin Baulig <martin@gnome.org>
17182 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17183 The first argument is now a `MonoReflectionModuleBuilder *', the return
17184 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
17185 `methods' field to get the method builder. The `token' argument is the
17188 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17189 invalid characters instead of g_assert_not_reached()ing. This seems
17190 to be the behaviour of mscorlib.
17192 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
17194 * object.c (mono_runtime_invoke_array): applied patch from Rachel
17195 Hestilow to fix bug #25104
17197 2002-05-21 Martin Baulig <martin@gnome.org>
17199 * debug-symfile.c (mono_debug_find_source_location): New function.
17200 Looks up an IL offset in the line number table and returns the source
17201 location as a string.
17203 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17206 (mono_double_ToStringImpl): changed %f by %g until we have something
17209 2002-05-21 Nick Drochak <ndrochak@gol.com>
17211 * icall.c : Use different name for Math.Pow's icall. Needed to check
17212 parameters first in C#.
17214 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17216 * icall.c, reflection.h: added icall to get info about an event.
17218 2002-05-20 Radek Doulik <rodo@ximian.com>
17220 * object.c (mono_value_box): don't use memcpy for boxing on BIG
17222 (mono_value_box): don't use memcpy for small sizes on
17223 architectures with unaligned access
17225 2002-05-20 Martin Baulig <martin@gnome.org>
17227 * reflection.c (mono_reflection_setup_internal_class): Don't crash
17228 if `tb->parent == NULL'.
17229 (mono_reflection_create_internal_class): New function. This is
17230 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17233 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17236 2002-05-19 Martin Baulig <martin@gnome.org>
17238 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17239 argument to get the length, don't default to the array length.
17241 2002-05-18 Miguel de Icaza <miguel@ximian.com>
17243 * assembly.c (mono_assembly_setrootdir): New function used to
17244 override the MONO_ASSEMBLIES directory.
17246 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17248 * icall.c: ValueType_GetHashCode() initialize local var.
17250 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17252 * reflection.c: sort custom attributes table.
17254 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17256 * reflection.c: support named args in custom attributes (write support).
17258 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17260 * reflection.c: fix finally position calculation.
17262 2002-05-15 Radek Doulik <rodo@ximian.com>
17264 * reflection.c: fixed endianess at many places
17266 * icall.c (ves_icall_InitializeArray): comment out debug msg
17268 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
17270 * object.c (mono_unhandled_exception): new function to handle
17271 unhandled exceptions.
17272 (mono_unhandled_exception): call the UnhandledException event.
17273 (mono_runtime_delegate_invoke): impl.
17275 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17277 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17278 returns the RVA, not the direct pointer to the data. Handle the case
17279 when the class size is fixed.
17281 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17283 * reflection.c: fix some endianess issues.
17285 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
17287 * object.c (mono_runtime_invoke): is now able to catch exceptions.
17289 * threads.c (mono_thread_init): added a callback which is invoked
17292 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17294 * icall.c: make GetHashCode return non-negative values.
17296 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17298 * object.c, icall.c, gc.c: revert to address-based hashcode.
17300 2002-05-13 Miguel de Icaza <miguel@ximian.com>
17302 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17304 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17306 * icall.c, class.c: special case <Module>.
17308 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
17310 * icall.c: fix bug in GetNow().
17312 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
17314 * object.c (mono_runtime_class_init): make sure that we call all
17315 static class constructors.
17317 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17319 * reflection.c: sort methodsemantics table.
17321 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17323 * reflection.h, reflection.c: honour init locals setting.
17325 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17327 * icall.c: copied Double ToStringImpl for Single ToStringImpl
17329 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17331 * reflection.c: support ContructorBuilders in attribute blob creation.
17333 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17335 * reflection.c: some changes to build a binary that can be run
17336 directly in windows.
17338 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17340 * loader.c: print a big message when an icall can't be found.
17342 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17344 * string-icalls.c: fix bug 24248.
17346 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17348 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17349 icall.c, reflection.h: separate assembly loading by pathname and by
17350 assembly name. Use the MONO_PATH env var to search for assemblies.
17352 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17354 * assembly.c, image.h: add some support for assemblies
17355 with multiple modules.
17356 * class.c, class.h: export mono_class_from_typeref().
17357 * loader.c: remove duplicated code and use mono_class_from_typeref(),
17360 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17362 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17363 documentation says (the ECMA one is correct).
17365 2002-05-02 Dick Porter <dick@ximian.com>
17367 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17368 Don't name the synchronisation mutex.
17370 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
17373 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17374 Make the prototypes match.
17375 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17379 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17380 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17381 all systems have tm.tm_zone, so use strftime() with %Z to print
17382 the timezone abreviation into a temp string.
17384 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17385 rather than mono_array_addr() on a MonoString on Big Endian
17388 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
17390 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17393 2002-04-30 Dick Porter <dick@ximian.com>
17395 * socket-io.c: Cope with SOCKET being an integer rather than a
17398 * threads.c: Added Thread_free_internal, to deal with thread
17399 handle cleanup. Moved calls to handle_store() and handle_remove()
17400 to start_wrapper(), so each can only be called once. Allocate
17401 synchronisation blocks with GC_malloc(), and use GC finalisation
17402 to close the handles.
17404 * icall.c: added System.Threading.Thread::Thread_free_internal
17406 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17408 * icall.c: support Environment.Exit, CommandLineArgs().
17410 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17412 * object.c, object.h: added mono_runtime_run_main () and
17413 mono_runtime_get_main_args () for use in System.Environment.
17415 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17417 * gc.c: fix thinko, enable actual finalization since the jit is now
17420 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17422 * gc.c, object.c: take into account that an object may be offset wrt the address
17423 returned by GC_malloc().
17425 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17427 * image.c: handle files without entries in the assembly table (modules).
17429 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17431 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
17432 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17433 allowed to be null when it's System.Object class setup.
17435 2002-04-27 Martin Baulig <martin@gnome.org>
17437 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17438 if `tb->parent == NULL' rather than crashing.
17440 2002-04-28 Nick Drochak <ndrochak@gol.com>
17442 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
17443 calling acos() where asin() should have been called.
17445 2002-04-26 Martin Baulig <martin@gnome.org>
17447 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17448 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17449 there's a subdirectory called `System', but we don't want to read that
17450 subdirectory as an assembly.
17452 2002-04-25 Martin Baulig <martin@gnome.org>
17454 * debug-symfile.c: Reflect latest MonoString changes.
17456 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17458 * rand.c, rand.h: instance method icalls need to have an explicit
17459 this pointer as first argument in the C implementation.
17461 2002-04-25 Nick Drochak <ndrochak@gol.com>
17463 * icall.c: Fix typo in map for GetNonZeroBytes
17465 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17467 * string-icalls.c : String does now passes unit tests without any
17468 errors, the following changes has been made:
17470 Implemented replace methods.
17471 Renaming of methods to (try) follow the standard.
17472 Fixed compare ordinal
17473 Made all memory allocated directly to function instead of via icall function.
17474 Small performance fix in is_in_array function
17476 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17478 c (mono_string_Internal_ctor_charp_int_int):
17479 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
17480 sindex < 0, throw ArgumentOutOfRangeException instead of
17481 ArgumentNullException.
17483 Added new check for length == 0, however
17484 I need to make it return String.Empty from the C code.
17486 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17487 that calculate the length for us here.
17489 (mono_string_Internal_ctor_sbytep_int_int): Replaced
17490 mono_string_new_utf16 with mono_string_new, since value is utf8.
17492 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17494 * object.c: register the object for finalization if needed.
17495 Allocate one more char in the string for the terminating 0 char.
17497 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17499 * class.c, class.h, image.c: check if a type implemenst a destructor.
17500 Use the proper key for array class lookups.
17501 * icall.c: register the icalls in the System.GC class.
17502 * gc.c, gc.h: GC-related functions and icalls.
17504 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17508 * unicode.c: free some strings gotten from mono_string_to_utf8 and
17509 changed a couple of free () by g_free ().
17511 * decimal.c: one-liner in the comments for decimal2string ().
17513 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17515 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17517 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17519 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17520 * object.c (mono_runtime_invoke_array) : handle null in params
17522 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17524 * string-icalls.c: fixed bug in split (one off bug)
17526 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17528 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17529 * icalls.c: added String::Equals as internal method
17531 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17533 * threads.c: fixed bug in the double interlocked functions
17535 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
17537 * threads.c: implemented all of the new interlocked icalls.
17538 * string-icalls.c: fix a bug in insert.
17539 * icalls.c: added the icalls for interlocked, removed old string functions.
17541 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17543 * loader.c: fix off-by-one error when reading argument names.
17545 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17547 * profiler.c: win32 counter implementation (untested).
17548 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17549 (the latter needs testing and more complete impl. from win32 folks).
17551 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
17553 * object.c: mono_array_new_full workaround mono_array_class_get
17556 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17558 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17559 * object.h (mono_string_chars): Changed casting type.
17561 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17563 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17564 method signatures to use gunichar2 instead of gint16.
17566 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
17568 * object.h, object.c: domain-specific versions of mono_object_new and
17571 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
17573 * object.c: changed String layout
17575 * string-icalls.c (mono_string_Internal_ctor_chara): added
17576 internal string constructors.
17578 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17580 * threads.c: pass 'this' to the thread start routine.
17582 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17584 * string-icalls.c: fix IndexOf and LastIndexOf. Now
17585 InternalCompareStr don't call twice mono_string_cmp_char for the last
17586 character. Improved performance in mono_string_cmp_char.
17588 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17590 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17591 code into its own library: libmonoruntime.
17593 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
17595 * object.h, object.c: changed array format so that szarrays do not
17596 require a bounds structure.
17597 * icall.c, appdomain.c: support for new szarray format.
17599 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17601 * metadata.c: compare also the retuns type when comparing signatures:
17602 we didn't do this as an optimization since really overloaded methods
17603 must differ also in the arguments, but this doesn't work with
17604 low-level IL code (or when using explicit conversion operators: see
17605 bug#23498 for an example).
17607 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17609 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17611 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17613 * icall.c: make MonoType::GetElementType its own icall.
17615 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17617 * icall.c: remove MonoMethod_get_Name().
17618 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17621 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17623 * string-icalls.c: optimized a few methods.
17625 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17627 * icall.c: added all new string internal calls
17628 * string-icalls.c: added, new string internal call implementation.
17629 * object.c: added mono_string_new_size for allocating a string a size
17631 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
17633 * object.c (mono_object_isinst): use the same code as in the
17634 optimized x86 version.
17636 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17638 * profiler.c: TSC-based timer code (faster and more accurate).
17639 Not hooked up in configure, yet (set USE_X86TSC to 1).
17641 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17643 * profiler.c, profiler.h: track time spent compiling methods.
17644 * threads.c: track thread creation/destruction.
17646 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17648 * profiler.c, profiler.h, profiler-private.h: profiling interface
17649 and sample implementation. Moved here so that it can be used also by
17652 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17654 * reflection.c, reflection.h: keep types and other handles separate in
17655 the hash tables for referred tokens. Add guid for modules.
17657 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17659 * assembly.c: fix bugs found with valgrind.
17660 * metadata.h, metadata.c: added mono_metadata_guid_heap().
17662 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
17664 * threads: added icall support for getting current domain for
17667 2002-04-13 Martin Baulig <martin@gnome.org>
17669 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17670 (MonoDebugVarInfo): Added `index' field for register based addresses.
17671 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17672 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17673 `MonoDebugVarInfo *params' and `guint32 this_offset' with
17674 `MonoDebugVarInfo *this_var'.
17676 * debug-symfile.c (relocate_variable): New static function to write
17677 a location description for a local variable or method parameter.
17679 2002-04-12 Martin Baulig <martin@gnome.org>
17681 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17682 stack offset and begin/end scope address of a local variable.
17683 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17684 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17685 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17687 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17688 Added new relocation types for start/end scope of a local variable.
17690 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17692 * object.h: add mono_object_domain() macro.
17693 * reflection.c: handle typespecs.
17694 * icall.c: MonoMethod::get_Name() implementation.
17696 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17698 * icall.c: String::GetHashCode() icall implementation.
17700 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17702 * icall.c: String::IndexOfAny icall.
17703 * object.c, object.h: make array->max_length more useful.
17704 Intrduced mono_object_class() and mono_string_length() macros.
17706 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17708 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17709 instead of g_unichar_isdigit.
17711 2002-04-11 Nick Drochak <ndrochak@gol.com>
17713 * icall.c: Implement a simple Double.ToString().
17715 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17717 * appdomain.h: only io-layer.h is supposed to be included.
17718 * icall.c: explicitly import environ. Fix warning.
17720 2002-04-10 Nick Drochak <ndrochak@gol.com>
17722 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17723 return true even if it's not Daylight Savings time.
17724 Only return false for the case where the function isn't
17725 implemented for a plaform (read Windows).
17727 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17729 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17732 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
17734 * mempool.c (mono_mempool_alloc): only use g_malloc when
17735 absolutely necessary.
17737 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17739 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17741 * class.c (mono_class_vtable): use domain mempool to allocate vtable
17742 (mono_class_proxy_vtable): use domain mempool
17744 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17746 * appdomain.h, appdomain.c: split initialization that requires the
17747 execution engine support into mono_runtime_init().
17749 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17751 * class.c (mono_class_init): don't include vtable inside MonoClass
17752 to save some memory, gather some statistics.
17753 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17755 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17757 * icall.c: internalcall implementation for ValueType.Equals().
17759 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
17761 * object.c (mono_message_init): moved
17762 (mono_runtime_exec_main): new arch. independent impl.
17763 (mono_runtime_invoke_array): new method - like
17764 mono_runtime_invoke, but you can pass an array of objects.
17765 (mono_remoting_invoke): new arch. independent impl.
17766 (mono_message_invoke): new arch. independent impl.
17767 (mono_runtime_class_init): new arch. independent impl.
17768 (mono_runtime_object_init): new arch. independent impl.
17770 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17772 * metadata.c, object.c, reflection.c: documented the exported
17775 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17777 * icall.c: simpler code to pass the assembly builder data to corlib.
17778 Implement GetNestedTypes() internalcall.
17780 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17782 * class.c: warn if a type can't be loaded.
17784 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
17786 * image.h: typedef MonoImageOpenStatus
17787 * types.h: removed unused file
17789 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
17791 * icall.c: Enum_ToObject accepts enum value arguments.
17793 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17795 * class.c: move initialization of properties, events and nested
17796 classes, so that they happen for interfaces, too.
17798 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17800 * icall.c: cleanup some ugly casts in Array_SetValue*.
17802 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17804 * icall.c: the values array fro enums is of the correct type, now.
17805 Implement (correctly) getFullName instead of assQualifiedName for
17807 * reflection.h, reflection.c: added mono_type_get_name ().
17809 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17811 * assembly.c, image.h: for each MonoImage, record from wich assembly
17813 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17814 Make Type.Assembly work.
17816 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
17818 * debug-symfile.h: use char* instead of gpointer to avoid
17821 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17823 * icall.c (ves_icall_InternalExecute): impl. FielSetter
17824 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17826 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
17828 * icall.c (mono_message_init): impl. (code cleanup)
17829 (ves_icall_InternalExecute): impl. FieldGetter
17831 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17832 defined we call all (non-static)methods through the vtable.
17834 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17836 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17837 finalizer even though the memory is still referenced (and the chunk of
17838 memory is not freed).
17840 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17842 * assembly.c: fix brokeness.
17844 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17846 * class.c: kill some warnings. Check explicit interface method
17847 implementation also without considering the namespace.
17848 Load also literal strings in static class data.
17850 2002-03-29 Miguel de Icaza <miguel@ximian.com>
17852 * assembly.c (default_assembly_name_resolver): Kill memory leak.
17853 (default_assembly_name_resolver): Make the resolver take the
17854 "base" directory where the assembly was originally defined, so we
17855 can load DLLs that are in the same directory as the assembly that
17856 is being referenced.
17858 2002-03-28 Dick Porter <dick@ximian.com>
17864 * unicode.c: Warning cleanups
17866 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17868 * object.h, reflection.h: use the correct type instead of MonoObject.
17870 2002-03-28 Martin Baulig <martin@gnome.org>
17872 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17873 (mono_debug_update_symbol_file): Initialize classes if necessary.
17875 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17877 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17878 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17880 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17882 * assembly.h: fix function prototype.
17883 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17884 * mono-endian.h: use const cast.
17886 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17888 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17890 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17892 * loader.c: don't assert when a typeref can't be loaded, give
17893 a chance to the runtime to trow an exception instead.
17894 * loader.h: fix warning.
17896 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17898 * class.c (mono_class_proxy_vtable): added proxy support
17900 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
17902 * icall.c: removed last of PAL calls, added System.Environment
17903 * file-io.h, file-io.c: MonoIO implementation
17904 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17906 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17908 * appdomain.c: do not use the byte marker in ldstr table lookup.
17909 * debug-helpers.c: allow two ':' to separate class and method name.
17910 * object.c: allocate arrays bounds with the GC, too.
17911 * verify: add a few more checks.
17913 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17915 * reflection.c: output also literal strings. Allocate parameter data
17916 with GC_malloc() (thanks, Martin, for catching this!).
17918 2002-03-26 Martin Baulig <martin@gnome.org>
17920 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17921 include the `this' offset in the `param_offsets'.
17923 2002-03-25 Martin Baulig <martin@gnome.org>
17925 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17926 mono_debug_get_class() function to get the classes. Added new
17927 relocation types for arrays and strings.
17928 (mono_debug_get_class): New static function to search in all
17929 referenced assemblies for a metadata token.
17931 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17933 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17935 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17936 hold gc-allocated objects. Make the string heap a stream like the
17937 others. Removed duplicated code when writing stream info.
17938 Added asserts to catch possible buffer overflows. Set the sorted map
17939 for tables that need sorting. Added some documentation.
17941 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17943 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
17944 for interned strings and vtables.
17946 2002-03-24 Martin Baulig <martin@gnome.org>
17948 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17949 it in the array since it was created with g_slist_prepend().
17951 2002-03-24 Martin Baulig <martin@gnome.org>
17953 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17954 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17955 (mono_debug_method_from_token): Renamed to
17956 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17957 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17959 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17962 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17964 2002-03-24 Martin Baulig <martin@gnome.org>
17966 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17967 (mono_debug_method_from_token): New func.
17969 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17970 New interncall, calls mono_debug_local_type_from_signature().
17971 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17972 calls mono_debug_method_from_token().
17974 2002-03-23 Martin Baulig <martin@gnome.org>
17976 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17977 specifies the number of bytes to be converted, not the array size.
17978 Return the number of chars, not the number of bytes.
17979 (ves_icall_iconv_get_chars): The `byteCount' argument
17980 specifies the number of bytes to be converted, not the array size.
17982 2002-03-23 Martin Baulig <martin@gnome.org>
17984 * reflection.h (MonoReflectionSigHelper): New type.
17986 * reflection.c (mono_reflection_sighelper_get_signature_local),
17987 (mono_reflection_sighelper_get_signature_local): New functions.
17989 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17990 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17993 2002-03-23 Martin Baulig <martin@gnome.org>
17995 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17996 is_writeable is set.
17997 (mono_raw_buffer_update): New function to write the modified map
18000 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18002 * debug-symfile.c (mono_debug_update_symbol_file): Call
18003 mono_raw_buffer_update() when done writing.
18005 2002-03-23 Martin Baulig <martin@gnome.org>
18007 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18009 * debug-symfile.c: Added support for arguments and local variables.
18011 2002-03-23 Dick Porter <dick@ximian.com>
18013 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18014 protected by ifdefs, hence breaking the w32 build.
18016 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18018 * object.c: implement is_interned() the right way.
18020 2002-03-21 Martin Baulig <martin@gnome.org>
18022 * debug-symfile.[ch]: New files to handle debugging information
18023 files. There's also support to dynamically update these symbol
18024 files to include machine dependent information.
18026 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
18028 * threads.c (mono_thread_create): new function to create thread
18031 2002-03-20 Martin Baulig <martin@gnome.org>
18033 * icall.c (ves_icall_InternalInvoke): Create a new object if the
18034 method is a constructor.
18035 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18036 points to ves_icall_InternalInvoke().
18038 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
18040 * file-io.c: Flush shouldn't throw exceptions.
18042 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
18044 * file-io.c: FileStream flush support; FileSetLength now
18045 restores file pointer.
18047 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18049 * class.c: set image for pointer classes.
18051 2002/03/19 Nick Drochak <ndrochak@gol.com>
18053 * sysmath.c: Forgot one.
18055 2002-03-18 Miguel de Icaza <miguel@ximian.com>
18057 * sysmath.c: Avoid redefining existing names.
18059 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
18061 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18062 handled by runtime as icall rather than dllimport from libm.so
18063 * file-io.c, file-io.h: fixed handle argument type.
18065 2002-03-18 Dick Porter <dick@ximian.com>
18067 * reflection.c (mono_image_get_type_info): rename interface to
18068 iface, because of "#define interface struct" on windows.
18070 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18072 * class.c, class.h: rename and export mono_ptr_class_get().
18073 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18074 * reflection.c, reflection.h, icall.c: better/saner type name
18075 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18078 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
18080 * class.c (mono_class_init): removed hardcoded GHC_SLOT
18082 * icall.c (ves_icall_InternalInvoke): impl.
18084 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18086 * reflection.c: output the interface map table, too.
18088 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18090 * class.c (class_compute_field_layout): separate computation of
18091 static field layout
18093 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
18095 * icall.c: added System.Buffer support.
18096 * file-io.c: moved file icalls from PAL to FileStream.
18098 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18100 * icall.c (ves_icall_System_Object_GetHashCode): impl.
18102 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
18104 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18106 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18108 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18110 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18112 * debug-helpers.{c,h}: moved here from monograph some useful functions
18113 to locate a method by name/signature in a class or image. Included
18114 also a small and flexible IL disassembler.
18116 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18118 * reflection.c: fixup tokens in methods with small header size, too.
18120 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
18122 * object.c (mono_string_to_utf8): remove assert(!error), instead
18125 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18127 * icall.c: update to the new mono_Array_class_get interface.
18129 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18131 * appdomain.c, object.c: Boehm-GC enable.
18132 * icall.c: make get_data_chunk() support split data requests.
18133 Ensure a class is initialized in more cases. Return only the first
18134 property found in GetProperties() or the compiler gets confused.
18135 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18136 * reflection.h, reflection.c: add fixup mechanism for field and method
18137 tokens. Initialize assembly->typeref in a single place. Output
18138 properties after events. Support custom attributes for events, too.
18139 Typo fix for paramter custom attrs.
18141 2002-03-07 Martin Baulig <martin@gnome.org>
18143 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18145 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
18147 * class.c (mono_array_class_get): fix. for multi. dim. arrays
18149 2002-03-06 Martin Baulig <martin@gnome.org>
18151 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18152 non-zero lower bounds. See testcases #F10-#F13.
18154 2002-03-05 Martin Baulig <martin@gnome.org>
18156 * exception.c (mono_get_exception_argument_out_of_range): New exception.
18158 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18159 ves_icall_System_Array_GetValue(), only calculate the absolute array position
18161 (ves_icall_System_Array_SetValue): Likewise.
18162 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18163 as argument and does the actual work. This function is used when copying a
18164 multi-dimensional array.
18165 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18166 now do all the widening conversions of value types.
18167 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18169 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18171 * class.c: remove some magic numbers and use the smbolic names,
18172 instead. Added init_events() to load event info at class init time.
18173 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18174 and mono_metadata_methods_from_event().
18175 * reflection.h, reflection.c: added support for writing out the evnets
18176 related information.
18178 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18180 * reflection.h, icall.c: use a different method (GetInterfaces)
18181 to gather interface info and add isbyref, isprimitive and
18182 ispointer to the ves_icall_get_type_info() return value.
18184 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18186 * class.h: stared adding support for events.
18187 * icall.c: split find_members implementation. Added debug icall to get
18188 the address of an object.
18189 * reflection.c: handle TypeBuilders in mono_type_get_object().
18191 2002-03-01 Martin Baulig <martin@gnome.org>
18193 * icall.c (ves_icall_System_Array_GetLength): This must throw an
18194 ArgumentOutOfRangeException(), not an ArgumentException().
18195 (ves_icall_System_Array_GetLowerBound): Likewise.
18196 (ves_icall_System_Array_GetValue): Improved argument checking.
18197 (ves_icall_System_Array_SetValue): Improved argument checking.
18199 2002-03-01 Martin Baulig <martin@gnome.org>
18201 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18202 called with invalid arguments rather than just dying with g_assert().
18203 (ves_icall_System_Array_SetValue): Likewise.
18204 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18205 raise a NotImplementedException instead.
18206 (ves_icall_System_Array_GetLength): Added argument checking.
18207 (ves_icall_System_Array_GetLowerBound): Added argument checking.
18209 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
18211 * object.h (mono_assert): new macros mono_assert and
18212 mono_assert_not_reached
18214 2002-02-28 Martin Baulig <martin@gnome.org>
18216 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18217 and "System::String::IsInterned" to "System::String::_IsInterned".
18219 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18221 * icall.c: remove hacks for typebuilder. Added icall to create a
18222 modified type from a tybebuilder.
18223 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18224 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18225 to create a backing MonoClass for a TypeBuilder.
18227 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18229 * class.c, class.h: more refactoring of class init.
18230 Export mono_class_setup_mono_type() and mono_class_setup_parent().
18232 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18234 * marshal.c, marshal.h: start of marshaling interface.
18236 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18238 * icall.c: fix order in assembly qualified name icall.
18240 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18242 * class.c: do not free str, since we store it in the hash table.
18243 * reflection.h: add label field to MonoILExceptionInfo.
18244 * reflection.c: handle references to more than one assembly. Handle
18245 case when there isn't a module created in the assembly.
18247 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18249 * class.c: Fix typo. Start refactoring of class init code.
18251 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18253 * appdomain.c: exit with 1 on error.
18254 * class.c: we already have the name in MonoClassField.
18255 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18256 MonoStreamHeader instead of an offset of image->raw_metadata.
18258 2002-02-26 Miguel de Icaza <miguel@ximian.com>
18260 * appdomain.c (mono_init): Be even more descriptive about the error.
18262 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18264 * appdomain.c: give the user an informative message when corlib can't
18267 2002-02-26 Martin Baulig <martin@gnome.org>
18269 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18270 New icall to get the time zone data.
18272 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18274 * reflection.c: set virtual and raw size of section correctly.
18275 * threads.c: transfer domain information to newly created threads.
18277 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18279 * class.c: when instancing a class in a domain, load the default
18280 vaules for static fields from the constant table. Fix System.Enum to
18282 * icall.c: implement Object::GetType() internalcall. Implemented
18283 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18284 Fixed checking of binding flags in find_members().
18285 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18286 * reflection.c: handle enumerations when writing to the constant
18287 table. Use a different object cache for types.
18290 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
18292 * object.c (mono_object_isinst): fix for arrays
18294 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18296 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18298 * object.c: don't use mprotect () and fix intern pool hash table
18299 lookup for big endian systems.
18301 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18303 * icall.c: change type_is_subtype_of () signature.
18305 2002-02-21 Mark Crichton <crichton@gimp.org>
18307 * rand.c, rand.h: Added random number generator for
18308 System.Security.Cryptography classes.
18310 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18312 * icall.c: Added System.Security.Cryptography calls.
18314 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18316 * class.c, icall.c, metadata.c: better support for pointer types.
18317 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18318 * reflection.c: Add support for getting custom attrs for properties
18319 and simplify some code.
18321 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18323 * icall.c: change getToken () and add custom attribute GetBlob()helper
18325 * reflection.h: add custom attrs array to the reflection builder structures.
18326 * reflection.c: encode and emit custom attributes for all the relevant
18327 reflection objects. Cache fieldref and methodref tokens. Change
18328 mono_image_create_token() interface to take a MonoDynamicAssembly.
18329 More complete custom attributes decoder. Load custom attributes for
18330 Assembly, Field, Method and Constructor objects, too. Make the
18331 returned array an Attribute[] one, not object[]. Added
18332 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18333 custom attribute constructor.
18335 2002-02-20 Dick Porter <dick@ximian.com>
18339 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18340 problem code out for now).
18342 2002-02-19 Radek Doulik <rodo@ximian.com>
18344 * object.c (mono_ldstr): use hash table to avoid multiple swapping
18346 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18348 * icall.c: register the GetCustomAttributes method.
18349 * object.c, object.h: add mono_string_new_len ().
18350 * reflection.h, reflection.c: added mono_runtime_invoke(),
18351 mono_install_runtime_invoke(). Added
18352 mono_reflection_get_custom_attrs () to load custom attributes and
18353 create the attribute objects.
18355 2002-02-19 Dick Porter <dick@ximian.com>
18356 * threads-dummy-types.c:
18357 * threads-dummy-types.h:
18360 * threads-pthread-types.c:
18361 * threads-pthread-types.h:
18362 * threads-pthread.c:
18363 * threads-pthread.h: Deleted obsolete files
18365 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
18367 * class.c (mono_class_vtable): runtime init the class when we
18368 allocate static class data.
18370 * icall.c (ves_icall_System_Array_SetValue): check for null values.
18372 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18373 and String - but we will need generic marshalling support in the
18375 (mono_init): set the domain name in a ms compatible way
18377 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18380 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
18382 * object.c (mono_array_clone): use alloca() instead of g_malloc
18385 * appdomain.c (mono_domain_unload): impl.
18387 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18389 * appdomain.c, object.c: fix intern pool implementation.
18390 * class.c: fix alignment code.
18392 2002-02-16 Radek Doulik <rodo@ximian.com>
18394 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18395 and s2 > s1, just copy lower bytes to be compatible with little
18396 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18397 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18399 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18400 force big_endian to be 1 for big endian machines
18401 (ves_icall_iconv_new_decoder): ditto
18403 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
18405 * socket-io.c (convert_sockopt_level_and_name): If the system
18406 doesn't define SOL_IP or SOL_TCP, get them by hand using
18407 getprotobyname() and caching the values (because this could be a
18409 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18410 Use the appropriate struct when the system does support it. Ie,
18411 not all systems have struct ip_mreqn so use struct ip_mreq when
18414 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18416 * reflection.c: handle finally clauses.
18418 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18420 * socket-io.c: use g_snprintf() instead of snprintf.
18422 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18424 * reflection.c (mono_param_get_objects): Cast second argument to
18425 mono_method_get_param_names to a const char** to silence the
18428 * appdomain.c (mono_domain_assembly_open): Put parens around the
18429 truth statement in the for-loop.
18431 * unicode.c (iconv_convert): Got rid of a compiler warning about
18432 int i being unused when the system has a new iconv.
18433 (iconv_get_length): Same.
18435 * image.c (load_class_names): Cast the second argument to
18436 g_hash_table_insert() to char* to hush compiler warnings about the
18438 (mono_image_open): Same here.
18440 * socket-io.c: Don't conditionally include sys/filio.h or
18441 sys/sockio.h here anymore since we now get them from
18442 io-layer/io-layer.h
18443 (inet_pton): If the system doesn't support inet_aton, implement
18444 using inet_addr and also #define INADDR_NONE if it isn't defined
18447 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18449 * metadata.c, metadata.h: added function to get packing and size info
18451 * reflection.h, reflection.c: handle field RVA data. Save info about
18452 the table layout if needed. Assign typedef indexes to all the types
18453 before dumping the info about them to avoid forward reference problems.
18455 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
18457 * socket-io.c (convert_sockopt_level_and_name): ifdef
18458 SO_ACCEPTCONN because it is not defined on my system (old debian)
18460 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18462 * opcode.c: use stddef.h to get NULL.
18464 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18466 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18467 for FIONBIO, FIONREAD and SIOCATMARK.
18468 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18469 define INADDR_NONE and besides, inet_addr() is deprecated and
18470 should not be used. Use inet_pton() instead - it also has the
18471 added bonus that it can easily handle IPv6 addresses as well.
18472 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18474 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18476 * decimal.c: remove _MSC_VER conditional.
18478 2002-02-13 Dick Porter <dick@ximian.com>
18481 * icall.c: Internal calls for Blocking, Select, Shutdown,
18482 GetSocketOption and SetSocketOption
18484 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18486 * assembly.cs: better resolver: use it instead of some kludgy
18489 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18491 * reflection.c: the best way to speed-up the compiler is to avoid
18494 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
18496 * class.c (mono_class_vtable): changed the object layout
18497 (obj->vtable->class).
18498 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18500 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18502 * assembly.c: look for assemblies in the assembly dir, too.
18504 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18506 * class.c: fix thinko in mono_class_from_type().
18508 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18510 * exception.h, exception.c: added TypeLoadException.
18511 * object.h, object.c: added mono_array_clone ().
18512 * icall.c: handle throwOnError in AssemblyGetType().
18513 Added Array.Clone().
18514 * opcode.h, opcode.c: use a single value for the opcode val.
18515 Compile fix for non-gcc compilers.
18517 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18519 * opcodes.c, opcodes.h: export interesting info about opcodes.
18521 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
18523 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18526 * class.c (class_compute_field_layout): set element_class for enums
18527 (mono_class_create_from_typedef): set element_class for normal classes
18529 * icall.c (ves_icall_System_Enum_get_value): impl.
18531 * class.c (mono_class_create_from_typedef): do not set valuetype
18532 flag for System.ValueType and System.Enum
18534 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
18536 * unicode.c (iconv_convert): fix big endian problem.
18538 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18540 * class.c: add asserts if we are ever going to scribble over memory.
18541 * socket-io.c: not all systems have AF_IRDA defined.
18543 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
18545 * class.c (class_compute_field_layout): do not consider static
18546 fields to compute alignment
18548 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
18550 * appdomain.c (mono_appdomain_get): impl.
18551 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18553 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18555 * icall.c: ignore "file://" prefix when loading an assembly.
18557 2002-01-23 Dick Porter <dick@ximian.com>
18561 * Makefile.am: Added socket support
18563 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18565 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18566 code back. This should return the assemblies that are loaded by
18567 the runtime on behalf of an application domain.
18569 The current implementation is still broken, it just returns every
18570 assembly loaded, but until we get real applications domain this
18573 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
18575 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18578 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18580 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18581 the mono_class_from_name lookup.
18582 (ves_icall_get_parameter_info): ditto.
18583 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18585 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18587 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18589 * class.c: load also nested classes on class init.
18590 System.ValueType instance methods gets passed boxed
18591 values, unless methods in derived classed that get a pointer to the
18593 * icall.c: use better name parsing code in GetType().
18594 * image.c, image.h: add mono_image_loaded ().
18595 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18596 * reflection.c, reflection.h: added mono_reflection_parse_type().
18598 2002-01-22 Veronica De Santis <veron78@interfree.it>
18600 * icall.c : Added mapping of internal calls for Manual and Auto reset events
18601 * threads.c : Added the implementation of internal calls for events
18602 * threads.h : Added prototypes of internal calls for events
18604 2002-01-21 Radek Doulik <rodo@ximian.com>
18606 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18608 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
18610 * class.c (mono_class_init): set min_align to 1 (instead of 0)
18611 (mono_class_value_size): use min_align
18613 2002-01-20 Dick Porter <dick@ximian.com>
18616 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18617 so it compiles on w32.
18619 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
18621 * metadata.c (mono_type_stack_size): impl.
18623 * class.c (mono_class_get_field): impl. memberref token
18625 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18627 * icall.h : Added the internal calls mapping for CreateMutex_internal
18628 and ReleaseMutex_internal.
18629 * threads.h : Added the prototype of mutexes internal calls.
18630 * threads.c : Added the implementations of mutexes internal calls.
18632 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18634 * metaparse.h: removed unused file.
18635 * reflection.c, reflection.h: added stream_data_align () function
18636 to align data in streams and keep stream aligned. Add support for
18637 exception support in method headers.
18639 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18641 * unicode.c: make iconv_convert () return the number of bytess written
18642 in the output buffer.
18644 2002-01-15 Dick Porter <dick@ximian.com>
18645 * threads.c: Make the runtime's idea of infinite timeouts coincide
18646 with the class library's
18648 Fix a particularly egregious bug in mono_thread_cleanup(). That
18649 code was so utterly bogus it must have been written on a Monday.
18651 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18653 * reflection.h: add subtypes field to TypeBuilder.
18654 * reflection.c: encode constants for literal fields.
18655 Handle subtypes. Fix user string token (and add a zero byte)
18658 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
18660 * class.c (mono_class_init): bug fix: assign slot numbers for
18663 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18665 * reflection.c: don't try to output a code RVA for abstract methods.
18666 Small fixes for method header format. Output parameter info to the
18667 ParamDef table. Save method overriding info to MethodImpl table.
18668 Fix property support. Allow typedef.extends to be a type in the
18670 * verify.c: fix off-by-one error.
18672 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18674 * class.c: fix mono_class_from_mono_type () for szarray types.
18675 Remove unused cache check in mono_class_from_type_spec().
18676 * icall.c: *type_from_name () functions handle simple arrays and byref.
18677 * reflection.c: handle byref and szarray types. Handle methods without
18678 body (gets P/Invoke compilation working). Handle types and fields in
18680 * reflection.h: add rank to MonoTypeInfo.
18682 2002-01-10 Dick Porter <dick@ximian.com>
18684 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18687 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18689 * icall.c: initialize class in type_from_handle ().
18690 Loop also in parent classes for get_method ().
18691 * reflection.c: properly encode class and valuetype types.
18692 Start on encoding TypeBuilder types. Handle fieldrefs.
18693 Use correct length when registering a user string.
18694 Handle ConstructorBuilder and MonoMethod in get_token ().
18695 Make mono_type_get_object () aware of cached types.
18696 * object.c: back out change to mono_string_new ().
18698 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18699 * object.c: mono_string_new should return a NULL when the string
18700 passed in is NULL -- not try to deference it.
18702 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18704 * icall.c: hack to make IsSubType work for TypeBuilders.
18705 * reflection.c: emit constructors before methods.
18706 Retrieve param names in mono_param_get_objects().
18708 2002/01/05 Nick Drochak <ndrochak@gol.com>
18710 * Makefile.am: fix list of headers and sources so automake 1.5
18711 doesn't complain. Removed \# at end of list.
18713 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18715 * reflection.c: get token for a method ref. Set return type of
18716 constructor to void.
18717 * loader.c: debug message.
18718 * class.c: typo fix.
18720 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18722 * icall.c: fix array init with rank > 1. FindMembers
18723 loops in parent class as well.
18724 * image.c: do not insert nested types in name cache.
18725 * reflection.c: warning fix.
18726 * reflection.h: add override method (for interface impl).
18728 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18730 * metadata.c: fix customattr decoding.
18732 2001-12-21 Miguel de Icaza <miguel@ximian.com>
18734 * rawbuffer.cs: Added native Win32 implementation, avoids using
18735 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18737 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18739 * class.c: make the low-level routines handle the cache.
18741 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18743 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18745 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18747 * class.c: fix mono_array_element_size() for objects.
18748 * class.h, class.c: add properties to MonoClass and load them
18750 * icall.c: check with isinst() when assigning a value to an array
18751 instead of requiring the classes to match exactly.
18752 Implemented icall for System.Type::GetType().
18753 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18754 enums. Handle bindingflags when looking for methods and fields.
18755 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18756 and mono_metadata_methods_from_property().
18757 * reflection.h, reflection.c: added structures for propreties,
18758 parameters and enums. Implemented mono_property_get_object() and
18759 mono_param_get_objects().
18761 2001-12-18 Dick Porter <dick@ximian.com>
18763 * file-io.c: Use mono_string_to_utf16() instead of
18764 mono_string_chars()
18766 * object.c: Added mono_string_to_utf16(), which copies the non
18767 NULL-terminated MonoString into a new double-null-terminated
18770 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
18772 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18774 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
18776 * file-io.c: raise exceptions if handle is invalid.
18778 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18780 * assembly.c: yet another check for mscorlib.
18781 * class.c, class.h: load nesting info for classes.
18782 * icall.c: many new functions to support the Reflection classes.
18783 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18784 * reflection.h, reflection.c: mono_image_create_token(),
18785 mono_assembly_get_object(), mono_type_get_object(),
18786 mono_method_get_object(), mono_field_get_object(): methods to return
18787 objects that parallel the C representation of assemblies, types,
18790 2001-12-11 Dick Porter <dick@ximian.com>
18793 * file-io.c: Internal calls for file IO.
18795 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18797 * tabledefs.h: missing FileAttributes.
18798 * verify.h, verify.c: use is_valid_string () to simplify and check for
18799 valid strings more correctly. Fix warnings and speeling.
18800 Check more tables: Filed, File, ModuleRef, StandAloneSig.
18801 Check code: branches, maxstack, method calls.
18803 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
18805 * object.c (mono_object_allocate): removed static, so that the jit
18806 can allocate value types.
18808 * icall.c (ves_icall_System_DateTime_GetNow): impl.
18810 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18812 * class.c: init enum types right away and register the
18813 token->MonoClass map in mono_class_create_from_typedef ().
18814 * verify.h, verify.c: first cut of the verifier.
18815 * pedump.c: add --verify switch to verify metadata tables.
18816 * tabledefs.h: add some missing enums.
18818 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
18820 * class.c (mono_install_runtime_class_init): impl.
18821 (mono_class_init): renamed mono_class_metadata_init to
18822 mono_class_init, also removed the metadata_inited flag
18824 * object.c (mono_object_isinst): use faster algorithm
18826 2001-11-30 Radek Doulik <rodo@ximian.com>
18828 * mono-endian.h: reverted last change
18829 added function prototypes
18831 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18832 add mono-endian.c back
18834 * mono-endian.c: returned back, as Paolo pointed out, it's needed
18835 for unaligned access, I've mistaked it with endianess. I am
18837 (mono_read16): fix reverted endianess
18838 (mono_read64): ditto
18839 (mono_read32): ditto
18841 2001-11-30 Dick Porter <dick@ximian.com>
18843 * exception.c: Implement mono_exception_from_name()
18845 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18847 * metadata.h, metadata.c: remove params_size and locals_size and their
18848 calculation from the metadata code: they are only usefult to the
18851 2001-11-29 Radek Doulik <rodo@ximian.com>
18853 * object.c (mono_ldstr): swap bytes here, it's probably not the
18854 best place, but works for me now, I'll redo it once I know mono
18855 better, also note that I add PROT_WRITE and don't reset back, also
18856 note that it's only affects big endians, so x86 should be OK
18858 * mono-endian.h (read16): use just glib macros for both endians
18860 * mono-endian.c: removed as glib macros are used in in
18861 mono-endian.h so we don't need to care about endianess for read
18862 macros as glib does that for us already
18864 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18866 * class.h, class.h: take minimum alignment into consideration so
18867 that the fields of a class remain aligned also when in an array.
18869 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18871 * loader.h, loader.c: add mono_method_get_param_names().
18872 * class.c: 0-init class fields.
18874 2001-11-26 Dick Porter <dick@ximian.com>
18878 * threads.c: New file that handles System.Threading on all platforms
18881 * object.h: Remove the synchronisation struct from MonoObject,
18882 replace it with a pointer that gets initialised on demand
18884 * Makefile.am: Replace all the system-specific threading code with
18885 a single file that uses the new wrapper library
18887 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18889 * class.c, class.h: add mono_install_trampoline() so that the runtime
18890 can register a function to create a trampoline: removes the ugly
18891 requirement that a runtime needed to export arch_create_jit_trampoline.
18892 * object.h, object.c: added mono_install_handler() so that the runtime
18893 can install an handler for exceptions generated in C code (with
18894 mono_raise_exception()). Added C struct for System.Delegate.
18895 * pedump.c: removed arch_create_jit_trampoline.
18896 * reflection.c: some cleanups to allow registering user strings and
18897 later getting a token for methodrefs and fieldrefs before the assembly
18899 * row-indexes.h: updates and fixes from the new ECMA specs.
18901 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18903 * class.h, class.c: add enum_basetype field to MonoClass.
18904 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18905 to get index in the constant table reated to a field, param or
18907 * reflection.h, reflection.c: handle constructors. Set public-key and
18908 version number of the built assembly to 0.
18909 * row-indexes.h: update from new ECMA spec.
18911 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18913 * class.h, class.c: add a max_interface_id to MonoClass.
18914 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18915 since it's used to do that. Added mono_type_type_from_obj().
18916 Make GetType() return NULL instead of segfaulting if the type was not
18917 found. Handle simple arrays in assQualifiedName.
18918 * object.h: add a struct to represent an Exception.
18919 * reflection.c: output call convention in method signature.
18920 Add code to support P/Invoke methods and fixed offsets for fields.
18922 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18924 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18926 * icall.c: use mono_array_addr instead of array->vector: fixes the
18927 reflection image writing.
18928 * reflection.c: init call convention byte to 0 in method signature.
18929 Encode the property signature. Don't output property-related methods
18930 twice. Really process the properties for a type (don't cast a field to
18931 a property, my mom always told me that).
18932 Fix 64 bit issues in pointer alignment in a different and more
18935 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
18937 * loader.h: Removed type class from MonoDefaults, added monotype
18939 * loader.c: Loaded MonoType, removed loading of Type
18941 * icall.c (my_mono_new_object): Now returns a System.MonoType,
18942 and fills in System.Type._impl with a RuntimeTypeHandle rather
18943 than the actual MonoClass *
18945 (ves_icall_type_from_handle): change from type_class to
18948 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18951 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18954 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18956 (ves_icall_System_Reflection_Assembly_GetType): implemented
18958 (ves_icall_System_MonoType_assQualifiedName): implemented
18960 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18962 2001-11-09 Miguel de Icaza <miguel@ximian.com>
18964 * assembly.c (mono_assembly_open): Implement a cache for the
18967 (mono_assembly_close): only destroy the assembly when the last
18970 2001-11-09 Dick Porter <dick@ximian.com>
18972 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18974 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
18976 * class.c (mono_class_metadata_init): bug fix: compute the right slot
18978 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18980 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18981 from Martin Weindel.
18982 * object.h: add mono_string_chars ().
18984 2001-11-07 Miguel de Icaza <miguel@ximian.com>
18986 * reflection.c (build_compressed_metadata): Eliminates warnings
18987 and uses 64-bit clean code.
18989 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18990 (mono_type_equal): Change signature to eliminate warnings.
18992 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18994 * icall.c, loader.c: remove the internalcall array constructors.
18995 Changes to match the new MonoArray structure.
18996 * object.h, object.c: an array object doesn't allocate an extra
18997 vector. Add mono_array_new_full () to create jagged arrays easily.
18999 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19001 * metadata.h, metadata.c: add mono_metadata_field_info () to
19002 retreive all the info about a field from vairous tables.
19003 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19004 * class.h, class.c: augment MonoClassField with more info.
19005 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19006 policy and load a field's RVA if needed.
19008 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
19010 * class.c (mono_class_metadata_init): create a trampoline for all
19011 virtual functions instead of actually compiling them.
19013 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19015 * class.h, class.c: include name in MonoClassField.
19016 * class.c: fix fundamental type of System.Object and System.String.
19017 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19019 * icall.c: remove internalcalls for the Reflection stuff that is now
19021 * loader.c: mono_field_from_memberref () implementation.
19022 * mono-endian.c: thinko (s/struct/union/g).
19023 * object.c, object.h: make the mono_string_* prototypes actually use
19024 MonoString instead of MonoObject.
19025 * reflection.c, reflection.h: updates for changes in the reflection
19026 code in corlib: we use C structures that map to the actual C# classes.
19027 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19028 fat method header if needed and use the info from the ILGenerator for
19029 methods. Handle fields in types. Misc fixes.
19031 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
19033 * class.c (mono_class_metadata_init): bug fix: always allocate
19034 space for static class data
19036 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
19038 * class.c (mono_compute_relative_numbering): use relative
19039 numbering to support fast runtime type checks.
19041 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
19043 * class.c (mono_class_create_from_typeref): added debugging output
19044 to print class name when MonoDummy is returned instead of real class
19046 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
19048 * class.c (mono_class_metadata_init): interface offset table now
19049 contains pointers into the vtable - this is more efficient for the jit
19051 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
19053 * class.c (mono_class_metadata_init): use a temporary vtable (the
19054 old algorithm only worked for the interpreter, but not for the jit)
19056 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
19058 * loader.c (method_from_memberref): use mono_class_get to get the
19059 class of an array instead of using System.Array directly.
19060 (mono_get_method): also add MEMBERREF methods to the method cache
19061 which usefull for arrays.
19063 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
19065 * pedump.c (arch_compile_method): added to compute vtable entry
19067 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19068 number of interfaces.
19070 * class.h: merged MonoArrayClass into MonoClass
19072 * class.c (mono_class_create_from_typedef): compute the vtable size and
19073 allocate space to include the vtable inside MonoClass
19074 (mono_class_metadata_init): initialize the vtable
19076 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19078 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19079 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19080 * image.c: endian fixes by Laurent Rioux.
19081 * object.h, object.c: rename MonoStringObject to MonoString and
19082 MonoArrayObject to MonoArray. Change some function names to conform to
19083 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19084 guint16* as first argument, so don't use char*.
19085 Provide macros to do the interesting things on arrays in a portable way.
19086 * threads-pthread.c: updates for the API changes and #include <sched.h>
19087 (required for sched_yield()).
19088 * icall.c: updates for the API changes above.
19089 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19090 platforms that need them.
19092 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19094 * class.c: set the correct type for all the fundamental
19095 type when loading the class.
19097 2001-10-05 Dick Porter <dick@ximian.com>
19099 * threads-pthread.c (pthread_mutex_timedlock): Simple
19100 compatibility version for C libraries that lack this call.
19102 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19104 * class.c: MonoTypes stored in MonoClass are stored as
19105 fundamental MonoTypes when the class represents a
19106 fundamental type (System.Int32, ...).
19107 The TypeHandle return by ldtoken is a MonoType*.
19108 * icall.c: ves_icall_get_data_chunk () write out all the
19109 PE/COFF stuff. Implement ves_icall_define_method (),
19110 ves_icall_set_method_body (), ves_icall_type_from_handle ().
19111 * image.c: properly skip unknown streams.
19112 * loader.h, loader.c: add type_class to mono_defaults.
19113 * metadata.c, metadata.h: export compute_size () as
19114 mono_metadata_compute_size () with a better interface.
19115 Typo and C&P fixes.
19116 * pedump.c: don't try to print the entry point RVA if there is no entry point.
19117 * reflection.c, reflection.h: many cleanups, fixes, output method
19118 signatures and headers, typedef and typeref info, compress the metadata
19119 tables, output all the heap streams, cli header etc.
19120 * row-indexes.h: typo fixes.
19122 2001-10-04 Dick Porter <dick@ximian.com>
19124 * object.h: Add a synchronisation mutex struct to MonoObject
19126 * object.c (mono_new_object): Initialise the object
19127 synchronisation mutexes
19129 * icall.c: System.Threading.Monitor internal calls
19131 * threads-pthread.h:
19132 * threads-pthread.c: System.Threading.Monitor internal calls
19134 * threads-types.h: New file, includes the system-specific thread
19137 * threads-pthread-types.h:
19138 * threads-pthread-types.c: New files, handle pthread-specific
19139 synchronisation types
19141 * threads-dummy-types.h:
19142 * threads-dummy-types.c: New files of dummy support for
19143 thread-specific types
19147 * pedump.c: include mono-endian.h not endian.h
19149 * Makefile.am: More threads files.
19150 Name mono-endian.h not endian.h
19152 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19154 * Makefile.am, reflection.h, reflection.c: move here the reflection related
19155 stuff and implement a few more bits.
19156 * icall.c: a field needs to be dereferenced twice. Do not use the same
19157 name for two variables in the same scope.
19158 * image.c, image.h: cleanups.
19160 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
19162 * class.c (mono_class_metadata_init): bug fix: compute the right size
19164 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19166 * icall.c: implemented some of the Reflection internalcalls.
19167 * image.c, image.h: start writing out the PE/COFF image.
19168 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19169 that does the reverse than decode_blob_size ().
19170 * object.c: use mono_metadata_encode_value (). Move here
19171 temporary implementation of mono_string_to_utf8 ().
19172 * rawbuffer.c: make malloc_map static.
19174 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19176 * metadata.c: fix type comparison for arrays.
19177 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19178 Added a couple of new classes to monodefaults.
19179 * icall.c: added a couple of Reflection-related internalcalls.
19180 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19181 Added a byval_arg MonoType to MonoClass.
19183 2001-09-28 Dick Porter <dick@ximian.com>
19186 * threads-pthread.h:
19187 * threads-pthread.c: Implemented internal calls for
19188 LocalDataStoreSlot operations. Applied mutexes around all shared
19189 data. Reworked the thread creation and Start() operations to
19190 avoid a race condition.
19193 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19195 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19197 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19199 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19201 * class.c, loader.c: warn and return NULL instead of erroring out.
19202 * icall.c: added System.AppDomain::getCurDomain().
19203 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19205 2001-09-25 Dick Porter <dick@ximian.com>
19207 * threads-pthread.h:
19208 * threads-pthread.c: Implemented timed thread joining and added
19209 System.Threading.Thread::Join_internal internal call
19211 * icall.c: Added System.Threading.Thread::Join_internal internal call
19214 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19216 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19218 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19219 mono_string_intern () to implement the semantics of the ldstr opcode
19220 and the interning of System.Strings.
19221 * icall.c: provide hooks to make String::IsIntern and String::Intern
19224 2001-09-23 Dick Porter <dick@ximian.com>
19227 * threads-dummy.h: New files of dummy threading routines
19229 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19230 support code based on system specifics
19232 Rename PTHREAD_LIBS to THREAD_LIBS
19234 2001-09-23 Dick Porter <dick@ximian.com>
19236 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19237 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19239 (mono_thread_init): Set up a Thread object instance to return when
19240 the main thread calls Thread.CurrentThread
19241 (mono_thread_cleanup): Wait for all subthreads to exit
19243 * icall.c: New internal calls for System.Threading.Thread::Sleep
19244 (including Schedule) and CurrentThread
19246 * threads.h: New file, to insulate thread-specific stuff from the
19249 2001-09-21 Dick Porter <dick@ximian.com>
19251 * threads-pthread.h:
19252 * threads-pthread.c: New file, for handling pthreads-style
19253 threading support. Start() now starts a new thread and executes
19254 the ThreadStart delegate instance.
19256 * icall.c: Added the internalcall for
19257 System.Threading.Thread::Start_internal
19259 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19261 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19263 * loader.c: work around the different signatures for delegates
19264 constructors csc generates in compiled code vs the ones compiled in mscorlib.
19266 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19268 * class.h, class.c: add mono_class_get_field_from_name ().
19269 * *: Fix C comments and other ANSI C issues.
19271 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19273 * endian.h, assembly.c: fix some endianness issues.
19275 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19277 * loader.h, load.c: add delegate_class to mono_defaults.
19278 Handle runtime provided methods in mono_get_method ().
19280 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
19282 * loader.c (mono_get_method): use pinvoke for internal call
19284 * icall.c: use pinvoke for internal call
19286 * loader.c (method_from_memberref): set the method name
19288 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19290 * metadata.c: help the compiler generate better code for
19291 mono_class_from_mono_type ().
19293 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
19295 * class.c (mono_class_metadata_init): delayed computing of the
19296 class size to mono_class_metadata_init ()
19298 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19300 * class.c, class.h: add an interfaces member to MonoClass.
19301 * image.c, image.h: add assembly_name field to MonoImage
19302 from the assembly table.
19303 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19305 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19307 * class.c: Handle Array in mono_class_from_mono_type ().
19308 * metadata.c, pedump.c: some endian fixes.
19310 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19312 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19313 * metadata.c: fix small problem introduced with the latest commit.
19315 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19317 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19318 We don't need a MonoMetadata pointer anymore to compare signatures in
19319 mono_metadata_signature_equal (), update callers.
19320 Reduced memory usage an number of allocations for MonoMethodHeader and
19321 MonoMethodSignature.
19323 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19325 * metadata.c: added compare for szarray.
19327 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19329 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19330 and add a couple more types to it and mono_defaults. Give an hint on
19331 classes that need implementing in our corlib and are referenced
19334 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19336 * class.h, class.c: keep track if a class is also an Enum.
19337 * loader.c: Implement a couple more types for use in libffi
19338 marshalling. Gives better diagnostics when failing to dlopen
19339 a library. Set method->klass for P/Invoke methods, too.
19341 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19343 * class.c, class.h: add a MonoType this_arg to MonoClass that
19344 represents a pointer to an object of the class' type that
19345 can be used by the interpreter and later the type cache.
19346 Add best guess alignment info for valuetype objects.
19348 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19350 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19351 into MonoType: one less level of indirection and allocation and
19352 simplifies quite a bit of code. Added cache for MonoTypes that are
19353 used frequently, so that we don't need to allocate them all the time.
19355 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
19357 * class.c (mono_class_create_from_typedef): System.Enum is also a
19358 value type, although it does not derive from System.ValueType
19359 (maybe a bug in the ms compiler?)
19361 * metadata.c (mono_type_size): return the right size for value types
19363 * loader.c (mono_get_method): only initialize method header if not abstract
19365 * class.c (mono_class_from_mono_type): use mono_default values.
19367 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
19369 * *: use MonoClass pointers instead of <type_tokens>
19371 * class.h: new flag: metadata_inited.
19373 * class.c (mono_class_metadata_init): impl.
19374 (mono_class_instance_size): impl.
19375 (mono_class_data_size): impl.
19377 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19379 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19380 MonoClass now has the name and name_space fields.
19381 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19382 mono_get_method () takes and optional MonoClass as argument.
19383 Removed mono_typedef_from_name() and added mono_class_token_from_name()
19384 instead that takes advantage of a map from class names to typedef
19385 tokens in MonoImage.
19387 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19389 * metadata.c: zero is not a valid alignment boundary.
19390 Merge MONO_TYPE_VOID in default decoding code.
19392 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
19394 * image.h: merged MonoMetadata into MonoImage
19396 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19397 identify the type of elements.
19399 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19401 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19402 * cil-coff.h: split MonoMSDOSHeader and add size info.
19403 * image.c: add some consistency checks.
19404 * metadata.c: fix row size computation: one programmer
19405 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19406 add explanation for the locator routine.
19407 Fix decoding of size in method header.
19409 2001-08-20 Miguel de Icaza <miguel@ximian.com>
19411 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
19412 (g_concat_dir_and_file): Bring g_concat_dir_and_file
19413 function from gnome-libs. This uses the right path separator
19414 based on the OS, and also works around a bug in some systems where
19415 a double slash is not allowed.
19416 (default_assembly_name_resolver): Use g_concat_dir_and_file
19417 (mono_assembly_open): ditto.
19419 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
19421 * metadata.c (mono_metadata_signature_equal): impl.
19423 * *: void is now a realy MonoType (instead of using NULL)
19425 * metadata.c (do_mono_metadata_parse_type): use
19426 mono_metadata_parse_type to parse void value.
19428 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19430 * metadata.c, metadata.h: in the signature and method header store
19431 only the space required for holding the loca vars and incoming arguments.
19433 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
19435 * metadata.c (do_mono_metadata_parse_type): treat void like any
19436 other type (instead of assigning NULL);
19438 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
19440 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19442 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
19444 * image.c (do_mono_image_open): added a cache for arrays.
19446 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19448 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19449 decode a single column from a row in a metadata table and changes
19450 to take advantage of it in the typedef locator (gives a nice speed up).
19451 Store offset info for function params.
19453 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
19455 * image.h (MONO_IMAGE_IS_CORLIB): removed
19457 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19459 * assembly.c: how could mono_assembly_close () had ever worked?
19460 * metadata.c, metadata.h: provide offset info for local vars.
19461 Implement mono_type_size () to take care of alignment as well
19462 as size (it was mono_field_type_size in cli/class.c before).
19464 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
19466 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19468 * assembly.h (CORLIB_NAME): set to corlib.dll
19470 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19472 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19474 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19475 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19476 tokentype.h: massive namespace cleanup.
19478 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19480 * metadata.h, metadata.c: decode exception clauses when parsing method header.
19482 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
19484 * metadata.c (mono_metadata_free_type): added check for type !=
19485 NULL (void) before calling mono_metadata_free_type()
19487 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19489 * metadata.h, row_indexes.h: added header with enumerations to use
19490 to index in the columns from tables in metadata and to decode coded
19491 tokens: we should start using this instead of embedding magic numbers
19494 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19496 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19497 Move metadata_t info from cli_image_info_t to MonoImage, where
19498 it's easily accessible. Changed all the uses accordingly.
19499 Added the method and class caches to MonoImage.
19500 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19501 and mono_metadata_decode_value () signature to be more consistent
19502 with the other parse functions (and simplify code). Taken advantage
19503 of zero-length array allocation with GCC. Removed reduntant (and
19504 wrong) MonoFieldType struct and use MonoParam instead. Changed
19505 mono_metadata_parse_field_type () to use common code for parsing.
19506 Added mono_metadata_typedef_from_field () and
19507 mono_metadata_typedef_from_method () to lookup a typedef index from a
19508 field or method token.
19509 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19511 2001-07-23 Miguel de Icaza <miguel@ximian.com>
19513 * metadata.c (mono_metadata_parse_field_type): Implement.
19514 (do_mono_metadata_parse_type): Split engine from
19515 mono_metadata_parse_type, so that we can create smaller structures
19516 for things that just have one pointer to the MonoType (look at
19519 2001-07-20 Miguel de Icaza <miguel@ximian.com>
19521 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19522 as Jan Gray found out, it is incorrect.
19524 2001-07-18 Miguel de Icaza <miguel@ximian.com>
19526 * assembly.c: Implement asssembly loading. This loads an image
19527 and loads all the referenced assemblies. Come to think of it, we
19528 could always do lazy loading of the assemblies.
19530 * image.c (mono_image_open): Keep loaded images in a hashtable.
19532 * image.h (MonoImage): Add reference count.
19534 2001-07-17 Miguel de Icaza <miguel@ximian.com>
19536 * assembly.c (mono_assembly_open): Keep track of the file name in
19537 case the assembly has no ASSEMBLY table.
19539 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
19542 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19544 * metadata.c, metadata.h: decode local vars in method header
19545 parse function. Change callers accordingly.
19547 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19549 * metadata.h, cil-coff.h: protect against multiple inclusion.
19550 Added some new structures to hold information decoded from metadata:
19551 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19552 and relevant decoding/free functions.
19553 * metadata.c: implement decoding functions. Add warning for out of bounds
19554 index in mono_metadata_locate(). Implement mono_get_method () to retreive
19555 all the info about a method signature and invocation. Remove check on
19556 uninitialized local var in parse_mh() and fix memory leak.
19558 2001-07-12 Miguel de Icaza <miguel@ximian.com>
19560 * metadata.h: More macros.
19562 * tokentype.h: New file.
19564 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19566 * assembly.c: added a consistency check and initialize
19567 some structures with g_new0().
19568 * metadata.c: fixed a couple more bugs in table size computation
19569 and add other checks for out-of bound access to metadata.
19571 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19573 * metatada.c: fix bugs computing table sizes. Spew a
19574 warning when index in string heap is out of bounds.
19576 2001-07-04 Miguel de Icaza <miguel@ximian.com>
19578 * metadata.h: Add a couple of macros to manipulate tokens.
19580 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19582 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19583 cli_section_tables).
19585 2001-07-01 Miguel de Icaza <miguel@ximian.com>
19587 * metadata.c (mono_metadata_user_string): New function, provides
19588 access to the UserString heap.
19590 2001-06-27 Miguel de Icaza <miguel@ximian.com>
19592 * metadata.c: Add inline documentation.
19594 2001-06-26 Miguel de Icaza <miguel@ximian.com>
19596 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19599 2001-06-22 Miguel de Icaza <miguel@ximian.com>
19601 * typeattr.h: New file, TypeAttribute flags.
19603 2001-06-21 Miguel de Icaza <miguel@ximian.com>
19605 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19606 mono_assembly_ensure_section): Section loading code.
19607 (load_section_tables): Load the sections.
19609 * mono/metadata/metadata.c (mono_metadata_locate_token,
19610 mono_metadata_locate): Functions to locate the information
19611 definition given a token or a table and an index.
19612 (mono_metadata_compute_table_bases): New.
19613 (compute_size): New function to compute the sizes of the various
19616 * mono/metadata/metadata.h: Finish listing the different index
19619 * mono/metadata/pedump.c: Improve to dump new information.
19621 2001-06-19 Miguel de Icaza <miguel@ximian.com>
19623 * mono/metadata/metadata.c: Entered all the tables matching
19626 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2