1 2006-09-12 Martin Baulig <martin@ximian.com>
3 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
6 2006-09-11 Martin Baulig <martin@ximian.com>
8 * reflection.c (mono_image_build_metadata): Create the
9 MethodImpl's after emitting all types and methods, so we don't
10 need another fixup pass for them.
12 2006-09-11 Zoltan Varga <vargaz@gmail.com>
14 * class.c (mono_class_from_name_case): Fix regression introduced by the last
17 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
19 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
22 2006-09-10 Zoltan Varga <vargaz@gmail.com>
24 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
25 args is not set. Fixes #78926.
27 2006-09-08 Zoltan Varga <vargaz@gmail.com>
29 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
31 * image.c (load_class_names): Move this to class.c, and rename it to
32 'mono_image_init_name_cache'.
33 (load_modules): Fix a warning.
35 * class.c icall.c image.c: Initialize image->name_cache lazily.
37 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
38 on its name using information in the AOT file.
40 * class.c (mono_class_from_name): Use the new hook function.
42 2006-09-06 Zoltan Varga <vargaz@gmail.com>
44 * reflection.c (mono_param_get_objects): Handle enum default parameter values
47 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
50 2006-09-06 Martin Baulig <martin@ximian.com>
52 * icall.c (mono_lookup_internal_call): Small fix.
54 2006-09-05 Raja R Harinath <rharinath@novell.com>
56 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
59 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
61 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
62 when --debug is specified.
64 2006-09-04 Zoltan Varga <vargaz@gmail.com>
66 * class.c (setup_generic_array_ifaces): Fix a warning.
68 2006-09-04 Miguel de Icaza <miguel@novell.com>
70 * Temporarily remove the patch to assemly.c that checks the
71 assembly versions as it breaks our gacutil.
73 2006-09-03 Zoltan Varga <vargaz@gmail.com>
75 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
77 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
80 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
81 created using the default ctor. Fixes #79152.
82 (mono_string_builder_to_utf16): Ditto.
84 2006-09-01 Martin Baulig <martin@ximian.com>
86 Fix handling of the generic array interfaces.
89 (MonoDefaults): Removed `generic_array_class' and added
90 `generic_ilist' class.
93 (mono_bounded_array_class_get): Add the new generic array interfaces.
94 (setup_generic_array_ifaces): New static method; create vtable
95 entries for each method in the generic array interfaces.
98 (select_container): Allow "parent-less" generic methods.
101 (mono_marshal_get_generic_array_helper): New public method.
104 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
105 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
106 moved the interncall into System.Array.
108 2006-09-01 Raja R Harinath <rharinath@novell.com>
110 A few more cases of avoiding work on types with ->byref set.
111 Has the real fix for #79238
112 * icall.c (is_generic_parameter): New helper.
113 (ves_icall_Type_GetGenericParameterPosition): Use it.
114 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
115 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
116 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
117 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
119 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
121 (ves_icall_Type_get_IsGenericInstance): Likewise.
122 (ves_icall_Type_get_IsGenericType): Likewise.
124 2006-09-01 Zoltan Varga <vargaz@gmail.com>
126 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
129 * mempool.h (mono_mempool_get_allocated): New helper function.
131 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
134 * mempool.c: Fix warnings and the calculation of stats.
136 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
138 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
140 * loader.c (mono_get_method_from_token): Update method_count stat.
142 * class-internals.h (MonoStats): Add some stats.
144 2006-08-31 Robert Jordan <robertj@gmx.net>
146 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
147 with managed variants.
148 All code is contributed under the MIT/X11 license.
150 2006-08-31 Zoltan Varga <vargaz@gmail.com>
152 * reflection.c (reflection_methodbuilder_to_mono_method): Set
153 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
155 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
157 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
158 with cycles in classes.
160 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
162 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
163 missing a [MarshalAs] directive. Fixes #79203.
165 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
166 klass->marshal_info. Fixes #79217.
168 2006-08-30 Martin Baulig <martin@ximian.com>
170 Committing a patch from Joachim Ante <joe@otee.dk>:
171 Add support for binary data symbol stores.
173 * debug-mono-symfile.c
174 (mono_debug_open_mono_symbol_file): Renamed into
175 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
179 (mono_debug_open_image): Added `raw_contents' and `size' args.
180 (mono_debug_init_2_memory): New public function.
182 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
184 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
186 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
188 * appdomain.c: implement support for ShadowCopyFiles.
190 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
192 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
193 when value is NULL (and should remove CID #51).
195 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
197 * image.c: moved 2 functions to ../utils.
199 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
201 * gc.c: cope with the target object of a GC handle being NULL
204 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
206 * class.c: recursively check parent's explicit implementations
207 of interface methods (fixes bug #79125).
209 2006-08-19 Miguel de Icaza <miguel@novell.com>
211 * filewatcher.c: Avoid warnings when building, do not redefine
212 constants that are defined.
216 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
218 * image.c: don't fail when the link points to an absolute path.
220 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
222 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
225 2006-08-17 Miguel de Icaza <miguel@novell.com>
227 * image.c (full_path): A new method used to obtain the actual path
228 of an assembly even in the presence of symbolic links.
230 This is necessary for the case where we are running a binary that
231 has been GACed, but we are using the "published" path name
232 ($prefix/mono/1.0/blah.exe) which happens to point to the real
235 This was the source of the failure for the `xsp' command with the
236 recent AppDomain changes, as far as the runtime was concerned,
237 there were two different assemblies: $prefix/mono/1.0/blah.exe and
238 $prefix/mono/gac/blah/version/blah.exe.
240 (do_mono_image_open): use full path
242 2006-08-17 Zoltan Varga <vargaz@gmail.com>
244 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
246 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
248 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
249 domain_id is supplied. Fix CID #241 and corlib's unit tests.
251 2006-08-17 Zoltan Varga <vargaz@gmail.com>
253 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
254 small structures. Fixes #78990.
256 2006-08-17 Zoltan Varga <vargaz@gmail.com>
258 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
260 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
262 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
265 * marshal.c: don't load all the assemblies from a domain into newly
266 created ones. The new domains might have different rules and load
267 assemblies from different locations. Fixes bug #76757.
269 Patch by Lluis. Conflicts resolved by Brian Crowell.
271 2006-08-16 Alp Toker <alp@atoker.com>
273 * socket-io.c: First half of the fix for #79084.
274 Set sa_size to the length of the content, not that of the struct.
275 Don't add NULL suffix to the content, this should be done in
276 managed code if needed.
278 2006-08-14 Raja R Harinath <rharinath@novell.com>
281 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
282 mono_metadata_parse_type returns NULL.
284 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
286 * normalization-tables.h : new file for string normalization data.
287 * locales.c, locales.h, icall.c :
288 added load_normalization_resource() for string normalization,
290 * Makefile.am : added normalization-tables.h to the sources.
292 2006-08-13 Zoltan Varga <vargaz@gmail.com>
294 * marshal.c: Add more helper functions to reduce code duplication and use them
297 2006-08-12 Zoltan Varga <vargaz@gmail.com>
299 * marshal.c: Fix non-x86 stdcall warnings.
301 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
304 2006-08-11 Jonathan Chambers <joncham@gmail.com>
306 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
307 type check on multi-dimensional arrays. Fixes #79000.
309 2006-08-10 Jonathan Chambers <joncham@gmail.com>
311 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
312 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
313 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
314 * class-internals.h: add is_com_object to class structure.
315 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
316 null checks to COM object marshalling. Fix .ctor call on RCW.
317 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
319 All code is contributed under the MIT/X11 license.
321 2006-08-09 Dick Porter <dick@ximian.com>
323 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
324 racing mono_monitor_allocator_lock() somewhere, so don't delete
325 the critical section for now. Found by running and exiting
328 2006-08-10 Zoltan Varga <vargaz@gmail.com>
330 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
331 (ves_icall_System_ComObject_FindInterface): Ditto.
332 (ves_icall_System_ComObject_CacheInterface): Ditto.
334 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
335 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
337 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
339 * threadpool.c: treat pipes from process asynchronous reads as sockets
340 when reading from them, so we get select/poll or epoll to wait for
343 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
345 * loader.c: Fix a typo (CID #233) in the null check.
347 2006-08-07 Zoltan Varga <vargaz@gmail.com>
349 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
350 Hopefully fixes #78949.
352 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
353 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
356 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
358 * filewatcher.c: we need to set errno here.
360 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
362 * filewatcher.c: let Win32Exception get the error value.
364 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
366 * filewatcher.c: translate errno into win32 errors for Win32Exception
367 to know what happened.
369 2006-08-01 Zoltan Varga <vargaz@gmail.com>
371 * threadpool.c: Fix more warnings.
373 * assembly.c (search_loaded): Fix warnings.
375 * threadpool.c (mono_thread_pool_finish): Fix warnings.
376 (mono_async_invoke): Ditto.
378 2006-07-28 Jonathan Chambers <joncham@gmail.com>
380 * object.c (mono_remote_class_vtable): Need to create proxy vtable
381 entries for __ComObject type in addition to ComImport types.
382 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
385 All code is contributed under the MIT/X11 license.
387 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
389 * image.c: avoid tentative loading of modulerefs that contain
390 no metadata (P/Invoke library names).
392 2006-07-28 Dick Porter <dick@ximian.com>
394 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
395 mono_loader_lock() somewhere, so don't delete the critical section
396 for now. Found by running and exiting monodevelop.
398 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
400 * filewatcher.c: define the inotify syscalls when we're building on
401 linux and have sys/syscall.h. The build system might not have support
402 for inotify but the target system might have it.
404 2006-07-26 Miguel de Icaza <miguel@novell.com>
406 * domain.c: Documentation updates.
408 * loader.c (mono_free_method): Do not release the method
409 information if we are being profiled, as profilers will use this
410 information at shut down to present some data to the user.
412 This is needed so that the profiler does not crash, as the
413 profiler tends to keep MonoMethods around, and they might become
414 invalid if we free these.
416 (mono_get_method_constrained): Return the original CIL stream
417 method as well, so verification can be performed against it.
419 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
421 * filewatcher.[ch]: support for inotify file system watcher.
422 * icall.c: add new internal calls for the inotify file system watcher.
424 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
426 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
429 2006-07-20 Dick Porter <dick@ximian.com>
431 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
434 2006-07-20 Dick Porter <dick@ximian.com>
436 * threads.c (start_wrapper): Do the thread cleanup while we still
437 hold a reference to its object. Fixes bug 78123.
439 2006-07-18 Kornél Pál <kornelpal@gmail.com>
441 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
442 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
443 "managed-to-managed".
444 * icall.c: Redirect string constructors that take sbyte* to
445 ves_icall_System_String_ctor_RedirectToCreateString.
446 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
447 to CreateString () methods with matching signature.
448 * reflection.c: Use original security informations for
449 MONO_WRAPPER_MANAGED_TO_MANAGED.
450 * security-manager.c: Use original security informations for
451 MONO_WRAPPER_MANAGED_TO_MANAGED.
452 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
453 that is a placeholder and only its address should be used.
454 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
455 that is a placeholder and only its address should be used.
457 2006-07-15 Jonathan Chambers <joncham@gmail.com>
459 Begin implementing COM Interop.
460 * appdomain.c: Increment corlib version.
461 * class.c: Set ComImport classes' parent to __ComObject.
462 * loader.c: Mark cominterop methods as such.
463 * domain.c: Add __ComObject class to MonoDefaults structure.
464 * image.c: Add 2 hashtables to the image for COM Interop related methods
465 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
466 using the mempool allocator
468 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
469 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
470 declaration for mono_metadata_type_dup_mp.
472 * debug-helpers.c: Added strings for two additional wrapper types
473 * object.c: Create proxy objects for ComImport classes
474 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
475 and added __ComObject class to MonoDefaults structure.
477 * object-internals.h: Finish MonoRealProxy definition, and add definition of
478 MonoComInteropProxy and MonoComObject.
480 * marshal.c: Added support for COM Interop
481 (signature_cominterop): Converts managed signature to corresponding
482 unmanaged COM signature.
483 (cominterop_get_function_pointer): gets unmanaged function pointer via
485 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
486 (cominterop_get_method_interface): returns interface type that method is defined on
487 (mono_mb_emit_cominterop_call): emits native call to function pointer
489 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
490 that matches signature of unmanaged function.
491 (cominterop_get_native_wrapper): wrapper around adjusted method call.
492 (cominterop_get_invoke): forwards call from proxy to __ComObject
493 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
494 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
495 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
497 * marshal.h: Added Marshal icall declarations.
498 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
499 so we can access them in finalizer
501 2006-07-14 Dick Porter <dick@ximian.com>
503 * object.c (mono_type_initialization_cleanup): Fix a race
504 condition by temporarily commenting out the critical section
507 2006-07-14 Zoltan Varga <vargaz@gmail.com>
509 * reflection.c (create_custom_attr): Fix some warnings.
510 (create_custom_attr_data): Ditto.
511 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
514 2006-07-11 Zoltan Varga <vargaz@gmail.com>
516 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
518 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
520 2006-07-08 Zoltan Varga <vargaz@gmail.com>
522 * reflection.c (resolve_object): Add support for DynamicMethod.
524 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
525 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
527 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
529 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
530 don't leak GPtrArray's pdata has we have no use (nor free) for it.
532 2006-07-01 Zoltan Varga <vargaz@gmail.com>
534 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
537 2006-06-30 Raja R Harinath <rharinath@novell.com>
539 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
540 slightly: remove a shadow local variable.
542 2006-06-29 Raja R Harinath <rharinath@novell.com>
544 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
545 definition that introduces the virtual function slot.
546 Also fix Coverity #105.
548 2006-06-29 Zoltan Varga <vargaz@gmail.com>
550 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
551 for dynamic assemblies. Fixes #78724.
553 2006-06-28 Zoltan Varga <vargaz@gmail.com>
555 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
558 2006-06-21 Martin Baulig <martin@ximian.com>
561 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
564 2006-06-21 Zoltan Varga <vargaz@gmail.com>
566 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
568 2006-06-20 Raja R Harinath <rharinath@novell.com>
570 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
572 * class.c (mono_class_create_from_typespec): Add 'context' argument.
573 Inflate result if necessary.
574 (mono_class_get_full): Remove old version. Rename from
575 'mono_class_get' and add 'context' argument. Pass it to
576 ..._create_from_typespec.
577 (mono_class_get): New. Simple wrapper to mono_class_get_full.
578 (mono_ldtoken): Revert change below.
580 2006-06-20 Martin Baulig <martin@ximian.com>
582 * class.c (mono_ldtoken): Don't pass the generic context to
583 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
585 2006-06-15 Zoltan Varga <vargaz@gmail.com>
587 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
588 and later freeing it. Fixes #78638.
590 2006-06-15 Miguel de Icaza <miguel@novell.com>
592 * icall.c (mono_class_get_throw): Revert over-zealous error
593 throwing, the caller for mono_class_get_throw will cope with
594 errors when classes are not properly initialized already.
596 The code still copes with loader exceptions though.
598 Fixes the regression in reftype1 and reftype3 from the CAS tests.
600 2006-06-14 Miguel de Icaza <miguel@novell.com>
602 Fixes the `make run1' version of RuntimeAbort (to be commited,
603 source is in Bugzilla).
605 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
606 FALSE on class loading failure instead of returning true.
608 * class.c (mono_class_create_from_typedef): It is possible for
609 mono_metadata_interfaces_from_typedef_full to fail if a class is
610 not found, cope with this.
613 2006-06-14 Dick Porter <dick@ximian.com>
616 * process.c: Fix a bunch of signed/unsigned warnings from gcc
619 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
621 * culture-info-table.h : oops, forgot to make it nsync with r61548.
623 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
625 * icall.c: Another fix for building mono in Visual Studio.
627 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
629 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
631 2006-06-09 Martin Baulig <martin@ximian.com>
633 * debug-mono-symfile.c: Put this back and really fix it this
634 time. Sorry for all the trouble.
636 2006-06-08 Zoltan Varga <vargaz@gmail.com>
638 * icall.c (mono_class_get_throw): Fix a warning.
639 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
640 ReflectionTypeLoadException if needed. Fixes #78606.
642 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
643 (mono_class_init): Ditto.
645 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
647 (mono_loader_clear_error): Make this work even if there is no error.
649 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
651 * object-internals.h marshal.c marshal.h icall.c: Implement method
652 Marshal.GetComSlotForMethodInfo using internal call.
654 2006-06-07 Zoltan Varga <vargaz@gmail.com>
656 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
657 a function for signalling it.
659 * class.c (mono_class_from_typeref): Use the new kind of loader error when
660 a referenced assembly is not found.
662 * loader.c (mono_loader_error_prepare_exception): Add support for
663 LOADER_ERROR_ASSEMBLY. Fix formatting.
665 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
667 * domain.c appdomain.c class-internals.h marshal.c: Add support
668 for VARIANT marshalling on windows and increment corlib version
669 since Variant struct was added.
671 2006-06-03 Miguel de Icaza <miguel@novell.com>
673 * debug-mono-symfile.c: Revert Martin's previous patch which broke
674 stack trace line information:
676 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
677 (Martin) when looking up B which is between A and C, return A not C.
681 Thanks to Alexander Olk for tracking this down.
683 2006-06-02 Zoltan Varga <vargaz@gmail.com>
685 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
687 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
688 avoid clobbering its value.
689 (mono_string_to_lpstr): Fix a warning on windows.
691 2006-05-31 Zoltan Varga <vargaz@gmail.com>
693 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
695 * reflection.c loader.c: Removed references to 'dummy' flag.
697 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
699 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
702 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
705 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
707 * marshal.c threadpool.c: Update callers of mono_async_result_new.
709 * appdomain.c: Bump corlib version.
711 2006-05-30 Zoltan Varga <vargaz@gmail.com>
713 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
714 CEE_STIND_REF when working with object references.
716 2006-05-31 Zoltan Varga <vargaz@gmail.com>
718 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
721 2006-05-30 Miguel de Icaza <miguel@novell.com>
723 * loader.c (method_from_memberref): Fix argument value for
724 mono_loader_set_error_method_load (I was passing the MonoClass
725 instead of the class name char *).
727 2006-05-30 Zoltan Varga <vargaz@gmail.com>
729 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
730 CEE_STIND_REF when working with object references.
732 2006-05-30 Martin Baulig <martin@ximian.com>
734 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
735 mono_method_full_name() change and replace the ':' with a '.'
738 2006-05-30 Martin Baulig <martin@ximian.com>
740 * debug-mono-symfile.c
741 (mono_debug_symfile_lookup_location): Fix the algorithm:
742 when looking up B which is between A and C, return A not C.
744 2006-05-29 Martin Baulig <martin@ximian.com>
747 (MonoDebugMethodInfo): Make the typedef public.
748 (MonoDebugSourceLocation): New public struct.
751 (mono_debug_source_location_from_address): Removed.
752 (mono_debug_source_location_from_il_offset): Removed.
753 (mono_debug_il_offset_from_address): Removed.
754 (mono_debug_address_from_il_offset): Removed.
755 (mono_debug_lookup_method): New public function.
756 (mono_debug_lookup_source_location): New public function; replaces
757 the old mono_debug_source_location_from_*() functions; see the
758 inline documentation.
759 (mono_debug_free_source_location): New public function.
760 (mono_debug_print_stack_frame): New public function; see the
761 inline documentation.
763 * debug-mono-symfile.c
764 (mono_debug_find_source_location): Renamed into
765 mono_debug_symfile_lookup_location(); only take a
766 `MonoDebugMethodInfo *' and an `offset' argument; added inline
768 (mono_debug_find_method): Renamed into
769 mono_debug_symfile_lookup_method().
771 2006-05-27 Zoltan Varga <vargaz@gmail.com>
773 * assembly.c (mono_assembly_open_full): Dont overwrite the status
774 returned by mono_image_open_full ().
776 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
777 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
780 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
783 2006-05-27 Miguel de Icaza <miguel@novell.com>
785 * class.c (mono_class_from_typeref): handle missing images
786 earlier, deals with bug #78418. Refactor code;
788 Fix a warning introduced in my previous commit (some stale code
789 from before I revisited my patch).
791 * class.c (mono_class_create_from_typedef): On failure, remove the
792 class from the MonoImage->class_cache as the class is not
793 initialized; Fixes the leak pointed out by Paolo.
795 2006-05-25 Dick Porter <dick@ximian.com>
797 * threads.c (mono_thread_cleanup): Build fix. Comment out the
798 DeleteCriticalSections until I figure out which one may still be
799 sometimes locked when mono_thread_cleanup is called.
801 2006-05-24 Dick Porter <dick@ximian.com>
803 * threads.c (mono_thread_cleanup): Move the threading cleanup out
804 of mono_thread_manage and back into its own function, so it can be
805 called after the finalizer thread has finished.
807 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
809 2006-05-24 Zoltan Varga <vargaz@gmail.com>
811 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
814 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
815 with non-blittable elements.
816 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
818 2006-05-24 Martin Baulig <martin@ximian.com>
820 * mono-debug-debugger.h (MonoDebuggerEvent): Added
821 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
823 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
824 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
825 `mono_debugger_event_handler' to NULL.
827 2006-05-24 Martin Baulig <martin@ximian.com>
829 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
831 2006-05-24 Martin Baulig <martin@ximian.com>
833 * mono-debug-debugger.h
834 (mono_debugger_create_notification_function): Added
835 `MonoCodeManager *' argument.
837 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
839 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
841 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
843 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
844 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
847 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
849 * icall.c: precise GC support: objects can't be stored in unmanaged
850 memory anymore, even if they are kept alive by other references: since
851 they can move the GC needs to be able to always find them.
853 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
855 * object.c: precise GC support for static fields. Support
856 for moving GCs: write barriers and pinned allocation for interned
859 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
861 * domain.c, domain-internals.h: precise GC support for the MonoDomain
864 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
866 * class.c, gc.c: sgen and precise GC updates.
868 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
870 * marshal.h, marshal.c: added write barrier wrapper and precise type
873 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
875 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
878 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
880 * reflection.c: precise and sgen GC updates.
882 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
884 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
886 2006-05-22 Zoltan Varga <vargaz@gmail.com>
888 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
890 2006-05-20 Zoltan Varga <vargaz@gmail.com>
892 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
893 MONO_TYPE_OBJECT. Fixes #78462.
895 2006-05-18 Zoltan Varga <vargaz@gmail.com>
897 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
900 2006-05-17 Miguel de Icaza <miguel@novell.com>
902 * class.c (mono_class_get_exception_for_failure): Implement parts
903 of a TODO: if the loader error is set (instead of the class
904 error), we return a Loader exception that can be properly thrown
907 This was exposed by some Winforms 2.0 code that I tried to run
908 (Atsushi pointed me to it).
910 2006-05-17 Zoltan Varga <vargaz@gmail.com>
912 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
913 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
915 * marshal.c (emit_marshal_vtype): Add limited support for
916 UnmanagedType.LPStruct. Fixes #78427.
918 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
919 Applied a patch from kangaroo to fix #77523.
921 2006-05-17 Martin Baulig <martin@ximian.com>
924 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
925 (debugger_thread_created): Removed.
926 (debugger_thread_exited): Removed.
928 2006-05-15 Zoltan Varga <vargaz@gmail.com>
930 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
932 * object-internals.h (MonoReflectionResource): Sync with managed version.
934 2006-05-12 Wade Berrier <wberrier@novell.com>
936 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
938 2006-05-12 Zoltan Varga <vargaz@gmail.com>
940 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
941 functions try to allocate from the image mempool.
943 2006-05-12 Dick Porter <dick@ximian.com>
945 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
947 2006-05-12 Lluis Sanchez <lluis@ximian.com>
949 * object.c: The FieldGetter and FieldSetter methods require the full
950 name of the class, not only the name. Fixes bug #78277.
952 2006-05-11 Miguel de Icaza <miguel@novell.com>
954 * loader.c (method_from_memberref): Do not pass the NULL klass to
955 mono_loader_set_error_() methods. Pass the non-NULL value
958 2006-05-11 Zoltan Varga <vargaz@gmail.com>
960 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
961 (mono_assembly_close): Null out assembly->image->references after freeing it.
963 * image.c (mono_image_close): Free image->references.
965 * reflection.c (mono_image_basic_init): Fix a small memory leak.
967 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
969 * marshal.c: In function mono_mb_add_local don't use the mb pointer
970 before checking if it's NULL (g_assert).
972 2006-05-10 Martin Baulig <martin@ximian.com>
974 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
975 I thought I already killed that two months ago, but now it somehow reappeared.
977 2006-05-10 Martin Baulig <martin@ximian.com>
979 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
981 2006-05-10 Zoltan Varga <vargaz@gmail.com>
983 * reflection.c: Allocate memory for dynamically created methods in the image
986 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
988 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
989 don't use the ad pointer before checking if it's NULL (g_assert).
991 2006-05-09 Zoltan Varga <vargaz@gmail.com>
993 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
994 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
996 * marshal.c: Allocate all signatures from mempools.
998 * marshal.c: Allocate some more signatures from mempools.
1000 2006-05-09 Miguel de Icaza <miguel@novell.com>
1002 * object.c (mono_load_remote_field): The code used to provide a
1003 temporary variable for returning results if the user did not
1004 provide a result pointer. But our temporary variable was allocted
1007 Fix calling code to always pass a result area. Coverity ID 103.
1009 2006-05-06 Zoltan Varga <vargaz@gmail.com>
1011 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1012 value, not the old. Fixes #78312.
1013 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1015 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1016 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
1019 * assembly.c (mono_assembly_close): Free image->references.
1021 * assembly.c (mono_assembly_names_equal): Fix a warning.
1022 (mono_assemblies_cleanup): Cleanup more global data.
1024 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1026 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1027 ptr_cache and image->modules.
1029 * image.c (mono_image_init): Allocate array_cache lazily.
1031 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1033 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1034 behavior was changed recently and has bad side effects.
1036 2006-05-05 Zoltan Varga <vargaz@gmail.com>
1038 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1040 * assembly.c (mono_assembly_close): Remove a debug printf.
1042 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1044 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1045 to also allow for temporary references between mono_image_open ()/close ().
1047 * domain.c (get_runtimes_from_exe): Add a FIXME.
1049 2006-05-04 Zoltan Varga <vargaz@gmail.com>
1051 * marshal.c: Fix support for dynamic methods.
1053 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1055 * marshal.c (mono_marshal_cleanup): New cleanup function.
1057 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
1060 * class.c (mono_class_init): Fix leaking class->nested_classes.
1062 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1064 * image.c (mono_image_init): Initialize the new cashes.
1066 * image.c (mono_image_close): Destroy the new cashes.
1068 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1070 * mempool.c (mono_mempool_strdup): New helper function.
1072 * class-internals.h: Add prototype for mono_loader_unlock ().
1074 * domain.c (mono_jit_info_table_find): Fix a warning.
1075 (mono_debugger_check_runtime_version): Ditto.
1077 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
1078 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1079 functions to these modules.
1081 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1084 * marshal.c (mono_free_bstr): Fix a warning.
1086 * assembly.c (mono_assembly_open_full): Fix another small leak.
1088 * object.c: Fix some unload leaks in the remoting code.
1090 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1093 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1095 * reflection.c: Fix some unload leaks in dynamic assemblies.
1097 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
1099 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1100 * marshal.h: Add BSTR support on Win32
1101 * icall.c: Add BSTR icalls
1102 * metadata.h: Add BSTR enums
1104 2006-04-28 Miguel de Icaza <miguel@novell.com>
1106 Work to catch the crash from #76795 and turn it into an
1107 exception. As I stubbed out pieces of the VisualBasic support,
1108 I found a number of places where the code was failing and I added
1109 checks to those places.
1111 * metadata.c (do_mono_metadata_parse_generic_class): Make this
1112 function return a status code. If we fail to parse the signature
1113 from mono_metadata_parse_generic_inst, return FALSE.
1115 * loader.c (mono_get_method_from_token): If we fail to load the
1116 method (mono_class_get) return NULL.
1118 * (method_from_memberref): Return NULL if we are unable to parse
1119 the method signature
1121 (mono_loader_error_prepare_exception): Since we now use the
1122 loader_error flag internally to stop processing, and obtaining
1123 exceptions that might be thrown will walk this code path the
1124 proper way of going from a MonoLoaderError into a
1125 MonoException was convoluted. This new routine encapsulates the
1126 process of turning the error into an exception and *clearing* the
1129 2006-04-27 Miguel de Icaza <miguel@novell.com>
1131 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1132 with missing assemblies), and to cope with:
1134 * Missing fieldref from a non-existing assembly.
1135 * Missing methodref from a non-existing assembly.
1137 The first batch of work to address *some* of the issues from 76661.
1139 * object.c (mono_class_create_runtime_vtable): If we fail to
1140 initialize the class raise the exception here.
1142 * metadata.c (mono_class_get_overrides_full): If any methods fail
1143 to load return the failure to the caller.
1145 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1146 flagging assemblies that failed to load.
1148 Do not crash if we are unable to load the assembly.
1150 (mono_assembly_close): Do nothing with REFERENCE_MISSING
1153 * loader.c (mono_loader_set_error_type_load): Change the
1154 convention to always pass unallocated strings, so we make our own
1155 copies (I know our own code had duplicated strings before, but
1156 this keeps the normal conventions).
1157 (method_from_memberref): Call mono_loader_set_error_method_load
1158 for all possible failures of loading the class.
1159 Remove assert, turn into a loader error.
1161 (mono_loader_error_to_exception): Move this routine from mini
1162 (mini_loader_error_to_exception) there was no need to have that in
1165 * class.c (mono_class_from_typeref): If we were not able to load
1166 the assembly with mono_assembly_load_reference, call the
1167 mono_loader_set_error_type_load to register the problem.
1169 (mono_class_setup_fields): If we fail to load the type from
1170 mono_metadata_parse_type_full, call mono_class_set_failure and
1171 break from the loop.
1173 If class->exception_type is set, we do not layout the fields as
1174 that might crash the runtime, and instead return (from breaking
1175 from the previous loop).
1177 (mono_class_setup_vtable): This now returns a boolean indicating
1178 whether the table was properly setup. The decision is driven by
1179 mono_class_get_overrides_full which might run into non-existing
1182 (mono_class_init): Returns TRUE on success or FALSE if there was a
1183 problem in loading the type (incorrect assemblies, missing
1184 assemblies, methods, etc).
1186 When we call mono_class_setup_fields we also check for a potential
1187 error inside this call (either a class exception or a general
1190 (mono_class_create_from_typedef): If the parent fails to load
1191 (calling mono_class_get_full) return NULL.
1195 calls to mono_metadata_parse_type_full should be checked
1196 everywhere and set the mono_class_set_failure
1197 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1199 The current patch checks the places where my manually constructed
1200 tests show the errors are showing up, but we should do it
1205 mono_class_init return values should be tested everywhere, like
1206 the previous case this is something that we should audit
1207 everywhere and not only on the cases exposed by the tests I
1210 2006-04-26 Miguel de Icaza <miguel@novell.com>
1212 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1213 boolean parameter and instead pass the information on `options'
1214 parameter (FileOptions).
1216 * icall.c: Register the new signature for MonoIO.Open.
1218 * debug-helpers.c (dis_one): Trying to understand how coverity
1219 works. Fix Run 5, item 78.
1221 2006-04-26 Dick Porter <dick@ximian.com>
1223 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1226 2006-04-25 Martin Baulig <martin@ximian.com>
1228 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1230 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1231 debugger_thread_created().
1232 (debugger_gc_push_all_stacks): Don't handle the main thread in any
1234 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1235 (mono_debugger_finalize_threads): New function; undo the effects
1236 of mono_debugger_init_threads().
1237 (mono_debugger_create_all_threads): Removed.
1239 2006-04-24 Zoltan Varga <vargaz@gmail.com>
1241 * image.c (mono_image_close): Tidy up trace messages.
1243 * assembly.c (mono_assembly_close): Ditto.
1245 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1246 no longer references an already freed assembly. Fixes #78168.
1248 2006-04-21 Dick Porter <dick@ximian.com>
1250 * threads.c (mono_thread_detach): Fix reference counting when
1253 2006-04-21 Zoltan Varga <vargaz@gmail.com>
1255 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1258 2006-04-19 Zoltan Varga <vargaz@gmail.com>
1260 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1261 (mono_type_to_stind): Ditto.
1263 * marshal.c: Use the new helper functions to simplify code.
1265 * image.c (mono_image_close): Add some code for help debug assembly unloading
1268 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1271 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1272 assembly was already loaded in another appdomain. Fixes #78083.
1274 2006-04-13 Zoltan Varga <vargaz@gmail.com>
1276 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1277 referenced assemblies.
1278 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1280 * domain.c (mono_domain_free): Add a trace message.
1282 * appdomain.c (add_assemblies_to_domain): Ditto.
1284 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1287 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1289 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1291 2006-04-12 Martin Baulig <martin@ximian.com>
1293 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1294 `USE_INCLUDED_LIBGC'.
1296 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1298 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1299 the patch contains ../ and a small directory name later. Hopefully fixes
1302 2006-04-10 Martin Baulig <martin@ximian.com>
1304 Clean up the debugger's thread-handling code.
1306 The debugger's thread-handling code has been moved from
1307 ../mini/debug-debugger.c to threads.c. We now iterate directly
1308 over the `threads' hash, keep track of exiting threads and also
1311 We can now debug XSP and XSP based applications with the debugger.
1313 * object-internals.h (MonoThread): Added `gpointer end_stack'.
1316 (MonoThreadCallbacks): Removed; this was only used by the debugger.
1317 (mono_install_thread_callbacks): Likewise.
1319 * threads.c (mono_thread_callbacks): Removed.
1320 (debugger_thread_created, debugger_thread_exited): New static functions.
1321 (start_wrapper): Call debugger_thread_created().
1322 (thread_cleanup): Call debugger_thread_exited().
1323 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1324 (mono_debugger_init_threads): New public function.
1325 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1326 iterate directly over the `threads' hash and also use proper locking.
1328 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1330 * mono-debug-debugger.h
1331 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1333 2006-04-10 Zoltan Varga <vargaz@gmail.com>
1335 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
1336 argument type=array. Fixes #78057.
1338 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
1340 * culture-info-table.h : regenerated. Fixed bug #69652.
1342 2006-04-07 Zoltan Varga <vargaz@gmail.com>
1344 * loader.c metadata.c: Reapply a variant r59116.
1346 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1348 * class.c (mono_class_setup_interface_offsets): New internal function.
1350 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1351 interfaces too. Fixes #77398.
1353 * reflection.c (encode_cattr_value): Add support for
1354 parameter type=object, argument type=array.
1355 (load_cattr_value): Ditto. Fixes #77916.
1357 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1358 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1360 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1361 a byval char array and CharSet is Ansi.
1363 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1365 2006-04-06 Zoltan Varga <vargaz@gmail.com>
1367 * metadata.c: Add some locking comments.
1369 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1371 (mono_metadata_free_method_signature): Don't free the signature itself.
1373 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
1375 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1376 reference the same MonoImage.
1377 (mono_assembly_load_from_full): Add an assert.
1379 2006-04-05 Zoltan Varga <vargaz@gmail.com>
1381 * image.c (mono_image_close): Don't put the image we are about to free into the
1382 loaded_images_guid_hash.
1384 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1385 to reduce code duplication.
1387 * marshal.c: Register the native functions called by this module as icalls, to
1388 somewhat centralize the creation of MonoMethodSignature's.
1390 * loader.c (mono_method_signature): Add a cache for method signatures.
1392 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1393 the parameter attributes of a method.
1394 (mono_metadata_parse_method_signature_full): Refactored the computation of
1395 parameter attributes into a separate function. Also avoid one allocation in
1398 * assembly.c (mono_assembly_close): Ditto.
1400 * image.c (mono_image_close): Log trace messages with INFO level.
1402 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1404 * image.c reflection.c: Correct reference counting of image modules.
1406 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1407 of this function from the image mempool.
1409 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1410 to allow more cached types to be used.
1412 * mono-debug.c (mono_debug_add_method): Appled patch from
1413 David S. Miller <davem@sunset.davemloft.net>: Access
1414 minfo->lexical_blocks[] entry elements using read32().
1416 2006-04-04 Zoltan Varga <vargaz@gmail.com>
1418 * loader.c (mono_free_method): No longer free the method header for non-dynamic
1419 methods as it is allocated from the mempool.
1421 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1424 * metadata-internals.h: Add comments describing the reference counting scheme
1425 used for MonoImage and MonoAssembly.
1427 * image.c assembly.c reflection.c: Rework reference counting of images and
1428 assemblies so they are freed when the runtime is shut down. Free some
1429 additional memory structures when an image is unloaded.
1431 2006-04-03 Zoltan Varga <vargaz@gmail.com>
1433 * class.c loader.c reflection.c: Allocate more data structures in
1436 2006-03-31 Miguel de Icaza <miguel@novell.com>
1439 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1440 build on pre glib 2.4 systems.
1442 2006-03-31 Zoltan Varga <vargaz@gmail.com>
1444 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1446 * icall.c: Fix some warnings.
1448 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
1450 * culture-info-table.h : regenerated.
1452 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1454 * threads.c, object-internals.h, verify.c: changed the culture caching
1455 code to use a normal MonoArray for storage so the GC can keep track of
1456 them easily. Fixed bits of the cache logic, too and simplified the
1459 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1461 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1462 thread for non-Boehm GCs.
1464 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1466 * domain.c, object.c, domain-internals.h: reduce the amount of memory
1467 needed to keep track of the data for static fields.
1469 2006-03-29 Raja R Harinath <rharinath@novell.com>
1472 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1473 for interface classes. Use 'num_methods' instead.
1474 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
1475 before using '->vtable_size' field.
1477 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1479 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1480 doesn't contain managed pointers, so use a normal hashtable.
1482 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1484 * reflection.c, class-internals.h, domain.c: fixed handling of types
1485 used as values for objects in custom attributes (bug #77915):
1487 2006-03-24 Martin Baulig <martin@ximian.com>
1489 * class.c (mono_class_setup_fields): Added support for generic
1490 instances; fixes #77580.
1492 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1494 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1496 2006-03-24 Dick Porter <dick@ximian.com>
1498 * file-io.c (get_file_attributes): More stat macro breakage.
1501 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1503 * profiler.c: added the file=filename option in the default profiler
1504 to output the profile data to filename.
1506 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1508 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1511 2006-03-22 Martin Baulig <martin@ximian.com>
1513 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1514 allocated `MonoClassField *' in `fb->handle'.
1516 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1518 * class.c, image.c, metadata-internals.h: implemented new mechanism to
1519 allocate interface ID to save memory and allow better ID reuse on
1520 appdomain unload. setup_generic_vtable () removal from Martin.
1522 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1524 * object.h, appdomain.c, domain.c, exception.c, icall.c,
1525 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1526 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1527 write barriers for reference stores with managed objects accessed with
1528 C structures in the runtime and in embedding programs.
1530 2006-03-20 Raja R Harinath <rharinath@novell.com>
1532 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1533 'interface_id' and 'max_interface_id' fields of MonoClasses
1534 representing open generic types.
1536 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1538 * object.h, object.c, icall.c: added functions to deal with
1539 storing valuetypes that contain references in managed objects.
1540 * reflection.c, string-icalls.c, threads.c, marshal.c: small
1541 fixes and comments around uses of mono_array_addr ().
1543 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1545 * object.h, icall.c, monitor.c: object.GetHashCode ()
1546 implementation that supports the moving garbage collector.
1548 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1550 * icall.c, threads-types.h, threads.c: implemented finalizer for
1553 2006-03-15 Zoltan Varga <vargaz@gmail.com>
1555 * metadata.c (mono_type_size): Add a fixme.
1556 (mono_type_stack_size): Ditto.
1558 * object-internals.h (MonoReflectionAssemblyBuilder): Added
1559 'type_forwarders' field.
1561 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1562 attribute from net 2.0.
1564 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1567 * class.c (mono_class_setup_fields): Fix a warning.
1569 * class.c (mono_class_from_name): Add support for assemblyref entries
1570 in the EXPORTEDTYPE table.
1572 * reflection.c: Add support for handling type forwarders under net 2.0.
1574 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1576 2006-03-14 Zoltan Varga <vargaz@gmail.com>
1578 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1579 overwriting entries in ModuleBuild->types, also clean up the code
1580 a little. Fixes #77774.
1582 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1584 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1585 load friend assembly info when present.
1587 2006-03-14 Raja R Harinath <rharinath@novell.com>
1589 Fix crasher on gtest-158.cs.
1590 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1591 the return value if the MonoClass we want is yet in an
1593 * class.c (mono_class_create_from_typedef): Add an comment
1594 explaining an order dependency between mono_class_setup_parent and
1595 mono_class_setup_mono_type.
1597 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1599 * class.c: documentation updates and events bug fix.
1601 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1603 * class.c: some cleanup, locking fixes.
1605 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1607 * class.c: fix the generics code to setup nested
1608 type info to the instantiated type (bug #77770).
1610 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1612 * marshal.c: fixed a few type correctness issues.
1614 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1616 * loader.c: the Set/Get/Addrtess array methods should be public.
1618 2006-03-11 Zoltan Varga <vargaz@gmail.com>
1620 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1622 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1625 2006-03-10 Zoltan Varga <vargaz@gmail.com>
1627 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1629 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1631 * mempool.c (mono_mempool_alloc): Speed this up a bit.
1632 (mono_mempool_alloc0): Ditto.
1634 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1637 (create_object_from_sockaddr): it was allocating 4 extra bytes
1638 for the AF_UNIX data. Fixes bug #77747.
1640 2006-03-09 Zoltan Varga <vargaz@gmail.com>
1642 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1644 2006-03-09 Dick Porter <dick@ximian.com>
1646 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1647 Fixes bug 76966 again.
1649 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
1651 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1653 * appdomain.c: Bumped corlib version to 48 (due to r57532)
1655 2006-03-07 Martin Baulig <martin@ximian.com>
1658 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1660 2006-03-07 Martin Baulig <martin@ximian.com>
1663 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1664 regression introduced in r56970; see gtest-252.cs.
1666 * loader.c (mono_get_method_constrained): Correctly handle generic
1667 methods; see gtest-253.cs.
1669 2006-03-04 Zoltan Varga <vargaz@gmail.com>
1671 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1673 2006-03-04 Martin Baulig <martin@ximian.com>
1675 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1676 compute the parent type at runtime, just like we're already doing
1680 (mono_reflection_bind_generic_parameters): Don't compute the
1681 parent type anymore.
1683 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1685 2006-03-04 Martin Baulig <martin@ximian.com>
1687 * mono-debug-debugger.h
1688 (mono_debugger_create_notification_function): Allocate memory at
1689 runtime and return a pointer to it.
1691 2006-03-03 Zoltan Varga <vargaz@gmail.com>
1693 * assembly.c: Fix windows build.
1695 * assembly.c: Fix build.
1697 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
1699 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1701 2006-03-03 Dick Porter <dick@ximian.com>
1704 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1705 Check parameters before dereferencing them. Fixes Aaron's part of
1708 2006-03-03 Raja R Harinath <rharinath@novell.com>
1710 Fix performance regression.
1711 * loader.c (find_method_in_class): Add 'from_class' argument.
1712 Rename 'klass' argument to 'in_class'. The signature is compared
1713 against the method in 'in_class', and the corresponding method is
1714 returned from 'from_class'.
1715 (find_method): Walk both 'in_class' and 'from_class' in parallel.
1716 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1717 type definition and generic instantiation in parallel.
1718 (mono_get_method_constrained): Update to changes.
1720 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1722 * threads.c: make sure the domain is correct, too when doing
1723 mono_thread_attach ().
1725 2006-03-01 Zoltan Varga <vargaz@gmail.com>
1727 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1728 windows. Fixes #77683.
1730 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1732 * object.h, *: introduced specific way to set elements of an array
1733 of references to be used as write barrier. Still need to audit the
1734 uses of mono_array_addr.
1736 2006-03-01 Miguel de Icaza <miguel@novell.com>
1738 * object-internals.h: New field to cache the assmebly name, patch
1739 from Tambet Ingo (tambet@ximian.com)
1741 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1743 * decimal.h, class-internals.h, metadata-internals.h,
1744 file-io.h: mark a few function declarations as internal, to
1745 reduce the number of PLT entries.
1747 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1749 * file-io.c: fix typo in warning message.
1751 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1753 * loader.c: on unix, lookup the "*A" version of a function
1754 if charset is auto as a second option before failing.
1756 2006-02-28 Raja R Harinath <rharinath@novell.com>
1758 * class.h (mono_class_inflate_generic_method): Revert to two
1760 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1761 (mono_class_inflate_generic_method_full): Add.
1762 * class.c (mono_class_inflate_generic_method_full): Rename from
1763 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
1764 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
1765 * loader.c, reflection.c: Update to changes.
1767 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1769 * icall.c: const fixes and small improvements.
1771 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1773 * threadpool.c: for asynchronous connect(), enable the same workaround
1774 for BSD 6 as for the Mac. Fixes bug #77637.
1776 2006-02-24 Zoltan Varga <vargaz@gmail.com>
1778 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1779 formatted classes. Fixes #77524.
1781 2006-02-24 Raja R Harinath <rharinath@novell.com>
1783 * class.c (inflate_generic_type): Add a couple more
1784 micro-optimizations.
1785 (inflate_generic_context): Don't use the 'gmethod' from
1787 (mono_class_inflate_generic_method): If the method has generic
1788 parameters, but the passed-in context doesn't have a 'gmethod',
1789 create one. Use the possibly simplified generic instantiation
1790 from the declaring class instead of the one passed in.
1792 2006-02-24 Raja R Harinath <harinath@gmail.com>
1794 Make generic method signature and method header handling lazy.
1795 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1796 (inflate_generic_header): Likewise.
1797 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
1798 parameter to avoid inflating types.
1799 (mono_get_inflated_method): Empty out.
1800 * class.h (mono_class_inflate_generic_method): Update to changes.
1801 * loader.c (mono_get_method_from_token): Don't parse signature for
1802 generic methods, nor methods of generic classes.
1803 (mono_method_signature): Rename from 'mono_method_signature'.
1804 Inflate signature on demand.
1805 (mono_method_get_header): Inflate method header on demand.
1806 * reflection.c: Update to changes.
1808 2006-02-23 Raja R Harinath <rharinath@novell.com>
1810 * metadata.c (mono_metadata_inflate_generic_inst): If the
1811 instantiation is closed, don't bother expanding it in the new
1813 * class.c (inflate_generic_class): If the generic instantiation
1814 doesn't change after inflation, return the argument itself.
1815 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1817 (inflate_generic_context): If neither the generic class nor the
1818 generic method instantiations change, return the original context.
1819 * reflection.c (mono_method_get_object): Do
1820 'mono_get_inflated_method' before accessing the ->klass field.
1821 (inflate_mono_method): Don't create a MonoGenericMethod unless
1823 (inflate_method): Don't pass a constructed type as the declaring
1824 type of a methodbuilder.
1826 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1828 * object.c: fix memory overwrite.
1830 2006-02-22 Dick Porter <dick@ximian.com>
1832 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1833 it doesn't work any more.
1834 (mono_threads_request_thread_dump): Fix unused variable warnings.
1836 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1838 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1839 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1840 the public header file.
1842 2006-02-21 Zoltan Varga <vargaz@gmail.com>
1844 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1846 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1848 * class-internals.h, object.c: reduce the size of MonoVTable
1849 and store the interface_offsets array at negative offsets.
1851 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1853 * metadata.c: tweak table descriptors data structures to reduce
1854 size and runtime relocations.
1856 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1858 * marshal.c: fix some types and opcodes to be type-safe
1859 in marshaling wrappers.
1861 2006-02-21 Ankit Jain <jankit@novell.com>
1863 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1865 2006-02-21 Raja R Harinath <rharinath@novell.com>
1867 * metadata.c (get_constraints): Relax debugging checks for monodis.
1869 2006-02-21 Ankit Jain <jankit@novell.com>
1871 * metadata.c (mono_metadata_load_generic_params): Move the code
1872 checking for ambiguous generic params from here to mono/dis/get.c
1873 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1875 2006-02-21 Raja R Harinath <harinath@gmail.com>
1877 Fix assertion triggered when compiling nemerle.
1878 * class.c (mono_get_shared_generic_inst): Rename from
1879 get_shared_inst and make non-static.
1880 * loader.c (mono_get_shared_generic_method): New. Used to create
1881 the MonoGenericContext-equivalent of a MonoGenericContainer.
1882 (mono_get_method_from_token): Initialize the 'context' field of
1883 the created MonoGenericContainer.
1884 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1885 * metadata.c (get_constraints): Add sanity check.
1886 * class-internals.h: Add new internal methods.
1888 * reflection.c (verify_safe_for_managed_space): New sanity check.
1889 Currently checks that owner-less generic parameters aren't allowed
1891 (mono_type_get_object): Use it.
1892 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1893 that are now in mono_type_get_object.
1894 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1896 2006-02-19 Raja R Harinath <harinath@gmail.com>
1898 * metadata.c (mono_type_create_from_typespec): Rename from
1899 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
1900 argument and caching of types in the generic container.
1901 (unwrap_arrays, find_generic_param): Remove.
1902 * metadata-internals.h: Update.
1903 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1905 2006-02-18 Zoltan Varga <vargaz@gmail.com>
1907 * class.c (mono_class_get_exception_for_failure): Fix a warning.
1909 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1910 return values. Fixes #77581.
1912 * class.c (mono_fnptr_class_get): Switch name and name_space.
1914 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1915 classes and add support for [In, Out] attributes.
1916 (mono_marshal_free_asany): Ditto. Fixes #77524.
1918 2006-02-18 Raja R Harinath <harinath@gmail.com>
1920 * class.c (mono_class_from_generic_parameter): Make more robust to
1921 incomplete MonoGenericContainers from monodis.
1923 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1925 * class-internals.h: added some more exception types.
1926 * class.c, metadata.c: added a few checks to handle missing
1929 2006-02-17 Raja R Harinath <rharinath@novell.com>
1931 Use owner-less generic-params some more.
1932 * class.c (my_mono_class_from_generic_parameter): Remove.
1933 (mono_class_from_generic_parameter): Handle null image,
1934 param->name and param->owner.
1935 (mono_class_from_mono_type): Update.
1936 (mono_class_create_from_typespec): Remove 'container' parameter.
1937 If that parameter is non-null, the result is always inflated by
1938 'mono_class_get_full' anyway.
1939 (mono_class_get): Rename from _mono_class_get. Remove 'container'
1941 (mono_class_get_full): Update.
1943 * class.c (inflate_generic_type) [GENERICINST]: If the generic
1944 instance is not open, don't bother inflating.
1945 (mono_class_setup_fields): Hoist some loop-invariants. Don't
1946 parse metadata for inflated classes.
1947 (_mono_class_get): Change GenericContext* parameter to
1949 (mono_class_create_from_typespec): Likewise. Simplify, and
1950 implement trivially. All the cases are handled in
1951 mono_class_from_mono_type. Don't inflate returned class.
1952 (mono_class_get_full): Delegate GENERICINST optimization to
1953 inflate_generic_type.
1954 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1956 2006-02-16 Dick Porter <dick@ximian.com>
1958 * socket-io.c (create_object_from_sockaddr): Fix typo.
1959 (create_sockaddr_from_object): Check array lengths before
1960 potentially accessing items off the end.
1961 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1962 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1963 (ves_icall_System_Net_Sockets_Socket_Send_internal)
1964 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1965 length checks to avoid wraparound overflows.
1966 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1967 contents of the array of sockets
1968 (hostent_to_IPHostEntry2)
1969 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1970 Check return value of inet_ntop ().
1971 (addrinfo_to_IPHostEntry): Fix typo
1973 2006-02-16 Raja R Harinath <rharinath@novell.com>
1975 Type metadata parsing doesn't use generic-instantiation information.
1976 * metadata.c (mono_metadata_parse_array_full): Change
1977 MonoGenericContext* parameter to MonoGenericContainer*.
1978 (mono_metadata_parse_type_full): Likewise.
1979 (mono_type_create_from_typespec_full): Likewise.
1980 (mono_metadata_parse_mh_full): Likewise.
1981 (mono_metadata_parse_generic_inst): Likewise.
1982 (do_mono_metadata_parse_generic_class): Likewise.
1983 (do_mono_metadata_parse_type): Likewise.
1984 * metadata-internals.h: Update to changes.
1985 * class.c (mono_class_find_enum_basetype): Likewise.
1986 (mono_class_setup_fields): Likewise.
1987 (mono_class_create_from_typespec): Likewise.
1988 * loader.c (method_from_methodspec): Likewise.
1989 (mono_get_method_from_token): Likewise.
1990 (mono_method_get_header): Likewise.
1992 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1994 * marshal.c: handle additional GENERICINST case (patch from
1995 Thong Nguyen <tum@veridicus.com>).
1996 Fix a few cases where LDIND_I/STIND_I was used for references.
1998 2006-02-16 Raja R Harinath <rharinath@novell.com>
2000 * reflection.c (mono_reflection_get_token): Remove unused variable.
2002 2006-02-16 Martin Baulig <martin@ximian.com>
2004 * reflection.c (mono_reflection_get_token): Add support for fields
2005 in instantiated generic types.
2008 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2010 2006-02-15 Martin Baulig <martin@ximian.com>
2013 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2014 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2015 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2016 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2018 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2020 * class.c, metadata.c, metadata.h, object.c, icall.c,
2021 marshal.c: changed mono_type_get_underlying_type () to do
2022 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2023 Fixed handling of instantiated generic valuetypes (bug #75479).
2025 2006-02-15 Raja R Harinath <rharinath@novell.com>
2027 * metadata.c (mono_metadata_decode_signed_value): Simplify.
2028 Delegate to mono_metadata_decode_value, and work on the returned value.
2030 * icall.c (ves_icall_MonoType_GetGenericArguments):
2031 Add consistency check here too.
2033 2006-02-15 Ankit Jain <jankit@novell.com>
2035 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2038 2006-02-15 Ankit Jain <jankit@novell.com>
2040 * metadata.c (mono_metadata_decode_signed_value): New function to decode
2041 signed values, used only for representing lower bounds of arrays.
2042 (mono_metadata_parse_array_full): Use new
2043 mono_metadata_decode_signed_value to decode lower bounds.
2045 2006-02-14 Martin Baulig <martin@ximian.com>
2048 (mono_reflection_get_token): Support "MonoGenericMethod" and
2049 "MonoGenericCMethod" and allow generic instances / methods.
2051 2006-02-11 Zoltan Varga <vargaz@gmail.com>
2053 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2054 to obtain the terminal size using an ioctl.
2056 * object.c (mono_nullable_init): Revert this as nullable reference
2057 types are not valid.
2058 (mono_nullable_box): Ditto.
2060 2006-02-09 Dick Porter <dick@ximian.com>
2062 * threads.c (mono_thread_detach): Drop a reference to the thread
2065 2006-02-09 Zoltan Varga <vargaz@gmail.com>
2067 * object.c (mono_nullable_init): Handle nullable reference types.
2068 (mono_nullable_box): Ditto. Fixes #77446.
2070 2006-02-07 Martin Baulig <martin@ximian.com>
2072 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2074 2006-02-07 Ankit Jain <jankit@novell.com>
2076 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2077 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2078 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2079 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2080 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2081 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2083 2006-02-02 Zoltan Varga <vargaz@gmail.com>
2085 * class.c (mono_class_create_generic): Set type_token as well.
2087 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2090 2006-02-02 Martin Baulig <martin@ximian.com>
2092 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2093 has never been used so far.
2095 2006-02-02 Martin Baulig <martin@ximian.com>
2097 * mono-debug-debugger.h: Changed comment at the top of this file;
2098 the header is not installed, but it's safe to #include it from
2101 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2102 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2104 2006-02-02 Martin Baulig <martin@ximian.com>
2107 (MonoSymbolTable): Removed the `metadata_info' field.
2110 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2112 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2113 (mono_debugger_add_builtin_types): Removed.
2114 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2115 (mono_debugger_create_notification_function): We now operate on a
2116 pre-allocated area; take a `gpointer' and return `void'.
2118 * mono-debug-debugger.c
2119 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2120 (mono_debugger_add_builtin_types): Removed.
2122 2006-02-02 Martin Baulig <martin@ximian.com>
2124 * threads.c (mono_debugger_create_all_threads): New public method.
2126 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2128 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2129 breaks on several platforms.
2131 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
2133 * assembly.c: the VS.NET build doesn't supply default values for
2134 MONO_ASSEMBLIES and MONO_CFG_DIR.
2136 2006-02-01 Zoltan Varga <vargaz@gmail.com>
2138 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2141 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2143 * loader.c (method_from_memberref): Fix a warning.
2145 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2147 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2148 with explicit layout. Fixes #77433.
2150 2006-01-31 Zoltan Varga <vargaz@gmail.com>
2152 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
2153 max_interface_id is initialized before using it. Fixes #77398.
2154 (ves_icall_Type_GetInterfaces): Ditto.
2156 2006-01-30 Raja R Harinath <rharinath@novell.com>
2158 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2159 allocate memory for parameter attributes when parsing memberref
2161 * loader.c (mono_loader_set_error_method_load): Don't warn.
2162 (method_from_memberref): Ensure MissingMethodException gets thrown
2163 if method is not found. Make warning more informative.
2165 2006-01-29 Raja R Harinath <harinath@gmail.com>
2168 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2169 return true if is byref.
2170 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2171 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2172 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2174 2006-01-27 Raja R Harinath <rharinath@novell.com>
2176 Fix tests/find-method.2.il
2177 * loader.c (find_method, find_method_in_class): Remove is_inflated
2178 argument. Revert 2006-01-18 change.
2179 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2180 is generic, search for method in its generic definition.
2181 * class.c (mono_class_setup_vtable_general): Print generic
2182 arguments of generic types in debugging printf.
2184 2006-01-26 Zoltan Varga <vargaz@gmail.com>
2186 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2188 * threads.c (mono_threads_request_thread_dump): New helper function.
2190 2006-01-25 Raja R Harinath <rharinath@novell.com>
2192 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2194 2006-01-25 Ankit Jain <jankit@novell.com>
2196 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2197 move definition to ..
2198 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2200 2006-01-25 Ankit Jain <jankit@novell.com>
2201 Raja R Harinath <rharinath@novell.com>
2203 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2204 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2207 2006-01-25 Martin Baulig <martin@ximian.com>
2209 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2210 `MonoDebuggerThread' into debug-debugger.c.
2212 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2214 * profiler.c: fix printing of data.
2216 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
2218 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2219 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2221 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2223 * object.c: fix deadlock related to string interning.
2225 2006-01-23 Martin Baulig <martin@ximian.com>
2227 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2229 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2231 2006-01-23 Martin Baulig <martin@ximian.com>
2233 * mono-debug.h: Moved the prototypes of some functions which are
2234 used by the JIT here from mono-debug-debugger.h.
2236 2006-01-21 Martin Baulig <martin@ximian.com>
2238 * Makefile.am: Don't install mono-debug-debugger.h.
2240 2006-01-21 Martin Baulig <martin@ximian.com>
2242 * mono-debug-debugger.h: Enforce the private status of this header
2243 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2244 Moved some stuff from mono-debugger-jit-wrapper.h here.
2246 2006-01-20 Raja R Harinath <rharinath@novell.com>
2248 * class.c (mono_class_from_typeref): Add a sanity test to help
2249 catch lack of assembly load/search hooks.
2251 2006-01-19 Zoltan Varga <vargaz@gmail.com>
2253 * marshal.c (emit_struct_conv): Relax the fields with same offset
2254 check even more. Fixes #77230.
2256 2006-01-18 Martin Baulig <martin@ximian.com>
2258 * loader.c (find_method_in_class): Added `gboolean is_inflated'
2259 argument; if false, we compare the uninstantiated signatures.
2260 (method_from_memberref): Compare the uninstantiated signatures;
2263 2006-01-18 Robert Jordan <robertj@gmx.net>
2265 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2266 Clear the weak link. Fixes bug #77170.
2268 * gc.c (mono_gchandle_free):
2269 Reflect *-gc.c changes (tiny optimization).
2271 2006-01-18 Zoltan Varga <vargaz@gmail.com>
2273 * metadata.c (mono_metadata_signature_dup): Applied patch from
2274 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2277 2006-01-17 Zoltan Varga <vargaz@gmail.com>
2279 * marshal.c (emit_struct_conv): Allow fields with the same offset when
2280 marshalling from native to managed code. Fixes #77230.
2282 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2284 * threadpool.c: fix problem (Mac only) when more than one asynchronous
2285 connect. Fixes bug #77020.
2287 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2289 * class.c: fixed id assignement for nested interfaces (bug #77275).
2290 Added also better info for --print-vtable debugging.
2292 2006-01-12 Martin Baulig <martin@ximian.com>
2294 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2295 interfaces on-the-fly; fixes #76625.
2298 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2299 don't need that anymore.
2301 2006-01-12 Miguel de Icaza <miguel@novell.com>
2304 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2305 To avoid initing the nested_classes when not needed I turned the
2306 PeerCredData as a toplevel internal class, as it has to be shared
2309 Fixes the CASA issue.
2311 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
2313 * domain.c: Accessors for MonoJitInfo
2315 * profiler-private.h: Add jitinfo to the end jit hook
2317 * profiler.[ch]: Define new hooks, called after jitting which give
2318 the MonoJitInfo that was compiled
2320 2006-01-10 Martin Baulig <martin@ximian.com>
2322 * class.c (mono_class_setup_events): Add support for generic
2323 classes; fixes #76440.
2325 2006-01-06 Raja R Harinath <rharinath@novell.com>
2328 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2329 on passed-in method.
2331 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2333 * object.c (mono_runtime_invoke_array): Add Nullable support.
2335 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2337 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
2339 * file-io.c: Don't consider sockets as directory and avoid an endless
2340 loop. Fix bug #76966.
2342 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2344 * object.c (mono_nullable_init): New helper function.
2345 (mono_nullable_box): Ditto.
2347 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2349 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2351 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2353 2006-01-02 Zoltan Varga <vargaz@gmail.com>
2355 * class.c (mono_class_is_assignable_from): Make T assignable to
2358 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
2360 * appdomain.c: Bump corlib version to 46.
2361 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2362 serialization purpose) and changed ves_icall_System_Reflection_
2363 Assembly_get_code_base signature to accept a boolean (to escape, or
2364 not, the assembly code base).
2366 2005-12-23 Dick Porter <dick@ximian.com>
2370 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2371 CreateEvent icall now returns "created" boolean parameter.
2373 2005-12-22 Zoltan Varga <vargaz@gmail.com>
2375 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2378 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
2379 when attr_klass is an interface. Fixes #77045.
2381 2005-12-20 Zoltan Varga <vargaz@gmail.com>
2383 * marshal.c (emit_struct_conv): Fix previous patch.
2385 * marshal.c (emit_struct_conv): Add a check for fields with the same
2388 2005-12-20 Raja R Harinath <rharinath@novell.com>
2390 Fix regression in Mono.C5.
2391 * class.c (mono_class_create_generic): If 'klass' is an interface
2392 set up the interface offsets.
2393 (mono_class_is_assignable_from): Don't throw away generic arguments.
2395 2005-12-19 Raja R Harinath <rharinath@novell.com>
2397 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2400 2005-12-15 Raja R Harinath <rharinath@novell.com>
2402 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2404 (do_mono_metadata_parse_generic_class): Don't pass the current
2405 generic context when parsing the type being instantiated: it
2406 cannot use it, anyway.
2408 * loader.c (method_from_memberref): Don't inflate a signature if
2409 it doesn't contain any type parameters.
2411 2005-12-15 Zoltan Varga <vargaz@gmail.com>
2413 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2415 2005-12-14 Martin Baulig <martin@ximian.com>
2418 (mono_type_get_name_recurse): Don't return null for type
2419 parameters and open generic classes.
2420 (mono_class_setup_methods): Don't exclude generic instances.
2421 (mono_get_unique_iid): Use different IDs for different
2422 instantiations of the same generic type.
2423 (mono_class_setup_vtable): Only use setup_generic_vtable() for
2424 open generic instances; create a normal vtable for closed generic
2426 (mono_class_setup_vtable_general): We're now also called for
2427 closed generic instances.
2430 (mono_reflection_bind_generic_parameters): Correctly use
2431 mono_metadata_lookup_generic_inst() everywhere.
2433 2005-12-14 Zoltan Varga <vargaz@gmail.com>
2435 * object.c (mono_class_create_runtime_vtable): Call
2436 mono_class_setup_vtable ().
2438 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2440 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2443 * loader.c (mono_loader_set_error_type_load): Print the type load
2444 warnings to the console so they are more visible to the user.
2445 (mono_loader_set_error_method_load): Ditto.
2447 * reflection.c (ensure_runtime_vtable): Revert the last change as it
2450 * reflection.c (ensure_runtime_vtable): Fix build.
2452 * reflection.c (ensure_runtime_vtable): Disable an optimization which
2453 doesn't work in all cases.
2455 2005-12-13 Zoltan Varga <vargaz@gmail.com>
2457 * object.c (mono_array_new_full): Treat a single dimensional array
2458 with 0 lower bounds as an szarray. Fixes #76973.
2460 * reflection.c (custom_attr_visible): Really fix this.
2462 2005-12-12 Zoltan Varga <vargaz@gmail.com>
2464 * reflection.c (custom_attr_visible): Allow nested public attributes
2467 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2470 2005-12-12 Raja R Harinath <harinath@gmail.com>
2472 * class.c (set_generic_param_owner): Delete.
2473 (mono_class_create_from_typedef): Don't set ->owner field of
2474 generic parameters to "param containers" of enclosing classes.
2475 * reflection.c (mono_reflection_initialize_generic_parameter):
2478 2005-12-11 Zoltan Varga <vargaz@gmail.com>
2480 * reflection.c (custom_attr_visible): Fix build.
2482 2005-12-10 Zoltan Varga <vargaz@gmail.com>
2484 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2487 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2488 handling of null parameter defaults.
2490 2005-12-09 Raja R Harinath <rharinath@novell.com>
2492 * class.c (mono_class_from_generic_parameter): Don't set
2493 klass->generic_container.
2494 (my_mono_class_from_generic_parameter): Likewise.
2496 2005-12-07 Zoltan Varga <vargaz@gmail.com>
2498 * reflection.c (load_public_key): Fix a warning.
2499 (method_encode_code): Fix unaligned accesses.
2501 2005-12-07 Martin Baulig <martin@ximian.com>
2503 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2506 (write_generic_param_entry): Encode our custom attrs.
2508 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2510 2005-12-07 Martin Baulig <martin@ximian.com>
2512 * reflection.c (encode_new_constraint): Removed; we don't use the
2513 `NewConstraintAttribute' anymore.
2515 2005-12-06 Zoltan Varga <vargaz@gmail.com>
2517 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2518 not fire a TypeResolve event when Assembly.GetType () is called.
2520 2005-12-05 Ben Maurer <bmaurer@ximian.com>
2522 Beginning of support for nullable types in the runtime. Parts of
2523 this patch are from Martin.
2525 * appdomain.c (MONO_CORLIB_VERSION): Bump
2527 * domain.c (mono_init_internal): get the nullable type
2529 * class.c (mono_class_is_nullable): New method
2530 (mono_class_get_nullable_param): New mehod
2531 (mono_class_create_generic): In types T? set cast_class to T
2533 * class-internals.h (MonoDefaults): new nullable default class
2534 (mono_class_get_nullable_param, mono_class_get_nullable_param):
2537 2005-12-05 Raja R Harinath <rharinath@novell.com>
2539 * metadata.c (select_container): New. Refactor code to select the
2540 appropriate GenericContainer given the type of generic parameter
2542 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2543 not a MonoGenericContext. Use select_container. Update parameters.
2544 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2546 (unwrap_arrays): Remove duplicate tests.
2547 (find_generic_param): Rename from 'has_same_context'. Now walks a
2548 generic instantiated class to find any arguments that are generic
2550 (mono_type_create_from_typespec_full): Use find_generic_param to
2551 avoid evicting some generic instantiations from the typespec
2554 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2556 * reflection.c: fixed writing of doubles on ARM FPA.
2558 2005-12-02 Robert Jordan <robertj@gmx.net>
2560 * icall.c: Fixed EventInfo.ReflectedType (#76829).
2562 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2564 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2565 least on SUSE 10 they are not the same (on debian, they are just the
2568 2005-12-01 Raja R Harinath <rharinath@novell.com>
2570 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2571 DeclaringType for VARs and MVARs.
2572 * class.c (set_generic_param_owner): Fix initialization of owner
2575 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2577 * icall.c: fixed Enum.ToObject() to correctly convert the values.
2579 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2581 * threadpool.c: workaround for a bug that shows up on the Mac:
2582 select()+connect() on a blocking socket is not like it should
2583 be, so we proceed to connect() in that case, wasting the I/O
2584 threadpool thread until connect succeedes. Fixes bug #75436.
2586 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2588 * threadpool.c: fix typo when setting file descriptor states.
2590 2005-11-28 Raja R Harinath <rharinath@novell.com>
2592 * class-internals.h (MonoGenericContainer.is_signature): Remove.
2593 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2594 create a temporary signature container.
2595 (mono_metadata_parse_generic_param): Update to changes.
2596 (mono_type_create_from_typespec_full): Update to changes.
2597 * loader.c (method_from_memberref): Don't use a
2598 MonoGenericContainer while parsing a memberref signature.
2599 (method_from_methodspec): Remove dead-store of the 'container'
2600 variable. It's overwritten before use.
2602 * metadata.c (mono_type_create_from_typespec_full): Make debugging
2604 (mono_metadata_parse_generic_param): Likewise.
2605 * loader.c (find_method_in_class): Does not need a
2606 MonoGenericContainer. Use 'mono_method_signature' rather than
2607 'mono_method_signature_full'.
2608 (find_method, mono_get_method_constrained, method_from_memberref):
2611 * metadata.c (mono_type_create_from_typespec_full): Ensure that
2612 owner-less generic-parameters are never evicted from the typespec
2615 * loader.c (method_from_memberref): Don't use the current context
2616 when parsing signatures.
2617 (method_from_methodspec, mono_get_method_from_token): Update to changes.
2619 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2620 side-effects in g_assert.
2621 * loader.c (mono_get_method_from_token): Resolve klass earlier so
2622 that we don't potentially lose information.
2624 2005-11-26 Dick Porter <dick@ximian.com>
2627 * threads.c: icalls to implement basic (ie, not named)
2628 System.Threading.Semaphore.
2630 2005-11-24 Dick Porter <dick@ximian.com>
2633 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2634 Use GetProcessId() if it's available.
2636 2005-11-23 Zoltan Varga <vargaz@gmail.com>
2638 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2640 2005-11-23 Raja R Harinath <rharinath@novell.com>
2641 Ankit Jain <jankit@novell.com>
2643 * loader.c (mono_get_method_from_token): Initialize 'method' field
2644 of all generic parameters before parsing the signature. Remove
2645 code that "fixed"-up MVAR references.
2647 2005-11-23 Ankit Jain <jankit@novell.com>
2649 * metadata.c (mono_metadata_has_generic_params):
2650 (mono_metadata_load_generic_param_constraints):
2651 (mono_metadata_load_generic_params): Move duplicate code ...
2652 (mono_metadata_get_generic_param_row): ... here. Returns the
2653 first row-id in GenericParam table for a given owner (token).
2654 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2657 2005-11-23 Raja R Harinath <rharinath@novell.com>
2658 Ankit Jain <jankit@novell.com>
2660 * metadata.c (mono_metadata_class_equal): Pass signature_only when
2662 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
2663 type->data.generic_param only if the type is an MVAR.
2664 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2665 leak owner-less VARs and MVARs into managed space.
2667 2005-11-21 Martin Baulig <martin@ximian.com>
2670 (MonoMethod): Moved the `generic_container' here from
2671 `MonoMethodNormal' since we now also need it for
2672 `MonoMethodPInvoke';
2673 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2674 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2675 an union containing both `MonoMethodNormal' and
2676 `MonoMethodPInvoke'.
2679 (mono_get_method_from_token): Allow implementing generic methods
2683 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2686 2005-11-17 Dick Porter <dick@ximian.com>
2690 * process.c: Split the Process Start_internal icall into
2691 ShellExecuteEx_internal and CreateProcess_internal, which are
2692 called depending on whether UseShellExecute is true. Fixes bug
2695 * appdomain.c (MONO_CORLIB_VERSION): Incremented
2697 2005-11-17 Zoltan Varga <vargaz@gmail.com>
2699 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2700 'msize' parameters, use the information in 'mspec' instead.
2701 (emit_object_to_ptr_conv): Ditto.
2703 * marshal.c (emit_struct_conv): Handle explicit layout structs with
2704 fields out of order. Fixes #76733.
2706 2005-11-17 Ankit Jain <jankit@novell.com>
2708 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2710 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
2712 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2715 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2717 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2718 for types with non-auto layout. Fixes #76717.
2720 2005-11-16 Ankit Jain <jankit@novell.com>
2722 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2723 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
2724 if generic_context is null.
2725 (mono_metadata_generic_param_equal): param->owner can be null.
2726 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2729 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2731 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2734 2005-11-15 Martin Baulig <martin@ximian.com>
2736 * object.c (set_value): Use mono_class_from_mono_type() instead of
2737 the hack for generic instances; fixes #76136.
2739 2005-11-15 Zoltan Varga <vargaz@gmail.com>
2741 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2744 * image.c (load_metadata_ptrs): Initialize the new fields.
2746 * reflection.c (create_dynamic_mono_image): Ditto.
2748 * reflection.c (build_compressed_metadata): Use the new fields.
2750 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2753 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2756 2005-11-15 Ankit Jain <jankit@novell.com>
2757 Raja R Harinath <harinath@gmail.com>
2759 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2760 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2761 new per-generic_container cache if the cached MonoType's context matches
2762 the current context.
2763 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2764 to the expected context.
2765 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2767 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2769 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2770 we changed the signature of an icall.
2771 * icall.c: Modify to mono_double_ParseImpl return true/false
2772 depending on the success, instead of throwing the exception. This will
2773 help us in Double.TryParse methods.
2775 2005-11-14 Zoltan Varga <vargaz@gmail.com>
2777 * marshal.c (emit_marshal_object): Throw an exception when
2778 marshalling 'object' instead of crashing. Fixes #76696.
2780 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2782 * class-internals.h: Add prototype for mono_type_get_full_name ().
2784 2005-11-11 Dick Porter <dick@ximian.com>
2786 * threads.c (mono_thread_manage): Make sure the main thread has
2787 abandoned all its mutexes when cleaning up. Fixes bug 74680.
2789 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2791 * loader.c (mono_loader_set_error_type_load): Log a warning to the
2792 console about the missing type.
2793 (mono_loader_set_error_method_load): Ditto.
2795 2005-11-09 Miguel de Icaza <miguel@novell.com>
2797 * mono-config.c (mono_get_config_dir): Set the system defaults if
2800 * assembly.c (mono_set_dirs): New API entry point to set the
2801 assembly and the config directory in one call
2803 2005-11-09 Zoltan Varga <vargaz@gmail.com>
2805 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2806 the ftnptr was created from a delegate in a domain other than the
2807 current domain. Fixes #75377.
2809 * exception.h exception.c: Add mono_get_exception_not_supported ().
2811 2005-11-08 Martin Baulig <martin@ximian.com>
2813 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2815 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
2817 * security-manager.h: Added definitions to deal with strongname key
2818 pairs bigger (and smaller) than 1024 bits.
2819 * reflection.c: Remove hardcoded strongname size (128 bytes) and
2820 adjust wrt the public key length being used.
2822 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
2824 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2825 Windows build (r51396-51397).
2827 2005-11-03 Martin Baulig <martin@ximian.com>
2829 * class.c (mono_class_setup_vtable_general): Also add generic
2830 methods to the vtable; fixes #76581.
2832 2005-11-01 Miguel de Icaza <miguel@novell.com>
2834 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2835 sure that we lookup GetString method from the System.Text.Encoding
2836 class, not the derived class or we get an empty method.
2840 2005-10-25 Miguel de Icaza <miguel@novell.com>
2842 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2843 if it has been previously set (embedders).
2845 Make mono_set_rootdir available also on Unix.
2847 005-10-24 Robert Jordan <robertj@gmx.net>
2849 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2851 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
2853 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2854 only calls which are made to native code use this flag.
2856 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2858 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
2860 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2861 Add support for FieldBuilders.
2863 2005-10-29 Martin Baulig <martin@ximian.com>
2866 (mono_debug_using_mono_debugger): New public method; returns
2867 whether we're running inside the debugger.
2869 2005-10-27 Zoltan Varga <vargaz@gmail.com>
2871 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2872 for Method/Constructor/FieldBuilders.
2874 2005-10-26 Zoltan Varga <vargaz@gmail.com>
2876 * reflection.c (module_add_cattrs): Save custom attributes for global methods
2879 2005-10-26 Martin Baulig <martin@ximian.com>
2881 * mono-debug-debugger.c
2882 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2884 2005-10-24 Raja R Harinath <harinath@gmail.com>
2886 * icall.c (base64_to_byte_array): Don't pass an out-of-range
2889 2005-10-21 Zoltan Varga <vargaz@gmail.com>
2891 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2892 when passing valuetypes byref. Fixes #76502.
2894 2005-10-19 Jackson Harper <jackson@ximian.com>
2896 * profiler.c: Don't put a . in front of types that are not in a
2899 2005-10-18 Zoltan Varga <vargaz@gmail.com>
2901 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2903 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
2905 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2907 (mono_marshal_get_ldflda_wrapper): Fix a warning.
2909 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2911 * assembly.c metadata-internals.h icall.c: Define an additional
2912 parameter for mono_assembly_name_parse_full, so we can avoid creating
2913 S.R.AssemblyName.Version when no version info wasn't passed.
2915 2005-10-09 Miguel de Icaza <miguel@novell.com>
2917 * class.c (mono_type_get_full_name): Reimplement method that was
2920 * image.c: Some docs
2922 2005-10-10 Zoltan Varga <vargaz@gmail.com>
2924 * profiler.c (output_newobj_profile): Fix printing of Total memory
2927 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2929 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2931 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
2933 * threads.c: remove debug output.
2935 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2937 * threads.c (mono_thread_manage): Fix crashes if more than 64
2938 threads need to be aborted. Hopefully fixes #75899.
2940 * assembly.c (mono_stringify_assembly_name): New helper function.
2942 * class.c: Use mono_stringify_assembly_name instead of the similar
2945 * assembly.h assembly.c: Add support for calling a postload search
2946 hook if an assembly cannot be loaded.
2948 * appdomain.c: Register new search hooks which call the AssemblyResolve
2949 events in AppDomain. Fixes #75231
2951 2005-10-07 Martin Baulig <martin@ximian.com>
2953 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2954 methods without debug info.
2956 2005-10-07 Zoltan Varga <vargaz@gmail.com>
2958 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2961 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2963 * file-io.c: now that we return symlinks, use lstat and, when the file
2964 is a symbolic link, stat, to get the file attributes. Also avoid the
2965 conversion to/from utf16/external.
2967 2005-10-06 Zoltan Varga <vargaz@gmail.com>
2969 * class.c (mono_class_layout_fields): Compute klass->has_references
2970 correctly if an embedded valuetype is not yet initialized. Fixes
2973 2005-10-04 Martin Baulig <martin@ximian.com>
2976 (mono_metadata_load_generic_param_constraints): New public
2977 function; splitted the constraints loading out from
2978 mono_metadata_load_generic_params().
2980 * class.c (mono_class_create_from_typedef): Call
2981 mono_metadata_load_generic_param_constraints() after setting up
2982 the type and creating our parent; fixes #75329.
2984 2005-10-04 Martin Baulig <martin@ximian.com>
2986 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2987 non-dynamic parent classes.
2989 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
2991 * file-io.c : win32 build fix (ETXTBSY seems not found).
2993 2005-10-04 Martin Baulig <martin@ximian.com>
2996 (mono_image_get_methodspec_token): Make the cache actually work;
2999 2005-10-04 Martin Baulig <martin@ximian.com>
3001 * class.c (mono_class_name_from_token): Removed the unneccessary
3002 `MonoGenericContext *' argument.
3004 2005-10-04 Martin Baulig <martin@ximian.com>
3007 (method_from_methodspec): Make the caching work again; fixes the
3008 performance regression from #76262.
3010 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3014 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3015 GetFileSystemEntries that performs the same work but without going
3016 into io-layer, locking, etc.
3018 2005-09-30 Zoltan Varga <vargaz@gmail.com>
3020 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
3021 ThreadState_Stopped as well. Fixes #76047.
3023 2005-09-29 Martin Baulig <martin@ximian.com>
3026 (inflate_generic_context): If the new context has a `gmethod', set
3027 its `container' that that gmethod's `container'.
3030 (mono_metadata_parse_generic_param): Simplify things;
3031 `generic_container = generic_context->container;' is just fine.
3033 * loader.c (method_from_methodspec): Code cleanups.
3035 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3037 * decimal.c: fix warning (and let gcc generate correct
3038 code on ARM with optimizations).
3040 2005-09-28 Martin Baulig <martin@ximian.com>
3043 (method_from_memberref): Added `MonoGenericContext *class_context'
3044 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3045 (method_from_methodspec): If we're a memberref, use the enclosing
3046 context when parsing its parent. Fixes #76262; see gtest-206.cs.
3048 2005-09-28 Martin Baulig <martin@ximian.com>
3050 * object.c (mono_runtime_invoke_array): Added support for
3051 MONO_TYPE_GENERICINST; fixes #75917.
3053 2005-09-27 Martin Baulig <martin@ximian.com>
3055 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3056 `k->byval_arg.type' to determine the actual type.
3058 * loader.c (method_from_methodspec): Removed some hacks.
3060 2005-09-27 Ben Maurer <bmaurer@ximian.com>
3062 * class-internals.h (mono_field_is_deleted): Do the test for
3063 rtspecialname before we check the actual name of the field. This
3064 prevents us from dereferencing a pointer into the string table,
3065 saving us from accessing a few pages
3067 * *.c: Replace the use of {Enter,Leave}CriticalSection with
3068 macros. This will allow a deadlock debugger to easily be plugged
3071 2005-09-27 Martin Baulig <martin@ximian.com>
3073 * loader.c (method_from_methodspec): Create a "signature"
3074 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
3076 2005-09-27 Martin Baulig <martin@ximian.com>
3079 (inflate_generic_class): Correctly set the new context's
3083 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3084 instead of a `MonoGenericContext *'.
3085 (mono_method_signature_full): Take a `MonoGenericContainer *'
3086 instead of a `MonoGenericContext *'.
3089 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3090 instead of a `MonoGenericContext *'.
3091 (mono_metadata_parse_method_signature_full): Likewise.
3093 2005-09-26 Martin Baulig <martin@ximian.com>
3096 (mono_class_from_generic_parameter): Set `klass->generic_container'
3097 (mono_class_from_generic_parameter): Likewise.
3098 (mono_bounded_array_class_get): We inherit the generic container
3099 from the element class.
3102 (find_method, find_method_in_class): Take a `MonoGenericContext *'
3103 argument rather than computing it here.
3104 (method_from_memberref): Correctly set the generic context before
3105 parsing the signature. Fixes #75681.
3107 2005-09-26 Zoltan Varga <vargaz@gmail.com>
3109 * object.c (mono_class_has_special_static_fields): Fix warnings.
3111 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3113 * assembly.c: Add parse_public_key function, to
3114 par the public keys. Also added mono_assembly_name_parse_full,
3115 to define it the parsed key should be freed or not.
3116 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3117 to parse a long format assembly name.
3118 * metadata-internals.h: Keep mono_assembly_name_parse_full as
3119 private, since calling it to preserve the key requires
3120 freeing it manually.
3122 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
3124 * locales.c : removed HAVE_ICU part.
3126 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
3128 * object.c (mono_class_create_runtime_vtable): Avoid calling
3129 field_is_special_static if the klass has no special static fields.
3131 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3132 (MonoCachedClassInfo): Likewise.
3134 * object.c (mono_class_has_special_static_fields): New helper function.
3136 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3138 * class.c (mono_class_create_from_typedef): Don't call
3139 interfaces_from_typedef_full for enums.
3140 (mono_class_create_from_typedef): Compute the base types of enums directly
3141 without calling mono_class_setup_fields ().
3142 (mono_class_find_enum_basetype): New helper function.
3144 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3145 one place inside the string heap.
3147 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3149 * class.c: locking fixes, code cleanups, some docs added.
3150 Allocate some data structures in the image mempool.
3152 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3154 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3157 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3159 * class-internals.h, class.c, reflection.c: reduce memory taken by
3162 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3164 * metadata.c, metadata.h, loader.h: documentation updates, code and
3167 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3169 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3172 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3173 page faults caused by the runtime while reading metadata.
3175 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3177 * socket-io.c: the field names were changed 3 months ago and no one
3178 realized until bug #76077 got filed!
3180 2005-09-20 Martin Baulig <martin@ximian.com>
3182 * icall.c (assembly_icalls): Removed some unused debugger icalls.
3184 2005-09-20 Martin Baulig <martin@ximian.com>
3186 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3187 write the rank into the class entry.
3189 2005-09-20 Martin Baulig <martin@ximian.com>
3191 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3193 2005-09-19 Zoltan Varga <vargaz@gmail.com>
3195 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3197 * icall.c (custom_attrs_defined_internal): New icall.
3199 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3201 (mono_custom_attrs_construct_by_type): New helper function.
3203 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
3205 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3206 terminate the resulting string. Fixes #76123.
3208 2005-09-16 Martin Baulig <martin@ximian.com>
3211 (mono_debug_add_method): Ignore inflated methods for the moment.
3213 2005-09-14 Martin Baulig <martin@ximian.com>
3215 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3217 2005-09-13 Zoltan Varga <vargaz@gmail.com>
3219 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3220 return a success/failure indication.
3221 (mono_metadata_interfaces_from_typedef_full): Ditto.
3222 (get_constraints): Ditto.
3224 2005-09-12 Zoltan Varga <vargaz@gmail.com>
3226 * marshal.c (emit_marshal_array): Fix handling of null arrays.
3228 * marshal.c (emit_marshal_array): Add support for returning string
3229 arrays from delegates. Fixes #76063.
3231 * marshal.c: Use the emit_ldloc/stloc macros where possible.
3233 2005-09-11 Zoltan Varga <vargaz@gmail.com>
3235 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3238 2005-09-09 Zoltan Varga <vargaz@gmail.com>
3240 * reflection.c icall.c: Fix after mono_get_exception_type_load
3243 * assembly.c (mono_assembly_get_assemblyref): New helper function.
3244 (mono_assembly_load_reference): Use the new helper.
3246 * class-internals.h (MonoLoaderError): New structure containing
3247 information about type loading errors.
3249 * class-internals.h loader.c: Add APIs to store per-thread loader
3252 * loader.c class.c: Set the loader error if needed.
3254 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3256 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3258 * decimal.c: fixed to handle the broken ARM fp format.
3260 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3262 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3265 2005-09-06 Martin Baulig <martin@ximian.com>
3267 * domain.c (supported_runtimes): Added v2.0.50727.
3269 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3271 * culture-info.h: reduce the size of some structures.
3273 2005-09-05 Martin Baulig <martin@ximian.com>
3275 Reflect latest API changes in the August CTP.
3278 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3279 ("MonoType.HasGenericArguments"): Removed.
3280 ("MonoMethod.BindGenericParameters"): Renamed to
3281 "MakeGenericMethod".
3282 ("MethodBuilder.BindGenericParameters"): Renamed to
3283 "MakeGenericMethod".
3285 2005-09-05 Martin Baulig <martin@ximian.com>
3287 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3289 2005-09-05 Martin Baulig <martin@ximian.com>
3291 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3293 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3294 generic_container is non-NULL.
3296 2005-09-05 Martin Baulig <martin@ximian.com>
3298 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3300 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3302 2005-08-29 Michal Moskal <malekith@nemerle.org>
3304 * reflection.c (encode_locals,
3305 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3306 for large generic types.
3308 2005-09-05 Martin Baulig <martin@ximian.com>
3310 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3312 * class.c (mono_dup_array_type): New public method.
3313 (mono_metadata_signature_deep_dup): New public method.
3314 (dup_type): Correctly duplicate array and function types.
3316 2005-09-05 Martin Baulig <martin@ximian.com>
3318 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3320 * reflection.c (get_default_param_value_blobs): Handle generic types
3321 and generic methods.
3323 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
3325 * class.c: Fixed error reporting (method/class were inversed) for
3326 inheritance demands.
3327 * security-manager.c|h: Added the AppDomain when calling the managed
3328 System.Security.SecurityManager.InheritanceDemand method.
3330 2005-09-01 Raja R Harinath <rharinath@novell.com>
3332 * reflection.c (encode_marshal_blob): 'marshaltype' and
3333 'marshaltyperef' are alternate sources for the custom marshaler
3336 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3338 * class.c: fix creation of array classes with rank == 1
3339 (patch by Ankit Jain <jankit@novell.com>).
3341 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3343 * object.c: fix check for creating the bound data for arrays vs
3346 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3348 * object.c: configuration file name is now based on the executable name,
3349 not the image name. Fixes bug #75931.
3351 2005-08-29 Zoltan Varga <vargaz@gmail.com>
3353 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3354 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3356 2005-08-25 Zoltan Varga <vargaz@gmail.com>
3358 * rand.c: Use wincrypt.h instead of WinCrypt.h.
3360 2005-08-24 Ankit Jain <jankit@novell.com>
3361 Raja R Harinath <rharinath@novell.com>
3363 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3364 called by it recursively.
3365 (mono_class_init): Remove special case in pending_init handling, since it's
3366 superseded by the fix to mono_class_from_typeref.
3368 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
3370 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
3371 BROKEN_THREAD_START stuff.
3373 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
3375 * class-internals.h object.c: Add a new kind of trampoline called a delegate
3378 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3380 * object.c (mono_delegate_ctor): Replace the original function address with
3381 a delegate trampoline.
3383 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3385 * icall.c: add boolean argument to base64_to_byte_array and
3386 InternalFromBase64String to control whether a whitespace-only string
3387 is allowed (or should casue a FormatException to be thrown). We need
3388 this as the behavior has changed between MS.NET 1.x and 2.0, and we
3389 to match the MS behaviour in both profiles.
3390 * appdomain.c: Bump corlib version.
3392 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3394 This patch implements a big portion of publisher policy
3395 support, used to bind assembly versions and redirect
3396 one assembly from version A to version B.
3399 New GSList loaded_assembly_bindings, for storing the cached
3401 (assembly_binding_maps_name): New static function for checking if a
3402 assembly binding information maps an assembly name.
3403 (mono_assembly_binding_info_free): New function for freeing
3404 assembly binding information resources.
3405 (get_publisher_policy_info): New static function for retrieving
3406 assembly binding information from a MonoImage.
3407 (compare_versions): New static function for comparing an assembly
3408 binding information data and the version of an assembly name.
3409 (check_policy_versions): New static function for checking if an
3410 assembly binding info mapping an assembly name is valid for it.
3411 (mono_assembly_load_publisher_policy): New static function for
3412 loading the 'policy.major.minor.MyAssembly' image for an assembly
3413 with an assembly name 'aname'.
3414 (mono_assembly_bind_version): New static function for updating
3415 assembly redirection.
3416 (mono_assembly_apply_binding): New static function for applying
3418 (search_binding_loaded): New static function for searching
3419 loaded assembly binding infos in the cache domain.
3420 (mono_assembly_load_full): Don't apply assembly binding for
3421 reflection only assemblies.
3423 * metadata-internals.h: Add MonoAssemblyBindingInfo,
3424 which contains information about assembly binding. Also
3425 declare signature for mono_config_parse_publisher_policy ()
3426 function, used to retrieve pub policy info.
3429 (publisher_policy_start): New static function used to parse publisher
3430 policy config files.
3431 (publisher_policy_parser): New static MonoParseHandler containing
3432 the functions used when parsing config files.
3433 (mono_config_parse_publisher_policy): New function for parsing
3434 publisher policy files.
3436 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
3438 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3440 * marshal.c (mono_delegate_free_ftnptr): Ditto.
3442 * object.c (mono_get_addr_from_ftnptr): New helper function.
3444 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3446 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3448 2005-08-19 Dick Porter <dick@ximian.com>
3450 * threads.c, threads.h, appdomain.c, appdomain.h,
3451 profiler-private.h, monitor.c, object.c, object-internals.h,
3452 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3453 store the thread ID, so it can hold a 64 bit value if needed.
3455 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
3457 * reflection.c (mono_reflection_create_dynamic_method): Store the
3458 handle class into the method references as well so ldtoken works in
3461 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3464 2005-08-19 Ankit Jain <jankit@novell.com>
3467 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
3468 here rather than using the method signature of a arbitrary function
3469 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
3471 Hack done with Harinath.
3473 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3475 * threadpool.c: disable printing stack traces when we get a exception
3476 in a threadpool thread. I need to do more testing to figure out which
3477 cases actually print this. Fixes bug #75828.
3479 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3481 * icall.c: there might be ignored whitespace after the last '='. This
3482 fixes length computation and bug #75840.
3484 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
3486 * assembly.c (mono_assembly_load_full): Consider .exe extension as
3489 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3492 * reflection.c (create_custom_attr_data): Ditto.
3494 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
3496 * locales.c, culture-info.h : removed RegionLCIDMap.
3497 * culture-info-tables.h : regenerated.
3499 2005-08-16 Martin Baulig <martin@ximian.com>
3501 * class.c (mono_type_get_name_recurse): Small fix.
3503 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
3505 * locales.c : indentation fixie.
3507 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
3509 * object-internals.h,
3513 icall.c : added RegionInfo table support.
3514 * culture-info-table.h : regenerated for region support.
3516 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
3518 * reflection.c (resolve_object): handle all kinds of MonoMethod
3519 including generic ones
3521 2005-08-12 Ankit Jain <jankit@novell.com>
3523 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3524 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
3526 2005-09-12 Lluis Sanchez <lluis@ximian.com>
3528 * process.c: Don't close a thread handle when it's NULL. This is a
3529 workaround for bug #75733.
3531 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
3533 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3535 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
3537 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3539 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3541 * threadpool.c: if a work item in the thread pool has a callback that
3542 catches a exception, don't propagate it after invoking the callback.
3545 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
3547 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3549 * class-internals.h (MonoCachedClassInfo): Add some new fields.
3551 * class.c (mono_class_init): Load field info lazily in the AOT case.
3553 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3555 2005-08-03 Ankit Jain <jankit@novell.com>
3558 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3559 PInvoke calling convention is 0.
3561 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
3563 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
3564 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3566 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3568 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3569 to handle threads not started by the GC (patch by Michael Meeks
3570 <michael.meeks@novell.com>).
3572 2005-07-31 Kamil Skalski <nazgul@omega.pl>
3574 * reflection.c: Make buffer used in emitting types larger for some
3575 big generic types (patch by Michal Moskal).
3577 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
3579 * mono-debug.c: Fix some (not all) alignment problems.
3581 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3583 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3584 Invoke mono_image_load_from_data_full passing the refonly
3588 (mono_assembly_open_from_bundle): Add the refonly argument,
3589 in order to pass it to other methods it calls to.
3590 (do_mono_assembly_open): Add the refonly argument, in order
3591 to pass it to other methods it calls to.
3592 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3593 the refonly parameter to it.
3595 * image.c: Add loaded_images_refonly_hash and
3596 loaded_images_refonly_guid_hash to cache the reflection
3598 (mono_images_init): Initialize the hash tables used for
3599 caching the reflection only images.
3600 (load_modules): Invoke mono_image_open_full passing the refonly
3601 parameter to load the modules the correct way.
3602 (build_guid_table): Add the refonly argument, to re-build the
3604 (do_mono_image_open): Added the refonly argument, in order to
3605 define it for the loaded image.
3606 (mono_image_loaded_full): New function, which receives an
3607 additional parameter to look for the image in the refonly or
3608 non-refonly section.
3609 (mono_image_loaded): Updated, using mono_image_loaded_full.
3610 (mono_image_loaded_by_guid_full): The same case that happens
3611 with mono_image_loaded_full.
3612 (mono_image_loaded_by_guid): Likewise.
3613 (register_image): Use the ref_only variable inside MonoImage
3614 to decide in which hash table store the current image.
3615 (mono_image_open_from_data_full): Rename
3616 mono_image_open_from_data to mono_image_open_from_data_full,
3617 adding the refonly argument, to define the ref_only variable
3619 (mono_image_open_from_data): Return
3620 mono_image_open_from_data_full.
3621 (mono_image_open_full): Rename mono_image_open to
3622 mono_image_open_full, receiving the new refonly argument,
3623 to pass it to inner methods.
3624 (mono_pe_file_open): Update this function, to open
3625 a MonoImage as a non-refonly image.
3626 (mono_image_close): Use the refonly variable inside
3627 MonoImage to remove the image from the correct caches.
3629 * image.h: Add the signatures of mono_image_open_full,
3630 mono_image_open_from_data_full, mono_image_loaded_full,
3631 mono_image_loaded_by_guid_full.
3633 * metadata-internals.h: Add the ref_only field to
3636 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3638 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3639 Fix the last behavior, which used to load the assemblies and
3640 extract MonoReflectionAssemblyName information, instead of
3641 extract it from the metadata tables. Needed for Reflection
3644 2005-07-29 Martin Baulig <martin@ximian.com>
3646 * mono-debug-debugger.c
3647 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3651 (mono_debug_address_from_il_offset): Check whether we have
3652 debugging support before attempting to take the lock.
3653 (mono_debug_source_location_from_address): Likewise.
3654 (mono_debug_source_location_from_il_offset): Likewise.
3655 (mono_debug_il_offset_from_address): Likewise.
3656 (mono_debug_address_from_il_offset): Likewise.
3658 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
3660 * class.c (mono_class_from_name_case): Add support for dynamic images.
3663 * object.c (mono_class_compute_gc_descriptor): Add a workaround
3666 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3668 * reflection.c (mono_method_get_object): Fix warning.
3670 2005-07-28 Martin Baulig <martin@ximian.com>
3673 (mono_debug_add_wrapper): Also write the wrapper type.
3675 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3677 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3679 * class.c (mono_class_init): Avoid reading nested classes if the AOT
3680 data indicates the class has none.
3682 2005-07-26 Ben Maurer <bmaurer@ximian.com>
3684 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3685 loader lock with the debugger lock. Prevents deadlocks for beagle.
3687 Beagle can now run on an smp box for a weekend without any
3690 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
3692 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3693 in a module. Fixes #75629.
3695 2005-07-26 Martin Baulig <martin@ximian.com>
3697 * mono-debug.c (mono_debug_add_wrapper): New static method.
3698 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3699 interncall or a wrapper.
3701 * mono-debug.h (MonoDebugWrapperData): New public typedef.
3702 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3703 (MONO_DEBUGGER_VERSION): Bump to 51.
3705 * mono-debug-debugger.c
3706 (mono_debugger_add_type): Removed this empty function.
3707 (mono_debugger_add_method): Likewise.
3709 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
3711 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
3712 before accessing method->slot.
3714 2005-07-21 Jb Evain <jbevain@gmail.com>
3716 * reflection.c (method_encode_clauses/class): Handle filters clauses.
3719 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
3721 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3724 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
3726 * image.h image.c: Add mono_image_get_guid () API function.
3728 2005-07-19 Ben Maurer <bmaurer@ximian.com>
3730 There were issues when multiple threads tried to load
3731 assemblies. A deadlock was created between assemblies_mutex and
3732 mono_domain_assemblies_lock. This fixes the issue by making the
3733 assembly ref counting be lock free. See bug 75586.
3735 * image.c (mono_image_close): The add ref function here was using
3736 Interlocked operations while the unref was using a mutex and a
3737 --. I don't think this was ever a bug that would be exposed in a
3738 non-pendantic way (ie, by an embedder doing a ref on one thread
3739 and an unref on another), but for the sake of correctness, this is
3742 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3743 (mono_assembly_load_reference): Call mono_assembly_addref rather
3744 than touching the refcount ourselves.
3745 (mono_assembly_close): Use InterlockedDecrement to unref the
3746 assembly. Don't acquire the lock unless it is actually needed.
3748 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3750 * class.c (mono_class_layout_fields): Fix calculation of has_references
3753 2005-07-12 Martin Baulig <martin@ximian.com>
3755 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3758 (mono_type_hash): Provide better hashing for generic instances.
3759 (mono_generic_inst_hash): Improve hashing.
3760 (mono_generic_class_hash): Likewise.
3762 * reflection.c (mymono_metadata_type_hash): Improve hashing for
3765 2005-07-12 Martin Baulig <martin@ximian.com>
3767 * reflection.c (mono_reflection_create_runtime_class): Remove the
3768 hack for generic type definitions and non-`Run' assemblies.
3769 (mono_reflection_bind_generic_parameters): Also use
3770 `klass->wastypebuilder' to check for TypeBuilders.
3772 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3774 * class.c (mono_class_layout_fields): Fix calculation of has_references
3777 * class.c (inflate_generic_class): Fix a leak.
3778 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3781 2005-07-11 Martin Baulig <martin@ximian.com>
3783 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3786 2005-07-11 Martin Baulig <martin@ximian.com>
3788 * loader.c (find_method): Also lookup in
3789 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3791 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3793 * appdomain.c (mono_domain_unload): Don't free the error message
3794 before passing it to mono_get_exception_...
3796 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3798 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3800 * threads.c: try to better guess an available RT signal (bug #75387).
3802 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3804 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3807 2005-07-07 Martin Baulig <martin@ximian.com>
3809 * class.c (mono_type_get_name_full): Return NULL for
3810 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3813 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3815 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3816 exit the appdomain as well being aborted.
3818 * threadpool.c: Create all threadpool threads inside the root appdomain, and
3819 change back to the root domain after calling managed code. This enables
3820 appdomains using threadpools to be unloaded.
3822 2005-07-07 Martin Baulig <martin@ximian.com>
3825 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3826 into `MonoDynamicGenericClass' since we only need it for dynamic
3829 * reflection.c (mono_class_bind_generic_parameters): We don't need
3830 to compute the `parent' here.
3832 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
3834 * culture-info-table.h : regenerated.
3836 2005-07-06 Martin Baulig <martin@ximian.com>
3839 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3841 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3843 2005-07-06 Martin Baulig <martin@ximian.com>
3845 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3846 we're doing a signature-only comparision; fixes #74945.
3848 2005-07-06 Martin Baulig <martin@ximian.com>
3850 * class-internals.h (MonoGenericClass): Moved some things out into
3851 a new `MonoInflatedGenericClass' type.
3852 (MonoInflatedGenericClass): New type; the `klass' of a
3853 `MonoGenericClass' is now computed lazyly in
3854 mono_get_inflated_generic_class().
3856 * class.c (mono_get_inflated_generic_class): New public function.
3857 (mono_class_inflate_generic_method): Removed the unused
3858 `MonoClass *' argument.
3859 (setup_generic_vtable): Don't call mono_get_inflated_method() on
3861 (mono_class_create_generic): Make this static and merge it with
3862 mono_class_create_generic_2(); we're now called automatically from
3863 mono_get_inflated_generic_class().
3865 * loader.c (mono_method_signature): Call
3866 mono_get_inflated_method() here.
3868 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
3870 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3871 type of fields with RVA.
3873 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3874 for this pseudo class.
3875 (my_mono_class_from_generic_parameter): Likewise.
3876 (mono_class_init): Allow interfaces to have cctors.
3878 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3880 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3881 lazily for AOT methods.
3883 2005-07-05 Martin Baulig <martin@ximian.com>
3885 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3886 returns FALSE for a successful match, not TRUE.
3888 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3890 * loader.c (mono_method_get_index): Optimize this a bit.
3892 2005-07-04 Martin Baulig <martin@ximian.com>
3895 (class_compute_field_layout): Move the check for generic type
3896 definitions into mono_class_layout_fields(). Fixes #74684.
3897 (mono_class_from_generic_parameter): Correctly compute
3898 `klass->parent'; fixes #75457.
3900 * reflection.c (register_assembly, register_module): Make sure
3901 `domain->rejobject_hash' is already created.
3903 2005-07-02 Martin Baulig <martin@ximian.com>
3906 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3907 `MonoDynamicGenericClass'.
3909 2005-07-01 Lluis Sanchez <lluis@ximian.com>
3911 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3912 returned by a field getter is null, since null is a valid value.
3914 2005-07-01 Martin Baulig <martin@ximian.com>
3916 * reflection.c (mono_reflection_generic_class_initialize): Update
3917 the `dgclass->fields [i].parent' to the correct class.
3918 (mono_image_get_fieldref_token): Use the declaring type, not the
3921 2005-07-01 Martin Baulig <martin@ximian.com>
3923 * loader.c (find_method): Also look in the interfaces; fixes #75429.
3925 2005-06-30 Ben Maurer <bmaurer@ximian.com>
3927 * threads.c (thread_cleanup): assert that thread != NULL
3928 (wait_for_tids_or_state_change): We were using the wrong variable
3929 when accessing wait->threads. `i' was always out of the bounds of
3932 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3934 * loader.c: map user32 and kernel32 to libMonoSupportW
3936 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
3938 * appdomain.c (unload_thread_main): Mark this as WINAPI.
3940 2005-06-28 Martin Baulig <martin@ximian.com>
3942 * loader.c (method_from_methodspec): Fix #75334.
3944 2005-06-28 Martin Baulig <martin@ximian.com>
3946 Fix #74953 - Arrays now implement the generic IList<T> interface
3947 on the 2.0 platform.
3949 * class-internals.h (MonoDefaults): Added `generic_array_class'.
3951 * reflection.c (mono_class_bind_generic_parameters): New public
3952 function; similar to mono_reflection_bind_generic_parameters(),
3953 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3955 * domain.c (mono_init_internal): Try to initialize.
3956 `mono_defaults.generic_array_class' here; this'll only succeed if
3957 we're using the 2.0 corlib.
3960 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3961 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3962 (mono_lookup_internal_call): Added support for nested classes.
3965 (mono_get_method_from_token): Set `result->signature->pinvoke' if
3966 we're an interncall and have generic arguments.
3969 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3970 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3971 instance of System.Array.InternalArray<T> for arrays, so they
3972 implement the generic IList<T> interface.
3974 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
3976 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3977 (chastamar@yahoo.com). Fixes #75374.
3979 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
3981 * culture-info-table.h: regenerated.
3983 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3985 * icall.c: handle spaces correctly for base64 strings.
3987 2005-06-26 Ben Maurer <bmaurer@ximian.com>
3989 * *.c: Kill some warnings.
3991 2005-06-23 Duncan Mak <duncan@novell.com>
3993 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3994 that this builds on Solaris 10 (x86).
3996 2005-06-23 Martin Baulig <martin@ximian.com>
3999 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4000 generic type definitions.
4002 2005-06-23 Martin Baulig <martin@ximian.com>
4006 * metadata.c (mono_class_get_overrides): Renamed to
4007 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4008 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4009 pass it to mono_get_method_full().
4011 2005-06-22 Ben Maurer <bmaurer@ximian.com>
4013 * reflection.c (mono_reflection_create_runtime_class): take the
4014 mono_domain_lock in this method. Prevents deadlocks
4016 2005-06-22 Martin Baulig <martin@ximian.com>
4018 * loader.c (method_from_methodspec): Fix #75330.
4020 2005-06-22 Martin Baulig <martin@ximian.com>
4022 * reflection.c (type_get_qualified_name): Use
4023 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4024 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4025 argument; use it if we don't have an assembly name.
4027 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
4029 * object.c: In mono_message_init, set "copy out" flag for in
4030 parameters with the [Out] flag.
4032 2005-06-21 Martin Baulig <martin@ximian.com>
4035 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4038 2005-06-21 Martin Baulig <martin@ximian.com>
4040 * class.c (mono_class_init): Don't initialize `class->fields' for
4041 generic instances since they're initialized again in
4042 compute_field_layout().
4043 (compute_field_layout): Set the field's `generic_info' here; fix
4046 2005-06-21 Martin Baulig <martin@ximian.com>
4049 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4051 * metadata.c (mono_metadata_generic_method_equal): Also
4052 distinguish the `generic_class'; fixes #75334.
4054 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4058 * domain-internals.h:
4059 * reflection.c: 'domain_assemblies' field is now protected by its own
4060 lock. Don't call into managed code to run the AssemblyLoad event if we
4061 now there are no registered delegates for it.
4063 2005-06-20 Martin Baulig <martin@ximian.com>
4065 * class.c (mono_class_is_assignable_from): Use a custom version of
4066 mono_class_has_parent() to make things work for generic instances;
4069 2005-06-20 Martin Baulig <martin@ximian.com>
4071 * loader.c (method_from_methodspec): Apply a patch from
4072 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4074 2005-06-20 Martin Baulig <martin@ximian.com>
4076 * class.c (mono_class_init): Reverted Zoltan's last change; it
4079 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
4081 * threads.c (wait_for_tids_or_state_change): Add missing locking.
4083 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4085 * socket-io.c: fix the index in the socket array for writable/error
4086 sockets. Fixes bug #75306.
4088 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
4090 * class.c (mono_class_init): Allow interfaces to have static ctors.
4092 2005-06-17 Martin Baulig <martin@ximian.com>
4094 * loader.c (method_from_methodspec): Use `context->container' when
4095 parsing the `gmethod->inst'.
4097 2005-06-17 Martin Baulig <martin@ximian.com>
4099 * class.c (mono_type_get_name_recurse): Don't add the assembly
4100 name for type arguments.
4102 2005-06-15 Martin Baulig <martin@ximian.com>
4104 * reflection.c (mono_image_get_inflated_method_token): Encode
4105 correct klass; fixes #75260.
4107 2005-06-13 Michal Moskal <malekith@nemerle.org>
4109 * icall.c: Make GetCorrespondingMethod/Constructor take
4110 MonoReflectionMethod method not MonoMethod. Removed
4111 MonoType.GetCorrespondingField, and make
4112 MonoGenericType.GetCorrespondingField take name not
4115 2005-06-13 Michal Moskal <malekith@nemerle.org>
4117 * reflection.c (field_encode_signature, encode_locals):
4118 Make sizes of buffers for types larger (for big generic types).
4119 (create_generic_typespec,
4120 mono_reflection_sighelper_get_signature_local,
4121 mono_reflection_sighelper_get_signature_field):
4122 Add asserts for too small buffers.
4124 2005-06-15 Martin Baulig <martin@ximian.com>
4126 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4127 if our parent is not a dynamic type.
4129 2005-06-15 Martin Baulig <martin@ximian.com>
4131 * class-internals.h (MonoTypeNameFormat): New enum.
4134 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4135 (mono_type_get_full_name): Removed.
4136 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4137 argument instead of the boolean's.
4139 * icall.c (ves_icall_System_MonoType_getFullName):
4140 Added `gboolean assembly_qualified'.
4143 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4145 * reflection.c (mono_reflection_parse_type): Parse the new type
4148 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4150 * icall.c: no need to convert from utf16 to utf8 and then back again
4151 after the call to GetLogicalDrives.
4153 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4155 * icall.c: frombase64. Fix problems exposed by new tests.
4157 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4159 * icall.c: added internal calls for converting char [] and strings in
4160 base64 into byte [].
4162 2005-06-10 Martin Baulig <martin@ximian.com>
4164 * class.c (mono_class_create_generic_2): Read the nested classes
4165 from the metadata rather than from `gklass->nested_classes' since
4166 `gklass' might not be initialized yet.
4168 2005-06-09 Duncan Mak <duncan@novell.com>
4170 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4171 all public headers. Fixes #74919.
4173 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
4175 * domain.c: The key for proxy_vtable_hash is now a pointer
4176 array. Added new GHashFunc and GCompareFunc functions for this.
4178 * class.h: The list of interfaces in MonoRemoteClass is known in
4179 advance and can't grow (we create a new MonoRemoteClass if needed),
4180 so now the interface array can be allocated together with
4183 * object.c: Added a new method create_remote_class_key.
4184 Fixed mono_remote_class so it does not depend on
4185 mono_upgrade_remote_class.
4186 Removed extend_interface_array.
4187 Added new method clone_remote_class(), which makes a copy of a remote
4188 class and adds a new interface or class to it.
4189 mono_upgrade_remote_class() now creates a new remote class (or gets
4190 it from the cache) if an vtable upgrade is needed. In this way
4191 we make sure that other objects sharing the same remote class
4192 don't get the new vtable with unwanted interfaces.
4194 * object-internals.h:
4195 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4197 * marshal.c: Track changes in mono_upgrade_remote_class().
4199 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
4200 * icall.c: Add runtime methods for obtaining members of inflated
4201 class, which were created from supplied non-inflated members. It
4202 is used in internal Get{Method,Constructor,Field} methods in
4205 2005-06-09 Martin Baulig <martin@ximian.com>
4208 (mono_reflection_bind_generic_method_parameters): Fix #75169.
4210 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4211 * reflection.c (mono_image_basic_init): Define
4212 Version in MonoDynamicAssembly.
4214 2005-06-08 Martin Baulig <martin@ximian.com>
4219 (mono_method_signature_full): New public method; takes a
4220 `MonoGenericContext *'.
4221 (find_method): Use mono_method_signature_full() and pass the
4222 klass'es context to it.
4224 * class.c (mono_class_is_inflated_method): Use
4225 mono_method_signature_full() and pass the context to it.
4227 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4229 * object.c: add proper locking in mono_remote_class_vtable(),
4230 fixes possible memory corruption.
4232 2005-06-08 Michael Meeks <michael.meeks@novell.com>
4234 * marshal.c (mono_remoting_marshal_init): set
4235 initialized after initialization.
4237 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
4241 2005-06-06 Michael Meeks <michael.meeks@novell.com>
4243 * object.c (extend_interface_array): fix really silly
4244 memory corrupting / comparison bug.
4246 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4248 * reflection.c: Functions added to support the creation
4249 of CustomAttributeData, which includes Attribute data
4250 used by ReflectionOnly methods.
4252 * reflection.h: mono_reflection_get_custom_attrs_data and
4253 mono_custom_attrs_data_construct added (functions exposed).
4255 * icall.c: Added mono_reflection_get_custom_attrs_data
4258 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
4260 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4263 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
4265 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4267 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4268 dynamic DllImportAttribute.
4270 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
4271 dynamic DllImportAttribute.
4273 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4276 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4278 * threads.c: avoid segfault when an unstarted thread is aborted.
4280 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
4282 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4283 Returns the name and version of the runtime for reporting.
4285 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4287 * appdomain.c: bump corlib version.
4288 * object-internals.h: new field in MonoReflectionAssembly.
4290 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4292 * object-internals.h: Carlos forgot to add this field.
4294 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4296 * icall.c: Added create_version to create instances
4297 of Version of MonoReflectionAssemblyName. This change helps
4298 the AssemblyName tests to keep running fine.
4300 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
4302 * object.c (mono_method_return_message_restore): A somehow less
4303 intrusive fix for #75138.
4305 2005-06-03 Raja R Harinath <rharinath@novell.com>
4307 * object.c (mono_method_return_message_restore): Fix computation
4308 of expected number of out args.
4310 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4312 * reflection.c (mono_image_get_method_info): Fix the case when the
4315 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4317 * object.c: Added missing null check in
4318 mono_method_return_message_restore.
4320 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4322 * reflection.c (mono_image_get_method_info): Handle the case when
4325 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4327 * object.c: When creating the vtable for a proxy, take into account
4328 all inherited interfaces, not only the ones registered in
4329 iclass->interfaces. This fixs bug #74996.
4330 Also, in mono_method_return_message_restore, verify that the array
4331 of out args has the expected lengh.
4333 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4335 * socket-io.c: update the timeout in Poll when the call is interrupte.
4337 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4339 * socket-io.c: support abort/suspend in Select_internal after last
4342 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4344 * threadpool.c: remove warning.
4346 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4349 * socket-io.[ch]: Select_internal uses poll() now when available, thus
4350 removing the 1024 limit from select(). Runtime part of the fix for
4353 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4355 * socket-io.c: when resolving the addresses for the same
4356 host returned by gethostname(), get the local IPs from the interface
4357 list. Loopback addresses are discarded if the are interfaces up with
4358 non-loopback ones. Fixes bug #63265.
4360 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
4362 * appdomain.c, verify.c, object-internals.h, reflection.c:
4363 bumped corlib number to 36, and added new extra_flags field
4364 to ReflectionMethodBuilder and friends. Fixes #75060.
4366 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4368 * gc.c: register a new weak link only if the object is non-null
4371 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4373 * culture-info.h : short time pattern too.
4375 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4377 * culture-info.h : expand long time pattern string length.
4379 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4381 * culture-info-table.h : update (more French date format; #72788).
4383 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
4385 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4386 the method is static. Fixes #75029.
4388 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
4390 * reflection.c: Update the table_idx field of method builders after
4391 saving the module, since it can change. This is a workaround for
4394 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4396 * culture-info-table.h : update (additional French date format).
4398 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
4400 * icall.c (ves_icall_type_Equals): Revert last change.
4402 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4404 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4406 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
4408 * class-internals.h: Added executioncontext_class field to
4409 MonoDefaults structure.
4410 * domain.c: Cache System.Threading.ExecutionContext class in
4412 * object.c: Capture the ExecutionContext for asynchroneous calls in
4413 mono_async_result_new.
4414 * object-internals.h: Added execution_context and original_context
4415 fields to MonoAsyncResult. Added execution_context to MonoThread.
4416 * security-manager.c|.h: Added mono_get_context_capture_method to
4417 return the capture method (if required by the security manager or by
4418 the framework version used).
4419 * threadpool.c: Apply capture (if present) ExecutionContext in
4420 mono_async_invoke and revert to original context after it completes.
4422 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
4424 * culture-info-table.h : updated (real hacky solution for zh-CHT).
4426 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
4428 * culture-info-table.h : zh-CHT related workaround.
4430 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4432 * marshal.c (emit_marshal_custom): Add some error checking and call the
4433 methods in the ICustomMarshaler interface. Fixes #74875.
4435 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4436 native->managed wrappers.
4438 2005-05-12 Martin Baulig <martin@ximian.com>
4440 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4441 here and use the loader lock.
4443 * mono-debug.c: Properly lock when the debugger is not attached.
4444 (mono_debug_init): Release the initial lock if we're not running
4447 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4449 * marshal.c (emit_marshal_custom): Pass through NULL values without
4450 calling the custom marshalling routines.
4452 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4453 conversion in structures. Fixes #74882.
4455 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
4457 * culture-info-table.h : zh-* cultures were missing.
4459 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
4461 * threads.c: Added a new event background_change_event which is signaled
4462 when a thread changes its background mode.
4463 Moved here several checks previously done in managed code. The checks
4464 require the thread lock, and using the thread lock in managed code
4465 can result in deadlocks.
4466 Merged Start_internal and Thread_internal into a single method. Now
4467 Thread_internal does all work of creating and starting a thread.
4468 Added icalls for setting and getting the state of the object. Moved from
4469 managed code to avoid locking there.
4470 Added wait_for_tids_or_state_change() which is called instad of
4471 wait_for_tids when waiting for non-backround threads to end. This method
4472 will return if one of the threads ends or the background_change_event
4474 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4475 the background mode. This method signals the background_change_event
4478 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4479 removed Start_internal.
4481 2005-05-11 Martin Baulig <martin@ximian.com>
4483 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4484 to order of some fields to get proper alignment on 64-bit machines.
4486 2005-05-11 Martin Baulig <martin@ximian.com>
4488 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4489 changes as they're broken and completely fuck up the debugger.
4491 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4493 2005-05-10 Martin Baulig <martin@ximian.com>
4495 * reflection.c (mono_reflection_generic_class_initialize): Don't
4496 call mono_class_setup_parent() here.
4498 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4500 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4501 send/receive timeout use an integer in milliseconds. We were using a
4504 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4507 (internal_get_cultures): reserve the first slot of the array for the
4508 InvariantCulture, which will be filled in managed code.
4510 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
4512 * reflection.c (mono_image_fill_module_table): Initialize the
4513 GENERATION field as well.
4515 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4517 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4518 Monitor.Enter on the object.
4520 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
4522 * threads.c: Enable the wait for running threads when exiting.
4523 * icall.c: Suspend all threads before exiting.
4525 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
4527 * assembly.c (mono_assembly_load_reference): Fix warning.
4529 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4531 * threadpool.c: changed the default number of threads per cpu. From now
4532 on, the default will be 20 + (5 * number of cpus) instead of 50.
4534 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
4536 * loader.c (mono_method_get_signature_full): Add locking here.
4538 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
4540 * appdomain.c: Moved methods for parsing and freeing assembly
4541 names to assembly.c.
4542 * assembly.c, domain-internals.h: Created public methods for parsing
4543 assembly names. Fixed mono_assembly_load_with_partial_name:
4544 it now finds the best match, taking into account the version,
4545 token and culture specified in the partial name. Also return
4546 the latest version if no version information is specified.
4548 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4550 * threadpool.c: replace check for SocketAsyncCall class.
4552 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4554 * threadpool-internals.h:
4555 * Makefile.am: added threadpool-internals.h
4557 * threadpool.c: call mono_unhandled_exception on exceptions not handled
4558 that happen in threadpool threads (tested on MS).
4559 (mono_thread_pool_remove_socket): new function that dispatch any pending
4560 AIO call on a socket that is closing. By now only epoll really needs it,
4561 as select/poll wake up when the socket closes.
4564 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4566 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
4568 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4570 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
4572 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4574 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
4576 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4577 has an abort request, convert it into a suspend request.
4579 2005-04-30 Ben Maurer <bmaurer@ximian.com>
4581 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4582 warning for the usage of `UnmanagedFunctionPointerAttribute' which
4583 is not supported yet.
4585 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4587 * image.c: register assemblies loaded from data (bundles) in the loaded
4588 assemblies hash. Fixes bug #74772.
4590 2005-04-29 Martin Baulig <martin@ximian.com>
4592 * class.c (mono_type_get_name_recurse): Update to the new naming
4593 schema from the latest .NET 2.x beta2.
4594 (mono_class_setup_vtable_general): If we're a generic instance,
4595 copy the vtable from our generic type definition and inflate all
4598 * loader.c (find_method): Update to the new naming schema from the
4599 latest .NET 2.x beta2.
4601 2005-04-29 Raja R Harinath <harinath@gmail.com>
4603 * class.c (mono_class_init): Add a mono_loader_unlock to the
4606 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
4608 * icall.c (ves_icall_System_Environment_Exit): Remove the
4609 suspend_all_other_threads () call for the time being, since it can hang.
4611 * threads.c (mono_thread_manage): Similarly, disable the waiting for
4612 the background threads to exit, since it can also hang.
4614 * class.c (mono_class_init): Applied patch from Ankit Jain
4615 (radical@gmail.com). Avoid pending init errors when a field refers
4616 to a nested class using a typeref. Fixes #74734.
4618 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4619 this for dynamic modules.
4621 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4623 * threads.c: don't wait for threads that are in the process of aborting
4624 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4625 and waiting for background threads to finish. This makes xsp and
4626 mod-mono-server exit without random length delays and/or hangs.
4628 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4630 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4632 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
4634 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4635 dynamic types to prevent infinite loops. Fixes #74727.
4637 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4638 ..._is_assignable_to.
4640 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
4642 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4644 2005-04-25 Martin Baulig <martin@ximian.com>
4646 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4649 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4651 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4653 * reflection.c (build_compressed_metadata): Set metadata header
4656 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
4658 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4659 number into an integral and a decimal part. Fixes #70473.
4661 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4663 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
4665 * culture-info-table.h : reflected the latest locale-builder output.
4667 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4669 * threadpool.c: check for SuspendRequested too when deciding if
4670 mono_thread_interruption_checkpoint should be called.
4672 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4674 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4675 * threads.c: remove interruption_mutex and use Interlocked instead. When
4676 suspending all the threads, wait for all the suspended events at once.
4677 If we're shutting down and get an APC that is going to be queued,
4678 call mono_thread_execute_interruption immediately, as the thread might
4679 be sleeping on a pthread condition or mutex.
4681 * icall.c: call mono_runtime_set_shutting_down before suspending the
4684 Fixes bug #74693. And now xsp is happier when exiting.
4686 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
4688 * loader.c (mono_stack_walk): Fix #74690.
4690 2005-04-22 Martin Baulig <martin@ximian.com>
4692 * mono-debug.h (MonoDebugMethodJitInfo): Added
4693 `MonoDebugMethodJitInfo *jit'.
4695 * mono-debug.c (mono_debug_read_method): Cache the
4696 MonoDebugMethodJitInfo in `address->jit'.
4697 (mono_debug_free_method_jit_info): New public method.
4699 2005-04-22 Martin Baulig <martin@ximian.com>
4701 * class.c (mono_class_is_assignable_from): Disallow
4702 type parameter -> interface.
4704 2005-04-21 Dick Porter <dick@ximian.com>
4706 * threads.c (mono_thread_create): Turn an assertion into an error.
4708 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
4710 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4712 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
4713 Fix some gcc 4.0 warnings.
4715 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4717 * file-io.c: fix alt dir separator char on unix systems
4718 and cleanup (fixes bug #71214).
4720 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
4722 * marshal.c: Use CALLVIRT instead of CALL when dispatching
4723 a call to a remote domain, since the method may be an
4724 interface method in the client domain. This fixes bug #74192.
4726 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4728 * threadpool.c: recv/send are now performed before going back to managed
4729 code to save one transition.
4731 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4733 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4735 * metadata/threadpool.c: removed hack to workaround the bug above.
4739 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
4741 * reflection.c reflection.h: Fix handling of parameter defaults in
4742 dynamic methods. Also fixes handling of parameter attributes.
4745 * mono-debug.c (mono_debug_close_image): Fix warning.
4747 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4749 * socket-io.h: replaced old unused field with new 'blocking'.
4750 * threadpool.c: restore socket blocking state on windows(tm).
4752 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
4754 * icall.c: don't return the codebase in the AssemblyName[] returned by
4755 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4756 * object-internals.h: Removed FIXME (fields were presents) and fixed
4757 versioncompat declaration.
4759 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4761 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4762 not closed, so don't cleanup when it happens.
4764 2005-04-13 Chris Toshok <toshok@ximian.com>
4766 * mono-debug-debugger.h: change prototype for
4767 mono_debugger_lookup_type.
4769 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4770 this function, although it should probably be named
4771 mono_debugger_init_type.
4773 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4775 * threadpool.c: fix non-AIO case.
4777 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
4779 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4780 the built-in profiler to measure just JIT compilation times.
4782 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4784 * threadpool.c: the epollfd might be closed by another thread at
4785 any time, so ignore EBADF at treat it as a "we're closing" sign.
4787 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4789 * threadpool.c: release the semaphores with a count equals to the number
4790 of working threads in both IO and regular pools. Fixed typo that messed
4791 up the count of IO pool threads. Don't initialize the pipe handles if
4794 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4796 * threadpool.c: some systems don't like a NULL when deleting the socket
4799 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4801 * threadpool.c: fix semaphore allocation.
4803 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4805 * threadpool.c: added epoll() based implementation for asynchronous IO
4806 that is used instead of the default poll() when available.
4807 It can be disabled by setting MONO_DISABLE_AIO.
4809 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4811 * threadpool.c: windows needs 'closesocket' and instead of returning
4812 0 when the stream is closed while in select, it returns -1. Fixes bug
4815 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
4817 * class.c (class_compute_field_layout): Fix the regression caused by
4820 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4822 * threadpool.c: separate pool for socket async. IO.
4823 * threadpool.h: mono_max_worker_threads is not a global any more.
4825 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
4827 * class.c (class_compute_field_layout): Fix #74549.
4829 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4831 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4832 use 2 connected sockets instead.
4834 2005-04-08 Miguel de Icaza <miguel@novell.com>
4836 * mono-config.c: Add new entry point for mkbundle
4837 mono_config_parse_memory.
4839 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4841 * threadpool.c: removed another unused function.
4843 2005-04-08 Ankit Jain <radical@corewars.org>
4845 * reflection.c (get_default_param_value_blobs): Add 'types'
4846 parameter to get the types encoded in the constant table.
4847 (mono_param_get_objects): Use the type from the constant table,
4848 not the type of the parameter, when creating default values.
4849 Handle null default values correctly.
4851 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4858 * socket-io.c: removed dead code for async IO.
4860 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4862 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4864 * threadpool.c: intercept socket async. calls and pass them to a thread
4865 that is polling and dispatching the job items to the threadpool as
4866 socket become ready. Fixes bugs #71217, #71933.
4868 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4869 between char and short/ushort arrays.
4871 * socket-io.c: remove dead code.
4873 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4876 icall.c : removed InternalToUpper_Comp() and
4877 InternalToLower_Comp().
4879 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4881 * char-conversions.h : The tables were incorrectly generated. Should
4882 be generated against invariant culture.
4884 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
4886 * object.c (mono_runtime_invoke_array): Fix return value when
4887 passing pre-created valuetype objects to ctors.
4889 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
4890 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4893 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
4895 * domain.c: removed g_assert for runtimesecurityframe_class. This is
4896 only used with --security and hides the wrong corlib version error.
4898 2005-03-30 Joshua Tauberer <tauberer@for.net>
4900 * class.c: Changed mono_class_name_from_token so that types
4901 outside of a namespace don't have an initial period. Improved
4902 the g_warning message used in _mono_class_get when loading
4904 * assembly.c: In mono_assembly_load_reference, when an assembly
4905 can't be found, "No such file or directory" is misleading and
4906 unhelpful because a few paths were checked for the presence of
4907 the assembly. When that happens (ENOENT), display a nicer
4908 message indicating the directories that were searched. In all
4909 cases, the warning is made easier to read for non-hackers.
4911 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
4913 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4915 * appdomain.h|domain.c: Removed inline from functions.
4916 * appdomain.c: Reduced warnings when compiling on windows.
4917 * icall.c: Fixed output_debug declaration to gunichar2*.
4918 * mono-config.c: Reduced warnings when compiling on windows.
4919 * rand.c: Added missing "windows.h". Added missing return value.
4920 * rawbuffer.c: Added missing winsock2.h for windows.
4921 * sysmath.h: Added mono-compiler.h header to allow/ease
4922 compilation with non-GCC compilers.
4923 * threads.c: Fixed declarations to compile with VS.NET C compiler.
4924 Removed cast warnings.
4926 Adapted from the work of J Lothian (for VC6).
4928 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
4930 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4933 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
4935 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4938 2005-03-27 Raja R Harinath <harinath@gmail.com>
4940 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
4941 has to be in $(exec_prefix). $(prefix) is for arch-independent
4942 stuff, and it would probably use $(prefix)/share rather than
4945 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4947 * console-io.c: added 2 includes that might be missing.
4949 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
4951 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4954 * reflection.c (create_custom_attr): Allocate the params array using
4955 alloca so it gets GC tracking.
4957 2005-03-23 Chris Toshok <toshok@ximian.com>
4959 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4962 2005-03-24 Raja R Harinath <rharinath@novell.com>
4964 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4965 changes to pick up any changes in prefix, etc.
4967 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4969 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4971 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4972 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4974 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4976 * class-internals.h object-internals.h class.c reflection.c: Extend the
4977 mono_lookup_dynamic_token () function to return the class of the
4980 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4983 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
4985 * security-manager.c: Skip inheritance checks for intra-corlib
4986 class inheritance and method overrides. This skips a lot of checks
4987 and (anyway) permissions cannot work until corlib is loaded.
4989 2005-03-23 Martin Baulig <martin@ximian.com>
4991 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4992 MONO_TYPE_GENERICINST.
4994 2005-03-23 Martin Baulig <martin@ximian.com>
4996 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4998 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5000 * class.c: added locking comments to some functions.
5001 Cache the interface offsets arrays (saves about 20 KB
5002 of runtime memory in a typical app).
5003 Reduce the time overhead in mono_class_setup_supertypes ().
5005 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5007 * icall.c: speedup and fix leaks in GetMethodsByName and
5008 GetPropertiesByName.
5010 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5012 * reflection.c: some locking fixes.
5014 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5016 * metadata.c: added missing break in case statement.
5018 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
5020 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5021 typedbyref return values. Fixes #73941.
5023 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
5025 * security-manager.c|h: Added demandunmanaged method and
5026 suppressunmanagedcodesecurity class to MonoSecurityManager.
5027 Renamed aptc class to allowpartiallytrustedcallers.
5029 2005-03-17 Martin Baulig <martin@ximian.com>
5031 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5033 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5035 * file-io.c: disabled file async. IO using aio_*. It uses the
5036 threadpool now. Workaround for bug #73718.
5038 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5040 * assembly.h, mono-config.c: added code to deal with bundled configs
5041 for bundled assemblies.
5043 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5045 * *.c, private.h: cleanup, removing old private.h header file.
5047 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
5049 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5050 and throw_on_unmappable_char attributes.
5052 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
5054 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5055 _ProcessName_internal.
5057 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
5059 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5062 * icall.c threads.c threads-types.h: Remove slothash icalls as they
5065 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
5067 * object.c (compute_class_bitmap): Add support for generics. Fixes
5070 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5072 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5074 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5076 * filewatcher.c: commented out the code for windows watcher, as we don't
5077 use it (we use the managed implementation instead).
5079 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5081 * object-internals.h (MonoThread): Remove 'unused1' field.
5083 * appdomain.c: Bump corlib version.
5085 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5087 * reflection.c (mono_reflection_create_runtime_class): Remove the
5088 AssemblyBuilder.Save optimization since it causes too many problems.
5090 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
5092 * exception.c|h: Added mono_get_exception_reflection_type_load to
5093 create a ReflectionTypeLoadException object.
5094 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5095 to return NULL is a InheritanceDemand fails during reflection. Updated
5096 ves_icall_System_Reflection_Assembly_GetTypes to throw a
5097 ReflectionTypeLoadException if an InheritanceDemand fails during
5098 reflection. Added icall mapping for GetLinkDemandSecurity.
5099 * security-manager.c|h: Added ves_icall_System_Security_
5100 SecurityManager_GetLinkDemandSecurity internal call to return the
5101 class and methods permissions set for a LinkDemand. Removed unused
5102 fields in MonoSecurityManager.
5104 2005-03-10 Martin Baulig <martin@ximian.com>
5106 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5107 it's a generic instance.
5109 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
5111 * reflection.c (mono_get_object_from_blob): Applied patch from
5112 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5114 * class.c (mono_class_is_assignable_from): Another try at fixing
5115 #73469 without breaking anything.
5117 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
5119 * class.c: (mono_class_is_assignable_from): Revert the last changes
5120 since they don't work with generics.
5122 * class.c (mono_class_is_assignable_from): Fix build bustage.
5124 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5125 the managed IsAssignableFrom method. Fixes #73469.
5127 * reflection.c (mono_reflection_call_is_assignable_from): New helper
5130 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
5132 * object.c (mono_load_remote_field_new): Fix returning uninitialized
5133 memory when the remoting callback does not sets the out arguments.
5136 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5139 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5141 * object-internals.h (MonoStackFrame): Sync with managed object layout.
5143 * appdomain.c: Bump corlib version.
5145 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
5147 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5150 * threads.c (mono_thread_attach): Detect threads which are not started
5151 by the GC pthread wrappers.
5153 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
5155 * icall.c: Added new icall for RNG.
5156 * rand.c|h: Added new icall to open the RNG. This allows to share a
5157 single handle on Linux to access /dev/urandom and fix #73183.
5159 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5161 * object.c: setting the new vtable in a transparent proxy object must
5162 not change the GC descriptor.
5164 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5166 * object.c: fixed compilation without GCJ support.
5167 * reflection.c: for runtime-created types ensure klass->has_references
5168 is correct (bug #73215).
5170 2005-03-02 Martin Baulig <martin@ximian.com>
5172 * class.c (mono_class_is_assignable_from): Make this work if
5173 `oklass' is a generic instance; fixes #72831.
5175 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5177 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5180 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5182 * marshal.c: Reorganize native->managed marshalling code to also use
5183 the emit_marshal_... functions.
5185 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5187 * object.c: typed allocs have issues with bitmap sizes > 30,
5188 so check for max_set >= 30.
5190 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5192 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5193 managed code. Fixes #73012.
5195 * metadata.h (MonoMarshalSpec): Add elem_mult field.
5197 * metadata.c reflection.c: Load/Emit elem_mult as well.
5199 * metadata.h (MonoMarshalSpec): Add comment.
5201 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5203 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5204 num_elem to -1 if not given.
5206 * object-internals.h (MonoReflectionMarshal): Add has_size field.
5208 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5211 2005-03-01 Marek Safar <marek.safar@seznam.cz>
5213 * null-gc.c (mono_gc_free_fixed): Was not compilable.
5215 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
5217 * reflection.c (encode_marshal_blob): Encode param_num field as well.
5219 * object-internals.h (MonoReflectionMarshal): Add param_num field.
5221 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5223 * object.c: generalized the reference bitmap creation
5224 and added hooks for the new GC.
5225 * class-internals.c: removed the gc_bitmap field from MonoClass.
5227 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5229 * domain.c: help the compiler to produce better code
5230 in mono_jit_info_table_find ().
5232 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5234 * object.c: make all allocations look typed.
5236 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5238 * socket-io.c: load Mono.Posix if it's not loaded already
5241 2005-02-24 Martin Baulig <martin@ximian.com>
5243 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5244 * reflection.c (dup_type): Likewise.
5246 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
5248 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5249 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5251 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5253 * domain.c, threads.c, object-internals.h: make the critical thread
5254 local vars use the fast access mode (even when we're compiled in
5255 a lib). Provide accessors to be used by the jit during codegen.
5257 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5259 * appdomain.c: Changed hook functios behavior to include
5260 support for the reflection only assemblies. Some icalls were changed
5261 to support the mentioned assemblies too. Signatures of static methods
5262 try_assembly_resolve and real_load now have an additional parameter:
5265 * assembly.c: General changes to mono_assembly_ methods to support
5266 reflection only api. Functions mono_assembly_open, mono_assembly_load,
5267 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5268 suffix, to support an additional gbool parameter to specify whether
5269 the assembli is reflection only or not. Created some new hook functions
5270 to add support for reflection only assemblies. Signatures of static
5271 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
5272 have now an additional parameter: refonly.
5274 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5275 indicating whether the assembly is reflection only or not.
5277 * exception.c: Add mono_get_exception_invalid_operation.
5279 * icall.c: Throw an InvalidOperationException when trying to invoke
5280 a property/method/event, or trying to set/get the value of a field.
5281 Also add an icall to retrieve the ref_only flag to the
5282 MonoReflectionAssembly.
5284 2005-02-23 Chris Toshok <toshok@ximian.com>
5286 Part of fix for #72827.
5287 * mono-debug.c (mono_debug_add_method): add lexical block data to
5288 the info we write. Kind of a hack at the moment - we copy the
5289 lexical block info from the MonoDebugMethodInfo to the
5290 MonoDebugMethodJitInfo here, before writing it.
5291 (mono_debug_read_method): read the lexical block info.
5293 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5295 * debug-mono-symfile.h: add lexical block support.
5297 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5300 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5302 * loader.c (mono_lookup_pinvoke_call): Fix warning.
5304 * object.c (mono_runtime_free_method): Call mono_free_method () and
5305 put the TODOs there.
5307 * loader.c (mono_free_method): Free up most memory allocated for
5310 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5312 * reflection.c: properly flag a Type argument to a
5313 named custom attr value (bug #72248).
5315 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5317 * reflection.c: reduce code duplication in named custom
5320 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5322 * reflection.c: properly encode custom attrs of type object
5325 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5327 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5329 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5331 * socket-io.c: load System.dll if it's not loaded already
5332 (bug #72850 and #70477).
5334 2005-02-21 Martin Baulig <martin@ximian.com>
5336 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5339 2005-02-21 Martin Baulig <martin@ximian.com>
5341 * reflection.c (mono_image_build_metadata): We also need to
5342 "fixup" the MethodImpl table after we computed the final method
5343 indices. Call fixup_methodimpl() to do that.
5344 (fixup_methodimpl): New private method.
5346 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5348 * assembly.c: special case mscorlib.dll (bug#72536),
5349 patch from Carlos Alberto Cortez.
5351 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
5353 * threads-types.h threads.c: Fix build bustage.
5355 * threads.c: Use a union for long<->double conversions.
5357 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5358 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5360 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
5361 containing the checkpoint call with NOT_TAKEN.
5363 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
5364 checkpoint before pushing the arguments, so they won't have to be
5367 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5369 * domain.c, assembly.c, domain-internals.h: make some data
5370 const and relocation-free.
5372 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5374 * object.c, appdomain.c, class-internals.h: introduce the
5375 MonoClassRuntimeInfo structure to hold the info needed to
5376 use a class at runtime. Made mono_class_vtable() lock-free
5377 for all the appdomains.
5379 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5381 * metadata-internals.h, image.c: introduce a per-image mempool to
5382 be used for memory that has the same lifetime as the image.
5384 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
5386 * domain.c: In mono_init_internal(), instead of selecting the first
5387 runtime version supported by an executable, get a list of all
5388 supported versions and select the one for which an mscorlib exists
5389 (since even if the runtime supports a given version, it doesn't mean
5390 that the framework for that version is installed).
5391 Modified get_runtimes_from_exe to support this behavior.
5392 In supported_runtimes, added information about additional system
5395 * assembly.c: Added support for more than one system assembly version
5396 per runtime version. Updated the assembly list.
5397 In mono_assembly_remap_version, removed the initial version check,
5398 since we don't know to which version we need to compare until we
5399 get the version set on which the assembly is based.
5400 Moved the code for loading corlib into the new method
5401 mono_assembly_load_corlib(), so it can be used by the initialization
5404 * domain-internals.h: Updated data structures and added declaration
5405 for mono_assembly_load_corlib.
5407 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5409 * reflection.c (resolve_object): Fix the creation of the signature in
5410 the SignatureHelper case.
5412 * assembly.c (mono_assembly_remap_version): Fix binary search.
5414 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
5416 * class.c: Added inheritance check when a method is overloaded (from a
5417 virtual method or when implementing an interface) and when a class is
5418 inherited. Added functions to set a failure for a class and to
5419 retreive the exception from a failure.
5420 * class-internals.h: Added fields to MonoClass to keep the exception
5421 information status for inheritance (or other exceptions) to be thrown
5422 later (i.e. not at load time).
5423 * object.c: Throw the inheritance SecurityException when a type is to
5424 be created with either class or method inheritance violations.
5425 * reflection.c|h: Fix when getting declsec from a class. Removed
5426 unrequired code for class. Improved sanity in parameter naming.
5427 * security-manager.c|h: Added functions to check for class and method
5430 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5432 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5433 and has_finalize in dynamic types as well.
5435 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
5437 * culture-info-table.h : fixed currency format for en-GB (and so on).
5439 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5441 * gc.c: ensure the GC handles never have 0 as a value.
5443 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5445 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5446 a pointer to a struct to unmanaged code. Fixes #72625.
5448 2005-02-16 Martin Baulig <martin@ximian.com>
5450 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5452 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5454 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5456 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5458 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5460 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
5461 UnmanagedFunctionPointerAttribute, use it for determining calling convention
5464 * reflection.c (mono_custom_attrs_get_attr): New helper function.
5466 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5468 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5470 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5471 changes to make the current context a field in MonoThread.
5473 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5475 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5478 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5479 extracted from mono_marshal_get_native_wrapper.
5481 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5482 to create wrappers around native functions.
5484 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
5485 delegates for arbitrary function pointers. Fixes #71472.
5487 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5489 * threads.c: cleaned up the code a little.
5491 2005-02-15 Martin Baulig <martin@ximian.com>
5493 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5496 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5497 allocate larger chunks if needed.
5499 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5501 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5504 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5506 * domain.c: keep the domains in an array and ensure the domain ids
5507 are kept small, so they can be used as indexes to domain-specific data
5508 with a small memory overhead.
5510 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5512 * icall.c: Handle byref types in Type icalls. Fixes #72544.
5514 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5516 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5518 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
5520 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5522 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5525 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5527 2005-02-12 Ben Maurer <bmaurer@ximian.com>
5529 * domain-internals.h: add the hashtable here.
5531 * class-internals.h: Remove `info' from MonoMethod
5533 * domain.c: Add a new hashtable, jit_trampoline_hash
5535 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5537 * object.c: don't set the value of static fields
5540 2005-02-11 Martin Baulig <martin@ximian.com>
5542 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5543 (mono_debug_add_method): Silently ignore the method if it's too big.
5544 (mono_debug_add_type): Likewise.
5546 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5548 * threads.c, appdomain.c: remove #ifdefs from the code.
5550 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
5552 * metadata-internals.h: Added flags to MonoAssembly to cache the most
5553 common security informations. This allows us to stay in unmanaged code
5554 when doing LinkDemand and it's special cases (except for the first
5555 time for initialization). The flags a very much used with --security.
5556 * reflection.c|h: Added code to get declarative security attributes
5557 for LinkDemand and InheritanceDemand. This required to refactor the
5558 existing code for Demand.
5559 * security-manager.c|h: Added new method fields for the special cases
5562 2005-02-10 Martin Baulig <martin@ximian.com>
5564 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5565 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5567 2005-02-10 Martin Baulig <martin@ximian.com>
5569 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5570 debugging code; this is almost a complete rewrite.
5572 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5574 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5576 * domain.c, object.h: expose mono_string_equal () and
5577 mono_string_hash ().
5578 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5579 it's implemented in managed code.
5581 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5583 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5584 lo leak objects between appdomains.
5586 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5588 * assembly.c: old compilers compilation fix from
5589 robertj@gmx.net (Robert Jordan).
5591 2005-02-09 Ben Maurer <bmaurer@ximian.com>
5593 * class-internals.h: Little reminder for the future.
5595 * debug-helpers.c: Fix up wrapper_type_names
5597 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5599 * image.c, metadata-internals.h: when loading an image from a file,
5600 mmap all of it and use the same codepaths as when using a
5601 in-memory image: the code is simpler and we use less memory
5602 (both writable and readonly).
5604 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5606 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5607 API to alloc runtime data structures that need to be tracked by the
5608 GC and contain pointers.
5609 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5610 make the code more readable and eventually use a different GC.
5612 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
5614 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5617 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
5619 * object.c: In release_type_locks(), don't release the cctor lock
5620 if it has already been released. This fixes a crash in the
5623 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5625 * gc.c, marshal.c, icall.c: register a delegate for finalization
5626 only when the native function pointer has been allocated for it.
5628 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5630 * object.c: cleaned up some code, allocate objects that are
5631 pointer free with the atomic malloc variant. Allocate memory
5632 for static data from the mempool if it's pointer-free.
5633 Allocate the bounds array at the end of the array data, when needed.
5634 * object-internals.h, object.h: move a private function in a private
5636 * class.c: handle missing case in tracking references in fields.
5638 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5640 * class.c, class-internals.h: keep track if a type has
5641 reference fields in either the instance or static fields.
5643 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
5645 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5646 and renamed to MonoRuntimeInfo. Added fields to store the expected
5647 framework assembly version. Changed mono_get_framework_version and
5648 mono_get_runtime_version for a single mono_get_runtime_info method.
5650 * assembly.c: Added method to remap system assembly versions to the
5651 current executing runtime version. Removed old mapping code.
5652 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5654 * icall.c, reflection.c: Track api changes.
5656 2005-02-06 Miguel de Icaza <miguel@novell.com>
5658 * loader.c (method_from_memberref): Improve error reporting,
5659 produce the class name instead of the typeref/typedef index.
5661 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
5663 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5665 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5667 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5668 stdcall and charset name mangling. Reorganize the code and add
5671 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5673 * monodiet.c: More iters!
5675 * marshal.c: Iter usage.
5677 * icall.c: Iter usage.
5679 * object.c: Use iters.
5681 * debug-helpers.c: More iters
5683 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5685 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5688 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5690 * mono-debug-debugger.c: use iters
5692 * class.c, class-internals.h: mono_class_setup_events is static
5695 * All callers: use iters
5697 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5699 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5700 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5702 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5704 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5706 * marshal.h: Add prototypes for ldfld/stfld_remote.
5708 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5709 this is called during startup.
5711 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5713 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5714 MonoThreadsSync struct private in monitor.c. Changed the way
5715 MonoThreadsSync is allocated so it's faster and there is no
5716 need to keep track of it with a finalizer and it uses less memory.
5717 This also finally allows us to allocate mono objects as ptrfree when
5718 there are no reference fields.
5720 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5722 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5723 disappearing link to the GC interface and use them to simplify
5726 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5728 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5729 stfld_remote which call mono_load/store_field_new. This allows methods
5730 calling ldfld/stfld wrappers to be AOTed.
5732 * console-io.c: Include sys/filio.h under solaris.
5734 * console-io.c: Include curses.h if needed correctly.
5736 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5738 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5739 method->klass as well.
5741 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5743 * class.c (mono_class_init): Switch on lazy initialization of
5746 * class.c (mono_class_get_finalizer): Handle the case when the
5747 finalizer is inherited.
5749 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5751 * console-io.c: <curses.h> is needed by term.h on solaris.
5753 2005-02-03 Ben Maurer <bmaurer@ximian.com>
5755 * icall.c, class-internals.h, monodiet.c, class.c: Remove
5756 mono_class_setup_properties where possible. Remove this ftn from
5757 the header file, and make it static.
5759 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5761 * loader.c: Add missing setup_... call.
5763 * class.c: Add missing setup_... calls.
5765 * class.c (mono_class_init): Switch on lazy initialization of
5768 * class.c (mono_class_init): Fix generics broken by the recent changes.
5770 * monodiet.c (handle_type): Add missing setup_... calls.
5772 * class.c: Back out garbage in previous patch.
5774 * class.c: Add missing setup_... calls.
5776 * class.c (mono_class_get_method_from_name_flags): Avoid calling
5777 mono_class_setup_methods () if possible.
5779 * class-internals.h (MonoClass): Add 'has_cctor' flag.
5781 * class-internals.h (MonoCachedClassInfo): New structure.
5783 * class.c: Initialize properties and events fields of MonoClass lazily.
5785 * class.c: Add infrastructure for lazily initializing the methods and
5786 vtable fields of MonoClass. Not yet used.
5788 * class.c (mono_class_get_finalizer): New helper function.
5790 * class.c: Add infrastructure for loading some class related data from
5793 * object.c: Add infrastructure for initializing the vtable from data
5796 * gc.c (run_finalize): Use mono_class_get_finalizer ().
5798 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5799 appropriate initialization function before accessing parts of the
5800 MonoClass structure.
5802 * marshal.c: Fix warnings.
5804 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5806 * mono-debug-debugger.c (get_exception_message): Use
5807 mono_class_get_method_from_name_flags ().
5809 2005-02-02 Ben Maurer <bmaurer@ximian.com>
5811 * reflection.c, appdomain.c: Replace a few manual searches that
5812 Zoltan missed. (Paolo approved this part of my initial patch).
5814 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5816 * profiler.c: disable recording statistical events at report time.
5818 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5820 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5821 to byteswap arrays of enum values, too (bug #72080).
5823 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
5825 * appdomain.c (set_domain_search_path): Allow this to be called if
5826 domain->setup is not yet set.
5828 * loader.c (mono_method_get_index): New helper function.
5830 * loader.c reflection.c: Use mono_method_get_index ().
5832 * class.c (mono_class_get_method_from_name_flags): New helper method.
5834 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5837 * class.c (mono_class_get_cctor): New helper method.
5839 * string-icalls.c object.c class.c marshal.c reflection.c: Use
5840 mono_class_get_method () to look up methods.
5842 2005-02-01 Miguel de Icaza <miguel@novell.com>
5844 * console-io.c: Fix the build, this should work on Windows.
5846 2005-01-31 Ben Maurer <bmaurer@ximian.com>
5848 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5849 be set to null to keep things valid
5851 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5853 * icall.c: added Console 2.0 icalls.
5854 * Makefile.am: added console-io.[ch]
5855 * console-io.[ch]: internal calls for Console 2.0 API.
5857 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5859 * class.c: make sure we consider all the interfaces
5860 when calculating max_interface_id (bug found by
5861 Jeroen Frijters running ikvm).
5863 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
5865 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5866 valuetype fields to null.
5868 * object.c (set_value): Ditto. Fixes #71669.
5870 2005-01-31 Martin Baulig <martin@ximian.com>
5872 * metadata.c (mono_metadata_has_generic_params): New public
5873 function; checks whether something is a generic method.
5875 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5877 * appdomain.c: fix infinite recursion when adding assemblies.
5879 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
5881 * object.c: Fix small typo to return all items for Environment.
5884 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5886 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5887 reflection.c: more domain and assembly-unload related fixes
5888 and memory leaks plugs.
5890 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
5892 * 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.
5894 2005-01-29 Ben Maurer <bmaurer@ximian.com>
5896 * loader.c (mono_method_signature): Make this method lazy
5897 (mono_get_method_from_token): Don't computate the signature here.
5899 Doing this saves quite a bit of memory. I got 90 kb on starting up
5900 monodoc. It should also save some disk reads on startup.
5902 * *: MonoMethod->signature might be NULL now. You *MUST* use
5903 mono_method_signature.
5905 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
5907 * object.c (mono_runtime_get_main_args): Return an array from the
5908 current domain here. Fixes #71938.
5910 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5912 * monitor.c: formatting changes to comply with the
5913 mono coding style and remove #ifdefs from the code.
5915 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5917 * metadata.c, private.h: remove some unneeded data
5918 and use a more compact representation for table schemas.
5920 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5922 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5923 to get a better distribution in hash tables.
5924 * *.c: use mono_aligned_addr_hash() where appropriate.
5925 * assembly.c: make var static.
5927 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
5929 * domain-internals.h: Put MonoJitInfo on a diet.
5931 * domain.c: Fix a warning.
5933 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5935 * gc.c: rework the gc handles code to reuse handles
5938 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5940 * domain.c: fixed long standing bug in mono_string_equal() which
5941 was brought to light with the ldstr changes.
5943 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
5945 * reflection.c: Remove warning by adding missing include for marshal.h
5947 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5949 * domain.c, object.c: change the ldstr_table to hold
5950 MonoString* as keys: makes the runtime isinterned lookup
5951 faster and simplifies memory management.
5953 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
5955 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5956 possible to add imperative security checks before calling the icall.
5957 * reflection.c: Return security attributes on the original MonoMethod
5958 (and not the wrapped one). This fix permissions on icalls.
5960 2005-01-25 Dick Porter <dick@ximian.com>
5962 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5963 the check for mktime() support actually test the mktime() return
5964 value. "Fixes" bug 71682, though the output is still different to
5967 2005-01-25 Martin Baulig <martin@ximian.com>
5969 * class.c (mono_class_is_assignable_from): Make this work for
5972 2005-01-24 Ben Maurer <bmaurer@ximian.com>
5974 * marshal.c (mono_string_utf8_to_builder)
5975 (mono_string_builder_to_utf16): We might not have ownership of the
5976 string. In thise case, we need to create a new buffer.
5978 * object-internals.h (mono_stringbuilder_capacity): sb->str might
5979 be null, in which case, use the default capacity.
5981 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5983 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5984 GC events to the profiler.
5986 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5988 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5989 if you don't want the GC to run.
5991 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5993 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5994 start providing a GC API and keeping different implementations in
5996 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5998 2005-01-22 Ben Maurer <bmaurer@ximian.com>
6000 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6001 mmap rather than allocating a huge buffer.
6002 (mono_debug_close_mono_symbol_file): Free the buffer allocated
6005 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
6007 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6008 and CheckExecutionRights.
6009 * reflection.c|h: Keep the index of the declarative security to be
6010 used, instead of the pointer, when AOT compiler is used. Also add
6011 class initialization when requesting demands.
6012 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6013 CheckExecutionRights. Both properties are now FALSE by default, and
6014 unmodifiable, unless the --security option is used.
6016 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6018 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6019 reflection.c: properly refcount images and assemblies, many leaks fixed.
6021 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6023 * threadpool.c: increase the timeout for threads in the thread pool to
6024 10s. Fixes bug #67159.
6026 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
6028 * class-internals.h: Sun's compiler insists on explicit
6029 signed on bit fields to handle then correctly.
6031 2005-01-19 Miguel de Icaza <miguel@ximian.com>
6033 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6034 Make the size of the array fit only the number of invalid path
6037 * class.c (_mono_class_get): Improve the error reporting when a
6038 class referenced is not found, to assist debugging.
6040 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6042 * threads.c: fix off-by-one error.
6043 * domain.c: free data allocated in the domain.
6045 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6047 * reflection.c (mono_method_body_get_object): Fill out exception info
6050 * object-internals.h: Add MonoReflectionExceptionHandlingClause
6053 2005-01-19 Martin Baulig <martin@ximian.com>
6055 * loader.c (mono_get_method_constrained): Make this work again.
6057 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6059 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
6060 guint16 to match the managed side.
6062 * reflection.c (mono_reflection_body_get_object): Fill out local
6065 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6068 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6069 'local_var_sig_token'.
6071 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
6073 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
6076 * reflection.c (mono_method_body_get_object): Handle abstract and
6079 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6081 * marshal.c, loader.c, class-internals.h, reflection.c:
6082 store the emthod data for a wrapper in an array instead of a list.
6084 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6086 * marshal.c: change the code to allocate memory more
6087 conservatively for method wrappers.
6089 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6091 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6092 fields from MonoClass to the marshal info structure where they belong.
6094 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6096 * class.c, object.c, class-internals.h, marshal.c: rearrange
6097 some fields and tweak some types to lower memory usage.
6099 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
6101 * threads.c (signal_thread_state_change): Handle the case when the
6102 target thread is the current thread.
6104 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6106 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
6107 emit_ptr_to_object_conv.
6109 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6110 marshalling. Fixes #71352.
6112 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6114 * metadata.h, blob.h: move table enum to blob.h so it can be included
6116 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6117 cut the size of MonoImage/MonoDynamicImage.
6119 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
6121 * profiler.c (mono_profiler_install_simple): Fix default arguments.
6123 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6125 * reflection.c, reflection.h, icall.c: add a function to check
6126 if an attribute type is defined for a metadata object.
6128 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
6130 * object-internals.h: Added some needed fields from StringBuilder class.
6131 * marshal.c: Set the maxCapacity when creating a StringBuilder.
6133 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
6135 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6136 threads before shutting down the runtime.
6138 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6140 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6142 * object-internal.h, threads.c: implement stacksize and
6143 parameterized thread start functionality (requires
6144 matching corlib). Marked broken code for later removal.
6146 2005-01-12 Martin Baulig <martin@ximian.com>
6148 * class-internals.h (MonoGenericClass): Moved the `initialized'
6149 flag to MonoDynamicGenericClass, removed `init_pending'.
6150 (MonoGenericInst): Added `is_reference' flag.
6152 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
6154 * reflection.c (mono_image_create_pefile): Only set the pe_offset
6155 inside the MSDOS header. Fixes #71201.
6157 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6159 (mono_domain_finalize): Ditto.
6161 2005-01-12 Martin Baulig <martin@ximian.com>
6163 * class.c (mono_get_shared_generic_class): Use the cache for
6164 non-dynamic generic classes.
6166 * class-internals.h (mono_class_create_generic_2): Removed
6167 function prototype, this function is now static inside class.c.
6169 * class.c (mono_class_create_generic_2): Made this static, only
6170 call it from mono_class_init() and mono_class_setup_parent().
6171 (collect_implemented_interfaces_aux): Call mono_class_init() on
6172 the interfaces we collect.
6173 (mono_class_setup_vtable): Call mono_class_init (class->parent).
6175 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6177 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6178 it a real thread handle.
6180 * domain-internals.h: Move exvar_offset from MonoJitInfo to
6181 MonoJitExceptionInfo, since each catch clause needs its own variable.
6183 2005-01-11 Dick Porter <dick@ximian.com>
6185 * image.c (mono_pe_file_open): New variant on mono_image_open()
6186 that does not set up the CLI metadata; used for FileVersionInfo so
6187 it can get the data for windows binaries too.
6189 * process.c (process_read_string_block): Don't read off the end of
6190 the StringTable block.
6192 These both fix bug 70766.
6194 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6196 * gc.c: set some fields to NULL at GC cleanup time.
6197 * threads.c: if we quit the main thread, call exit ().
6199 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6201 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6203 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6205 * threads.h, threads.c, object.c: added accessor and settor for
6206 main_thread. Handle it specially when exiting from it: wait
6207 for other foreground threads to exit.
6209 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6211 * process.c, verify.c: remove some bloat.
6213 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
6215 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6216 the calling convention to cdecl under win32.
6218 2005-01-08 Ben Maurer <bmaurer@ximian.com>
6220 * object.c (mono_object_get_size): New function to get the size of
6223 * profiler.c (simple_allocation): Use above.
6225 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
6227 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6228 ves_icall_System_AppDomain_getRootDomain (as it's not required to
6229 get an appdomain by it's id and we can't assume the root's id is 0).
6230 * domain-internals.h: Change the function prototype to match.
6231 * icall.c: Change the icall table for AppDomain.
6233 2005-01-08 Miguel de Icaza <miguel@ximian.com>
6235 * locales.c (string_invariant_compare_char): Only compute
6236 GUnicodeTypes in the case where we need them. Test for ordinality
6237 first and return if so.
6242 * FIXME: here we must use the information from c1type and c2type
6243 * to find out the proper collation, even on the InvariantCulture, the
6244 * sorting is not done by computing the unicode values, but their
6245 * actual sort order.
6248 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6250 * loader.c: for P/Invoke methods, allow the "Internal" shared
6251 library name to refer to the calling process symbol namespace.
6253 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
6255 * Makefile.am: Add the security manager to the build.
6256 * security-manager.c|h: New. Initialization of the security manager.
6258 2005-01-07 Dick Porter <dick@ximian.com>
6261 * monitor.c: Update thread state during Monitor and WaitHandle
6262 waits. Fixes bug 71031.
6264 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
6266 * reflection.c (property_encode_signature): Correctly handle when the
6267 property has no methods.
6269 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
6271 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6273 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6274 fields from mb, not rmb. Fixes #71017.
6276 * marshal.c (emit_ptr_to_str_conv): Add support for
6277 ByValTStr -> string conversion. Fixes #71015.
6279 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6281 * mempool.c (mono_mempool_contains_addr): New helper function.
6283 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6285 * metadata.c (mono_metadata_compute_size): Fix size calculation of
6286 HasSematics encoded fields.
6288 * metadata.c (mono_type_to_unmanaged): Improve error message for
6289 invalid string marshalling.
6291 * metadata.c: Fix warnings.
6293 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6295 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6298 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6300 * domain.c object.c domain-internals.h: Revert part of r38077 since the
6301 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6304 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
6306 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6307 so methods containing these can be AOTed.
6309 2005-01-03 Martin Baulig <martin@ximian.com>
6311 * loader.c (find_method): Removed the hack for generic instances.
6312 (method_from_memberref): If our parent is a generic instance, pass
6313 its generic type definition to find_method() and then inflate the
6315 (mono_get_method_constrained): Pass the generic type definition to
6316 find_method() and inflate the method later.
6318 * class-internals.h (MonoStats): Added `generic_class_count'.
6320 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6321 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6323 * reflection.c (mono_custom_attrs_from_params): Don't ignore
6324 generic type definitions.
6326 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
6328 * loader.c icall.c: Fix warnings.
6330 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
6332 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6333 blittable types. Fixes #70864.
6335 2004-12-29 Martin Baulig <martin@ximian.com>
6338 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6340 * reflection.c (mono_method_get_object): Create a
6341 "System.Reflection.MonoGenericMethod" for inflated methods; don't
6342 call mono_get_inflated_method().
6344 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6346 2004-12-27 Martin Baulig <martin@ximian.com>
6348 * class-internals.h (MonoMethod): Added `is_inflated' flag.
6349 (MonoMethodInflated): Added `inflated' field.
6351 * class.c (mono_class_inflate_generic_method): Don't really
6352 inflate the method here; just set the `is_inflated' flag in the
6354 (mono_class_get_inflated_method): Actually inflate the method here
6355 if it's not already inflated; we use the MonoMethodInflated's new
6356 `inflated' field as a cache.
6358 2004-12-26 Martin Baulig <martin@ximian.com>
6361 (inflate_generic_class): Moved some code out of inflate_generic_type().
6362 (mono_class_inflate_generic_method): If we're already inflated,
6363 inflate the context and use the declaring method; ie. make sure
6364 the declaring method of an inflated method is always the generic
6366 (mono_class_create_from_typedef): Create
6367 `class->generic_container->context->gclass'.
6369 2004-12-24 Ben Maurer <bmaurer@ximian.com>
6371 * metadata-internals.h, marshal.c, reflection.c: More
6372 MonoGHashTable->GHashTable.
6374 * domain-internals.h, class.c: Change MonoGHashTable's into
6375 GHashTables for some cases where no gc stuff is used
6377 All users: update apis
6379 2004-12-23 Ben Maurer <bmaurer@ximian.com>
6381 * metadata.c (builtin_types): Make this `const'. Makes this get
6382 put into the shareable section.
6383 (mono_metadata_init): Casts to make gcc happy.
6385 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
6387 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6389 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
6391 * icall.c: Added an internal call to retrieve the position and length
6392 of assembly-level declarative security attributes (RequestMinimum,
6393 RequestOptional and RequestRefuse). This is used by the Assembly class
6394 to re-create the corresponding permission sets.
6396 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6398 * marshal.c: fix the stelemref wrapper to be type correct
6401 2004-12-20 Ben Maurer <bmaurer@ximian.com>
6403 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6404 to do key & 0x7fffffff. Hashtable already does this. It just
6405 results in longer code.
6407 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
6409 * appdomain.c: Bump corlib version.
6410 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6411 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6412 * reflection.c|h: Add functions to get declarative security infos
6413 (blob position and length) for assemblies, classes and methods.
6415 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6417 * reflection.c: sort the constant table (bug #70693).
6419 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6421 * object-internals.h, threads.c, domain.c: add accessors for
6422 the MonoThread and MonoDomain tls keys.
6424 2004-12-18 Martin Baulig <martin@ximian.com>
6426 * class.c (inflate_generic_type): If we're inflating a generic
6427 instance, set `ngclass->context->container = context->container';
6428 ie. the container we inflated into.
6430 * metadata.c (mono_metadata_parse_generic_param): Reflect above
6431 inflate_generic_type() changes.
6433 2004-12-17 Martin Baulig <martin@ximian.com>
6436 (MonoGenericClass): Replaced `MonoType *generic_type' with
6437 `MonoClass *generic_class'. Removed `dynamic_info'; if
6438 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6439 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6441 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
6443 * exception.c (mono_exception_from_token): New helper function.
6445 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
6447 * assembly.c (mono_assembly_load_with_partial_name): Call
6448 mono_assembly_loaded before invoking the preload hooks. Fixes
6451 * object-internals.h (MonoThread): Change culture_info and
6452 ui_culture_info into an array.
6454 * threads.c: Cache culture info objects from more than one appdomain.
6456 * threads.c threads-types.h icall.c: Add icalls for manipulating the
6459 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
6461 * threads.h threads.c appdomain.c: Clear the culture_info field of
6462 all threads during unloading if they point to an object in the dying
6465 2004-12-13 Ben Maurer <bmaurer@ximian.com>
6467 * culture-info.h (TextInfoEntry): New struct
6468 * object-internals.h: sync with managed
6469 * locales.c: fill the `text_info_data' field
6470 * culture-info-tables.h: update
6472 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6474 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6477 2004-12-12 Ben Maurer <bmaurer@ximian.com>
6479 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6480 (ves_icall_ModuleBuilder_getMethodToken): Ditto
6482 2004-12-12 Martin Baulig <martin@ximian.com>
6484 * mono-debug-debugger.c (write_type): If we're an enum and the
6485 builtin types have already been initialized, call mono_class_init().
6487 2004-12-11 Martin Baulig <martin@ximian.com>
6489 * metadata.c (mono_metadata_load_generic_params): Added
6490 `MonoGenericContainer *parent_container' argument; automatically
6491 compute `container->is_method'; pass the correct owner to
6494 * reflection.c (compare_genericparam): Sort the GenericParam table
6495 according to increasing owners.
6497 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6499 * profiler.c: allow disabling the default profiler.
6501 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6503 * decimal.c, icall.c: allow disabling System.Decimal support.
6505 2004-12-09 Marek Safar <marek.safar@seznam.cz>
6507 * reflection.c: Add support for null attribute arguments.
6509 2004-12-09 Martin Baulig <martin@ximian.com>
6511 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6512 names to get rid of compiler warnings.
6514 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6516 * marshal.c (mono_marshal_get_struct_to_ptr): Call
6517 mono_marshal_load_type_info (). Fixes #69625.
6518 (mono_marshal_get_ptr_to_struct): Likewise.
6520 2004-12-08 Martin Baulig <martin@ximian.com>
6522 * mono-debug.h: Bumped version number to 47.
6524 * mono-debug-debugger.c
6525 (mono_debugger_event_handler, mono_debugger_event): Take two
6526 guint64 arguments insteed of a gpointer and a guint32.
6528 2004-12-08 Martin Baulig <martin@ximian.com>
6530 * debug-mono-symfile.h
6531 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6532 `address' to `native_offset'.
6534 2004-12-08 Martin Baulig <martin@ximian.com>
6536 * class.c (mono_class_create_from_typespec): Only inflate if we
6537 either have `context->gclass' or `context->gmethod'.
6539 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6541 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6543 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6545 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6547 * reflection.c (mono_assembly_get_object): Remove the workaround put
6550 * appdomain.c: Use the corlib_internal field from MonoAssembly.
6552 * appdomain.c: Bump corlib version.
6554 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6555 be visible in other appdomains.
6557 2004-12-07 Ben Maurer <bmaurer@ximian.com>
6559 * threads.c: Interlocked inc and dec for longs were messed up,
6560 use a KISS based impl for this. Fixes 70234
6562 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
6564 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6566 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6568 * icall.c: fix to follow policy not to allow struct
6569 arguments in icalls.
6571 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6573 * process.c: make the patch that handles spaces in file paths work
6574 on mono/windows too.
6576 2004-12-06 Martin Baulig <martin@ximian.com>
6578 * class.c (mono_class_create_generic): Call
6579 mono_class_setup_supertypes() if we're dynamic.
6580 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6582 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
6584 * object-internals.h: Add new fields to MonoThread.
6586 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6588 * icall.c threads-types.h threads.c: Add new icalls.
6590 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6592 * object-internals.h (MonoReflectionAssembly): Sync object layout with
6595 * appdomain.c: Bump corlib version.
6597 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6598 internal assemblies. Fixes #69181.
6600 2004-12-05 Martin Baulig <martin@ximian.com>
6602 * class.c (mono_class_inflate_generic_signature): Make this a
6603 no-op if `context' is NULL or we don't have any type parameters;
6604 also copy `sentinelpos'.
6606 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
6608 * image.c: Add unbox_wrapper_cache.
6610 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6612 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6615 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6618 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6620 2004-12-04 Martin Baulig <martin@ximian.com>
6622 * loader.c (mono_method_get_signature_full): New public function;
6623 like mono_method_get_signature(), but with an additional
6624 `MonoGenericContext *' argument.
6626 * class.c (mono_class_inflate_generic_signature): Formerly known
6627 as inflate_generic_signature(); make this public.
6629 2004-12-04 Martin Baulig <martin@ximian.com>
6632 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6633 instead of a `MonoGenericContainer *'.
6634 (mono_metadata_parse_array_full): Likewise.
6635 (mono_metadata_parse_signature_full): Likewise.
6636 (mono_metadata_parse_method_signature_full): Likewise.
6637 (mono_metadata_parse_generic_inst): Likewise.
6638 (mono_metadata_parse_generic_param): Likewise.
6639 (mono_metadata_parse_mh_full): Likewise.
6640 (mono_type_create_from_typespec_full): Likewise.
6642 2004-12-03 Martin Baulig <martin@ximian.com>
6644 * class-internals.h (MonoGenericContainer): Replaced the
6645 `MonoGenericContext * pointer with a `MonoGenericContext'
6646 structure and made it the first element.
6648 2004-12-03 Martin Baulig <martin@ximian.com>
6651 (inflate_generic_type): Set the `context->container' when creating
6652 a new MonoGenericContext.
6653 (mono_class_inflate_generic_method): Likewise.
6654 (mono_class_create_from_typespec): Just use `context->container'
6655 to get the container.
6657 * loader.c (method_from_methodspec): Set `context->parent' from
6658 `context->container' - and if that's a method container, use its
6659 parent. Also set the `context->container' when creating a new
6661 (mono_get_method_from_token): Use just `context->container' to get
6664 * metadata.c (do_mono_metadata_parse_generic_class): Also set
6665 `gclass->context->container'.
6667 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6668 the `context->container' when creating a new MonoGenericContext.
6670 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
6672 * reflection.c (compare_genericparam): Sort params with identical
6673 owner by their number. Fixes gen-111 on sparc.
6675 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6677 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6678 around the domain changes.
6680 * appdomain.c (mono_domain_unload): Handle the case when the thread
6681 calling Unload is itself being aborted during unloading. Fixes #70022.
6683 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6685 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
6686 checkpoint_func as an icall so it gets a wrapper.
6687 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6688 in the cross-appdomain wrappers too.
6690 * threads.c (mono_thread_has_appdomain_ref): Make this public.
6692 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6694 * reflection.c: Fix some memory leaks.
6696 2004-12-02 Martin Baulig <martin@ximian.com>
6698 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6700 * metadata.c (generic_class_cache): New static hashtable.
6701 (mono_metadata_lookup_generic_class): New public method.
6703 2004-12-02 Martin Baulig <martin@ximian.com>
6705 * class.c (mono_class_create_from_typedef): Call
6706 mono_class_setup_parent() and mono_class_create_mono_type() before
6707 parsing the interfaces.
6709 2004-12-02 Martin Baulig <martin@ximian.com>
6711 * metadata.c (generic_inst_cache): New static hashtable.
6712 (mono_metadata_lookup_generic_inst): New public function.
6713 (mono_metadata_inflate_generic_inst): New public function.
6714 (mono_metadata_parse_generic_inst): New public function.
6715 (do_mono_metadata_parse_generic_class): Use the new
6716 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6717 since this'll also use the cache.
6719 * reflection.c (mono_reflection_bind_generic_method_parameters):
6720 Use mono_metadata_lookup_generic_inst() to use the new cache.
6722 * class.c (inflate_mono_type): Use
6723 mono_metadata_inflate_generic_inst() to inflate a generic
6724 instance; this'll also use the new cache.
6726 * loader.c (method_from_methodspec): Use
6727 mono_metadata_parse_generic_inst() and
6728 mono_metadata_inflate_generic_inst() rather than parsing it
6729 manually, so we can use the new cache.
6731 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6733 * threads.c (wait_for_tids): Do not incorrectly free threads when
6736 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6738 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6739 iter->args based on whether parameters are passed in registers (i.e.
6740 MONO_ARCH_REGPARMS is defined)
6742 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
6744 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6745 the exception message. Fixes #70070.
6746 (method_from_methodspec): Fix warnings.
6748 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6750 * process.c: (complete_path) return the path quoted
6752 2004-12-01 Martin Baulig <martin@ximian.com>
6754 * class-internals.h (MonoGenericInst): New structure.
6755 (MonoGenericClass): Replaced `type_argc', `type_argv' and
6756 `is_open' with `MonoGenericInst *inst'.
6757 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6758 `is_open' with `MonoGenericInst *inst'.
6760 2004-11-30 Martin Baulig <martin@ximian.com>
6762 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6764 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6765 to `generic_class_cache'.
6768 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6769 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6770 (mono_generic_inst_is_valuetype): Renamed to
6771 mono_generic_class_is_valuetype().
6774 (MonoGenericInst): Renamed to MonoGenericClass.
6775 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6776 (MonoClass): Renamed `generic_inst' to `generic_class'.
6777 (MonoGenericContext): Renamed `ginst' to `gclass'.
6779 * object-internals.h
6780 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6782 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6783 mono_reflection_generic_class_initialize().
6785 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6786 now known as "System.Reflection.MonoGenericClass".
6787 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6789 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
6791 * class-internals.h: Added a flag field to MonoClass to cache the
6792 declarative security attributes actions associated with the class.
6793 * domain-internals.h: Added booleans to MonoJitInfo to cache the
6794 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6795 applicable to the JITted method.
6796 * reflection.c|h: Added functions to extract (as flags) which security
6797 actions are available (declaratively) for a method, class or assembly.
6798 * metadata.c|h: Added functions to search the declarative security
6799 table in the metadata.
6801 2004-11-29 Ben Maurer <bmaurer@ximian.com>
6803 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6804 EXPORTEDTYPES are already in the class name cache, so there is no
6805 need to add extra code here to look at them. Just removes a bit of
6808 (ves_icall_System_Environment_get_TickCount): No need for #if
6809 WINDOWS. We already have the code in io-layer.
6811 2004-11-28 Martin Baulig <martin@ximian.com>
6814 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6817 2004-11-27 Miguel de Icaza <miguel@ximian.com>
6819 * assembly.c (do_mono_assembly_open): Instead of having a
6820 conditional WITH_BUNDLE, incorporate support for bundles here, by
6821 having a global `bundles' variable holding a pointer to the actual
6824 (mono_register_bundled_assemblies): New API call used by the
6827 See mkbundle.1 for details.
6829 2004-11-27 Martin Baulig <martin@ximian.com>
6831 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6832 the vtable for generic methods.
6834 2004-11-26 Martin Baulig <martin@ximian.com>
6837 (mono_metadata_generic_method_hash): New public function.
6838 (mono_metadata_generic_method_equal): Likewise.
6841 (MonoGenericContainer): Added `GHashTable *method_hash'.
6843 * reflection.c (ReflectionMethodBuilder): Added
6844 `MonoGenericContainer *generic_container'.
6845 (reflection_methodbuilder_to_mono_method): Don't create a new
6846 MonoGenericContainer each time we're called.
6847 (mono_reflection_bind_generic_method_parameters): Use
6848 `container->method_hash' to cache the results so we don't create a
6849 different method if we're called several times with the same
6852 * loader.c (method_from_methodspec): Use the new
6853 `container->method_hash' here, too.
6855 2004-11-26 Martin Baulig <martin@ximian.com>
6857 * class.c (inflate_generic_signature): Correctly compute
6858 `res->has_type_parameters'.
6859 (mono_class_vtable): Use the `has_type_parameters' flag to
6860 determine whether we're a generic method.
6862 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6864 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
6866 * object.c (mono_runtime_run_main): Fix a small memory leak.
6868 2004-11-25 Martin Baulig <martin@ximian.com>
6870 * class.c (set_generic_param_owner): Fixed the loop.
6872 2004-11-25 Martin Baulig <martin@ximian.com>
6874 * object.c (mono_class_vtable): Don't create any JIT wrappers for
6877 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
6879 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6880 names. Fixes #69787.
6882 2004-11-24 Martin Baulig <martin@ximian.com>
6884 * class.c (mono_class_create_generic_2): If we don't have a
6885 `ginst->parent', inflate `gklass->parent' to get our parent.
6887 2004-11-24 Martin Baulig <martin@ximian.com>
6889 * reflection.c (compare_genericparam): Correctly sort the
6890 GenericParam table; fixes #69779.
6892 2004-11-23 Ben Maurer <bmaurer@ximian.com>
6894 * reflection.c: When writing a PE file, don't create a huge
6895 buffer in memory. Just write the arrays we have to the file.
6896 This reduces memory usage.
6898 * metadata-internals.h: MonoDynamicStream pefile is no longer used
6901 2004-11-17 Martin Baulig <martin@ximian.com>
6903 * class.c (mono_class_init): Don't setup `class->parent' for
6904 dynamic instances; moved this to mono_class_generic_2().
6905 (mono_class_create_generic): Also set `klass->inited' for dynamic
6907 (mono_class_create_generic_2): Don't do anything for dynamic
6908 generic instances. Set `klass->parent' here and also call
6909 mono_class_setup_parent() here.
6911 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6912 `MonoType *parent' argument; set `ginst->parent' before calling
6913 mono_class_create_generic_2(), so we set the correct parent.
6915 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6917 * reflection.c: allow getting attributes from ModuleBuilder
6920 2004-11-17 Martin Baulig <martin@ximian.com>
6922 * class.c (mono_class_create_from_typedef): If a type parameter is
6923 inherited from an outer class, set its owner to that class.
6925 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
6927 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6928 for (int*) written size. This fixes bug #69592.
6930 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
6932 * icall.c: Added IsAuthenticodePresnet internal call.
6933 * image.c|h: New function that check a MonoImage for an Authenticode
6934 signature in the certificate PE data directory.
6935 * security.c|h: New internal call to ask the runtime if an
6936 Authenticode signature seems referenced in the PE header.
6938 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
6940 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6942 * reflection.c (mono_image_create_pefile): Free the assembly streams
6943 after writing out the assembly file.
6945 * object.c (mono_runtime_run_main): Fix small memory leak.
6947 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6948 property access modifiers. Fixes #69389.
6950 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6952 * domain.c, object.c, object-internals.h, domain-internals.h,
6953 object.h, marshal.c: keep dynamic code info per domain.
6955 2004-11-15 Martin Baulig <martin@ximian.com>
6957 * class.c (mono_type_get_name_recurse): Put type arguments in
6958 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
6961 2004-11-15 Martin Baulig <martin@ximian.com>
6963 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6964 (mono_class_setup_vtable): When computing `the_cname' for a
6965 generic instance, don't include the namespace since we'd otherwise
6968 2004-11-15 Martin Baulig <martin@ximian.com>
6970 * class.c (mono_class_create_generic): Changed return type to void.
6971 (mono_class_create_generic_2): New public function; setup
6972 `class->method', `class->field' and `class->interfaces' here
6973 instead of in mono_class_init().
6975 * class.h (mono_class_create_generic): Moved to class-internals.h.
6977 2004-11-14 Ben Maurer <bmaurer@ximian.com>
6979 * reflection.c (mono_image_create_pefile): take a file HANDLE.
6980 rather than writing to memory, write to this file. Right now,
6981 we are just writting into a buffer, and copying that. However
6982 we can avoid the buffer later.
6984 (mono_dynamic_stream_reset): new function
6986 * icall.c, object-internals.h: update for the above.
6988 2004-11-13 Ben Maurer <bmaurer@ximian.com>
6990 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6991 have been using gc'd memory. First it is slower, unlikely
6992 the comment in the source code said, secondly, it increases
6993 our footprint to do it in the gc.
6995 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6996 the method so that it does not have to copy to managed code.
6998 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
7000 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7002 2004-11-12 Martin Baulig <martin@localhost>
7004 * reflection.c (mono_image_create_token): Allow generic method
7005 definitions here, since they may appear in an `.override'; see
7006 gen-98/gen-99 for an example.
7008 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
7010 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7013 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7016 2004-11-11 Martin Baulig <martin@ximian.com>
7018 * class.c (mono_class_setup_vtable): In an explicit interface
7019 implementation, the method name now includes the arity.
7021 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
7023 * object.c (mono_array_full_copy): Fix warning.
7025 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
7027 * appdomain.c: Removed look_for_method_by_name(). Use the new method
7028 mono_class_get_method_from_name() instead.
7030 * class-internals.h: Added two new types of wrappers.
7031 Added MonoRemotingTarget enum. Added new trampoline function type, which
7032 takes an additional MonoRemotingTarget value as parameter, so it is
7033 possible to request a trampoline for a specific target.
7035 * class.c: Added new mono_class_get_method_from_name() method.
7037 * class.h: In MonoRemoteClass, we can have now to vtables, one for
7038 general remoting sinks and one specific for cross domain calls.
7040 * debug-helpers.c: Added new wrapper names.
7042 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7045 * image.c: Porperly delete value objects form the remoting invoke hashtable.
7047 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7048 with several other methods (mono_marshal_get_xappdomain_dispatch,
7049 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7050 and others) can generate a fast remoting wrapper for cross domain calls.
7051 More information can be found in docs/remoting.
7052 Other changes: Removed mono_find_method_by_name, and used
7053 mono_class_get_method_from_name instead.
7054 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7055 is stored in the remoting invoke hashtable.
7057 * marshal.h: published the new method for getting the xdomain wrapper,
7058 and also added a method for getting the adequate wrapper for a given
7061 * object-internals.h, object.c: Added a couple of methods for capying and
7063 Modified mono_install_remoting_trampoline, which takes the new remoting
7064 trampoline that has a remoting target as parameter.
7065 mono_class_proxy_vtable now also takes a remoting target as parameter, and
7066 will return the most suitable vtable for the target.
7067 Added mono_remote_class_vtable, which returns the vtable of a remote class
7068 (which can be the normal remoting vtable or the xdomain vtable).
7070 * threads.c: the xdomain invoke and dispatch wrappers must also be
7071 protected against interruptions.
7073 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7075 * icall.c: use memmove in BlockCopyInternal when the source and
7076 destination arrays are the same.
7078 2004-11-09 Martin Baulig <martin@ximian.com>
7080 * class-internals.h (MonoGenericContainer): Removed `method' and
7081 `signature', replaced them with `is_method' and `is_signature'
7082 flags. Added `context'.
7084 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7085 instead of a `MonoGenericContainer *'.
7087 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7088 for dynamic type parameters.
7089 (mono_metadata_load_generic_params): Setup `container->context'.
7091 * reflection.c (mono_reflection_setup_generic_class): Setup
7092 `tb->generic_container->context'.
7093 (do_mono_reflection_bind_generic_parameters): Use
7094 mono_class_inflate_generic_type() to correctly inflate types,
7095 rather than using our own hack just for MONO_TYPE_VAR.
7097 2004-11-09 Martin Baulig <martin@ximian.com>
7099 * class.c (mono_class_inflate_generic_method): Small fix; don't
7103 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7104 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7105 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7106 (ves_icall_Type_BindGenericParameters): Likewise.
7107 (ves_icall_Type_get_IsGenericInstance): Likewise.
7108 (ves_icall_Type_GetGenericParameterPosition): Likewise.
7109 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7110 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7111 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7113 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
7115 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7116 assembly versions and public key tokens. Fixes #69113.
7118 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7120 * metadata.c: fix bug introduced with the type cache changes
7123 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7125 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7126 the MonoClass pointer instead of the token in exception clauses.
7127 * reflection.c: updates for the above and make the code not depend
7128 on the structure of MonoExceptionClause.
7130 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
7132 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7133 Add support for dynamic assemblies. Fixes #69114.
7135 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7137 2004-11-07 Ben Maurer <bmaurer@ximian.com>
7139 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7140 since most only those methods use it. the code member of
7141 MonoMethodPInvoke was dead, so that can be removed too. Also,
7142 remove inline_count (again, not used), and move slot so that it
7143 can share bits with some other flags. This saves 8 bytes in the
7144 structure and gives us about 50 kb back for mcs helloworld.cs
7146 * *.[ch]: Do naming changes for the above.
7148 * loader.c (mono_method_get_header): Lazily init the header
7150 (mono_get_method_from_token): don't init the header here
7151 (mono_free_method): the header may never be allocated
7153 Overall, this saves 150 kb of unmanaged allocations
7154 for mcs helloworld.cs. That accounts for 10% of the unmanaged
7157 * loader.c, loader.h (mono_method_get_header): new accessor.
7159 * *.[ch]: use the above method. Prepares us to lazily load
7162 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7163 three warnings, which are actual bugs (see 69206).
7165 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7166 unused. Saves a cool 4 bytes / method.
7168 2004-11-06 Ben Maurer <bmaurer@ximian.com>
7170 * metadata.c (builtin_types): Add types for System.Object here.
7171 (mono_metadata_parse_type_full): Cache MonoType*'s that are
7172 for a class or valuetype from klass->this_arg or klass->byval_arg.
7174 On mcs for a hello world, this gets us down from 21836 MonoType's
7177 (mono_metadata_free_type): Account for the above change.
7179 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
7181 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
7182 exception instead of asserting if name is null.
7183 (ves_icall_System_AppDomain_GetData): Ditto.
7185 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
7187 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7190 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
7191 Return NULL when the domain does not have entry_assembly set.
7193 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
7194 Add a 'resource_modules' argument.
7195 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7197 * reflection.c (mono_reflection_create_runtime_class): Move setting
7198 of wastypebuilder here, so mono_get_type_object () returns a MonoType
7201 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7202 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7203 Throw an ArgumentNullException if 'ptr' is null.
7205 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7206 assemblies here. Fixes #69020.
7208 2004-11-05 Geoff Norton <gnorton@customerdna.com>
7210 * reflection.c (build_compressed_metadata): Fix the previous patch for
7211 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
7214 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
7216 * assembly.c (mono_assembly_names_equal): Allow a match if one of
7217 the cultures is false. Fixes #69090.
7219 * reflection.c (build_compressed_metadata): Fix invalid memory read
7220 detected by valgrind.
7222 * reflection.c (mono_reflection_get_type): Avoid triggering a
7223 TypeResolve multiple times for the same type. Fixes #65577.
7225 2004-11-04 Ben Maurer <bmaurer@ximian.com>
7227 * marshal.c: Avoid using ldftn to call managed functions. It is
7228 much slower than just a call.
7230 * reflection.c (mono_module_get_object): free the basename we
7231 allocate here from glib.
7233 * reflection.c (ensure_runtime_vtable): make sure to free
7234 overrides. Also, we were allocating an array of MonoMethod not an
7235 array of MonoMethod*.
7237 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7239 * image.c (mono_image_close): free image->guid here.
7241 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
7243 * reflection.c: Fix some spec conformance issues with the PE file
7244 structures so mcs compiled apps run on the Net 2.0 beta.
7246 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
7248 * string-icalls.c (ves_icall_System_String_ctor_encoding):
7249 Implement this. Fixes #67264.
7251 * debug-helpers.h debug-helpers.c marshal.c: Move
7252 mono_find_method_by_name to debug-helpers.c.
7254 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
7256 * object.c (mono_release_type_locks): type_initialization_hash is
7259 * reflection.c object.c object-internals.h: Fix warnings.
7261 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7262 without accessors. Fixes #61561.
7264 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7265 application base from the root domain if not set. Fixes #65641.
7266 (mono_runtime_init): Fix warning.
7268 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7270 * appdomain.c: call mono_thread_pool_init.
7271 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7272 of worker threads based on the number of CPUs and the environment
7273 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7274 for non-windows (windows) systems.
7276 2004-10-27 Chris Toshok <toshok@ximian.com>
7278 * mono-debug-debugger.c (write_class): don't call mono_class_init
7279 here, as even with the check for (!klass->init_pending), we get
7280 into a situation where we're hitting cycles in class
7281 initialization. Fixes #68816.
7283 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
7285 * image.c: Avoid overwriting values in the loaded_images_hash when an
7286 assembly is loaded multiple times. Fixes #61152.
7288 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7289 so multiple satellite assemblies for the same name can be loaded.
7292 * mono_domain_assembly_preload: Actually return the loaded assembly,
7295 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7296 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7298 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7299 pending finalizers are not invoked after the appdomain has been
7300 unloaded. Fixes #67862.
7302 2004-10-22 Martin Baulig <martin@ximian.com>
7304 * mono-debug-debugger.c
7305 (mono_debugger_runtime_invoke): Don't box valuetypes.
7307 2004-10-22 Chris Toshok <toshok@ximian.com>
7309 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7310 don't hide private methods.
7312 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
7314 * icall.c: Allows the runtime to "share" (when known) the public key
7315 token of an assembly. This avoid the need to recalculate the token
7316 (from the public key) in managed code.
7318 2004-10-21 Chris Toshok <toshok@ximian.com>
7320 * debug-helpers.c (append_class_name): argh, revert last patch.
7322 2004-10-21 Chris Toshok <toshok@ximian.com>
7324 * debug-helpers.c (append_class_name): use '+' as the delimiter,
7325 not '/', so that it matches what the debugger uses to look up
7328 2004-10-21 Martin Baulig <martin@ximian.com>
7330 * mono-debug-debugger.c (mono_debugger_throw_exception): New
7331 public method; this is called each time an exception is thrown and
7332 allows the debugger to use exception catch points.
7334 2004-10-21 Martin Baulig <martin@ximian.com>
7336 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7337 the stack pointer and the exception object in some struct and pass
7338 that to the debugger.
7340 2004-10-21 Chris Toshok <toshok@ximian.com>
7342 * mono-debug-debugger.c (do_write_class): add instance/static
7343 event support. We don't expose "raise" or "other" yet.
7344 (event_is_static): new method.
7346 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
7348 * mono-debug-debugger.c
7349 (mono_debugger_handle_exception): Remove
7350 bogus return value for fussy compilers.
7352 2004-10-20 Martin Baulig <martin@ximian.com>
7354 * mono-debug-debugger.c
7355 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7356 (mono_debugger_handled_exception): Likewise.
7358 2004-10-20 Martin Baulig <martin@ximian.com>
7360 * mono-debug-debugger.h (MonoDebuggerEvent): Added
7361 MONO_DEBUGGER_EVENT_EXCEPTION.
7363 * mono-debug-debugger.c (mono_debugger_handle_exception): New
7364 public function to send the debugger a notification for an
7365 exception and inform it about a catch/finally clause.
7367 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
7369 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7370 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7373 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7375 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
7377 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7378 marshalled as [In,Out]. Fixes #58325.
7380 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
7382 * reflection.c (mono_method_body_get_object): Implement some fields.
7384 2004-10-12 Martin Baulig <martin@ximian.com>
7386 * reflection.c (mono_reflection_bind_generic_parameters): Small
7387 fix, correctly retrieve our parent from a generic instance.
7389 2004-10-12 Martin Baulig <martin@ximian.com>
7391 * metadata.c (mono_metadata_generic_param_equal): We always have
7395 (mono_class_from_generic_parameter): We need to have an owner.
7396 (my_mono_class_from_generic_parameter): Likewise.
7398 * reflection.c (mono_reflection_setup_generic_class): Renamed to
7399 mono_reflection_create_generic_class() and added a new
7400 mono_reflection_setup_generic_class().
7401 (mono_reflection_initialize_generic_param): If we're a nested
7402 generic type and inherited from the containing class, set our
7403 owner to the outer class.
7405 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
7407 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7409 * reflection.c (mono_method_body_get_object): New function to create
7410 a MethodBody object.
7412 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7414 2004-10-11 Martin Baulig <martin@ximian.com>
7416 * metadata.c (_mono_metadata_type_equal): Renamed to
7417 do_mono_metadata_type_equal() and made static.
7419 2004-10-11 Martin Baulig <martin@ximian.com>
7421 * appdomain.c: Bump corlib version number to 28.
7423 2004-10-10 Martin Baulig <martin@ximian.com>
7426 (MonoGenericInst): Added `MonoGenericContainer *container'.
7427 (MonoGenericMethod): Likewise.
7428 (MonoGenericContext): Likewise.
7429 (MonoGenericParam): Added `MonoGenericContainer *owner'.
7432 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7433 (do_mono_metadata_parse_generic_inst): Likewise.
7434 (mono_metadata_parse_type_full): New public method. This is the actual
7435 mono_metadata_parse_type() implementation - with an additional
7436 `MonoGenericContainer *' argument.
7437 (mono_metadata_parse_array_full): Likewise.
7438 (mono_metadata_parse_signature_full): Likewise.
7439 (mono_metadata_parse_method_signature_full): Likewise.
7440 (mono_metadata_parse_mh_full): Likewise.
7441 (mono_type_create_from_typespec): Likewise.
7442 (mono_metadata_interfaces_from_typedef_full): New public method;
7443 this is similar to the other _full() methods, but we take a
7444 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7445 (mono_metadata_parse_generic_param): Take an additional
7446 `MonoGenericContainer *' argument and lookup the MonoGenericParam
7447 from that container.
7448 (mono_metadata_generic_param_equal): New static method to compare
7449 two type parameters.
7450 (_mono_metadata_type_equal): New static method; takes an
7451 additional `gboolean signature_only' argument - if true, we don't
7452 compare the owners of generic parameters.
7453 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7454 with a TRUE argument - do a signature-only comparision.
7456 * loader.c: Use the new _full() methods and pass the
7457 MonoGenericContainer to them.
7459 * object-internals.h (MonoReflectionTypeBuilder): Added
7460 `MonoGenericContainer *generic_container' field.
7461 (MonoReflectionMethodBuilder): Likewise.
7463 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
7465 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7466 case initial images of dynamic assemblies.
7468 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7470 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7472 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7473 length of event->other array.
7474 (typebuilder_setup_events): Ditto.
7476 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7477 'assembly_by_name' and add an 'assemblies' list.
7479 * assembly.h assembly.c: Add a new search hook for determining whenever
7480 an assembly is already loaded. Use this instead of searching in the
7481 loaded_assemblies list.
7483 * domain.c appdomain.c: Implement the new search hook so loaded
7484 assemblies are now scoped by appdomain. Fixes #67727.
7486 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
7488 * threads.c (mono_thread_attach): Initialize synch_lock field so
7489 mono_thread_detach works again.
7491 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7492 'lib' too. Fixes #63130.
7494 2004-10-06 Jackson Harper <jackson@ximian.com>
7496 * culture-info-tables.h: regenerated.
7498 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
7500 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
7501 implemented by other interfaces in the result. Fixes #65764.
7503 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7504 Handle unloadable modules without crashing.
7506 * image.c (load_modules): Revert the previous patch since modules must
7507 have a fixed index inside the array.
7509 * image.c (load_modules): Don't include native modules in the modules
7512 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
7514 * reflection.h: Add param_defaults field.
7516 * reflection.c: Add support for parameter defaults in dynamic methods.
7519 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7520 an empty string when a type has no namespace. Fixes #64230.
7522 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
7524 * tabledefs.h: Added "internal" security actions to support non-CAS
7525 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
7526 Note: they do not seems to be used anymore in 2.0 (new metadata format)
7528 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
7530 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7531 constructor of abstract class. Fixes #61689.
7533 2004-10-04 Martin Baulig <martin@ximian.com>
7535 * class-internals.h (MonoGenericContainer): New type.
7536 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7537 `MonoGenericContainer *generic_container'.
7538 (MonoClass): Replaced `gen_params' and `num_gen_params' with
7539 `MonoGenericContainer *generic_container'.
7541 * metadata.c (mono_metadata_load_generic_params): Return a
7542 `MonoGenericContainer *' instead of a `MonoGenericParam *';
7543 removed the `num' argument.
7545 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
7547 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7550 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7553 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7555 * reflection.c: Save pe_kind and machine values into the generated
7558 * appdomain.c: Bump corlib version number.
7560 * object-internals.h: Reorganize layout of LocalBuilder.
7562 * class-internals.h class.c (mono_class_get_implemented_interfaces):
7563 New helper function.
7565 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7566 created MonoType for dynamic types. Fixes #66180.
7568 2004-10-02 Ben Maurer <bmaurer@ximian.com>
7570 * threadpool.c: the ares hashtable needs a critical section around it.
7571 this prevents some nasty segfaults
7573 2004-10-02 Massimiliano Mantione <massi@ximian.com>
7575 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7576 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7579 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7581 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7583 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
7585 * image.c: Always canonicalize image file names, to avoid loading
7586 the same assembly twice when referenced using a relative path.
7588 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7590 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7592 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7594 * marshal.c: Fix warnings.
7596 2004-09-29 Geoff Norton <gnorton@customerdna.com>
7598 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7599 attempting to marshal the delegate_trampoline as the method_addr.
7600 This patch has a static hashtable of marshalled delegates so that
7601 we can map delegate_trampoline addresses back to delegates. This
7602 allows a delegate passed to managed code to be passed back into native
7605 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7607 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7609 * reflection.c (method_encode_code): Align method headers properly.
7612 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7614 * marshal.c: In the runtime invoke wrapper, reset the abort
7615 exception if it is cached. This avoids the automatic rethrowal of
7616 the exception after the catch of the wrapper. Also check for pending
7617 interruptions before calling the managed method. This is done using
7618 the new method emit_thread_force_interrupt_checkpoint, since the
7619 normal checkpoint method is ignored when running the invoke wrapper.
7620 * object.c: If the abort exception is rethrown, set the abort_exc
7621 field of the thread, so it will be rethrown aftere every catch.
7622 * threadpool.c: Only run an interruption checkpoint if what has been
7623 requested is a stop of the thread (aborts will be ignored).
7624 * threads.c: By default, a thread will now never be interrumped while
7625 running the runtime invoke wrapper (this ensures that runtime_invoke
7626 will always return to the caller if an exception pointer is provided).
7627 There is a new special method mono_thread_force_interruption_checkpoint()
7628 to force an interruption checkpoint even if running a protected
7629 wrapper, which is used by the same runtime invoke wrapper to do a check
7632 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7634 * object.c, object-internals.h: Implemented mono_release_type_locks,
7635 which releases the cctor locks held by a thread.
7636 * threads.c, threads.h: In thread_cleanup, release cctor locks held
7637 by a thread. Added mono_thread_exit() method to be used to safely stop
7640 2004-09-28 Raja R Harinath <rharinath@novell.com>
7642 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7643 Move null check before dereference. Avoid indexing beyond the end
7644 of the 'modules' array.
7646 2004-09-28 Raja R Harinath <rharinath@novell.com>
7648 * metadata-internals.h (MonoImage): Add module_count field.
7649 * image.c (load_modules): Set image->module_count.
7650 (mono_image_load_file_for_image): Use image->module_count.
7651 * reflection.c (mono_image_load_module): Append to image->modules array
7652 of dynamic assembly.
7653 (mono_module_get_object): Fix loop to actually increment index.
7654 Use image->module_count.
7655 * assembly.c (mono_assembly_load_references): Use image->module_count.
7656 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7659 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7661 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7662 Avoid assert on generic types.
7664 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
7666 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7668 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7670 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
7671 function to convert a MarshalSpec structure to its managed counterpart.
7673 * reflection.c: Fix warnings.
7675 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7678 * icall.c (mono_create_icall_signature): Fix build.
7680 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
7682 * icall.c: Add MakePointType icall.
7684 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7687 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7689 * threadpool.c: reuse allocated slots in the queue.
7691 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
7693 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7695 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7697 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7700 * tabledefs.h: Add constants for pinvoke attributes BestFit and
7701 ThrowOnUnmappableChar.
7703 * icall.c (ves_icall_Type_GetPacking): New icall.
7705 2004-09-24 Martin Baulig <martin@ximian.com>
7707 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7709 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7712 (mono_domain_set): allow setting a domain that is being unloaded.
7713 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7716 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7718 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7719 the GetCustomAttributes icall.
7721 2004-09-23 Martin Baulig <martin@ximian.com>
7723 * object-internals.h (MonoReflectionGenericParam): Replaced
7724 'has_ctor_constraint', `has_reference_type' and `has_value_type'
7725 with `guint32 attrs'.
7727 2004-09-23 Martin Baulig <martin@ximian.com>
7729 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7731 2004-09-23 Martin Baulig <martin@ximian.com>
7733 * object-internals.h (GenericParameterAttributes): New enum.
7735 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7737 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7739 * class.c (init_events): Fill out event->other field.
7741 * class.c: Fix warnings.
7743 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7745 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7747 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7748 walk which doesn't supply the IL offset.
7750 2004-09-22 Martin Baulig <martin@ximian.com>
7752 * reflection.c (mono_reflection_setup_internal_class): If we're
7753 System.ValueType, System.Object or System.Enum, set
7754 `klass->instance_size' and create the vtable.
7755 (mono_reflection_create_internal_class): If we're an enum type,
7756 get the base class from our current corlib.
7758 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
7760 * reflection.h (MonoResolveTokenError): New type.
7762 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7765 * icall.c: Add an 'error' argument to the ResolveToken icalls.
7767 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
7769 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7770 Support also calling constructors, but only for already allocated objects.
7772 2004-09-17 Geoff Norton <gnorton@customerdna.com>
7774 * reflection.c (type_get_qualified_name): If the klass is null
7775 return the typename to avoid a NullRefEx.
7776 (encode_cattr_value): Get the qualified name of the boxed type,
7777 not the underlying enumtype. Fixes #62984.
7779 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
7781 * marshal.c: Fix problems with previous checkin.
7783 2004-09-21 <vargaz@freemail.hu>
7785 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7786 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7788 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7790 2004-09-21 Geoff Norton <gnorton@customerdna.com>
7792 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7793 should only return a type for pointers, arrays, and passbyref types.
7796 2004-09-21 Martin Baulig <martin@ximian.com>
7798 * domain.c (mono_debugger_check_runtime_version): New public
7801 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
7803 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
7805 * reflection.c: Added missing sort to the declarative security
7806 attributes table. MS implementation stops seeing the attributes if the
7807 token number regress in the table (as shown by ildasm and permview).
7809 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
7811 * object-internals.h (MonoReflectionModule): Add 'token' field.
7813 * reflection.c (mono_reflection_get_token): Add support for Module
7815 (mono_module_get_object): Set 'token' field.
7816 (mono_module_file_get_object): Set 'token' field.
7818 * icall.c: Add new Assembly and Module icalls.
7820 * appdomain.c: Bump corlib version.
7822 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
7824 * loader.h loader.c class.h class.c: Add helper functions for obtaining
7825 tokens of metadata objects.
7827 * reflection.h reflection.c (mono_reflection_get_token): New function
7828 to obtain the token of a metadata object.
7830 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7832 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
7834 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7836 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7838 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
7840 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7841 * object-internals.h: Added 3 MonoArray* members to MonoReflection
7842 AssemblyBuilder to access the permissions set in the class lib.
7843 * reflection.c: Added security attributes encoding step in
7844 mono_image_build_metadata.
7845 * tabledefs.h: Added new security actions defined in 2.0:
7846 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7848 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7850 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7853 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7855 * locales.c: nullify the ICU_collator member of CompareInfo when it is
7856 finalized. There where random SIGSEVs at program termination, when
7857 an object being finalized was trying to do a string comparison and
7858 the current culture was already finalized.
7860 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7862 * threads.c: call thread_cleanup before finishing the thread if we get
7865 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
7867 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7868 assemblies from the parent. Fixes #65665.
7870 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
7872 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7875 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
7877 * reflection.h: add prototype for mono_get_dbnull_object
7878 * reflection.c: add prototypes for get_default_param_value_blobs
7879 and mono_get_object_from_blob for fussier compilers
7881 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
7883 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7884 false deadlock checks in class initialization.
7886 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
7888 * image.c (mono_image_addref): Fix comment.
7890 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7893 2004-09-12 Jambunathan K <kjambunathan@novell.com>
7895 * reflection.c (mono_param_get_objects): Modified to return
7896 ParameterInfo.DefaultValue object.
7898 (get_default_param_value_blobs):
7899 (mono_get_object_from_blob):
7900 (mono_get_dbnull_object): New helper routines.
7902 * object.c (mono_get_constant_value_from_blob): New helper routine
7903 carved out from get_default_field_value ()
7905 * object-internals.h (mono_get_constant_value_from_blob): Added
7906 function declaration.
7908 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
7910 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
7911 referenced assemblies. Fixes #62135.
7913 * exception.h exception.c (mono_get_exception_file_not_found2): New
7916 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
7918 * class.h class.c: Add mono_type_get_underlying_type ().
7920 2004-09-09 Geoff Norton <gnorton@customerndna.com>
7922 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7923 Fix GetTypes() to support dynamically created assemblies.
7925 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
7927 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7929 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7932 * reflection.h reflection.c loader.c: Allow dynamic construction of
7933 pinvoke methods. Fixes #65571.
7935 * reflection.c (mono_reflection_get_type): Revert previous change since
7936 it causes regressions.
7938 2004-09-08 Martin Baulig <martin@ximian.com>
7940 * class.c (class_compute_field_layout): Don't call
7941 mono_class_layout_fields() for open generic instances.
7943 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7944 * threads.c appdomain.c: fix typo in GC macro
7946 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7948 * threads.c: don't call mono_thread_detach() in start_wrapper(),
7949 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7951 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
7953 * image.c (mono_image_close): Applied patch from
7954 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7955 assembly is loaded multiple times from data.
7957 * image.c (mono_image_open): Fix warning.
7959 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7961 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7964 * reflection.c (mono_reflection_create_runtime_class): Initialize
7965 klass->nested_classes. Fixes #61224.
7967 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7969 * threads.c: sched_yield() on exit, to allow threads to quit.
7971 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7973 * object.c (mono_unhandled_exception): Remove leftover debug code.
7975 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
7977 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7979 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7981 * marshal.c (emit_marshal_array): Really null terminate string arrays.
7983 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7985 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7987 * marshal.c (emit_marshal_array): Null terminate string arrays.
7989 * marshal.c (raise_auto_layout_exception): Fix warning.
7991 * reflection.c (mono_param_get_objects): Initialize the default value
7992 with DBNull.Value, not null. Fixes #62123.
7994 2004-09-01 Miguel de Icaza <miguel@ximian.com>
7996 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7997 throw an exception with a cute explanation.
7999 2004-09-06 Dick Porter <dick@ximian.com>
8001 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8002 Close the new process's thread handle, as we don't use it. The
8003 handle stays around forever otherwise.
8005 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8007 * object.c (arith_overflow): Fix warning.
8009 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8010 calling conventions in method refs. Fixes #65352.
8012 * reflection.c: Fix warnings.
8014 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8016 * icall.c: Add a new icall for Array.Clear
8018 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8020 * object.c: When allocating an array, we have to throw
8021 an overflow exception if any of the lengths are < 0.
8023 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8025 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8026 properly. Also move implementation of string array marshalling to
8027 managed code. Fixes #42316.
8029 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8031 * assembly.c: provide more information when loading an assembly fails.
8033 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8035 * filewatcher.c: don't expect the development fam package to be
8038 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
8040 * marshal.c: Make a copy of the signature cookie since it will be
8041 freed by the caller.
8043 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8045 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8047 * metadata.c (mono_metadata_free_marshal_spec): New function to free
8050 * marshal.c: More refactoring.
8052 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8055 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
8057 * object.c: In mono_message_invoke, fill the output parameter array after
8058 calling the managed method (it was done before the call). This fixes
8061 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8063 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8066 2004-09-02 Martin Baulig <martin@ximian.com>
8068 * class.c (mono_class_instance_size): Don't allow generic type
8069 definitions or open generic instances.
8070 (mono_class_array_element_size): If we're a value type, call
8071 mono_class_instance_size() on the original class.
8073 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8074 handle generic instances.
8076 * mono-debug-debugger.c (write_type): Handle generic instances
8079 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8081 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8082 the allocation request fails. Fixes #65089.
8084 * object.c (mono_runtime_free_method): Do not call mono_free_method.
8086 * object.c (mono_runtime_free_method): New function to free a dynamic
8089 * marshal.c (mono_delegate_free_ftnptr): New function to free the
8090 delegate trampoline.
8092 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8093 with hasthis as dynamic,
8095 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8097 * domain.c (mono_jit_info_table_remove): New function to remove an
8098 entry from the jit info table.
8100 * class-internals.h (MonoMethod): Add 'dynamic' field.
8102 * loader.c: Fix warnings.
8104 2004-09-01 Martin Baulig <martin@ximian.com>
8106 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8107 instead of mono_debugger_lock() because the latter one is a no-op
8108 unless running in the debugger.
8110 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8112 * class.c (class_compute_field_layout): Classes with auto-layout or
8113 reference fields are not blittable.
8115 2004-09-01 Dick Porter <dick@ximian.com>
8117 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8118 mono_image_get_filename() to get the assembly location.
8121 * metadata.h: Fix compile warnings
8123 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8125 * class.c (class_compute_field_layout): System.Object is blittable.
8127 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8128 as in/out. Fixes #59909.
8130 2004-09-01 Martin Baulig <martin@ximian.com>
8132 * metadata.h (MONO_TYPE_ISREFERENCE): Call
8133 mono_metadata_generic_inst_is_valuetype() if we're a generic
8134 instance to check whether our underlying type is a reference type.
8136 2004-09-01 Martin Baulig <martin@ximian.com>
8138 * metadata.c (mono_type_size): If we're a generic instance, call
8139 mono_class_value_size() for value types.
8141 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
8143 * marshal.c: Implement more custom marshalling functionality. Fixes
8146 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8148 * mono-debug.c, debug-mono-symfile.c: add some locking love.
8150 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
8152 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8154 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8156 * icall.c: Fix some warnings.
8158 * threads.c (abort_appdomain_thread): Fix unref errors.
8159 (mono_thread_current): Fix THREAD_DEBUG define.
8161 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
8163 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8165 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8167 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
8169 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
8172 2004-08-28 Martin Baulig <martin@ximian.com>
8175 (mono_metadata_generic_inst_is_valuetype): New public function.
8177 * metadata.h (MONO_TYPE_ISSTRUCT): Call
8178 mono_metadata_generic_inst_is_valuetype() if we're a generic
8179 instance to check whether our underlying type is a valuetype.
8181 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
8183 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8186 2004-08-25 Martin Baulig <martin@ximian.com>
8188 * loader.c (mono_get_method_from_token): Abstract methods can also
8189 be generic and thus have type parameters.
8191 * metadata-internals.h
8192 (MonoDynamicImage): Added `GPtrArray *gen_params'.
8194 * reflection.c (mono_image_get_generic_param_info): Don't create a
8195 metadata row, just add an entry to the `gen_params' array.
8196 (build_compressed_metadata): Sort the `gen_params' array and then
8197 actually create the metadata.
8199 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8201 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8203 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
8205 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8207 2004-08-24 Martin Baulig <martin@ximian.com>
8209 * class.cs (mono_class_is_subclass_of): Like an interface, a
8210 generic instance also derives from System.Object.
8212 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
8214 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8215 custom modifiers to be in any order. Fixes #61990.
8217 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
8219 * object.c: Register mono_object_new_fast icall.
8221 * object.c (mono_class_get_allocation_ftn): Return to calling
8222 mono_object_new_fast, since it seems faster to compute the object
8223 size in unmanaged code than passing it as a parameter.
8225 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8227 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8228 this function with Boehm as the oom handler, so we don't have to check
8229 the result of GC_malloc.
8231 * object.c: Remove checks for oom.
8233 * object.h object.c (mono_class_get_allocation_ftn): New function to
8234 return the icall which can be used to allocate an instance of a given
8237 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8239 * class-internals.h: Add 'enabled' field.
8241 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
8243 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8245 2004-08-18 Jambunathan K <kjambunathan@novell.com>
8246 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8249 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
8251 * appdomain.c: use the Tls function for appdomain too,
8252 at Zoltan's request. Actually return in mono_context_get
8254 * appdomain.c, profiler.c, threads.c: use __thread
8256 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
8258 * appdomain.c threads.c: Call GC_CreateThread on windows.
8260 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8261 multiple libraries since this don't work on windows.
8263 2004-08-18 Martin Baulig <martin@ximian.com>
8266 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8269 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8270 MonoMethodNormal since we also need it for abstract and interface
8274 (build_compressed_metadata): Sort the GenericParam table.
8275 (mono_image_create_token): Added `gboolean create_methodspec'
8276 argument; this is false when generating a MethodImpl token.
8277 (reflection_methodbuilder_to_mono_method): Abstract and interface
8278 methods may also have generic parameters.
8280 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
8282 * appdomain.c: thread local alloc
8284 2004-08-17 Martin Baulig <martin@ximian.com>
8286 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8289 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8292 * class.c (mono_type_get_full_name): New public function.
8293 (mono_type_get_name): Don't include the type arguments.
8295 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
8297 * Makefile.am: Build static versions of libmetadata and libmonoruntime
8298 for inclusion into the mono executable.
8300 2004-08-16 Martin Baulig <martin@ximian.com>
8302 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8303 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8305 2004-08-14 Martin Baulig <martin@ximian.com>
8307 * class.c (dup_type): Also copy the `byref' field.
8309 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
8311 * reflection.c (create_dynamic_mono_image): Revert the last change
8312 since it breaks bootstrap.
8314 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
8316 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8318 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8319 not free them with g_free.
8321 2004-08-11 Martin Baulig <martin@ximian.com>
8323 * reflection.c (mono_reflection_setup_internal_class): Also call
8324 mono_class_setup_mono_type() if we already have a `tb->type.type'.
8326 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
8328 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
8329 called during default (first) AppDomain creation. Keep track of
8330 Evidence when loading assemblies.
8332 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8334 * opcodes.c, opcodes.h: reduce runtime relocations.
8336 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8338 * culture-info.h, locales.c: fixes and chages to sue the new
8339 optimized format of the locale data.
8340 * culture-info-tables.h: regenerated.
8342 2004-08-06 Geoff Norton <gnorton@customerdna.com>
8344 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8346 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
8348 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8349 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8350 * domain-internals.h: icall declaration.
8351 * icall.c: icall registration.
8352 * object-internals.h: New fields in MonoAssembly for CAS.
8354 2004-08-05 Duncan Mak <duncan@ximian.com>
8356 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8359 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8361 * reflection.c: fix to deal with object[] arrays in custom ctors
8364 2004-08-05 Martin Baulig <martin@ximian.com>
8366 * class.c (mono_class_array_element_size): Added support for
8367 generic instances and correctly handle "recursive" types.
8369 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
8371 * assembly.c: Fix warnings.
8373 2004-08-04 Martin Baulig <martin@ximian.com>
8376 (mono_type_get_name_recurse): Added `gboolean include_arity'
8377 argument specifying whether or not we should include the generic
8378 arity in the type name.
8379 (_mono_type_get_name): New static function.
8380 (mono_class_setup_vtable): If we're a generic instance, don't
8381 include the generic arity in the names of explicit method
8384 2004-08-03 Martin Baulig <martin@ximian.com>
8386 * class.c (mono_type_get_name_recurse): Enclose the generic type
8387 arguments in `<', '>'.
8389 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8391 * gc.c: make GC warning messages use the trace API, they are just
8392 noise to most of the users.
8394 2004-08-03 Martin Baulig <martin@ximian.com>
8396 * debug-mono-symfile.c (read_string): Correctly read the string.
8398 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
8400 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8402 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8404 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8406 2004-07-30 Martin Baulig <martin@ximian.com>
8408 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8409 Reflect latest symbol writer changes.
8411 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8413 * object.c: always create an object if null is passed
8414 to Invoke() where a valuetype is expected.
8416 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
8418 * marshal.c (mono_marshal_init): make managed
8419 signatures match native ones better for 64bits.
8421 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8423 * appdomain.c: hack to build correctly the private bin path on windows.
8426 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
8428 * assembly.c: Load mscorlib from the correct framework directory
8429 (mono/<version>/mscorlib.dll).
8430 * appdomain.h: Added prototypes for new functions.
8431 * internals.h: Added some prototypes.
8432 * domain.c: When initializing the runtime, get from the executable and
8433 the configuration files the runtime version that the app supports.
8434 Added support methods for reading app.exe.config. Added list of versions
8435 supported by the JIT. Added two new methods: mono_init_from_assembly,
8436 which initializes the runtime and determines the required version from
8437 the provided exe file, and mono_init_version, which initializes
8438 the runtime using the provided version.
8439 * icall.c: Get machine.config from version-specific directory.
8440 * reflection.c: When generating an image, embed the version number
8441 of the current runtime.
8443 2004-07-28 Dick Porter <dick@ximian.com>
8446 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8447 returned sockaddr size before creating the remote address object.
8448 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8451 2004-07-28 Dick Porter <dick@ximian.com>
8453 * locales.c (string_invariant_compare_char): Fix invariant char
8454 compares between upper and lower cases. Fixes bug 61458.
8456 2004-07-27 Ben Maurer <bmaurer@ximain.com>
8458 * marshal.c: actually cache stelem.ref wrappers.
8460 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8462 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
8463 sections and remove the mono_cli_rva_map () function.
8465 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8467 * debug-mono-symfile.c: fix one more endianess issue, from a patch
8468 by Geoff Norton (<gnorton@customerdna.com>).
8470 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8472 * class.c: fix class loads for pointer types (typeof(int) !=
8475 2004-07-27 Martin Baulig <martin@ximian.com>
8477 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8478 reading the debugging information from an external ".mdb" file.
8480 2004-07-24 Martin Baulig <martin@ximian.com>
8482 * reflection.c (mono_image_get_type_info): Only write a class
8483 layout entry if we actually have a size or a packing size.
8485 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8487 * reflection.c (type_get_fully_qualified_name):
8488 insert cast to get type checking of ?: with non-gcc compilers
8490 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8492 * rand.c: use g_getenv for both lookups of
8495 2004-07-17 Martin Baulig <martin@ximian.com>
8497 * reflection.c (mono_reflection_bind_generic_method_parameters):
8498 Set `gmethod->reflection_info'.
8500 2004-07-17 Martin Baulig <martin@ximian.com>
8502 * class.c (mono_class_create_from_typedef): Insert the newly
8503 created class into the hash table before computing the interfaces
8504 since we could be called recursively.
8506 2004-07-16 Ben Maurer <bmaurer@ximain.com>
8508 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8509 function to implement stelem.ref in managed code
8510 * class-internals.h, debug-helpers.c: a new wrapper type
8513 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8515 * gc.c: allow GC handles to work even when no GC is compiled in.
8516 Fix part of bug #61134 (GetAddrOfPinnedObject).
8518 2004-07-13 Peter Williams <peter@newton.cx>
8520 * process.c (complete_path): Make sure we don't attempt to execute
8523 2004-07-12 Geoff Norton <gnorton@customerdna.com>
8525 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
8526 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
8527 and will add/subtract the hour if needed
8529 2004-07-12 Martin Baulig <martin@ximian.com>
8531 * reflection.c (mono_field_get_object): If we have
8532 `field->generic_info', take the attributes from
8533 `field->generic_info->generic_type'.
8535 2004-07-12 Martin Baulig <martin@ximian.com>
8537 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8538 This function must be called before initializing the runtime.
8539 (mono_debug_init_1): New function; call this after initializing
8540 the runtime, but before loading the assembly. It tells the
8541 debugger to load corlib and the builtin types.
8543 * mono-debug-debugger.c: Did some larger changes in the debugging
8544 code; support recursive class declarations, make sure we actually
8547 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8549 * debug-helpers.c: undo my previous patch and fixed the real issue in
8550 ../mini/exceptions-x86.c
8552 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8554 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8555 when no HOME env. variable was set and a NullRef was thrown in a .cctor
8556 called from other .cctors.
8558 2004-07-09 Miguel de Icaza <miguel@ximian.com>
8560 * loader.c: Removed the mono_loader_wine_init hack now that we are
8561 doing a managed version of Windows.Forms.
8563 2004-07-09 Ben Maurer <bmaurer@ximian.com>
8565 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8566 threadpool.c, threads.c: remove static data from rootset.
8568 2004-07-09 Dick Porter <dick@ximian.com>
8570 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8571 Don't do any more processing if the matched length was 0. It was
8572 increasing the size of the string before. Fixes bug 61167.
8574 2004-07-09 Dick Porter <dick@ximian.com>
8578 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8579 Add support for SO_PEERCRED if its available.
8581 2004-07-09 Peter Bartok <pbartok@novell.com>
8582 * loader.c: winelib.exe.so error message is now only displayed if
8583 MONO_DEBUG is set. To help us avoid questions when people are trying
8584 out the new Managed.Windows.Forms.
8586 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
8588 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
8589 for isinst and castclass wrappers.
8591 * class-internals.h icall.c: Move registration and lookup of JIT icalls
8592 to libmetadata from the JIT, so they could be used by the marshalling
8593 code and the interpreter.
8595 * marshal.c: Register marshalling related JIT icalls here instead of
8596 in mini.c. Use CEE_MONO_ICALL instead of the family of
8597 CEE_MONO_PROC<x> opcodes to call marshalling functions.
8599 * metadata.h: Remove unneeded marshalling conversions.
8601 * opcodes.c: Update for new opcodes.
8603 2004-07-08 Martin Baulig <martin@ximian.com>
8605 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8606 (mono_debug_get_domain_data): Make this function static.
8608 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8610 * gc.c, object.h: add nice GC handle API for embedders.
8612 2004-07-06 Ben Maurer <bmaurer@ximian.com>
8614 * reflection.c: more changes for the new api
8616 * object.c: When we reflect on a field w/ a constant value, it
8617 will not have a memory location, so we must access metadata. Also,
8618 allow easier reading of strings so that we can read them from
8621 * class.c (mono_class_layout_fields): no need for literal fields here.
8623 * class-internals.h: api changes for const fields
8625 * icall.c (ves_icall_get_enum_info): use new apis for const fields
8627 2004-07-06 Martin Baulig <martin@ximian.com>
8629 * mono-debug.h: Increment version number to 44.
8631 * mono-debug.c (mono_debug_add_wrapper): The second argument is
8632 now a gpointer, rewrote this whole method.
8634 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8635 function. Add information about the wrapper in a new "misc table".
8637 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8638 for the new misc table.
8640 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
8642 * metadata-internals.h image.c: Add a cache for helper signatures.
8644 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8646 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
8648 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8649 delegates from a delegate. Fixes #61033.
8651 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8652 marshalling of stringbuilder arrays. Fixes #59900.
8654 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
8656 * icall.c: Add EnumBuilder:setup_enum_type icall.
8658 2004-06-30 Ben Maurer <bmaurer@ximian.com>
8660 * icall.c: Added a new icall for the property version of
8663 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
8665 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8666 it has a constant size across platforms.
8668 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8671 2004-06-29 Martin Baulig <martin@ximian.com>
8673 * mono-debug.c (mono_debug_add_method): Protect the whole function
8674 in mono_debugger_lock(), not just parts of it.
8676 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8678 * reflection.c: make sure padding bytes in heaps are zeroed.
8680 2004-06-24 David Waite <mass@akuma.org>
8682 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8683 image.c, loader.c, locales.c, marshal.c, metadata.c,
8684 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8685 string-icalls.c, threads.c: change to C90-style comments from C99 /
8688 2004-06-24 Dick Porter <dick@ximian.com>
8691 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8692 return createdNew. Fixes bug 60412.
8695 * icall.c: Add createdNew parameter to CreateMutex icall
8697 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8699 * reflection.c, object-internals.h: save default value in params.
8701 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8703 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8704 no need to build a new path combining that with the application base.
8707 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8709 * reflection.c: fixed minor standard compliance issues.
8711 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8713 * reflection.c: fixed issue with encoding some custom attributes
8714 (arrays in properties and fields, bug #60411).
8716 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8718 * reflection.c: fix start address when copying the public key token.
8720 2004-06-23 Martin Baulig <martin@ximian.com>
8722 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8723 the `exc' object in a static object to put it into the GC's root set.
8725 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8727 * reflection.c: make mono_reflection_setup_internal_class ()
8728 callable a second time to setup a new parent class.
8730 2004-06-23 Dick Porter <dick@ximian.com>
8732 * threads.c: Check for WAIT_IO_COMPLETION return values.
8734 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
8736 * appdomain.c: Removed the g_free on the public key token. Now copy
8737 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8738 * assembly.c: Added public key token string value when loading
8739 assemblies. Fix bug #60439.
8740 * icall.c: Added missing informations (like public key) in
8741 GetReferencedAssemblies. Fix #60519.
8742 * image.h: Changed definition for public key token from const char*
8743 public_tok_value to guchar public_key_token [17];
8744 * reflection.c: Updated for changes to public key token.
8746 2004-06-22 Lluis Sanchez Gual
8748 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
8749 for the field in base classes.
8751 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8753 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8754 mark headers as not supported, they are installed only for use by the
8757 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8759 * *.c, *.h: avoid namespace pollution in public headers.
8761 2004-06-21 Martin Baulig <martin@ximian.com>
8763 * exception.c (mono_get_exception_security): It's in
8764 "System.Security", not in "System".
8766 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8767 the exception classes.
8769 2004-06-21 Martin Baulig <martin@ximian.com>
8771 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8772 Protect the exception object from being finalized.
8774 2004-06-21 Martin Baulig <martin@ximian.com>
8776 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8779 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
8781 * reflection.c: Load the assembly in mono_reflection_type_from_name,
8782 if it was not loaded before. Fix parts of #60439.
8784 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8786 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8787 code that was broken since Ben's change: wrappers are now
8788 dependent on the method signature only again.
8790 2004-06-21 Martin Baulig <martin@ximian.com>
8792 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8793 added interface support.
8795 2004-06-21 Martin Baulig <martin@ximian.com>
8797 * class.c (mono_vtable_get_static_field_data): New public method.
8799 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
8801 * filewatcher.c : Windows build fix to be compliant with API changes.
8803 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8805 * class.h, class.c: more accessors.
8806 * metadata.h, metadata.c: prepare for hiding MonoType and
8807 MonoMethodSignature: people should use the accessors from now on
8808 outside of the tree.
8810 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8812 * *.c, *.h: more API cleanups.
8814 2004-06-18 Jackson Harper <jackson@ximian.com>
8816 * assembly.c: Trace loading assemblies.
8817 * loader.c: Trace loading native libraries.
8818 * mono-config.c: Trace loading config files.
8820 2004-06-18 Dick Porter <dick@ximian.com>
8822 * locales.c: Tell ICU the lengths of strings, it can cope with
8823 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
8825 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8827 * image.c: swapped name/filename;
8829 2004-06-18 Martin Baulig <martin@ximian.com>
8831 * mono-debug-debugger.c (write_class): Write the parent class at
8832 the end of the header.
8834 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8836 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8838 2004-06-17 Raja R Harinath <rharinath@novell.com>
8840 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
8841 (bundle_obj): New conditional define.
8842 (BUILT_SOURCES): Remove.
8843 ($(bundle_srcs)): Make parallel-make safe.
8844 (libmonoruntime_la_LIBADD): Make unconditional.
8845 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
8846 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8848 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
8850 * culture-info-tables.h: It was inconsistent with the latest
8853 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
8855 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8858 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8861 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8863 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8864 cleaned up public header threads.h.
8866 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8868 * Makefile.am, *.c, *.h: more API cleanups.
8870 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8872 * Makefile.am: removed monosn from compilation.
8873 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8874 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8875 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8876 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8877 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8878 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8880 2004-06-15 Jackson Harper <jackson@ximian.com>
8882 * assembly.c: Make locales lower case when searching the GAC for
8883 assemblies. gacutil will always make locales lowercase when
8884 installing so this effectively makes them case insensitive.
8886 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
8888 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8889 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8890 parameter which allows to choose whether the wait can be interrupted or
8891 not. Also added the method mono_monitor_enter(), which locks the monitor
8892 using an infinite wait and without allowing interruption.
8893 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8895 * object.h: Added new fields in MonoThread. suspend_event holds the event
8896 used to susped/resume the thread. synch_lock is the lock object to use for
8897 modifying the thread state.
8898 * threads.c: Use the new synch_lock object for locking, instead of "this",
8899 which can generate deadlocks.
8900 Moved thread state change in Thread.Sleep and Thread.Join from managed
8901 to unmanaged code. This avoids a deadlock when the thread was suspended
8902 just after acquiring the thread lock.
8903 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8904 Implemented Thread.Suspend using an event instead of ThreadSuspend,
8905 which is not fully implemented in the io-layer.
8906 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8908 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8910 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8911 threads-types.h: more API cleanups.
8913 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8915 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8916 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8917 threadpool.c, threads.c: first pass at the exported API cleanup.
8919 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8921 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8923 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8925 * icall.c: added internalGetHome.
8927 2004-06-14 Dick Porter <dick@ximian.com>
8929 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8930 possible to return successfully when '.' or '..' were the only
8931 entries in a directory, but were skipped. The MonoIOStat was not
8932 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
8935 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8937 * reflection.c: make binaries run on .Net 1.1 by default.
8939 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8941 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8943 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8945 * marshal.c: keep track of struct size with explicit layout
8948 2004-06-12 Martin Baulig <martin@ximian.com>
8950 * mono-debug-debugger.c: Comment out a debugging g_message().
8952 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8954 * reflection.c, reflection.h: do not free custom attrs that are cached.
8955 * icall.c: use braces to make code clearer.
8957 2004-06-11 Martin Baulig <martin@ximian.com>
8959 * class.h (MonoInflatedField): New type.
8960 (MonoClassField): Replaced `MonoType *generic_type' with
8961 `MonoInflatedField *generic_info'.
8964 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8966 2004-06-11 Martin Baulig <martin@ximian.com>
8968 * reflection.c (mono_image_create_method_token): Correctly encode
8971 2004-06-11 Martin Baulig <martin@ximian.com>
8973 * metadata.c (mono_metadata_parse_method_signature): When parsing
8974 a MethodDef which has VarArgs, also set sentinelpos if we don't
8975 have any parameters.
8977 2004-06-11 Martin Baulig <martin@ximian.com>
8979 * verify.c (mono_method_verify): In CEE_CALL, use
8980 mono_method_get_signature() to get the method's signature, unless
8981 we're a PInvoke method.
8983 2004-06-10 Jackson Harper <jackson@ximian.com>
8985 * assembly.c: Use <path>/lib/mono/gac for the extra paths
8986 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8987 logical name as the supplied path is just a prefix to the gac not
8988 the direct path to it.
8990 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8992 * reflection.c: make the token for a created method match
8993 the token of the MethodBuilder it was created from
8994 (IKVM requires this behaviour now).
8996 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8998 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8999 reflection.c, socket-io.c: leak fixes.
9001 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9003 * icall.c: handle sentinel pos in vararg methods in position different
9006 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9008 * culture-info-tables.h: freshly generated.
9010 2004-06-09 Martin Baulig <martin@ximian.com>
9012 * loader.c (mono_get_method_constrained): Call `mono_class_init
9013 (constrained_class)'.
9015 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
9017 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9018 any methods. Fixes #59629.
9020 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9022 * culture-info-tables.h: reflecting locale-builder updates.
9024 2004-06-08 Dick Porter <dick@ximian.com>
9027 * locales.c: Fixed compile warnings, including a real bug in
9028 CompareInfo_internal_compare.
9030 2004-06-08 Dick Porter <dick@ximian.com>
9033 (ves_icall_System_Globalization_CompareInfo_internal_index):
9034 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9035 Double-check the resuls of usearches, because ICU currently
9036 ignores most of the collator settings here. Fixes bug 59720.
9038 2004-06-08 Dick Porter <dick@ximian.com>
9041 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9042 Fix memory leak and segfault-causing typo. No idea how this one
9043 lasted so long without being noticed.
9045 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
9047 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9048 any methods. Fixes #59629.
9050 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9053 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9054 own the critical section before). Removed dead code (that's done
9055 in the preload hook).
9057 (mono_assembly_load_with_partial_name): call the preload hook.
9059 2004-06-08 Martin Baulig <martin@ximian.com>
9061 * metadata.c (mono_metadata_signature_alloc): Default
9062 `sentinelpos' to -1.
9064 * reflection.c (mono_image_get_array_token): Likewise.
9066 2004-06-08 Martin Baulig <martin@ximian.com>
9068 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9070 * metadata.c (mono_metadata_parse_method_signature): When parsing
9071 a MethodDef which has VarArgs, set sentinelpos.
9073 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9074 `gint16' since we're using -1 for non-varargs methods.
9077 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9078 (method_encode_signature): Added varargs support.
9079 (method_builder_encode_signature): Likewise.
9080 (mono_image_get_varargs_method_token): New static method.
9081 (mono_image_create_method_token): New public method; this is
9082 called via an icall instead of mono_image_create_token() when
9083 calling a varargs method.
9085 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
9087 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9089 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9091 * culture-info-tables.h : Reflecting the latest locale-builder that
9092 fixed empty array representation ({} to {0}).
9094 2004-06-07 Jackson Harper <jackson@ximian.com>
9096 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9097 looking up extra gac paths. This allows MONO_GAC_PATH to act
9098 exactly like a prefix.
9100 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9102 * reflection.c (mono_reflection_type_from_name): Make a copy of the
9103 type name before modifying it. Fixes #59405.
9105 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9107 * culture-info.h: added fields for "all datetime patterns".
9108 * locales.c: ( ves_icall_System_Globalization_CultureInfo
9109 _construct_datetime_format ()): fill xxx_patterns fields.
9110 * object.h: added fields for "all datetime patterns" to
9111 MonoDateTimeFormatInfo.
9112 * culture-info-tables.h: reflecting locale-builder updates.
9114 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9116 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9117 the event has no add and remove methods. Fixes #59629.
9119 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
9121 * object.c: Fixed possible integer overflow when allocating large
9124 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9126 * culture-info-tables.h: reflecting locale-builder updates.
9128 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9130 * culture-info-tables.h: reflecting locale-builder updates.
9132 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
9134 * culture-info-tables.h: reflecting locale-builder updates.
9136 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
9138 * threads.c: Made Thread.Sleep abortable.
9140 2004-06-02 Martin Baulig <martin@ximian.com>
9142 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9144 * debug-mono-symfile.h: Bumped symbol file version number to 37.
9146 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
9148 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9150 2004-05-30 Jackson Harper <jackson@ximian.com>
9152 * reflection.c: Do not hardcode assembly versions or public key
9153 tokens anymore. All of this except the corlib section was dead
9156 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
9158 * object.c (mono_runtime_invoke_array): Automatically create boxed
9159 objects for byref valuetypes if needed. Fixes #59300.
9161 * object.c (mono_method_return_message_restore): Handle
9162 MONO_TYPE_OBJECT as well.
9164 2004-05-28 Jackson Harper <jackson@ximian.com>
9166 * reflection.c: The modified type encoding was causing build
9167 problems. Reverted for now.
9169 2004-05-28 Jackson Harper <jackson@ximian.com>
9171 * reflection.c/h: Take an assembly ref so that we dont create
9172 fully qualified names when encoding types in the same assembly as
9173 the custom attribute being emitted.
9174 * appdomain.c: Increment version number.
9176 2004-05-26 Duncan Mak <duncan@ximian.com>
9179 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9180 Set the full version number (major, minor, build, revision).
9182 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
9184 * marshal.c (emit_struct_conv): increment src/dst after blit
9185 (mono_marshal_get_managed_wrapper,
9186 mono_marshal_get_native_wrapper): make sure we have marshalling
9187 info before marshalling params (info computation affects
9190 * class.c (class_compute_field_layout): correctly deal with
9192 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9193 value types (as per what windows dows by default)
9194 (mono_class_setup_mono_type): System.ValueType is blittable
9195 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9198 * marshal.c (mono_marshal_load_type_info): flag types as
9199 non-blittable if the native layout doesn't match the managed
9202 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9204 * appdomain.c: don't add stuff in the private search path that is
9205 above the application base. If application base is not set, there's
9206 no private search path.
9208 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
9210 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9211 byref struct arguments in native->managed marshalling.
9213 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
9215 * marshal.c (mono_marshal_get_runtime_invoke): correctly
9216 cache methods using signature (special case for methods
9217 that are value type or string class)
9219 * image.c (mono_image_close): clean up allocated GSList's
9220 in runtime_invoke_cache.
9222 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9224 * mono-config.c: set the correct path for mono_cfg_dir on windows when
9225 there's no MONO_CFG_DIR environment variable defined.
9227 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9229 * threads.c: windows version must be >= 0x0500 to include OpenThread.
9231 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
9233 * threadpool.c: Really wait for 500ms after the async call, even if the wait
9235 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9236 before waiting for it, and call CloseHandle after the wait to unref it.
9237 This will make sure that handles are not disposed too early.
9239 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9244 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9247 * object.c: se the application_base only for the domain that runs
9248 Main. Fixes bug #59216,
9250 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9253 * object.c: only the domain in which Main is run have
9254 SetupInformation.ConfigurationFile set, so moved a few lines from
9255 appdomain.c to object.c.
9257 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9259 * appdomain.c: we tried to load [name].(dll|exe), but according
9260 to bug #57710, we must also try [culture]/[name].(dll|exe) and
9261 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9262 There's a test case attached to bug #58922.
9264 2004-05-27 Dick Porter <dick@ximian.com>
9267 * file-io.c: Implemented icalls for locking and unlocking regions
9269 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9270 FALSE on error (fixes both compiler warning and real bug.)
9272 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
9274 * culture-info-tables.h: reflecting locale-builder updates.
9276 (Added missing ChangeLog entry for 05/26)
9278 2004-05-27 Jackson Harper <jackson@ximian.com>
9280 * locales.c: Fix some cut and paste errors.
9282 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9284 * mono-config.c: set the correct path for config. directory on windows.
9286 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9288 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9291 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9293 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9294 from pinvoke functions.
9296 * marshal.c (mono_ftnptr_to_delegate): Implement this.
9298 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9300 * culture-info-tables.h: reflecting locale-builder updates.
9302 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9304 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9307 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
9309 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9310 * icall.c: Modified icalls for RNG.
9311 * rand.c|h: Changed RNG interface to allow thread-safe usage under
9312 Windows (CryptoAPI).
9314 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9316 * locales.c: Fix build.
9318 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
9320 * culture-info-tables.h: reflecting locale-builder updates.
9322 2004-05-25 Jackson Harper <jackson@ximian.com>
9324 * locales.c: When creating the current culture use the $LANGs
9325 specific culture. So DateTimeFormat and NumberFormat entries are created.
9327 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9329 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9330 a char array as parameter.
9332 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
9334 * image.c: In mono_image_open(), always use an absolute path name to
9335 look for already loaded images.
9337 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
9339 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9340 missing in the windows build (like older cygwin include files).
9342 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
9344 * icall.c: Fixed check for possible integer overflow in Buffer_
9345 BlockCopy icall. Replaced comments style // by /* */.
9347 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
9349 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9351 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9352 check after MONO_VTADDR. Fixes pinvoke2.exe.
9354 * marshal.h marshal.c metadata.h: Add beginnings of support for
9355 ftnptr -> delegate marshalling.
9357 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
9359 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9360 * threads.c: Fix warnings.
9362 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
9364 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9365 * icall.c: Registered icalls for Suspend and Resume.
9366 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9368 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9369 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9370 * process.c: Use WaitForSingleObjectEx.
9371 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
9373 * threads.c, threads.h: Make use of new Ex wait methods. Improved
9374 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9375 for Suspend and Resume. Added new mono_thread_stop, used for stoping
9376 background threads. Added basic support for Abort in Windows.
9377 Start new threads using a managed delegate invoke wrapper. This wrapper
9378 has an interruption checkpoint that is needed since an interruption
9379 can be requested before the thread leaves the unmanaged code that starts
9381 * marshal.c: Added interruption checkpoint after every native call, and
9382 also before managed calls for wrappers called from unmanaged code to
9383 go into managed code.
9384 * object.h: Added new field in MonoThread to keep track of interruption
9387 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
9389 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9392 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9399 * rand.c: getenv -> g_getenv (windows!)
9401 * process.c: complete_path is also used on non-windows platforms.
9403 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9405 * icall.c: new signature for Process_Start.
9407 * process.[ch]: new signature for Process_Start. If we're on windows
9408 and UseShellExecute is false, we have to search for the program by
9409 ourselves if we don't get a full path.
9411 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
9413 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
9414 marshalling and call CleanUpNativeData if needed. Fixes #58646.
9416 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9418 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9421 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9423 * process.c: use double quotes to quote program name and arguments on
9424 windows. Fixes bug #58575.
9426 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9428 * file-io.c: don't return "." and ".." when using windows Find*File.
9430 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
9432 * marshal.c: Don't pass wrappers to message init because method
9433 addressed used to lookup metadata. part of remoting[2|3] fix.
9435 2004-05-15 Jackson Harper <jackson@ximian.com>
9437 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9438 path is essentially the same as MONO_PATH except that it points to
9439 GACs instead of lib directories.
9440 * loader.h: The user gac is gone so we dont need function to
9442 * mono-config.c: user gac option is now gone.
9444 2004-05-15 Jackson Harper <jackson@ximian.com>
9446 * culture-info.h: Make defines more consistent, add calendar data
9447 to the culture info table.
9448 * culture-info-tables.h: Add basic calendar data. Basically
9449 everyone gets default gregorian until all the data is
9451 * locales.c: Use the new consistent defines. Set calendar data for
9452 culture info objects.
9453 * object.h: add a field for calendar data to CultureInfo
9455 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
9457 * image.c: image->runtime_invoke_cache is keyed on signatures now.
9458 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9460 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9461 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9462 an extra param that is the pointer of the method to invoke. The IL for
9463 the invoke method is no longer specific to the method, but to the
9464 signature of the method. Thus, we can share the same code for multiple
9465 methods. This reduces the number of methods that have to be compiled.
9467 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
9469 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9471 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9473 * icall.c: Optimize Buffer.BlockCopy.
9475 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9477 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9478 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9479 quote). Changed them to "MMMM yyyy".
9481 2004-05-12 Miguel de Icaza <miguel@ximian.com>
9484 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
9486 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
9488 * reflection.h: Updated after changes to managed structures.
9490 * appdomain.c: Bump corlib version.
9492 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9494 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9497 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9499 * Makefile.am: link to ../os/libmonoos.la on windows.
9502 -If MONO_DEBUG, warn about non-existing directories in
9504 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9505 compile time variable.
9506 -Removed init_default_path and call mono_set_rootdir from
9507 libmonoos.a instead (windows only).
9509 * assembly.h: declare mono_assembly_getrootdir().
9512 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9514 * loader.c: s/getenv/g_getenv/
9516 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
9518 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9520 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9522 * metadata.h: Add new marshalling conversions.
9524 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9527 * reflection.c (mono_reflection_get_type): Lookup the type in all
9528 modules of a multi-module assembly. Fixes #58291.
9530 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
9532 * threads.c: Before aborting a background, set the StopRequested
9533 state. This avoids throwing the Abort exception.
9534 In mono_thread_manage, don't continue with the shutdown until all
9535 aborted threads have actually stopped.
9537 2004-05-10 Jackson Harper <jackson@ximian.com>
9539 * locales.c: Remove the modifier from culture names.
9541 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9543 * Makefile.am: monosn is not installed any more. It has been deprecated
9546 2004-05-07 Jackson Harper <jackson@ximian.com>
9549 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9550 Fix array construction, add bailout if the length is 0.
9552 2004-05-07 Dick Porter <dick@ximian.com>
9554 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9555 machine doesn't have a DNS entry. Patch by Urs Muff
9556 (umuff@quark.com), fixes bug 57928.
9558 2004-05-06 Jackson Harper <jackson@ximian.com>
9560 * reflection.c: Handle null PublicTokens properly. alloc mem for
9561 assembly names culture so we dont crash when freeing it.
9563 2004-05-06 Jackson Harper <jackson@ximian.com>
9565 * assembly.c: Check the usergac when loading with partial names.
9567 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9569 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
9570 does nothing for now (not required for Linux/Windows) but the class
9571 library can call it (and a newer or modified runtime could need it).
9572 * icall.c: Registred icall.
9574 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9576 * loader.c: prints a message on module loading error we set MONO_DEBUG
9577 environment variable.
9579 2004-05-05 Jackson Harper <jackson@ximian.com>
9581 * appdomain.c: Handle PublicKeyToken=null properly.
9583 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9585 * environment.c|h: Added icall ves_icall_System_Environment_
9586 GetOSVersionString to get the current OS version as a string.
9587 * icall.c: Registred icall.
9589 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
9591 * object.c: in mono_object_get_virtual_method(), take into account that
9592 non-virtual methods don't have a slot in the vtable. Check needed when
9593 the object is a proxy.
9595 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
9597 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9598 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9600 * object.c (mono_class_compute_gc_descriptor): Fix warning.
9602 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9603 passed when a valuetype is expected.
9605 * object.c (mono_unhandled_exception): Only set the exit code if the
9606 exception happens in the main thread. Fixes thread5.exe.
9608 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9609 invalid names. Fixes #58047.
9611 2004-05-03 Jackson Harper <jackson@ximian.com>
9613 * assembly.c: This line was committed accidently and is unneeded.
9615 2004-05-03 Jackson Harper <jackson@ximian.com>
9617 * icall.c: Add new icall for Assembly::LoadWithPartialName
9618 * assembly.c/.h: new function that probes the GAC to load partial
9619 assembly names by Paolo Molaro.
9621 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9623 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9624 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9625 (type_get_fully_qualified_name): Added PublicKeyToken when building a
9628 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9630 * appdomain.c: fixed check for 'neutral' culture and removed warning.
9631 * reflection.c: fix bug when parsing a full type name and Version is not
9632 the last thing in the string.
9634 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
9636 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9637 crashes when it is freed.
9639 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9641 * assembly.c: print the compat warning to stderr.
9643 2004-05-01 Miguel de Icaza <miguel@ximian.com>
9645 * assembly.c (mono_assembly_load_references): Add a compatibility
9646 hack to run old applications that might be still referencing the
9647 3300-based assemblies, only do this for System.xxx.
9649 2004-05-01 Jackson Harper <jackson@ximian.com>
9651 * appdomain.c: If the culture is neutral we set it to "".
9653 2004-04-29 Jackson Harper <jackson@ximian.com>
9655 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9657 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9659 * string-icalls.c: added low overhead function for copying chars
9660 * icall.c: added needed icall for the above function
9662 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9664 * icall.c: fix return value of get_global_assembly_cache. Implemented
9665 Environment.GetLogicalDrives.
9667 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
9669 * rand.c: try and talk to egd or prngd
9670 for random bytes if opening devices fail.
9672 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
9674 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9675 alignment for the type using the native alignment of its members
9676 instead of using klass->min_align.
9678 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9680 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9683 * socket-io.c: added check for sys/aio.h.
9685 2004-04-28 Dick Porter <dick@ximian.com>
9687 * threads.c: Don't abort a thread thats already aborting, when
9688 terminating everything.
9690 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9692 * icall.c: added 2 new async calls for Socket.
9694 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9697 * threadpool.c: removed unused variable.
9699 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
9701 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9703 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9705 * locales.c: put back string_invariant_tolower () and
9706 string_invariant_toupper ().
9708 2004-04-26 David Waite <mass@akuma.org>
9713 * unicode.h: remove comma from end of enumeration declarations
9715 2004-04-26 David Waite <mass@akuma.org>
9717 * debug-mono-symfile.h:
9720 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9723 2004-04-26 Jackson Harper <jackson@ximian.com>
9725 * appdomain.c: Increment version number.
9727 2004-04-26 Jackson Harper <jackson@ximian.com>
9729 * appdomain.c: Set assembly references public token value when
9730 PublicKeyToken is specified, not the hash_value. Free public token
9731 values when free assembly name data. Previously the public key
9732 token was hex decoded, however we are using hex encoded public key
9733 tokens, so this is not neccasary.
9734 * assembly.c: Lookup assemblies in the gac if their public token
9735 value is set. Add function to allow enabling user gac
9736 lookups. Specify whether or not the assembly was loaded from the
9737 GAC. Compare full assembly names when checking the cache for
9738 assemblies (Temporarily disabled see comment in code). Remove
9739 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9740 specifies trace-loader they get extra info to stdout on the
9741 loading of assemblies.
9742 * image.h: Add a field for an assembly references public token
9743 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9744 whether an assembly has been loaded from the GAC.
9745 * image.c: Remove a corlib -> mscorlib name mapping.
9746 * loader.h: Add function to enable/disable the user gac.
9747 * mono-config.c: Check if the usergac is enabled in the config
9749 * icall.c: New icall to determine whether or not an assembly has
9750 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9751 * tabldefs.h: Add constant for assemblyref flag that specifies a
9752 full public key is used instead of a public token.
9753 * reflection.c: Remove mscorlib -> corlib mappings. Set
9754 PublicTokenValue instead of hash value. This value is a hex
9755 string so it does not need to be expanded.
9757 2004-04-26 Martin Baulig <martin@ximian.com>
9759 * mono-debug-debugger.c (mono_debugger_initialize): Set
9760 `mono_debugger_initialized' before calling mono_debug_lock().
9762 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
9764 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9765 InternalToUpper/InternalToLower.
9766 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9767 removed invariant culture shortcut. This is now done in managed code.
9768 * locales.c: (string_invariant_toupper/tolower) removed.
9770 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9772 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9773 Added Poll internal call.
9775 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9776 call for Poll. Select was too heavy for polling a single socket.
9778 * threadpool.[ch]: added mono_threadpool_cleanup.
9779 * threads.c: use it. Don't use Thread_Abort on windows.
9781 2004-04-23 Martin Baulig <martin@ximian.com>
9783 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9785 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
9787 * icall.c: Registred new icalls for key pair protection and added an
9788 icall for Environment.GetFolderPath on Windows.
9789 * security.c|h: Added new icalls for key pair protection.
9791 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9793 * socket-io.c: don't display the non-supported family warning for known
9794 families. Now this is not displayed on windows when checking support
9797 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9799 * class.c: don't display the layout warning for static fields.
9801 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
9803 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9804 * locales.c, locales.h: Added new icalls for culture-specific
9805 Char.ToLower and Char.ToUpper.
9807 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9809 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9812 2004-04-20 Martin Baulig <martin@ximian.com>
9814 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9815 of the type name before passing it to mono_reflection_type_from_name().
9817 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
9819 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9820 encodings here. Fixes #56965.
9822 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
9824 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9825 fix test on strstr result not that I can see anything that
9826 relies on the result.
9828 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
9830 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9833 * marshal.c (mono_marshal_get_string_encoding): New helper function.
9835 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9836 function to determine which marshalling to use for strings. Fixes
9839 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9841 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9843 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
9845 * icall.c: #include mono-config.h
9847 2004-04-15 Jackson Harper <jackson@ximian.com>
9849 * culture-info-tables.h: Fix date formats for en-US culture.
9851 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
9853 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
9854 ThreadPool.SetMinThreads.
9855 * threadpool.c: Implemented ThreadPool.GetMinThreads and
9856 ThreadPool.SetMinThreads.
9858 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9860 * mono-config.c: also load the .config file in the directory
9861 where the assembly was found.
9863 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9865 * assembly.c: load per-assembly config files.
9866 * icall.c: decrapified code to get the config dir and moved to
9868 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9869 per-assembly config files. When doing a dll map lookup give precedence
9870 to the per-assembly data.
9872 2004-04-14 Martin Baulig <martin@ximian.com>
9874 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9875 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9876 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9878 * mono-debugger-debugger.c: While the debugger is locked, remember
9879 whether the symbol tables have changes and send one single
9880 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9882 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
9884 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9886 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
9889 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9890 account when marshalling string arrays. Fixes #56965.
9892 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
9894 * icall.c: Add new icalls mapping for security.
9895 * security.c|h: Add internal calls for WindowsIdentity,
9896 WindowsImpersonationContext and WindowsPrincipal.
9898 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
9900 * class.c: Added comment to ensure the System.MonoDummy class
9901 is removed when no longer necessary
9903 2004-04-13 Miguel de Icaza <miguel@ximian.com>
9905 * appdomain.c: Pass arguments to the bootstraping exceptions to
9906 minimize JITed methods at boot
9908 * metadata.c (mono_exception_from_name_two_strings): Allow for the
9909 second string to be null.
9911 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9912 Change the protocol to minimize the JIT methods at startup. Now
9913 it Returns the internal codepage, if the value of "int_code_page"
9914 is 1 at entry, and we can not compute a suitable code page
9915 number, returns the code page as a string.
9917 2004-04-13 Jackson Harper <jackson@ximian.com>
9919 * culture-info-tables.h: Fix number of decimal digits for all
9922 2004-04-13 Jackson Harper <jackson@ximian.com>
9924 * icall.c: Clairfy out of sync error message. It is not always
9925 your corlib that is out of sync.
9927 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
9929 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9930 properties when only the set accessor is overriden. Fixes #55874.
9932 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
9934 * assembly.c (mono_assembly_load_references): Make this thread safe.
9937 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
9939 * monosn.c: Add missing initialization calls.
9941 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
9944 ves_icall_System_Globalization_CultureInfo_construct_number_format
9945 Fix g_assert so it compiles on fussier compilers re int/ptr
9948 2004-04-08 Dick Porter <dick@ximian.com>
9951 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
9952 53992. Also rearrange the code so that the internal calls return
9953 an error value and exceptions are thrown from managed code.
9955 * icall.c: Add type info to the socket icalls.
9957 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9959 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9962 2004-04-07 Martin Baulig <martin@ximian.com>
9964 * class.c (mono_class_from_generic_parameter): Don't default
9965 `klass->parent' to `mono_defaults.object_type'.
9967 2004-04-07 Martin Baulig <martin@ximian.com>
9969 * reflection.c (mono_reflection_initialize_generic_parameter): Set
9970 `param->pklass->reflection_info'.
9972 2004-04-07 Jackson Harper <jackson@ximian.com>
9974 * culture-info-tables.h: Fix date separator symbol.
9976 2004-04-07 Martin Baulig <martin@ximian.com>
9978 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9979 from System.Type to System.MonoType.
9981 2004-04-07 Martin Baulig <martin@ximian.com>
9984 (MonoReflectionGenericParam): Added `has_reference_type' and
9985 `has_value_type' fields.
9987 * reflection.c (mono_image_get_generic_param_info): Encode the
9988 correct flags if we have the `class' or `struct' constraint.
9990 2004-04-07 Martin Baulig <martin@ximian.com>
9993 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9995 2004-04-07 Jackson Harper <jackson@ximian.com>
9997 * appdomain.c: Revert extra patches, just wanted to bump the
10000 2004-04-07 Jackson Harper <jackson@ximian.com>
10002 * Makefile.am: Add culture-info private headers.
10003 * icall.c: Add new icalls for contructing locales.
10004 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10005 * locales.h: Declare new culture info construction methods.
10006 * object.h: Add new fields used to avoid the CultureMap to
10008 * culture-info.h: Definition of structs used in the culture info
10010 * culture-info-tables.h: Autogenerated tables that contain culture
10011 info data. This file was generated with the locale-builder tool.
10012 * appdomain.c: Incement corlib version number.
10014 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
10016 * appdomain.c: (mono_runtime_init) move mono_thread_init
10017 to before mono_object_new calls so critical sections
10018 are initialized before use.
10020 2004-04-07 Martin Baulig <martin@ximian.com>
10023 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10024 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10025 (ves_icall_MonoGenericParam_initialize): Removed.
10026 (monogenericparam_icalls): Removed.
10027 (generictypeparambuilder_icalls): Added new table for
10028 System.Reflection.Emit.GenericTypeParameterBuilder.
10031 (mono_reflection_define_generic_parameter): Removed.
10032 (mono_reflection_initialize_generic_parameter): This is now called
10033 from GenericTypeParameterBuilder's .ctor.
10035 2004-04-06 Martin Baulig <martin@ximian.com>
10037 * class.c (mono_class_init): Don't inflate nested classes in a
10039 (mono_type_get_name_recurse): Include the generic arguments for
10040 generic instances and generic type declarations.
10041 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10042 (_mono_class_get_instantiation_name): Removed.
10043 (mono_class_create_generic): Always use `gklass->name' as our name.
10045 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10047 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10048 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10049 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10050 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10051 closed generic methods here.
10054 (mono_reflection_generic_inst_get_nested_types): Removed.
10055 (inflate_mono_method): Copy the generic parameters from the
10056 MonoMethodHeader into out MonoGenericMethod.
10058 2004-04-06 Martin Baulig <martin@ximian.com>
10061 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10063 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10065 * reflection.c (build_compressed_metadata): If we have any entries
10066 in the GenericParam, MethodSpec or GenericParamConstraint tables,
10067 set the header version to 1.1.
10069 2004-04-06 Martin Baulig <martin@ximian.com>
10071 * class.c (mono_class_init): If we're a generic instance,
10072 initialize our nested classes, too.
10073 (_mono_class_get_instantiation_name): Deal with the new `!%d'
10076 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10078 * process.c: quote the argument passed to the shell on windows.
10080 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
10082 * threads.c (mono_alloc_special_static_data): Allow this to be
10083 called during startup.
10085 2004-04-02 Martin Baulig <martin@ximian.com>
10088 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10090 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
10092 * icall.c: Fix build.
10094 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
10096 * Makefile.am: Added security.c|h.
10097 * icall.c: Added icall for get_UserName;
10098 * security.c: New file for security related icalls. Added function
10099 get_UserName for System.Environment (fix #56144).
10100 * security.h: New. Header file for security.c
10102 2004-04-02 Dick Porter <dick@ximian.com>
10104 * icall.c: Deleted the icalls that were obsoleted some time ago
10105 by the ICU string code, and which were mixed into the icall
10106 rearranging. Fixes bug 55969.
10109 * string-icalls.c: Deleted the code that those icalls reference.
10111 2004-04-01 Martin Baulig <martin@ximian.com>
10113 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10115 * class.c (mono_class_from_generic_parameter): Don't set
10116 TYPE_ATTRIBUTE_INTERFACE.
10117 (my_mono_class_from_generic_parameter): Likewise.
10119 2004-04-01 Martin Baulig <martin@ximian.com>
10121 * loader.c (find_method): Added an optional `MonoClass *ic'
10122 argument to search in a specific interface.
10123 (mono_get_method_constrained): New public function.
10125 2004-04-01 Martin Baulig <martin@ximian.com>
10127 * reflection.c (mono_image_get_generic_field_token): Use the
10128 `handleref' cache here.
10130 2004-04-01 Martin Baulig <martin@ximian.com>
10132 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10134 * reflection.c (create_generic_typespec): Use the `typespec' hash
10135 here, not the `typeref' one.
10137 2004-04-01 Martin Baulig <martin@ximian.com>
10139 * class.c (mono_class_inflate_generic_type): Moved the
10140 functionality into a new static inflate_generic_type() which
10141 returns NULL if it didn't do anything. Only increment the
10142 `mono_stats.inflated_type_count' if we actually inflated
10144 (mono_class_get_full): Check the classes type to see whether we
10145 need to inflate it; also inflate MONO_TYPE_(M)VAR.
10147 2004-04-01 Jackson Harper <jackson@ximian.com>
10149 * reflection.c: Set culture for assembly references.
10151 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
10153 * reflection.[ch], icall.[ch], Fix support for pinning variables.
10155 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10158 (do_mono_assembly_open): the critical section also covers
10159 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10161 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10164 (mono_manage_threads): abort the background threads when finishing.
10167 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10169 * gc.c: only close the done_event handle if there was no timeout.
10172 2004-03-30 Martin Baulig <martin@ximian.com>
10174 * icall.c (icall_entries): It's called "System.Activator", not
10175 "System.Activation".
10177 2004-03-30 Martin Baulig <martin@ximian.com>
10179 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10180 (mono_class_create_from_typespec): Likewise.
10182 2004-03-30 Martin Baulig <martin@ximian.com>
10184 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10185 `has_ctor_constraint' and `initialized'.
10187 2004-03-30 Martin Baulig <martin@ximian.com>
10189 * reflection.c (encode_new_constraint): New static function to add
10190 the constructor constraint attribute to a type parameter.
10191 (encode_constraints): Call encode_new_constraint() if necessary.
10194 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10196 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10198 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
10200 * reflection.c, icall.c: add support for pinning variables.
10202 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
10204 * marshal.c (mono_marshal_get_managed_wrapper):
10205 init bool local with zero rather than null.
10207 2004-03-29 Martin Baulig <martin@ximian.com>
10209 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10210 the "official" behavior here.
10211 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10213 2004-03-29 Martin Baulig <martin@ximian.com>
10215 * icall.c: Reflect latest API changes.
10217 2004-03-29 Martin Baulig <martin@ximian.com>
10219 * loader.c (mono_get_method_from_token): Also call
10220 mono_metadata_load_generic_params () for abstract and interface
10221 methods; replace the type arguments in the method signature with
10222 the ones which are loaded from the metadata.
10224 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
10226 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10227 of the lock is not the current thread. MS.NET don't do it, in spite of
10228 what the documentation says. See bug #56157.
10230 2004-03-28 Martin Baulig <martin@ximian.com>
10232 * class.c (mono_class_init): Don't call init_properties() and
10233 init_events() for generic instances; set `prop->parent' when
10234 inflating properties.
10236 * reflection.c (mono_generic_inst_get_object): Call
10237 `mono_class_init (ginst->klass)'.
10238 (mono_type_get_object): Only create a MonoGenericInst if your
10239 generic type is a TypeBuilder.
10240 (do_mono_reflection_bind_generic_parameters): Only set
10241 `ginst->is_dynamic' if our generic type is a TypeBuilder.
10243 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
10245 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10248 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10250 * icall.c: added Kill_internal icall.
10251 * process.[ch]: added Kill_internal icall.
10253 2004-03-25 Martin Baulig <martin@ximian.com>
10255 * class.h (MonoStats): Added `generic_instance_count',
10256 `inflated_method_count', `inflated_type_count' and
10257 `generics_metadata_size'.
10259 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10261 * reflection.c: no warnings now.
10263 2004-03-25 Martin Baulig <martin@ximian.com>
10265 * class.c (mono_class_get_full): New public function; does a
10266 mono_class_get(), but also takes a `MonoGenericContext *'.
10268 * loader.c (mono_field_from_memberref): Renamed to
10269 `field_from_memberref', made static and added `MonoGenericContext *'
10271 (mono_field_from_token): Added `MonoGenericInst *' argument.
10272 (method_from_memberef): Likewise.
10273 (mono_get_method_from_token): Likewise.
10274 (mono_get_method_full): New public function; does a
10275 mono_get_method(), but also takes a `MonoGenericContext *'.
10277 * verify.c (mono_method_verify): Get the method's generic context
10278 and pass it to mono_field_from_token(), mono_get_method_full() and
10279 mono_class_get_full().
10281 2004-03-25 Martin Baulig <martin@ximian.com>
10283 * class.c (mono_class_inflate_generic_type): Take a
10284 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10285 `MonoGenericMethod *'.
10287 2004-03-25 Martin Baulig <martin@ximian.com>
10289 * loader.h (MonoMethodInflated): Store the MonoGenericContext
10290 instead of the MonoGenericMethod here.
10292 2004-03-25 Martin Baulig <martin@ximian.com>
10294 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10295 each time we create a new MonoGenericInst, we also create a new
10296 context which points back to us.
10298 * class.c (inflate_method): Use `ginst->context' instead of
10299 creating a new context.
10301 * loader.c (method_from_memberref): Use
10302 `klass->generic_inst->context' instead of creating a new context.
10304 2004-03-25 Martin Baulig <martin@ximian.com>
10306 * class.h (MonoGenericContext): New struct.
10307 (MonoGenericMethod): Removed `generic_inst'.
10309 * class.c (mono_class_inflate_generic_method): Take a
10310 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10312 2004-03-25 Martin Baulig <martin@ximian.com>
10314 * loader.h (MonoMethodInflated): New typedef.
10316 * metadata.h (MonoMethodSignature): Removed `gen_method', make
10317 `generic_param_count' consume just 30 bits, added `is_inflated'
10318 and `has_type_parameters' flags (one bit each).
10320 * class.c (mono_class_inflate_generic_method): Create a
10321 MonoMethodInflated instead of a MonoMethodNormal and set
10322 `is_inflated' in the method signature.
10324 * class.h (MonoGenericMethod): Removed `generic_method'.
10326 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
10328 * image.c: Make sure the name of a MonoImage is always an absolute path.
10329 This fixes bug #54415.
10331 2004-03-24 Martin Baulig <martin@ximian.com>
10333 * class.c (mono_class_setup_vtable): If we're a generic instance,
10334 use our generic type's vtable size.
10336 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
10338 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10339 MONO_NO_UNLOAD env var as a temporary workaround for unloading
10342 2004-03-23 Martin Baulig <martin@ximian.com>
10344 * class.h (MonoDynamicGenericInst): Added `int count_events' and
10345 `MonoEvent *events'.
10347 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10348 (typebuilder_icalls): Added "get_event_info"; calls
10349 mono_reflection_event_builder_get_event_info().
10351 * reflection.c (mono_reflection_generic_inst_initialize): Added
10352 `MonoArray *events'.
10353 (mono_reflection_event_builder_get_event_info): New function.
10355 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
10357 * object.h: add mono_type_initialization_init
10359 * object.c (mono_runtime_class_init):
10360 implement class constructor synchronization rules
10361 to cope with threading issues.
10362 add mono_type_initialization_init
10364 * appdomain.c (mono_runtime_init): call
10365 mono_type_initialization_init
10367 * class.h: removing initializing field from MonoVTable
10369 2004-03-23 Martin Baulig <martin@ximian.com>
10371 * class.c (my_mono_class_from_generic_parameter): Use
10372 `param->name' if it's not NULL.
10374 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
10376 * class.c: do not insert non-virtual methods in the vtable.
10377 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10378 that means the method is non-virtual. This never would have
10381 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
10383 * profiler.c: Added lock for accessing coverage_hash.
10385 2004-03-22 Martin Baulig <martin@ximian.com>
10387 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10388 `method->method->signature->generic_param_count != 0' to make it
10389 work for interface methods.
10391 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10393 * process.c: quote the string passed to the shell using g_shell_quote.
10395 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10398 (mono_threads_manage): don't remove the finalizer thread and self
10399 from the threads hash table so that mono_thread_manage can be called
10402 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10404 * process.c: quote the arguments when UseShellExecute is true. Fixes
10407 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10409 * threads.c: set mono_thread_detach as a cleanup routine for every
10410 thread. This way it's always executed upon thread termination, either
10411 aborted or finished normally. No more xsp hangs!
10413 2004-03-17 Martin Baulig <martin@ximian.com>
10415 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10416 `int count_nested' and a `MonoType **nested'.
10418 * reflection.c (mono_reflection_bind_generic_parameters): Moved
10419 most of the functionality into a new static
10420 do_mono_reflection_bind_generic_parameters() and don't take a
10421 `MonoType *nested_in' argument any more. Don't compute nested
10423 (mono_reflection_generic_inst_get_nested_types): New public method
10424 to get nested types.
10426 * class.c (mono_class_create_generic): Set `klass->nested_in' if
10427 we're a nested class.
10429 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10430 mono_reflection_generic_inst_get_nested_types() to compute the
10433 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10435 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10436 descriptive error message under windows.
10438 2004-03-17 Martin Baulig <martin@ximian.com>
10440 * class.c (dup_type): Added `const MonoType *original' argument;
10441 copy the attrs from the original type.
10443 2004-03-17 Martin Baulig <martin@ximian.com>
10445 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10446 `m->generic_inst_cache' here.
10448 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10450 * exception.h exception.c: Add stack_overflow_exception.
10452 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10455 (overlapped_callback): call SetEvent *after* invoking the callback.
10456 No need to call CloseHandle.
10458 2004-03-16 Martin Baulig <martin@ximian.com>
10460 * reflection.c (mono_image_get_fieldref_token): Take a
10461 `MonoReflectionField *' instead of a `MonoClassField *' and a
10462 `MonoClass *'; store the `MonoReflectionField *' in the hash.
10464 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10466 * appdomain.c: don't add the culture to the filename we're looking for
10467 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10469 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10471 * locales.c: don't ignore symbols when doing case insensitive compares.
10472 Thanks Dick! Fixes bug #54046.
10474 * threads.c: surround 'threads' usage with enter/leave in
10475 mono_thread_manage.
10477 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
10479 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
10480 implicitly marshalled as [Out]. Fixes #55450.
10482 (mono_marshal_get_runtime_invoke): Zero out the result if there is
10485 2004-03-16 Martin Baulig <martin@ximian.com>
10487 * class.c (mono_class_from_generic_parameter): Use the actual
10490 2004-03-16 Martin Baulig <martin@ximian.com>
10492 * reflection.c (type_get_signature_size): New static function.
10493 Compues the size of the type in a method signature.
10494 (method_get_signature_size): New static function; calls
10495 type_get_signature_size() to compute the actual size of the
10496 method's signature.
10497 (method_encode_signature): Use method_get_signature_size() to get
10498 the signature's size rather than using `nparams * 10'.
10500 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10502 * file-io.h: define here WapiOverlapped on windows. I don't want the
10503 regular OVERLAPPED one.
10506 * threadpool.c: somehow, BindIoCompletionCallback is not found.
10507 Disabling AIO on windows.
10509 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10511 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10514 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10516 * appdomain.c: upgraded corlib version.
10518 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10519 and BeginWrite. Allow opening files for asynchrnous operations.
10521 * file-io.h: new struct that maps FileStreamAsyncResult.
10522 * icall.c: added new icalls.
10523 * process.[ch]: support setting child process environment variables
10524 and use the SHELL or COMSPEC when UseShellExecute is true.
10526 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10527 callback for async. IO is here and also BindHandle.
10529 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10532 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
10534 * reflection.c (create_custom_attr): Allow len == 0.
10536 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10537 computation on big-endian machines.
10539 2004-03-13 Martin Baulig <martin@ximian.com>
10541 * class.h (MonoGenericInst): Added `int count_ifaces'.
10543 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10544 `ginst->count_ifaces' instead `klass->interface_count' since we
10545 may get called before the vtable is created.
10547 * loader.c (mono_method_get_param_names): If we're a generic
10548 instance, return and don't initialize the class.
10550 * reflection.c (mono_reflection_setup_generic_class): Don't call
10551 ensure_runtime_vtable().
10552 (mono_reflection_bind_generic_parameters): Set
10553 `ginst->count_ifaces'.
10555 2004-03-11 Jackson Harper <jackson@ximian.com>
10559 * unicode.h: Remove unused System.Char icalls.
10561 2004-03-11 Miguel de Icaza <miguel@ximian.com>
10563 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10564 code when we P/Invoke the first library in Windows.Forms, instead
10565 of when we first open the assembly.
10567 * assembly.c: Drop the lookup from here.
10569 2004-03-10 Martin Baulig <martin@ximian.com>
10571 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10572 class for properties, fields and events. Finally fixes #54945.
10574 2004-03-10 Martin Baulig <martin@ximian.com>
10576 * metadata.c (mono_metadata_class_equal): New static function;
10577 checks whether two generic instances or two generic parameters are
10579 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10582 2004-03-10 Martin Baulig <martin@ximian.com>
10584 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10586 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10587 argument and write it into the `reflection_info' field.
10590 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10591 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10593 2004-03-09 Jackson Harper <jackson@ximian.com>
10595 * char-conversions.h: use 8 bits for numeric data its all we need
10596 * icall.c: numeric data is only 8 bits now.
10598 2004-03-09 Martin Baulig <martin@ximian.com>
10600 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10602 * class.c (init_properties, init_events): Initialize the new
10605 * reflection.c (typebuilder_setup_properties): Likewise.
10606 (typebuilder_setup_events): Likewise.
10608 * reflection.h (MonoEventInfo): Replaced `parent with
10609 `declaring_type' and `reflected_type'.
10611 * icall.c (ves_icall_get_property_info): Distinguish between
10612 declaring and reflected type.
10613 (ves_icall_get_event_info): Likewise.
10615 2004-03-09 Martin Baulig <martin@ximian.com>
10617 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10618 (ves_icall_Type_GetField): Correctly set field->klass.
10620 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
10622 * loader.h: Fix warning.
10624 2004-03-08 Miguel de Icaza <miguel@ximian.com>
10626 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10627 library routine if present. Notice that it will still continue
10628 executing even if its missing, for those working on the Gtk#
10629 edition of Windows.Forms.
10631 * assembly.c (do_mono_assembly_open): If loading the
10632 System.Windows.Forms call mono_loader_wini_init.
10634 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
10636 * class.h: Added MonoRemoteClass struct.
10637 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10638 function for MonoStrings.
10639 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10640 Added internal call for getting the proxy type.
10641 * marshal.c: Get the type of transparent proxies from its remote_class.
10642 Added methods that generate the IL for type checks and casts:
10643 mono_marshal_get_isinst, mono_marshal_get_castclass,
10644 mono_marshal_get_proxy_cancast.
10645 * marshal.h: Declaration of the previous new methods.
10646 * object.c: Added new moethods for creating and updating MonoRemoteClass
10647 instances: mono_remote_class, mono_upgrade_remote_class,
10648 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10649 * verify.c: FIx transparent_proxy_fields layout.
10650 * appdomain.c: Bump corlib version.
10652 2004-03-04 Jackson Harper <jackson@ximian.com>
10654 * icall.c: Add icall to access char conversion tables.
10655 * char-conversions.h: Character conversion tables.
10656 * Makefile.am: Add char-conversions.h private header file.
10658 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
10660 * appdomain.c (unload_thread_main): Increase unloading timeout to
10661 10 sec as a temporary workaround for Nant problems.
10663 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
10665 * gc.c: Add checks for GC_enable and GC_disable.
10667 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10668 (jaak@zd.com.pl). Fix memory corruption in String.Replace
10671 2004-02-27 Martin Baulig <martin@ximian.com>
10673 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10674 `MonoReflectionType *' instead of a `MonoType *'.
10676 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
10678 * gc.c (run_finalize): Avoid finalizing the object representing the
10680 (finalizer_thread): Fix warning.
10682 2004-02-25 Martin Baulig <martin@ximian.com>
10684 * class.c (_mono_class_get_instantiation_name): Added `int offset'
10685 argument for nested types.
10686 (mono_class_create_generic): Added support for nested generictypes.
10688 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10691 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10693 * reflection.c (method_encode_signature): Increase the minimum
10694 value of `size' from 10 to 11.
10695 (mono_reflection_bind_generic_parameters): Take `int type_argc'
10696 and `MonoType **types' arguments instead of the `MonoArray
10697 *types'; added `MonoType *nested_in'. Recursively instantiate
10700 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
10702 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
10703 stack_overflow_ex members which are used by exception handling.
10705 * appdomain.c (mono_runtime_init): Initialize the new members.
10707 * gc.c (mono_gc_enable): New helper function.
10708 * gc.c (mono_gc_disable): New helper function.
10710 2004-02-23 Martin Baulig <martin@ximian.com>
10712 * icall.c: I must have been really stupid - make it actually work
10715 2004-02-23 Martin Baulig <martin@ximian.com>
10717 * loader.c (method_from_memberref): Only inflate the method if
10718 it's in another klass.
10720 2004-02-23 Martin Baulig <martin@ximian.com>
10722 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10723 (mono_class_init): If we're a generic instance and an interface,
10724 compute `class->interface_id'; also create `class->interfaces'
10725 here and inflate them.
10727 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10729 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10731 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10733 2004-02-15 Miguel de Icaza <miguel@ximian.com>
10735 * reflection.c (method_encode_code): Improved the error message
10736 generated by the exception.
10738 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10740 * icall.c: Martin did not do what he said in the ChangeLog for
10741 2004-02-18, but put back the changes for properties and events.
10742 Commenting those changes out again and adding comment to bug #54518.
10744 * process.c: removed warning.
10746 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
10748 * marshal.c (emit_struct_conv): Print an error message instead of
10749 asserting when a type does not have the StructLayout attribute.
10751 2004-02-20 Martin Baulig <martin@ximian.com>
10753 * reflection.c (mono_type_get_object): Also use the cache for
10755 (mono_reflection_bind_generic_parameters): Always compute
10758 2004-02-20 Martin Baulig <martin@ximian.com>
10760 * class.h (MonoGenericMethod): Removed `klass'.
10762 * class.c (mono_class_inflate_generic_method): Added `MonoClass
10765 2004-02-20 Martin Baulig <martin@ximian.com>
10767 * reflection.c (method_encode_methodspec): Actually use the
10768 uninflated signature for the memberref.
10770 2004-02-20 Martin Baulig <martin@ximian.com>
10772 * class.h (MonoGenericMethod): Removed `declaring'.
10774 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10775 is NULL, compute it here.
10777 2004-02-20 Martin Baulig <martin@ximian.com>
10779 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10781 * metadata.c (mono_metadata_generic_inst_hash): New method.
10782 (mono_metadata_generic_inst_equal): New method.
10784 * reflection.c (mono_reflection_bind_generic_parameters): Use the
10785 `klass->image->generic_inst_cache' cache to avoid creating
10786 duplicate MonoGenericInst's.
10788 * class.c (mono_class_inflate_generic_type): Use the cache.
10790 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10792 * object.c: fixed gc descriptor calculation for embedded valuetypes.
10794 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10796 * icall.c: added Socket.WSAIoctl icall.
10798 * socket-io.[ch]: implemented
10799 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10801 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
10803 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10805 2004-02-18 Urs C Muff <umuff@quark.com>
10807 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10808 this work on PPC and other big-endian architectures.
10810 * debug-mono-symfile.h: Prepended the names of all the `guint32'
10811 fields with an underscore to make sure they're only accessed by
10812 the read32() macro.
10814 2004-02-18 Martin Baulig <martin@ximian.com>
10816 * icall.c: Put the klass->refclass changes back for methods and
10817 fields, but not for properties and events. We're currently not
10818 distinguishing between DeclaringType and ReflectedType for
10819 properties and events, that's what caused the regressions.
10821 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10824 (mono_async_result_new): the handle can be NULL.
10826 * threadpool.c: Use an event instead of a semaphore, don't initialize
10827 it until needed. This saves quite a few semaphores from being created
10828 when using the threadpool.
10830 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
10832 * object.c (mono_string_is_interned_lookup): Fix interning of long
10833 strings. Fixes #54473.
10835 * domain.c (ldstr_equal): Optimize if the two strings are equal.
10837 * icall.c: Revert the klass->refclass changes since they introduce
10838 regressions (bug #54518).
10840 2004-02-18 Martin Baulig <martin@ximian.com>
10842 * class.c (mono_class_init): If we're a generic instance and don't
10843 come from a TypeBuilder, inflate our members here.
10844 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10845 (mono_class_create_generic): New public method.
10846 (mono_class_initialize_generic): Removed.
10847 (get_instantiation_name): Renamed to
10848 _mono_class_get_instantiation_name() and made it public.
10850 2004-02-18 Martin Baulig <martin@ximian.com>
10852 * class.c (mono_class_inflate_generic_type): Clear the new
10853 instance's `nginst->klass' when inflating a generic instance.
10854 (mono_class_is_subclass_of): Added (basic) support for generic
10857 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10859 * appdomain.h, domain.c: use a MonoCodeManager instead of a
10860 MonoMempool to hold compiled native code.
10862 2004-02-17 Martin Baulig <martin@ximian.com>
10864 * class.h (MonoDynamicGenericInst): Added `count_properties' and
10867 * reflection.c (mono_reflection_generic_inst_initialize): Added
10868 `MonoArray *properties' argument.
10870 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
10872 2004-02-17 Martin Baulig <martin@ximian.com>
10874 * icall.c (ves_icall_Type_GetFields): Renamed to
10875 ves_icall_Type_GetFields_internal() and added a
10876 `MonoReflectionType *rtype' argument; pass it to
10877 mono_field_get_object() to set the field's "reflected" type.
10878 (ves_icall_Type_GetConstructors): Likewise.
10879 (ves_icall_Type_GetEvents): Likewise.
10880 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10881 argument; pass it to mono_method_get_object() to set the method's
10884 2004-02-17 Martin Baulig <martin@ximian.com>
10886 * class.h (MonoDynamicGenericInst): New type.
10887 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10889 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10890 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10891 (ves_icall_MonoGenericInst_GetFields): New interncall.
10893 * class.c (mono_class_from_generic): Don't call
10894 mono_class_initialize_generic() if this is a dynamic instance;
10895 ie. it's being created from a TypeBuilder.
10896 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10897 `class->byval_arg.type'.
10899 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10900 to `inflate_method' and made static.
10901 (mono_reflection_inflate_field): Removed.
10902 (mono_reflection_generic_inst_initialize): New public method.
10904 * reflection.h (MonoReflectionGenericInst): Removed `methods',
10905 `ctors' and `fields'; added `initialized'.
10907 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
10909 * debug-helpers.c (mono_method_full_name): Fix output for empty
10912 2004-02-12 Martin Baulig <martin@ximian.com>
10914 * class.h (MonoClassField): Added `MonoType *generic_type'.
10916 * reflection.c (mono_image_get_fieldref_token): Added support for
10917 instantiated generic types.
10918 (field_encode_inflated_field): Removed.
10919 (mono_image_get_inflated_field_token): Removed.
10920 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10922 * reflection.h (MonoReflectionInflatedField): Removed.
10924 2004-02-12 Martin Baulig <martin@ximian.com>
10926 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10927 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10929 * reflection.c (mono_image_get_methodspec_token): Take a
10930 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10931 (mono_image_create_token): Check whether we have a
10932 `method->signature->gen_method' and call
10933 mono_image_get_methodspec_token() if appropriate.
10934 (inflated_method_get_object): Removed.
10935 (mono_reflection_bind_generic_method_parameters): Return a
10936 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10937 (mono_reflection_inflate_method_or_ctor): Likewise.
10939 * reflection.h (MonoReflectionInflatedMethod): Removed.
10941 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
10943 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10944 for custom valuetype marshalling.
10946 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10948 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10950 * icall.c: fixed WSAGetLastError_internal name.
10952 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
10954 * threads.c (mono_thread_attach): Allow this to be called multiple
10955 times for a thread.
10957 * threads.c (build_wait_tids): Do not wait for ourselves.
10959 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
10960 appdomain list is empty.
10962 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10963 memory returned by mono_string_builder_to_utf16, since it points into
10964 managed memory. Thanks to Bernie Solomon for noticing this.
10966 * icall.c: Add AppDomainSetup icalls.
10968 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10970 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10973 * reflection.c (reflection_methodbuilder_to_mono_method): Save
10974 custom attributes to the method_aux struct. Also fix array indexes etc.
10976 * loader.c (mono_method_get_param_names): Make dynamic case work again.
10978 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10980 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10981 (both static and runtime) and reduce startup time.
10983 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
10985 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10986 AsAny marshalling conversion instead of crashing.
10988 * marshal.c: Fix warnings.
10990 2004-02-09 Martin Baulig <martin@ximian.com>
10992 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10994 * reflection.h (MonoReflectionInflatedMethod): Removed the
10995 `declaring' field, it's now in the unmanaged MonoGenericMethod.
10997 * reflection.c (method_encode_methodspec): Removed the `method'
10998 argument; we get it from `gmethod->declaring'.
10999 (inflated_method_get_object): Removed the `declaring' argument.
11001 2004-02-09 Martin Baulig <martin@ximian.com>
11003 * class.h (MonoGenericMethod): New type.
11004 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11007 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11008 a `MonoGenericMethod *gen_method' one.
11010 * class.c (mono_class_inflate_generic_type): Take an additional
11011 `MonoGenericMethod * argument. This is only non-NULL if we're
11012 inflating types for a generic method.
11013 (mono_class_inflate_generic_signature): Renamed to
11014 inflate_generic_signature() and made static; take a
11015 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11016 (inflate_generic_header): Take a `MonoGenericMethod *' argument
11017 instead of a `MonoGenericInst *' one.
11018 (mono_class_inflate_generic_method): Likewise.
11020 * reflection.c (encode_generic_method_sig): Take a
11021 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11022 (method_encode_methodspec): Likewise.
11023 (inflated_method_get_object): Likewise.
11025 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11026 field with a `MonoGenericMethod *gmethod' one.
11028 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
11030 * class.h (mono_class_has_parent): add parens to expansion
11033 2004-02-08 Martin Baulig <martin@ximian.com>
11035 * image.h (MonoImage): Removed `generics_cache'.
11037 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11038 instead of a `MonoType *' argument; removed the `inflate_methods'
11039 argument. Don't inflate methods here.
11041 * loader.c (find_method): If it's a generic instance, call
11042 mono_class_init() on the `sclass->generic_inst->generic_type'.
11044 * metadata.c (mono_type_size): Make this work on uninitialized
11045 generic instances; call it on the `ginst->generic_type's class.
11047 * reflection.c (mono_reflection_bind_generic_parameters): Call
11048 mono_class_from_generic() to create the `ginst->klass'.
11050 2004-02-08 Martin Baulig <martin@ximian.com>
11052 * class.h (MonoClass): Changed type of `generic_inst' from
11053 `MonoType *' to `MonoGenericInst *'.
11055 2004-02-08 Martin Baulig <martin@ximian.com>
11057 * icall.c (ves_icall_Type_BindGenericParameters): Just call
11058 mono_type_get_object(), this is now creating a `MonoGenericInst'
11059 for MONO_TYPE_GENERICINST.
11060 (ves_icall_MonoGenericInst_GetParentType): Likewise.
11061 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11063 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11064 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11065 (inflated_method_get_object): Added `MonoClass *refclass' argument.
11066 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11067 and reflected type.
11069 * reflection.h (MonoReflectionInflatedMethod): Removed
11070 `declaring_type' and `reflected_type'.
11072 2004-02-08 Martin Baulig <martin@ximian.com>
11074 * class.h (MonoGenericInst): Added `MonoType *parent' and
11075 `MonoType **ifaces'.
11077 * reflection.h (MonoReflectionGenericInst): Removed `klass',
11078 `parent' and `interfaces'.
11080 * reflection.c (mono_reflection_bind_generic_parameters): Take a
11081 `MonoType *' argument and return a `MonoType *'.
11084 (ves_icall_MonoGenericInst_GetParentType): New interncall.
11085 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11087 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11089 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11090 valuetype marshalling.
11092 2004-02-06 Martin Baulig <martin@ximian.com>
11095 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11096 (my_mono_class_from_generic_parameter): Likewise.
11098 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11100 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11101 contents of the symbol files lazily.
11103 * object.h (MonoThread): Add 'name' and 'name_len' fields.
11105 * threads.h threads.c icall.c: New icalls for getting and setting the
11108 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
11110 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
11111 Raise an exception when the domain is not found.
11113 2004-02-03 Martin Baulig <martin@ximian.com>
11115 * reflection.c (mono_image_get_methodspec_token): Use the
11116 uninflated signature; fixes gen-33.
11118 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
11120 * gc.c threads.c: Make the finalizer thread a normal managed thread so
11121 the finalizer code can use thread functionality.
11123 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
11124 the finalizer thread.
11126 * threads.c: Make some functions more robust.
11128 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11130 * metadata.h: Add new marshalling conventions.
11132 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11133 stringbuilder marshalling. Fixes #53700.
11135 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11137 * reflection.c (mono_image_get_type_info): Save declarative security
11140 * reflection.c (mono_image_get_field_info): Handle uninitialized
11141 unmanaged fields as well.
11143 * appdomain.c: Bump corlib version.
11145 2004-02-01 Martin Baulig <martin@ximian.com>
11147 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11148 method type arguments.
11150 2004-01-30 Duncan Mak <duncan@ximian.com>
11152 * marshal.h: Add prototype for
11153 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11155 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11158 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
11160 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11161 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11163 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11165 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11166 custom marshalling of valuetypes.
11168 * marshal.c: Fix some warnings.
11170 2004-01-29 Martin Baulig <martin@ximian.com>
11172 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11173 for generic method parameters.
11175 * reflection.c (method_encode_methodspec): Write the uninflated
11176 signature into the methodspec table.
11177 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11178 is always the uninflated method.
11179 (reflection_methodbuilder_to_mono_method): Copy the generic
11180 parameters from the MethodBuilder into `header->gen_params'.
11182 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11184 * class.c (mono_class_from_generic_parameter): Fix warning.
11186 2004-01-27 Martin Baulig <martin@ximian.com>
11188 * class.c (mono_class_from_generic_parameter): Don't create
11189 `klass->methods' here.
11191 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
11193 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11194 extension since it does not work with libraries named lib<FOO>.dll.so.
11196 2004-01-25 Martin Baulig <martin@ximian.com>
11198 * class.c (mono_class_inflate_generic_type): Added support for
11199 MONO_TYPE_GENERICINST.
11201 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11202 inflate methods on open constructed types.
11204 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11206 * object.c: fire ProcessExit event in the root AppDomain after running
11207 Main. Fixes bug #53299.
11209 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11211 * socket-io.c: include the new socket-wrappers.h header.
11212 Use the wrappers instead of the unix socket functions to make the code
11215 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
11217 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11219 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11222 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
11224 * reflection.c (mono_image_create_pefile): Handle the case when the
11225 entry point is not a MethodBuilder.
11227 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11228 field to ReflectionMethod since it is not allways a builder.
11230 * reflection.c (type_get_fully_qualified_name): New helper function to
11231 return the fully qualified name of a type.
11233 * reflection.c (encode_marshal_blob): Always emit the fully qualified
11234 type name for custom marshallers.
11236 * reflection.c (mono_marshal_spec_from_builder): Ditto.
11238 * class.c (mono_class_setup_vtable): If a parent class already
11239 implements an interface, use the implementing methods from that class.
11242 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11244 * threadpool.c: just return instead of ExitThread to allow for thread
11247 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
11249 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11250 when closing resource modules.
11252 * reflection.c (mono_image_create_pefile): Handle the case when the
11253 entry point is not a MethodBuilder.
11255 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11256 field to ReflectionMethod since it is not allways a builder.
11258 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
11260 * marshal.c (mono_marshal_get_managed_wrapper):
11261 mono_marshal_alloc takes native int so CONV_I
11262 the arg for 64bits.
11264 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
11266 * reflection.c (fixup_cattrs): New function to fixup the methoddef
11267 tokens in the cattr table. Fixes #53108.
11269 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11271 * loader.c: don't trim ".dll" before looking up in the config file.
11272 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11274 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
11276 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11277 Return the module which contains the resource as well.
11278 (ves_icall_System_Reflection_Module_Close): New icall.
11280 * appdomain.c: Bump corlib version number.
11282 * image.c (mono_image_addref): New public function.
11284 * assembly.c: Call mono_image_addref.
11286 * reflection.c (mono_module_get_object): Increase reference count of
11289 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11292 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11293 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
11294 proper exceptions on DllImport problems.
11296 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11298 * class.c, metadata.c: eliminate CSIZE macro.
11300 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
11302 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11303 * object.h: Added async_callback field in MonoAsyncResult.
11304 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11305 * verify.c: Added async_callback in MonoAsyncResult layout.
11307 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
11309 * reflection.c (mono_reflection_get_custom_attrs): Add support
11312 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11314 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
11316 (mono_marshal_method_from_wrapper): Add null pointer check.
11318 2004-01-16 Martin Baulig <martin@ximian.com>
11320 * debug-mono-symfile.h: Set version number to 36 and reflect
11321 latest symbol writer changes.
11323 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11325 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11326 multi-dimensional arrays.
11327 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11328 (mono_class_from_mono_type): Use bounded_array_class_get.
11330 * class.c (mono_bounded_array_class_get): New function which takes
11331 a 'bounded' bool argument to distinguish vectors from one dimensional
11334 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
11335 bounded_array_class_get if the array has bounds.
11337 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11338 Search modules loaded using AssemblyBuilder:AddModule as well.
11340 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11342 * appdomain.c: increased corlib version.
11343 * filewatcher.c: removed g_print.
11345 (get_property_info): only allocate what is actually requested.
11346 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11348 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11350 * Makefile.am: added filewatcher.[ch]
11351 * filewatcher.[ch]: FileSystemWatcher runtime support.
11352 * icall.c: added new FSW icalls.
11354 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11356 * string-icalls.c: fix stringbuilder regression as suggested by
11357 Iain McCoy <iain@mccoy.id.au>.
11359 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
11361 * process.c (process_read_stringtable_block): Recognize '007f' as
11362 a language neutral stringtable block.
11364 2004-01-12 Patrik Torstensson
11366 * object.h (MonoStringBuilder) : Changed layout to support our
11367 new stringbuilder class.
11368 * marshal.c: Change marshalling to support the new layout of
11370 * appdomain.c: increased version number because new layout of
11373 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
11375 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11376 assembly name as an string instead of an AssemblyName, since it is
11377 easier to extract info from it.
11379 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11380 the culture subdirectories too. Fixes #52231.
11382 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11384 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11385 It takes 2 new parameters with an optional name for the method to look
11386 for and case ignoring info.
11388 * threadpool.c: removed unused variable.
11390 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11392 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11393 It takes 2 new parameters with an optional name for the property to look
11394 for and case ignoring info.
11397 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
11399 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11402 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11405 * assembly.c: escape the uri before passing it to g_filename_from_uri.
11408 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
11410 * reflection.c: Add support for more than one unmanaged resource.
11412 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11413 in field->def_value, as done in all other cases.
11415 * reflection.c (mono_reflection_get_custom_attrs): Add support for
11418 * reflection.c (mono_reflection_create_runtime_class): Remove
11419 errorneous assignment to klass->element_class, since it is already
11420 done in mono_reflection_setup_internal_class.
11422 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11424 * gc.c: added missing LeaveCriticalSection.
11425 * icall.c: indented a couple of lines.
11426 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11427 if we call EndInvoke inside a callback. Fixes bug #52601.
11429 2004-01-07 Martin Baulig <martin@ximian.com>
11431 * mono-debug-debugger.h
11432 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11434 2004-01-06 Miguel de Icaza <miguel@ximian.com>
11436 * appdomain.c: Use messages in NotImplementedException.
11438 * exception.c (mono_get_exception_not_implemented): Now this takes
11439 a message argument.
11441 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11442 exception instead of g_asserting an aborting when something is not
11445 Add some inline docs.
11447 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
11449 * reflection.h: Update after changes to object layout.
11451 * reflection.c: Implement saving of unmanaged aka win32 resources.
11453 * appdomain.c: Bump version number.
11455 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
11456 Handle missing domains gracefully.
11458 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
11460 * file-io.c : On Windows, there are much more invalid_path_chars.
11462 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11464 * class.h, object.c: prepare for GetType () speedup.
11466 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
11468 * profiler.c: workaround for --profile null reference exception on
11469 cygwin. Patch by Patrik Torstensson.
11471 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
11473 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11474 make work for unaligned access.
11476 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11478 * class.c: small cleanup (class->fields [i] -> field).
11479 * image.c: check address of metadata is valid.
11481 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
11483 * assembly.h assembly.c (mono_assembly_loaded): New public function to
11484 search the list of loaded assemblies.
11486 * reflection.c (mono_reflection_type_from_name): Use
11487 mono_assembly_loaded instead of mono_image_loaded.
11489 * reflection.c: Fix warnings.
11491 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
11493 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
11494 is dynamic. This is needed since an assembly can contain both dynamic and
11495 non-dynamic images.
11497 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
11500 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11502 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11503 to store modules loaded using AddModule.
11505 * reflection.c (mono_image_fill_file_table): Generalize this so it works
11508 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11510 * reflection.c (mono_image_fill_export_table_from_module): New function to
11511 fill out the EXPORTEDTYPES table from a module.
11513 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11514 into a separate function. Also handle loaded non-dynamic modules.
11516 * reflection.c (mono_image_basic_init): Fix memory allocation.
11518 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11520 * assembly.c (mono_assembly_load_references): Make this public.
11522 2003-12-19 Martin Baulig <martin@ximian.com>
11524 * class.c (mono_class_initialize_generic): Made this static, take
11525 a `MonoGenericInst *' instead of a `MonoClass *'.
11526 (mono_class_from_generic): Call mono_class_initialize_generic()
11527 unless we're already initialized or being called from
11528 do_mono_metadata_parse_generic_inst().
11530 * class.h (MonoGenericInst): Added `initialized' and
11531 `init_pending' flags.
11533 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11534 `mono_class_init (gklass)' or mono_class_initialize_generic()
11535 here; set `generic_inst->init_pending' while parsing the
11538 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
11540 * locales.c: include string.h for memxxx prototypes
11542 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
11544 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11545 constructor when accessing literal fields.
11547 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
11549 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11551 * reflection.c (assembly_add_resource_manifest): New function to fill
11552 the MANIFESTRESOURCE table.
11554 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11556 * reflection.h: Update to changes in class layout.
11558 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
11559 Reenable call to mono_runtime_is_shutting_down ().
11561 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11562 determine if the runtime is shutting down.
11564 2003-12-16 Jackson Harper <jackson@ximian.com>
11566 * icall.c: comment out call to mono_runtime_is_shutting_down to
11569 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
11571 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11572 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11574 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
11576 * reflection.c: move definition of swap_with_size
11577 to before its first call
11579 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
11581 * appdomain.c (mono_runtime_is_shutting_down): New public function.
11583 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11586 * object.c: Fix warnings.
11588 * icall.c (ves_icall_Type_Get...): Only consider inherited static
11589 members if FlattenHierarchy is set.
11591 * reflection.c (mono_image_add_decl_security): New function to emit
11592 declarative security.
11594 * reflection.h reflection.c: Add support for declarative security.
11596 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11598 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
11600 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11602 * appdomain.c verify.c: Moved corlib version checking into its own
11603 function in appdomain.c since it needs to create vtables etc.
11605 2003-12-13 Patrik Torstensson <p@rxc.se>
11607 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
11608 instead of unwrapped server.
11610 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
11612 * verify.c (check_corlib): Fix field index.
11614 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
11616 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11619 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
11621 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11622 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11623 cope with sizeof(size_t) != sizeof(guint32).
11625 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11627 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11628 in case of failure.
11630 2003-12-10 Mark Crichton <crichton@gimp.org>
11632 * icall.c: removed the GetNonZeroBytes. We now handle this case
11635 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
11637 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11639 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11642 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
11644 * verify.c (check_corlib): Handle the case when the version field is
11645 initialized by a static constructor.
11647 2003-12-08 Patrik Torstensson <p@rxc.se>
11649 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11651 2003-12-08 Martin Baulig <martin@ximian.com>
11653 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11654 a MonoReflectionGenericParameter, also take the parameter index
11655 and name as arguments.
11656 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11657 (ves_icall_MonoGenericParam_initialize): New interncall.
11658 (ves_icall_Type_make_byref_type): New interncall.
11660 * reflection.h (MonoReflectionGenericParam): Derive from
11661 MonoReflectionType, not just from MonoObject. Added `refobj' and
11664 * reflection.c (mono_reflection_define_generic_parameter): Create
11665 and return a new MonoReflectionGenericParam; don't initialize the
11667 (mono_reflection_initialize_generic_parameter): New public method;
11668 initializes the constraints and creates the `param->pklass'.
11670 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
11672 * reflection.h reflection.c: Use the new fields 'num_types',
11673 'num_fields' and 'num_methods' to track the number of types etc.
11675 * verify.c (check_corlib): Check corlib version number.
11677 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
11679 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11680 function works on all methods.
11682 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
11684 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11685 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11686 the custom_type_info flag of the transparent proxy.
11687 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11688 objects that supports IRemotingTypeInfo.
11689 * object.h: Added custom_type_info field in transparent proxy.
11691 2003-12-06 Martin Baulig <martin@ximian.com>
11693 * class.c (mono_class_create_from_generic): Removed.
11694 (mono_class_from_generic): Check `ginst->klass' before doing
11695 anything else. This is important to fully support "recursive"
11698 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11699 empty `generic_inst->klass' before doing anything else.
11701 2003-12-06 Dick Porter <dick@ximian.com>
11706 * locales.c: Use C structs to access class fields. Don't do a
11707 conversion between MonoString and UChar because both are
11708 platform-endian UTF-16. Compare now takes startindex and count
11709 parameters. Add a char overload for IndexOf. Speed up the
11710 invariant string IndexOf.
11712 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
11714 * Makefile.am (monosn_LDADD): Fix parallel build.
11716 2003-12-04 Martin Baulig <martin@ximian.com>
11719 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11720 (ves_icall_Type_make_array_type): New interncall.
11722 2003-12-04 Martin Baulig <martin@ximian.com>
11724 * locales.c: also change it in the !HAVE_ICU case.
11726 2003-12-04 Dick Porter <dick@ximian.com>
11729 * locales.c: construct_compareinfo is now in CompareInfo, not
11732 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
11734 * image.c (mono_image_load_file_for_image): Cache loaded images in the
11735 image->files array.
11737 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11740 * assembly.c (mono_assembly_load_references): Only load references
11743 * class.c (mono_class_from_name): Avoid linear search of the
11744 EXPORTEDTYPE table.
11746 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11748 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
11750 * image.h (MonoImage): Add 'field_cache' field.
11752 * loader.c (mono_field_from_token): Cache field lookups.
11754 * reflection.c (mono_module_get_object): Fix name property.
11756 * icall.c (ves_icall_get_enum_info): Update after changes to
11757 mono_metadata_get_constant_index ().
11759 * icall.c: Get rid of get_type_info icall, use a separate icall for
11760 each type property to avoid needless memory allocations. Fixes #51514.
11762 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11763 to avoid needless binary searches.
11765 * class.c (class_compute_field_layout): Move the initialization of
11766 field->def_value to mono_class_vtable ().
11768 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11771 * object.c (mono_object_allocate): Make it inline.
11773 * object.c (mono_object_allocate_spec): Make it inline.
11775 2003-12-02 Dick Porter <dick@ximian.com>
11777 * locales.c (create_NumberFormat): NumberFormatInfo construction.
11778 Patch by Mohammad DAMT (mdamt@cdl2000.com).
11780 2003-12-01 Dick Porter <dick@ximian.com>
11782 * threads.c: Fix signature and call in CreateMutex and
11785 2003-12-01 Dick Porter <dick@ximian.com>
11788 * locales.c: Implement string compares and searching
11790 * object.h: Add extra Thread field
11792 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
11794 * reflection.c (fixup_method): Add support for MonoCMethod.
11796 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
11798 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11800 * reflection.c (assembly_name_to_aname): Allow extra characters in
11801 assembly names. Fixes #51468.
11803 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
11805 * exception.c (mono_exception_from_name_domain): New helper function.
11807 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11808 exception object in the correct domain.
11810 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
11811 formatting + make a copy a the input data.
11813 * loader.c (mono_get_method_from_token): Methods which contain
11814 native code do not have entries in the ImplMap.
11816 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11817 Thanks to Gonzalo for spotting this.
11819 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11820 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11822 * assembly.h (mono_assembly_load_from): Split the second part of
11823 assembly loading into a new public function.
11825 * exception.h (mono_get_exception_bad_image_format): New function.
11827 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
11829 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11830 Enumerate all modules inside a dynamic assembly. Fixes #51293.
11832 * icall.c: Add new icall for creating dynamic methods.
11834 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11836 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11838 * reflection.c (mono_reflection_create_dynamic_method): New icall to
11839 create a dynamic method.
11841 * reflection.c (resolve_object): New helper function.
11843 * reflection.c: Generalize ReflectionMethodBuilder and the functions
11844 which manipulate it so they can also work on dynamic methods.
11846 * reflection.c (reflection_method_builder_to_mono_method): Avoid
11847 creating the MonoReflectionMethodAux structure if it is not needed.
11849 * reflection.h verify.c: Update after changes to object layout.
11851 * reflection.c (method_builder_encode_signature): Fix compilation on
11854 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
11856 * appdomain.h: Added support for context static fields. Added static_data
11857 field to MonoAppContext and renamed thread_static_fields to a more
11858 generic special_static_fields in MonoAppDomain, since it can now contain
11859 context static fields.
11860 * domain.c: Updated hashtable name.
11861 * object.c: Replaced field_is_thread_static() for a more generic
11862 field_is_special_static() which also checks for context static attribute.
11863 In mono_class_vtable(), added support for static context fields.
11864 * threads.c: Changed methods that manage thread static fields to more
11865 generic methods so they can be reused both for thread and context static
11867 * threads.h: Declared some new methods.
11869 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
11871 * reflection.h: Update after changes to the managed types.
11873 * reflection.c (encode_custom_modifiers): New helper function.
11875 * reflection.c (method_encode_signature): Emit custom modifiers.
11877 * reflection.c (field_encode_signature): Emit custom modifiers.
11879 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
11881 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11883 * icall.c (ves_icall_System_ValueType_Equals): New optimized
11886 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
11889 * object.c (mono_field_get_value_object): New function.
11891 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11894 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
11896 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11897 return a preallocated out-of-memory exception instance.
11899 * object.c (out_of_memory): Use the new function.
11901 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11902 flag is before the custom modifiers. Fixes #49802.
11904 2003-11-16 Martin Baulig <martin@ximian.com>
11906 * class.c (mono_class_is_open_constructed_type): Implemented the
11907 MONO_TYPE_GENERICINST case.
11909 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
11911 * assembly.c (mono_assembly_fill_assembly_name): New function to
11912 fill out the MonoAssemblyName structure.
11913 (mono_assembly_open): Use the new function.
11915 * icall.c (fill_reflection_assembly_name): New helper function.
11917 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11920 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11922 2003-11-15 Martin Baulig <martin@ximian.com>
11924 * class.c (mono_class_is_open_constructed_type): New public
11925 function; checks whether a type is an open constructed type,
11926 ie. whether it still contains type parameters.
11927 (mono_class_inflate_generic_type): If we're a type parameter and
11928 the inflated type is also a MONO_TYPE_(M)VAR, return the original
11931 * class.h (MonoGenericInst): Added `guint32 is_open'.
11933 * loader.c (method_from_methodspec): Check whether we're an open
11934 or closed constructed type and set `ginst->is_open'.
11936 * reflection.c (mono_reflection_bind_generic_parameters): Check
11937 whether we're an open or closed constructed type and set
11939 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11940 from open constructed types.
11942 2003-11-15 Martin Baulig <martin@ximian.com>
11944 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11945 a generic instance (instead of a generic type declaration) with
11946 unbound generic parameters, bind them to our actual types.
11948 2003-11-14 Martin Baulig <martin@ximian.com>
11950 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11952 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11953 an interface type, populate `res->interfaces' with instantiated
11954 versions of all the interfaces we inherit.
11956 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
11958 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11959 when MONO_PATH is set but doesn't contain the install dir.
11961 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11964 (ves_icall_Type_GetInterfaces): don't return an interface twice when
11965 it's also implemented in base classes. Fixes bug #50927.
11967 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
11969 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11970 if this method is called from a finalizer. Fixes #50913.
11972 2003-11-12 Miguel de Icaza <miguel@ximian.com>
11974 * threads.c: Implement VolatileRead/VolatileWrite
11976 * icall.c: Add new icalls for VolatileRead/VolatileWrite
11978 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11980 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
11981 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11984 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
11985 from Peter Ross (pro@missioncriticalit.com).
11987 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
11989 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11991 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11993 * assembly.c (mono_assembly_load_references): Disable check because it
11994 triggers on older corlibs which lots of people have.
11996 2003-11-12 Jackson Harper <jackson@ximian.com>
11998 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11999 load corlib.dll if mscorlib.dll is not found.
12000 * assembly.h: Remove corlib name define.
12003 * image.c: Change corlib name to mscorlib.
12005 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12007 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12009 2003-11-11 Miguel de Icaza <miguel@ximian.com>
12011 * appdomain.h: Added loader_optimization here to sync with the C#
12012 code, and add disallow_binding_redirects field.
12014 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12016 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12018 * reflection.c (mono_image_build_metadata): Fix crash on modules
12021 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12023 * icall.c (ves_icall_get_method_info): Return callingConvention as
12026 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
12027 namespaces from the EXPORTEDTYPE table as well.
12029 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12030 from all modules inside the assembly.
12032 2003-11-11 Martin Baulig <martin@ximian.com>
12034 * reflection.c (mono_reflection_bind_generic_parameters): Make
12035 this work for interfaces.
12037 2003-11-11 Martin Baulig <martin@ximian.com>
12039 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12041 2003-11-11 Martin Baulig <martin@ximian.com>
12043 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12044 "MonoInflatedMethod" and "MonoInflatedCtor".
12046 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12048 * reflection.c (resolution_scope_from_image): Use the assembly table
12049 from the manifest module, since other modules don't have it.
12051 * debug-helpers.c (mono_type_full_name): New helper function.
12053 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12055 * image.c (mono_image_load_file_for_image): New public function which
12056 is a replacement for the load_file_for_image in class.c.
12058 * assembly.c (mono_assembly_load_module): A wrapper for the function
12059 above which does assembly association and reference loading too.
12061 * class.c (mono_class_from_name): Call mono_assembly_load_module.
12063 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12065 * appdomain.c: not all of the attributes for the full assembly name
12066 are required and the order doesn't matter. Fixes bug #50787.
12068 2003-11-10 Dick Porter <dick@ximian.com>
12070 * locales.c: Use platform-endian UTF16
12072 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12074 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12076 2003-11-10 Martin Baulig <martin@ximian.com>
12079 (mono_metadata_load_generic_params): Make this actually work.
12081 * reflection.c (mono_reflection_bind_generic_parameters): If our
12082 parent is a generic instance, pass all the `types' to it, no
12083 matter whether it has the same number of type parameters or not.
12085 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12087 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12089 * assembly.c (mono_assembly_load_references): Move the image<->assembly
12090 assignment code to this function so it gets called recursively for all
12093 * image.c (load_modules): Remove the assembly assignment since it is
12094 now done by mono_assembly_load_references.
12096 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12097 Add 'module' argument.
12098 (mono_module_get_types): New helper function.
12099 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12101 2003-11-08 Martin Baulig <martin@ximian.com>
12103 * class.c (mono_class_inflate_generic_method): Interface method
12104 don't have a header.
12106 * reflection.c (mono_image_get_methodspec_token): Take an
12107 additional `MonoGenericInst *' argument instead of reading it from
12108 the header; this is necessary to support interfaces.
12109 (mono_image_create_token): Pass the `MonoGenericInst *' from the
12110 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12111 (inflated_method_get_object): Take an additional `MonoGenericInst *'
12114 * reflection.h (MonoReflectionInflatedMethod): Added
12115 `MonoGenericInst *ginst'.
12117 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
12119 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12121 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
12123 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12125 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
12128 (reflection_methodbuilder_from_method_builder):
12129 (reflection_methodbuilder_from_ctor_builder): New helper functions to
12130 initialize a ReflectionMethodBuilder structure.
12131 (mono_image_get_methodbuilder_token):
12132 (mono_image_get_ctorbuilder_token): New functions to emit memberref
12133 tokens which point to types in another module inside the same assembly.
12135 * reflection.c: Use the new helper functions.
12137 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12139 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
12140 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12142 * reflection.c (resolution_scope_from_image): Emit a moduleref if
12145 * reflection.c (mono_image_build_metadata): Emit metadata only for the
12146 current module. Emit the manifest only for the main module.
12148 * reflection.c (mono_image_create_token): Add assertion when a
12149 memberref needs to be created.
12151 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12153 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
12154 larger buffer for the custom attribute blob. Fixes #50637.
12156 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12158 * threadpool.c: notify listener on async processing handles after
12159 invoking the async callback. Thanks to Zoltan.
12161 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12163 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
12164 avoid code duplication.
12166 * reflection.h (MonoDynamicImage): New type which is currently unused,
12167 but will be used through the ref.emit code in place of
12168 MonoDynamicAssembly.
12170 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12173 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12174 a MonoDynamicImage instead of just a MonoImage.
12176 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12177 icalls to ModuleBuilder but keep their semantics, so they will work
12178 with moduleb->assemblyb. This will change later.
12180 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12182 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12185 * reflection.c (mono_image_build_metadata): Avoid creation of a default
12186 main module, since it is now done by the managed code.
12188 2003-11-03 Martin Baulig <martin@ximian.com>
12190 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12191 `ginst->klass' here.
12192 (method_encode_methodspec): Don't use the `ginst->generic_method's
12193 klass if it's a generic instance, use `ginst->klass' in this case.
12195 2003-11-03 Martin Baulig <martin@ximian.com>
12197 * reflection.c (mono_image_get_generic_method_param_info):
12198 Removed, use mono_image_get_generic_param_info() instead.
12199 (mono_image_get_type_info): Write the GenericParam table before
12200 the Method table. This is neccessary because in the GenericParam
12201 table, type parameters of the class (ie. '!0' etc.) must come
12202 before the ones from its generic methods (ie. '!!0' etc).
12204 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12206 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12208 2003-11-02 Martin Baulig <martin@ximian.com>
12210 * reflection.c (create_generic_typespec): Take a
12211 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12212 the generic parameters from it.
12214 2003-11-02 Martin Baulig <martin@ximian.com>
12216 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12217 instead of a `MonoClassField *' since we just need the type.
12218 (create_generic_typespec): New static function. Creates a
12219 TypeSpec token for a generic type declaration.
12220 (mono_image_get_generic_field_token): New static function.
12221 (mono_image_create_token): If we're a FieldBuilder in a generic
12222 type declaration, call mono_image_get_generic_field_token() to get
12225 2003-11-02 Martin Baulig <martin@ximian.com>
12228 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12229 `MonoReflectionGenericInst *declaring_type' and
12230 `MonoReflectionGenericInst *reflected_type' fields.
12232 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12233 `MonoReflectionGenericInst *declaring_type' and a
12234 `MonoReflectionGenericInst *reflected_type' argument instead of a
12235 single `MonoReflectionGenericInst *type' one. Set
12236 `res->declaring_type' and `res->reflected_type' from them.
12237 (mono_reflection_inflate_field): Likewise.
12239 2003-11-02 Martin Baulig <martin@ximian.com>
12241 * class.c (mono_class_setup_vtable): Don't store generic methods
12244 2003-11-02 Martin Baulig <martin@ximian.com>
12246 * reflection.h (MonoReflectionGenericInst): Added
12247 `MonoReflectionType *declaring_type'.
12249 * reflection.c (mono_reflection_bind_generic_parameters): Use
12250 `if (tb->parent)' instead of `klass->parent'.
12252 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
12254 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12255 with an empty ASSEMBLY table.
12257 * reflection.c (mono_image_build_metadata): Avoid using the same loop
12258 variable in the inner and outer loops.
12260 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
12262 * metadata.h (mono_metadata_make_token): Put parentheses around macro
12265 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12267 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
12268 icalls. Instead, do everything in managed code. This is needed since
12269 it is hard to restore the original domain etc. in unmanaged code in the
12270 presence of undeniable exceptions.
12272 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
12273 New icalls to push and pop appdomain refs.
12275 2003-10-31 Martin Baulig <martin@ximian.com>
12277 * class.c (inflate_generic_type): Renamed to
12278 mono_class_inflate_generic_type() and made it public.
12280 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12283 * loader.c (mono_field_from_memberref): Also set the retklass for
12286 * fielder.c (mono_image_get_inflated_field_token): New static
12287 method; creates a metadata token for an inflated field.
12288 (mono_image_create_token, fixup_method): Added support for
12289 "MonoInflatedField".
12290 (fieldbuilder_to_mono_class_field): New static function.
12291 (mono_reflection_inflate_field): New public function.
12294 (MonoReflectionGenericInst): Added `MonoArray *fields'.
12295 (MonoReflectionInflatedField): New typedef.
12297 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
12299 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12300 for Solaris and other platforms without s6_addr16
12302 2003-10-30 Martin Baulig <martin@ximian.com>
12304 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12305 argument instead of two.
12306 (mono_class_inflate_generic_signature): Likewise.
12307 (inflate_generic_header): Likewise.
12308 (mono_class_inflate_generic_method): Likewise. In addition, if
12309 `ginst->klass' is set, it becomes the new `method->klass'.
12311 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12314 * reflection.c (encode_generic_method_sig): Write a 0xa as the
12315 first byte. [FIXME]
12316 (method_encode_methodspec): If we have generic parameters, create
12317 a MethodSpec instead of a MethodRef.
12318 (fixup_method): Added support for "MonoInflatedMethod" and
12319 "MonoInflatedCtor".
12320 (mono_image_create_token): Added support for "MonoInflatedMethod"
12321 and "MonoInflatedCtor".
12322 (inflated_method_get_object): New static function; returns a
12323 managed "System.Reflection.MonoInflatedMethod" object.
12324 (mono_reflection_bind_generic_method_parameters): Return a
12325 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12326 (mono_reflection_inflate_method_or_ctor): Likewise.
12327 (mono_image_get_generic_method_param_info): Initialize unused
12329 (mono_image_get_generic_param_info): Likewise.
12331 * reflection.h (MonoReflectionInflatedMethod): New public
12332 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
12333 "S.R.MonoInflatedCtor" classes.
12335 * loader.c (method_from_memberref): If we're a TypeSpec and it
12336 resolves to a generic instance, inflate the method.
12338 2003-10-28 Dick Porter <dick@ximian.com>
12340 * object.c (mono_runtime_run_main): Convert command-line arguments
12341 into utf8, falling back to the user's locale encoding to do so.
12343 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
12345 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12348 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12350 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12351 up icalls at method definition time. Partially fixes #33569.
12353 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
12355 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12356 marshalling of arrays. Fixes #50116.
12358 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12360 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12361 points to a vtable in the dying appdomain.
12363 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12364 listeners into unmanaged code inside the lock.
12366 * object.c (mono_class_vtable): Turn off typed allocation in non-root
12367 domains and add some comments.
12369 2003-10-25 Martin Baulig <martin@ximian.com>
12371 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12373 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12375 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12376 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12377 currently parsing. Create the generic class and store it in
12378 `generic_inst->klass' before parsing the type arguments. This is
12379 required to support "recursive" definitions; see mcs/tests/gen-23.cs
12381 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12382 to support recursive typespec entries.
12384 * class.c (mono_class_setup_parent): If our parent is a generic
12385 instance, we may get called before it has its name set.
12386 (mono_class_from_generic): Splitted into
12387 mono_class_create_from_generic() and mono_class_initialize_generic().
12389 2003-10-25 Martin Baulig <martin@ximian.com>
12391 * icall.c (ves_icall_Type_BindGenericParameters): Return a
12392 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12393 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12394 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12396 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12397 (create_typespec): Likewise.
12398 (mono_reflection_bind_generic_parameters): Return a
12399 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12400 (mono_reflection_inflate_method_or_ctor): New public function.
12402 * reflection.h (MonoReflectionGenericInst): New typedef.
12404 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
12406 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12407 inside the domain lock. Fixes #49993.
12409 * object.c (mono_class_vtable): When typed allocation is used,
12410 allocate vtables in the GC heap instead of in the mempool, since the
12411 vtables contain GC descriptors which are used by the collector even
12412 after the domain owning the mempool is unloaded.
12414 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12416 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12417 reflect what it does. Also invalidate mempools instead of freeing
12418 them if a define is set.
12420 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12423 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12424 hold the finalizable objects in this domain.
12426 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12429 * appdomain.c (mono_domain_set): New function to set the current
12430 appdomain, but only if it is not being unloaded.
12432 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12433 appdomain which is being unloaded.
12435 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12436 unloading of the root appdomain.
12438 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12439 icall to execute a method in another appdomain. Intended as a
12440 replacement for InternalSetDomain, which can confuse the code
12441 generation in the JIT.
12443 * appdomain.c (mono_domain_is_unloading): New function to determine
12444 whenever an appdomain is unloading.
12446 * appdomain.c (mono_domain_unload): New function to correctly unload
12449 * assembly.c (mono_assembly_load_references): Check that an assembly
12450 does not references itself.
12452 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12453 domain manually, it asks the finalizer thread to do it, then waits for
12454 the result. Also added a timeout.
12456 * icall.c: Register the new icalls.
12458 * threads.h threads.c: Export the mono_gc_stop_world and
12459 mono_gc_start_world functions.
12461 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
12462 function to fill out the mempool with 0x2a.
12464 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
12466 * reflection.h (MonoReflectionMethodAux): New structure to store
12467 information which is rarely used, thus is not in the MonoMethod
12470 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12471 store the aux info.
12473 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12474 and marshalling info into the aux structure.
12476 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12477 from the aux structure.
12479 * loader.c (mono_method_get_param_names): Retrieve the param names from
12482 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
12484 * exception.h exception.c: Add AppDomainUnloadedException && fix
12487 2003-10-21 Dick Porter <dick@ximian.com>
12490 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12491 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12493 2003-10-21 Martin Baulig <martin@ximian.com>
12495 * reflection.c (mono_reflection_bind_generic_parameters):
12496 `klass->parent' is NULL for interfaces.
12498 2003-10-21 Martin Baulig <martin@ximian.com>
12500 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12502 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
12504 * exception.c (mono_exception_from_name_msg): New helper function for
12505 creating exceptions and initializing their message field.
12507 * exception.c: Simplify functions using the new helper.
12509 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12512 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12513 mono_raise_exception, since otherwise gcc doesn't generate the function
12514 epilog for raise_exception, confusing the stack unwinding in the JIT.
12517 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12518 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12521 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12523 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12526 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
12528 * icall.c: Removed GetUninitializedObject method because
12529 AllocateUninitializedClassInstance does the same.
12531 2003-10-18 Martin Baulig <martin@ximian.com>
12533 * class.c (inflate_generic_signature): Renamed to
12534 mono_class_inflate_generic_signature() and made it public.
12535 (my_mono_class_from_generic_parameter): New static function; if we
12536 don't already have the generic parameter's MonoClass, create a
12537 very simple one which is just used internally in the runtime and
12538 not passed back to managed code.
12540 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12542 * metadata.h (MonoMethodSignature): Moved the
12543 `MonoGenericParam *gen_params' to the MonoMethodHeader.
12544 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12546 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12547 ves_icall_MonoMethod_GetGenericArguments(); this is now an
12548 interncall on the MonoMethod class, not on MethodInfo.
12549 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12550 calling mono_reflection_bind_generic_method_parameters() directly.
12552 * loader.c (mono_method_get_signature): If this is a MethodSpec;
12553 return the already computed `method->signature'.
12554 (method_from_methodspec): New static function to load a method
12555 from a MethodSpec entry.
12556 (mono_get_method_from_token): Call the new method_from_methodspec()
12557 for MethodSpec tokens.
12558 (mono_get_method_from_token): If we're a generic method, load the
12561 * reflection.c (mono_image_get_memberref_token): Allow
12562 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12564 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12565 (mono_image_create_token): First check whether it's a generic
12566 method (so we'd need to create a MethodSpec), then do the other
12568 (mono_reflection_bind_generic_method_parameters): Return a
12569 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12570 called directly from the interncall.
12572 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
12574 * reflection.c (load_public_key): Move loading of the public key
12577 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12579 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12582 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12583 culture, hash_alg and public_key. Fixes #49555.
12585 2003-10-17 Martin Baulig <martin@ximian.com>
12587 * class.h (MonoGenericInst): Moved this declaration here and added
12588 `MonoMethod *generic_method'.
12591 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12592 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12594 * metadata.c (mono_metadata_type_equal): Two types of
12595 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12596 index; ie. don't compare the address of the `MonoGenericParam'
12598 (mono_metadata_load_generic_params): Removed the `MonoMethod
12601 * metadata.h (MonoGenericInst): Moved declaration to class.h.
12602 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12604 * reflection.c (method_encode_signature): Encode the number of
12605 generic parameters.
12606 (encode_generic_method_sig): New static function.
12607 (method_encode_methodspec): New static function; creates an entry
12608 in the MethodSpec table for a generic method.
12609 (mono_image_get_methodspec_token): New static function.
12610 (mono_image_create_token): Call mono_image_get_methodspec_token()
12611 for generic methods.
12612 (mono_reflection_bind_generic_method_parameters): New public
12613 function. Instantiates a generic method.
12615 2003-10-16 Martin Baulig <martin@ximian.com>
12617 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12618 *gen_params' here from MonoMethodHeader.
12620 * metadata.c (mono_metadata_parse_method_signature): If we have
12621 generic parameters, initialize `method->gen_params' and then set
12622 the correct `type->data.generic_param' in all the parameters.
12624 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
12626 * threads.c (mono_threads_get_default_stacksize): New function to
12627 return the default stacksize.
12629 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12630 termination of the finalizer thread, since the previous method had
12631 race conditions. Fixes #49628.
12633 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12634 as for the other managed threads.
12636 2003-10-16 Martin Baulig <martin@ximian.com>
12638 * class.c (inflate_generic_signature): Copy `generic_param_count'
12641 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12644 * metadata.c (mono_metadata_parse_method_signature): Actually set
12645 the `method->generic_param_count' here.
12646 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12648 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
12650 * object.h: Add a new field to TypedRef to simplify the implementation
12651 of the REFANY opcodes in the JIT.
12653 * icall.c: Make use of the new field.
12655 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12658 2003-10-15 Martin Baulig <martin@ximian.com>
12660 * class.c (mono_class_from_gen_param): Renamed to
12661 mono_class_from_generic_parameter() and moved most of the
12662 functionality from mono_reflection_define_generic_parameter()
12663 here; ie. we create a "real" class here.
12664 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12665 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12666 previously been called.
12668 * class.h (MonoGenericParam): Moved the declaration of this struct
12669 here from metadata.h and added `MonoMethod *method'.
12671 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12674 * loader.c (mono_get_method_from_token): If we have any generic
12675 parameters, call mono_metadata_load_generic_params() to read them
12676 from the MONO_TABLE_GENERICPAR.
12678 * metadata.c (mono_metadata_load_generic_params): Added
12679 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12681 * metadata.h (MonoMethodSignature): Replaced
12682 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12683 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12685 * reflection.c (mono_reflection_define_generic_parameter): Moved
12686 most of the functionality into the new
12687 mono_class_from_generic_parameter(); set the `method' field if
12688 we're a method parameter.
12690 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
12692 * marshal.c (emit_struct_conv): if native size is 0
12695 2003-10-14 Martin Baulig <martin@ximian.com>
12697 * icall.c: The generics API has changed in the spec since it was
12698 added to System.Type; these modifications make it match the spec
12700 (ves_icall_Type_GetGenericParameters): Renamed to
12701 `ves_icall_Type_GetGenericArguments'.
12702 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12703 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12704 `ves_icall_MonoType_get_HasGenericArguments'.
12705 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12706 `ves_icall_MonoType_get_IsGenericParameter'.
12707 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12708 this is no interncall anymore.
12709 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12710 `ves_icall_TypeBuilder_get_IsGenericParameter'.
12712 2003-10-14 Martin Baulig <martin@ximian.com>
12714 * reflection.c (mono_reflection_bind_generic_parameters): Also
12715 inflate generic methods if we're reading the class from IL.
12717 2003-10-13 Martin Baulig <martin@ximian.com>
12719 * reflection.c (mono_reflection_define_generic_parameter): This
12720 method isn't called directly from the icall anymore; take a
12721 `MonoReflectionAssemblyBuilder *' so we can use this for type and
12722 method generic parameters.
12723 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12724 (method_builder_encode_signature): Encode generic parameters.
12725 (mono_image_get_method_info): Write generic params to the
12726 MONO_TABLE_GENERICPARAM table.
12728 * reflection.h (MonoReflectionMethodBuilder): Added
12729 `MonoArray *generic_params'.
12731 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12733 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12734 wrapper for mono_reflection_define_generic_parameter().
12735 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12737 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
12739 * marshal.h: Add missing function to fix build.
12741 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12742 the SetLastError pinvoke attribute.
12744 * marshal.c (mono_marshal_set_last_error): New helper function called
12745 by the generated code.
12747 * marshal.c (mono_mb_emit_branch): New helper function.
12749 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12751 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12752 classes as parameters and return values of delegates. Fixes #29256.
12754 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
12756 * locales.c: use gint32 in non HAVE_ICU case
12758 2003-10-11 Martin Baulig <martin@ximian.com>
12760 * mono-debug.c (mono_debug_add_method): Added a workaround for
12763 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
12765 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12766 delegates passed to native code must use the STDCALL calling
12767 convention. Fixes #35987.
12769 2003-10-10 Martin Baulig <martin@ximian.com>
12771 * class.c (inflate_generic_type): If we're inflating for a generic
12772 type instance (and not for a generic method), return
12773 MONO_TYPE_MVAR unchanged.
12775 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12777 * string-icalls.c: Join ignores null strings in the source array.
12778 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12779 * threads.c: GetAvailableTheads is slightly more accurate.
12781 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
12783 * threads.h threads.c : add mono_threads_set_default_stacksize
12784 and pass default to CreateThread calls.
12786 2003-10-09 Dick Porter <dick@ximian.com>
12790 * locales.c: Internal calls for constructing CultureInfo and
12791 related objects from libicu (if its available.)
12793 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
12795 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12797 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12799 * threadpool.c: added an argument to async_invoke_thread that is the
12800 item to process, pass the MonoAsyncResult to the thread start function
12801 when creating a new thread. This way we don't need to acquire any lock
12802 when we're creating a new thread. Readded a semaphore for faster
12803 response times (instead of that Sleep i added).
12805 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
12807 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12808 get daylight change dates better on Windows, fix handling
12809 of platforms without tm_gmtoff.
12811 2003-10-06 Martin Baulig <martin@ximian.com>
12813 * class.c (inflate_generic_method): Renamed to
12814 mono_class_inflate_generic_method() and made public.
12815 (mono_class_init): Don't inflate the generic methods here.
12816 (mono_class_from_generic): Added `gboolean inflate_methods'
12817 argument. Inflate the methods here.
12819 * loader.c (mono_method_get_param_names): Ignore instances of
12820 generic types for the moment.
12822 * reflection.c (fixup_method): Added support for inflated methods.
12823 (mono_image_create_token): Use mono_image_get_methodref_token()
12824 for inflated methods.
12825 (mono_custom_attrs_from_param): Ignore instances of generic types
12827 (mono_reflection_bind_generic_parameters): New public function.
12828 Moved all the functionality from
12829 ves_icall_Type_BindGenericParameters() here and added support for
12831 (mono_reflection_define_generic_parameter): Initialize
12832 `klass->methods' here.
12834 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12835 functionality into mono_reflection_define_generic_parameter().
12836 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12837 TypeBuilder, return that TypeBuilder.
12839 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12841 * appdomain.c: removed mono_delegate_semaphore.
12844 (mono_thread_pool_add): moved hash table creation inside and the thread
12845 creation outside of the critical region.
12846 (mono_thread_pool_finish): removed obsolete code.
12847 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12848 continue or exit the thread depending on the queue.
12850 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
12852 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12853 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12854 handle more bool marshalling options
12856 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
12858 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12859 arrays of structs. Also add a more descriptive error message when
12860 a structure member is marshalled as LPArray.
12862 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
12864 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12865 marshalling arrays of complex types. Fixes #29098. Also remove an
12866 usused and incomplete function.
12868 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12870 * gc.c: report heap_size - free_bytes as total memory allocated
12873 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
12875 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
12876 fix timezone handling problems on Windows.
12878 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12879 asserts when the year is outside the range handled by ms the functions.
12881 * class.c (setup_interface_offsets): If the class is an interface,
12882 fill out its interface_offsets slot.
12884 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12886 * threadpool.c: mark threadpool threads as background.
12888 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
12890 * decimal.c - define DECINLINE to nothing if not using GCC
12892 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
12894 * assembly.c: More refcount fixes.
12896 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12898 * string-icalls.c: if we're not trimming, return the same string.
12899 When not splitting, don't create a new string.
12901 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12904 (mono_image_open): increment the ref_count inside the critical section.
12906 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
12908 * image.c (mono_image_open): Fix reference counting bug.
12910 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
12912 * marshal.c (mono_marshal_type_size) struct alignment changed for
12913 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
12914 64bits. Avoid leak in mono_marshal_get_native_wrapper when
12915 mono_lookup_pinvoke_call throws.
12917 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
12919 * reflection.c (mono_reflection_parse_type): Fix #49114.
12921 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12922 temporary workaround for cygwin header problem.
12924 * object.c (mono_object_isinst): Synchronize this with the code
12925 generated by the JIT for casts.
12927 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
12929 * reflection.c (encode_type): Fix #38332.
12931 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
12933 * marshal.c (mono_marshal_method_from_wrapper): New function to return
12934 the original method from the wrapper method.
12936 2003-09-25 Martin Baulig <martin@ximian.com>
12938 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12939 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12940 (ves_icall_Type_get_IsGenericInstance): New interncall.
12942 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12944 * object.c: fix cast warning in big endian code.
12946 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12948 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12950 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12952 * assembly.c: don't call check_env from mono_assembly_load. It's
12953 already done once in mono_assemblies_init and may cause headaches when
12954 multiple threads are loading assemblies.
12956 2003-09-19 Martin Baulig <martin@ximian.com>
12958 * reflection.c (mono_reflection_define_generic_parameter): Don't
12959 allocate `klass->methods', set `klass->flags' to
12960 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12962 2003-09-18 Martin Baulig <martin@ximian.com>
12964 * class.c (mono_class_init): Don't create `class->methods' if it's
12965 already initialized.
12967 * metadata.c (mono_metadata_load_generic_params): Make this
12970 * reflection.c (mono_reflection_define_generic_parameter): Set
12971 parent class and interfaces from the constraints.
12973 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12974 to keep this struct in sync with the declaration in TypeBuilder.cs.
12976 2003-09-17 Martin Baulig <martin@ximian.com>
12978 * metadata.h (MonoType): Replaced the data's `int type_param'
12979 field with `MonoGenericParam *generic_param'.
12980 (MonoGenericParam): Added `MonoClass *klass'.
12982 * class.c (mono_class_from_gen_param): Removed the
12983 `MonoImage *image' and `int type_num' arguments.
12985 * metadata.c (mono_metadata_parse_generic_param): New static
12986 method; creates a MonoGenericParam which just contains the index.
12987 (do_mono_metadata_parse_type): Call
12988 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12991 * reflection.c (mono_image_typedef_or_ref): Generic type
12992 parameters may be in the same assembly, but never use a typedef
12994 (mono_reflection_define_generic_parameter): We're now creating a
12995 "real" class for the type parameter; it's now safe to call
12996 mono_class_from_mono_type() on the class'es type, it'll do the
12999 2003-09-16 Martin Baulig <martin@ximian.com>
13001 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13002 `symfile->range_entry_size' and `symfile->class_entry_size' here;
13003 the `symfile' data structure must be fully initialized before it
13004 gets added to the table.
13006 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
13008 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13010 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13011 class init trampolines.
13013 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
13015 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13016 to the built-in profiler to turn off time and allocation profiling
13019 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
13021 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13024 * debug-helpers.c (mono_method_full_name): Print the wrapper type
13025 in human readable form.
13027 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
13029 * reflection.c icall.c: Fixed warnings.
13031 * image.c (load_class_names): Use a temporary hash table to hold the
13032 namespaces in order to avoid doing many string comparisons.
13034 * image.h: Fix typo.
13036 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13037 Pass NULL instead of g_direct_equal to the GHashTable constructor
13038 since the NULL case is short-circuited inside g_hash_table_lookup,
13039 leading to better performance.
13041 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13042 obtain the first custom attribute for a given index. Depends on the
13043 CustomAttribute table being sorted by the parent field.
13045 * reflection.c (mono_custom_attrs_from_index): Use the new function
13046 for better performance.
13048 2003-09-07 Martin Baulig <martin@ximian.com>
13050 * class.c (mono_class_init): If we're a generic instance, inflate
13051 all our methods instead of loading them from the image.
13052 (mono_class_from_generic): Set `class->methods = gklass->methods'.
13054 2003-09-07 Martin Baulig <martin@ximian.com>
13056 * mono-debug-debugger.c: Added support for constructors.
13058 2003-09-06 Martin Baulig <martin@ximian.com>
13060 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13063 * reflection.c (mono_reflection_setup_generic_class): Call
13064 ensure_runtime_vtable() to create the vtable.
13066 2003-09-05 Martin Baulig <martin@ximian.com>
13068 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13071 2003-09-04 Martin Baulig <martin@ximian.com>
13073 * reflection.c (mono_reflection_define_generic_parameter): Generic
13074 parameters start with zero.
13076 2003-09-04 Martin Baulig <martin@ximian.com>
13078 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13080 * reflection.h (MonoReflectionGenericParam): New typedef.
13081 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13082 the generic parameters from the managed TypeBuilder.
13084 * reflection.c (mono_reflection_define_generic_parameter): New function.
13085 (mono_reflection_create_runtime_class): Encode generic parameters.
13086 (mono_reflection_setup_generic_class): New function; this is
13087 called after adding adding all generic params to the TypeBuilder.
13088 (encode_type): Added MONO_TYPE_VAR.
13090 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
13092 * class.h class.c (mono_class_needs_cctor_run): Moved this method
13095 * assembly.h assembly.c: Moved the AOT loading code into an assembly
13098 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
13100 * reflection.h reflection.c class.h class.c: Delete duplicate
13101 definition of mono_type_get_name () from reflection.c and export the
13104 * class.c: Class loading fixes from Bernie Solomon
13105 (bernard@ugsolutions.com).
13107 * reflection.c: Endianness fixes from Bernie Solomon
13108 (bernard@ugsolutions.com).
13110 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
13112 * assembly.h assembly.c: Define a file format version for AOT
13115 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13117 * appdomain.h (MonoJitInfo): New field to determine whenever the
13118 code is domain neutral.
13120 2003-08-31 Miguel de Icaza <miguel@ximian.com>
13122 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13124 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
13126 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
13127 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13128 Avoid caching the result since strings must be domain specific. Fixes
13131 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
13133 * marshal.c (mono_marshal_init): Make this callable multiple times
13134 since it is hard to find a correct place to call it.
13136 * object.c (mono_runtime_class_init): Execute static constructors in
13137 the correct appdomain.
13139 * image.c (build_guid_table): Handle the case when multiple images have
13142 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13144 * icall.c: added a couple of icalls for System.Web.
13146 2003-08-28 Martin Baulig <martin@ximian.com>
13148 * icall.c (ves_icall_Type_BindGenericParameters): Use
13149 `klass->generic_inst' instead of `&klass->byval_arg' in the
13150 mono_type_get_object() call. The returned type must be
13151 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13153 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
13157 * object.c (mono_class_proxy_vtable): Make it thread safe.
13159 * pedump.c: Fix warning.
13161 * object.c appdomain.h: Get rid of metadata_section.
13162 It is no longer needed and it was causing deadlocks with domain->lock.
13164 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13166 2003-08-26 Martin Baulig <martin@ximian.com>
13168 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13170 2003-08-26 Martin Baulig <martin@ximian.com>
13172 * pedump.c (main): Call mono_metadata_init(),
13173 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13174 and mono_loader_init().
13176 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
13178 * loader.h: Add missing include to fix build.
13180 * image.h: mono_image_load_references is no more.
13182 * assembly.c: Reworked assembly loading to make it really thread safe.
13183 After these changes, the assembly returned by mono_assembly_open is
13184 fully initialized, i.e. all its references assemblies are loaded.
13186 * assembly.c (mono_image_load_references): Renamed to
13187 mono_assembly_load_references, and made private, since clients no
13188 longer need to call it.
13190 * class.c: Removed calls to mono_assembly_load_references, since it was
13191 a source of deadlocks.
13193 * loader.h loader.c class.h class.c: Protect data structures using a
13194 new lock, the loader lock.
13196 * class.c (mono_class_setup_vtable): Create temporary hash tables and
13197 GPtrArrays only when needed.
13199 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
13200 into empty structures by mcs. Fixes pinvoke7.cs.
13202 * domain.c (mono_init): Call a new initialization function.
13204 * appdomain.c (mono_runtime_init): Call the new initializer function
13205 of the marshal module.
13207 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13208 inserted into empty structures by mcs. Fixes pinvoke7.cs.
13210 * marshal.h marshal.c: Added locks around the wrapper caches to make
13211 this module thread safe.
13213 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13214 this argument. Fixes pinvoke1.exe.
13216 2003-08-25 Lluis Sanchez <lluis@ximian.com>
13218 * object.h: Added call_type field to MonoMethodMessage and the corresponding
13219 enumeration of values. Removed fields to store remote call output values in
13220 MonoAsyncResult. Not needed any more.
13221 * object.c: Initialize call_type and async_result fields in mono_message_init.
13222 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13223 dispatching the message.
13224 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13225 async call to finish. To do it use a message with EndInvoke call type.
13227 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
13229 * loader.h loader.c (mono_method_hash_marhal_info): New function which
13230 determines whenever a method has marshalling info.
13232 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13234 * assembly.c: fix the build on windows.
13236 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13238 * object.cs: Fixed bug #47785.
13240 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13242 * string-icalls.c (StringReplace): If their are no occurances of
13243 the old string found return a reference to the supplied
13244 string. This saves some memory and matches MS behavoir.
13246 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13248 * socket-io.c: fixed compilation for systems that define AF_INET6
13249 and don't define SOL_IP/SOL_IPV6.
13251 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
13253 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13254 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13256 * rawbuffer.c rawbuffer.h: Make this module thread safe.
13258 * domain.c: Make this module thread safe.
13260 * domain.c (mono_init): Call new initialization function.
13262 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13263 reference types too. Fixes #38812.
13265 * image.c (mono_image_init): Fixed warnings.
13267 * class.c (mono_class_from_typeref): Handle assembly load failure
13270 * appdomain.c (add_assemblies_to_domain): Handle the case when
13271 the references of an assembly are not yet loaded.
13273 * metadata.c image.c assembly.c: Moved initialization of global
13274 variables to a separate function called at startup since lazy
13275 initialization of these variables is not thread safe.
13277 * image.c assembly.c: Made this module thread safe by adding locks in
13278 the appropriate places.
13280 * domain.c (mono_init): Call the new initialization functions of the
13283 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
13285 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13286 make a direct call. It is proxy's work to make the call asynchronous.
13287 mono_delegate_end_invoke(): If the targe is a proxy, just collect
13289 * object.cs: mono_method_call_message_new(): read AsyncResult and
13290 state object from parameters list, if this info is requested.
13291 * object.h: Added fields to store remote call output values in
13292 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13294 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13296 * object.h: add needed fields to MonoThread.
13297 * threads.c, threads.h: allow registering a function to cleanup data
13298 allocated per thread by the JIT.
13300 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13302 * loader.h: portability fix by Bernie Solomon
13303 * <bernard@ugsolutions.com>.
13305 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
13307 * reflection.h reflection.c (mono_param_get_objects): Changed this to
13308 return a MonoArray. This simplifies the code and also ensures that
13309 the cache allways contains an object reference as a value.
13311 * icall.c (ves_icall_get_parameter_info): Simplified using the new
13314 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13316 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13317 fixes a problem with byte ordering when getting the address family for
13320 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
13322 * .cvsignore: Added monosn.
13324 * reflection.h reflection.c loader.c: Added support for parameter
13325 marshalling to dynamically created types. Fixes #47295.
13327 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13329 * rand.c: remove useless warnings.
13331 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13333 * class.c: implemented ldtoken for methods and fieldrefs.
13335 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13337 * threadpool.c: when mono_async_invoke was called, no one took care of
13338 monitoring the queue. So if the method invoked took some time and we
13339 got new async invoke requests after 500 ms (the thread created waited
13340 that long in WaitForSingleObject), the new async invoke was not called
13341 until the previous one finished.
13343 This is fixed now. Thanks to Totte for helping with it.
13345 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13347 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13349 2003-08-11 Martin Baulig <martin@ximian.com>
13351 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13353 2003-08-06 Martin Baulig <martin@ximian.com>
13355 * mono-debug-debugger.c: Added support for static fields,
13356 properties and methods.
13358 2003-08-06 Martin Baulig <martin@ximian.com>
13360 * mono-debug-debugger.c: Don't store the MonoString's vtable to
13361 make this work for applications with multiple application domains.
13363 2003-08-04 Martin Baulig <martin@ximian.com>
13365 * mono-debug-debugger.c: Completely reworked the type support; the
13366 most important thing is that we're now just using one single
13367 `MonoType' instance per type.
13369 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13371 * mono-endian.h, mono-endian.c, icall.c: Added icall
13372 ves_icall_System_Double_AssertEndianity to assert double word endianity
13373 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13375 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13377 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13378 support, icalls and fixes.
13380 2003-07-31 Miguel de Icaza <miguel@ximian.com>
13382 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13383 classes that are a punctuation character in .NET is not the same a
13386 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13388 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13390 2003-07-29 Miguel de Icaza <miguel@ximian.com>
13392 * icall.c: Add new MemCopy internalcall.
13393 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13394 Simplified code; It is not necessary to handle all the cases here,
13395 as the C# code takes care of it. Only handle the case of the name
13396 resource embedded into the assembly.
13398 Changed signature to return the data pointer and the size of the
13401 2003-07-26 Miguel de Icaza <miguel@ximian.com>
13403 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13404 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13406 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13408 * socket-io.c: ignore EINTR error in select.
13410 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13412 * class.h, class.c: removed unused subclasses field in MonoClass.
13414 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13416 * icall.c: improve fix of get_base_definition(). If the parent class
13417 doesn't have the mehod, look at the parent of the parent.
13418 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13419 to check if a parameter is an in or out parameter
13420 (PARAM_ATTRIBUTE_IN is not set by default).
13421 mono_method_return_message_restore(): Use mono_class_value_size to
13422 get the size of a value type. mono_type_stack_size (parameterType)
13423 does not return the correct value if parameterType is byRef.
13424 mono_load_remote_field(), mono_load_remote_field_new(),
13425 mono_store_remote_field(), mono_store_remote_field_new():
13426 raise exception if the remote call returns an exception.
13428 2003-07-28 Martin Baulig <martin@ximian.com>
13430 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13431 method. This is a wrapper around mono_runtime_invoke() which
13432 boxes the instance object if neccessary.
13434 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13436 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13437 metadata.h, row-indexes.h, verify.c: first cut of generics support.
13439 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13441 * icall.c: disable mcs bug workaround.
13443 2003-07-21 Miguel de Icaza <miguel@ximian.com>
13445 * object.c (mono_runtime_class_init): Take the metadata_section
13446 mutex before obtaining the domain mutex.
13448 * appdomain.h: Added definition of metadata_section mutex here.
13450 * object.c: define metadata_mutex here.
13452 2003-07-24 Ravi Pratap <ravi@ximian.com>
13454 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13457 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
13459 * reflection.c: Fix bug #46669
13461 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13466 * object.h: fill in the type name for TypeLoadException.
13468 2003-07-23 Ravi Pratap <ravi@ximian.com>
13470 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13471 relationship between TypeBuilders while compiling corlib) and bug
13472 45993 (Array types returned from the runtime while compiling
13473 corlib were from the loaded corlib).
13475 2003-07-22 Martin Baulig <martin@ximian.com>
13477 * mono-debug-debugger.c: Reworked the type support a bit more;
13478 distinguish between types and classes.
13480 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13482 * icall.c: add IsArrayImpl icall.
13484 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
13486 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13487 initializing real_size only once. Also fix bug #46602.
13489 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
13491 * object.c: Renamed mono_metadata_section to metadata_section.
13493 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
13495 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13496 empty array if the type is an array. Fixed.
13497 ves_icall_MonoMethod_get_base_definition: if the base method
13498 is abstract, get the MethodInfo from the list of methods of
13500 * reflection.c: ParameterInfo.PositionImpl should be zero-based
13501 and it was 1-based. Fixed in mono_param_get_objects.
13503 2003-07-20 Martin Baulig <martin@ximian.com>
13505 * mono-debug.h: Set version number to 31.
13506 (mono_debug_init): Added `MonoDomain *' argument.
13508 * mono-debug-debugger.c: Reworked the type support; explicitly
13509 tell the debugger about builtin types; pass the `klass' address to
13512 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13514 * image.c: Allow new metadata tables to be loaded without a
13515 warning. Also update the warning message to give the new constant value.
13517 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13519 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13520 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
13521 array type representation changes.
13523 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13525 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13526 on Environment.Exit () call.
13528 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13530 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13531 requires a matching corlib.
13533 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13535 * Changelog: My editor decided to add a CR to each line. Sorry about that.
13536 Committed again without the CRs.
13538 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13540 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13541 getting it from the "this" socket instance. Did not work
13542 if the socket is a subclass of Socket.
13543 Also fixed bug #35371.
13545 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13547 * metadata.c: fixed size for TypedByRef.
13548 * loader.c: when searching for a method, consider the vararg amrker.
13549 * unicode.c, decimal.c: constify some arrays.
13551 2003-07-15 Dick Porter <dick@ximian.com>
13553 * socket-io.c: Fixed compilation for gcc < 3.2.
13555 Fixed compilation for machines that don't have AF_INET6 (thanks to
13556 Bernie Solomon <bernard@ugsolutions.com> for that part.)
13558 Fixed compile warnings.
13560 Fixed formatting and line endings.
13562 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
13565 * socket-io.c: Added IPv6 support.
13567 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
13569 * class.c (mono_class_is_assignable_from): New function to implement
13570 the is_assignable_from logic. Used by mono_object_isinst,
13571 Type::IsAssignableFrom () and the interpreter.
13573 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13574 Object, even interfaces.
13576 * object.c (mono_object_isinst): Implement in terms of
13577 is_assignable_from.
13579 * icall.c (ves_icall_type_is_assignable_from): New icall.
13581 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
13583 * domain.c (foreach_domain): fix compiler warning.
13585 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
13587 * image.c (load_metadata_ptrs): use g_strndup because strndup is
13588 not available on all plattforms
13590 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
13592 * image.h image.c: Store the metadata version string in MonoImage.
13593 * icall.c: New icall to retrieve the image version.
13594 * reflection.c (create_dynamic_image): Fill in the image version field
13595 * reflection.c (build_compressed_metadata): Use the image version
13596 from the image structure.
13598 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13600 * appdomain.c: modified comment.
13601 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13602 That will be its last iteration when mono_gc_cleanup is called from
13603 mono_runtime_cleanup and before the domain is unloaded.
13607 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
13609 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13612 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13614 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13615 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13616 Bernie Solomon <bernard@ugsolutions.com>.
13618 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13620 * object.c, object.h: provide mono_object_new_fast() for faster
13621 allocation in some special cases.
13623 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13625 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13626 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13628 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13630 * threadpool.c: fix leaks.
13632 2003-07-01 Dick Porter <dick@ximian.com>
13634 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13635 using MonoGHashTables. Fixes threadpool bug posted to list.
13637 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13639 * image.h, image.c: added support to load an assembly from a byte array.
13640 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
13641 assembly bundle support.
13643 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
13645 * threadpool.c (mono_thread_pool_add): keep a reference to the
13646 AsyncResult to prevent GC
13648 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13650 * class.c: leak fix.
13652 2003-06-25 Dick Porter <dick@ximian.com>
13654 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13655 for the async object, the WaitHandle object will close the handle.
13658 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13660 * class.c: in mono_array_class_get (), lookup from the hash with the
13661 same type we insert: this works around a bug in
13662 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13663 lluis. The real fix will have to wait for after the release.
13665 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13667 * icall.c: fix memory leak when getting type members.
13669 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13671 * reflection.c: added more pubtoken special cases.
13673 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13675 * class.c: handle field offset correctly when class size
13676 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13678 2003-06-20 Martin Baulig <martin@ximian.com>
13680 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13683 2003-06-20 Martin Baulig <martin@ximian.com>
13685 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13687 2003-06-20 Martin Baulig <martin@ximian.com>
13689 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
13690 just distinguish between variables in registers and variables at
13691 an offset relative to a register.
13693 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13695 * icall.c: #ifdef out latest changes until mcs is fixed.
13697 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13699 * icall.c: return members in metadata order.
13701 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13703 * icall.c: avoid infinite loop in GetTimeZoneData.
13705 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13707 * icall.c: added Marshal.Prelink/All icalls.
13709 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13711 * object.c, object.h: fix warnings and do some overflow checking
13712 when creating arrays.
13714 2003-06-17 Dick Porter <dick@ximian.com>
13717 * file-io.c: File attributes need to be tweaked slightly when
13718 passed from the managed to the w32 world.
13720 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13721 * profiler.h profiler-private.h profiler.c: Rework last patch
13722 based on suggestion by Paolo.
13724 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13726 * profiler.h profiler-private.h profiler.c: Added infrastructure for
13727 instruction level coverage data collection.
13728 * profiler.h profiler.c (: Added new callback function which can be
13729 used by the profiler to limit which functions should have coverage
13731 * profiler.c (mono_profiler_load): Call g_module_build_path to
13732 generate the file name of the profiler library.
13734 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13736 * profiler.c, profiler.h, profiler-private.h: added basic block
13737 coverage profiling API.
13739 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
13741 * reflection.c (mono_reflection_create_runtime_class): Add support
13742 for events in dynamically generated code.
13744 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13747 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13749 * icall.c: when getting timezone info, return reasonable values if we
13750 can't get the actual data.
13752 2003-06-14 Dick Porter <dick@ximian.com>
13754 * threads.c (start_wrapper): Remove the reference to the thread
13755 object in the TLS data, so the thread object can be finalized.
13756 This won't be reached if the thread threw an uncaught exception,
13757 so those thread handles will stay referenced :-( (This is due to
13758 missing support for scanning thread-specific data in the Boehm GC
13759 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13761 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13763 * reflection.c: ensure streams and tables are first allocated with
13764 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13766 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13768 * icall.c: fixed GetElementType for byrefs (bug# 44792).
13770 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
13772 * reflection.c (mono_reflection_create_runtime_class): Add support for
13773 properties to dynamically created classes.
13774 * reflection.c: Fix a few places where non-MonoObjects were inserted
13775 into the tokens hashtable.
13777 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13779 * object.c: some support to handle out of memory exceptions.
13781 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
13783 * marshal.c (mono_marshal_get_native_wrapper): support reference
13786 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13788 * object.h, object.c: more portability stuff from Bernie Solomon.
13789 Unexport mono_object_allocate(). Added mono_object_unbox ().
13790 Set exitcode when an unhandled exception is thrown.
13792 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
13794 * marshal.c (mono_marshal_get_native_wrapper): use custom
13795 marshaler for return types.
13797 2003-06-10 Dick Porter <dick@ximian.com>
13799 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13800 ip_mreq is available
13802 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13804 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13805 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13806 by Bernie Solomon <bernard@ugsolutions.com>.
13808 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
13810 * gc.c (mono_gc_init): Avoid error message on shutdown when
13811 GC_DONT_GC=1 is used.
13813 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
13814 New icall to return the GUID of a module.
13816 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13818 * class.c: ensure instance size always includes the parent's size
13819 even whem class size is set explicitly (fixes bug#44294).
13821 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13823 * profiler.h, profiler.c: made the simple profiler thread-safe,
13824 get more accurate timing info. Allow the loading of an
13825 externally-developed profiler module.
13827 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
13829 * marshal.c (mono_marshal_get_native_wrapper): improved
13830 class/byref arguments.
13831 (mono_marshal_get_native_wrapper): better string marshaling support.
13833 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13835 * class.c: ensure .pack and .size are handled correctly and
13836 simplified layout of static fields.
13838 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
13841 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13843 * loader.c (mono_lookup_pinvoke_call): look for modules in the
13844 current directory (fix bug 44008)
13846 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
13848 * marshal.c (mono_marshal_get_native_wrapper): started support for
13850 (mono_delegate_to_ftnptr): consider marshalling specifications
13852 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13854 * reflection.c, reflection.h: emit custom marshal info.
13856 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13858 * object.c: free the GError.
13859 * icall.c: added CloseEvent_internal.
13861 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13864 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
13866 * loader.c (mono_method_get_signature): Add support for dynamic
13869 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13871 * reflection.c: fixed bug #43905.
13873 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13875 * class.c, domain.c, icall.c, metadata.h, object.h: support for
13876 handling TypedReference and ArgIterator.
13877 * loader.c, loader.h: added function to get signature at call site.
13879 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13881 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
13882 data readonly. Buglets and warning fixes. Some MethodSpec support.
13884 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13886 * class.h, class.c, object.c: remove relative numbering support.
13888 2003-05-26 Miguel de Icaza <miguel@ximian.com>
13890 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13891 free the string, until we get a chance to fix Gtk#
13893 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13895 * marshal.c: revert last patch.
13897 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13899 * icall.c: updates for new mono_class_vtable() not calling
13900 the type constructor anymore.
13902 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13904 * object.h, object.c: separate vtable creation from type
13905 initialization. Make running the .cctor thread safe.
13907 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
13909 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13911 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
13913 * loader.c (mono_get_method): consider calling convention
13915 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
13917 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13918 to return the invisible global type for a module.
13920 * reflection.c (mono_image_build_metadata): Emit global fields too.
13922 2003-05-20 Peter Williams <peterw@ximian.com>
13924 * loader.c (mono_lookup_internal_call): Add a few newlines.
13926 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
13928 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13931 * appdomain.c (set_domain_search_path): Recalculate search path when
13932 AppDomainSetup.PrivateBinPath changes.
13934 * object.c (mono_class_compute_gc_descriptor): It turns out some
13935 parts of the class libs (like System.Thread) holds pointers to
13936 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13937 to treat native int a pointer type here.
13939 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13941 * appdomain.h, domain.c: add hashtable for jump target resolution.
13943 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
13945 * reflection.h reflection.c icall.c: Added new icalls
13946 GetManifestResourceInfoInternal, GetModulesInternal and support
13949 2003-05-16 Dick Porter <dick@ximian.com>
13953 * file-io.c: Implement System.IO.MonoIO::GetTempPath
13955 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
13957 * object.c: mono_store_remote_field: little fix to previous patch.
13959 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13961 * class.c: add constructors to array classes.
13962 * icall.c: special case array construction for InternalInvoke (),
13964 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
13966 * class.h class.c reflection.c object.c: Added support for field
13967 defaults in dynamically generated classes.
13969 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13971 * reflection.c: properly encode charset for ddlimport.
13973 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13975 * threads.c: allow compiling without GC.
13977 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13979 * appdomain.h, object.c, object.h, threads.c, threads.h: added
13980 handling of thread static data.
13982 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13984 * reflection.h, reflection.c: added mono_custom_attrs_free ().
13986 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
13988 * class.c (mono_array_class_get): always set the serializable flags
13989 (mono_array_class_get): always set the SEALED attribute for array types
13991 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
13993 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13994 attributes (fix for bug 42021).
13996 2003-05-12 Dick Porter <dick@ximian.com>
13998 * gc.c: Don't run finalizers when the finalizer thread is
13999 finishing up, because the default domain has already been
14002 2003-05-11 Miguel de Icaza <miguel@ximian.com>
14004 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14005 value is null, we should throw an exception. This is slightly
14006 different than the other conventions used for the constructor.
14008 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14010 * socket-io.c: fixed windows build.
14012 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14014 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14016 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
14018 * object.c (mono_string_new_wrapper): Compatibility fix for MS
14021 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
14023 * class.c (mono_class_layout_fields): Add experimental GC aware
14024 auto layout facility. Requires class library changes to work correctly.
14026 (mono_class_setup_vtable): Avoid overriding explicit interface
14027 method implementations. Fixes iface3.exe test.
14029 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14031 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14032 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14034 * metadata.h: Add new type classification macro which determines
14035 whenever the type holds an object reference.
14037 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
14039 * marshal.c (mono_marshal_get_native_wrapper): cleanups
14041 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
14043 * gc.c (finalizer_thread): Work around a GC bug.
14045 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
14047 * marshal.c (emit_struct_conv): allow unions
14049 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14051 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
14053 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14055 2003-05-06 Martin Baulig <martin@ximian.com>
14057 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14059 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14062 (Select_internal): allow NULLs, don't create arrays if not needed.
14063 Coupled with Socket.cs changes.
14066 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14067 register a finalizer for it that will close the semaphore handle. This
14068 fixes the leak and make Lupus' test run with > 4080 loops.
14070 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
14072 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14073 Jerome Laban (bug #42287)
14075 2003-05-02 Martin Baulig <martin@ximian.com>
14077 * debug-mono-symfile.h
14078 (MonoSymbolFile): Moved declaration into mono-debug.h.
14079 (MonoDebugMethodJitInfo): Likewise.
14080 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14082 (_mono_debug_address_from_il_offset): Take a
14083 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14086 (MonoDebugDomainData): New struct.
14087 (mono_debug_get_domain_data): New function.
14088 (mono_debug_add_method): Take an additional `MonoDomain *'
14090 (mono_debug_source_location_from_address): Likewise.
14091 (mono_debug_il_offset_from_address): Likewise.
14092 (mono_debug_address_from_il_offset): Likewise.
14094 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14096 * reflection.c: one more check for null type in custom attrs.
14098 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14100 * reflection.c: avoid warning (comparison is always false due to limited
14101 range of data type).
14103 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14105 * icall.c: throw an exception in Type.GetField if the argument 'name'
14108 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14110 * reflection.c: fixed handling of enums in named arguments to custom
14111 attributes (bug #42123).
14113 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14115 * reflection.c: use the right array element type and handle
14116 a null for a Type argument, too.
14118 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14120 * reflection.c: handle arrays as arguments to custom attributes.
14122 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14124 * reflection.c: handle a string value in a custom attr
14125 ctor that takes an object.
14127 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
14129 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14132 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
14134 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14136 2003-04-27 Martin Baulig <martin@ximian.com>
14138 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14139 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14140 MONO_DEBUGGER_EVENT_BREAKPOINT.
14141 (mono_breakpoint_trampoline_code): Removed.
14142 (mono_debugger_event_handler): The last argument is now a
14144 (mono_debugger_insert_breakpoint_full): Removed the
14145 `use_trampoline' argument.
14146 (mono_debugger_method_has_breakpoint): Likewise.
14147 (mono_debugger_trampoline_breakpoint_callback): Renamed to
14148 mono_debugger_breakpoint_callback(); take the method and
14149 breakpoint number as arguments.
14151 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14153 * metadata.c: fix off by one when loading parameters attributes.
14155 2003-04-24 Martin Baulig <martin@ximian.com>
14157 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14159 2003-04-24 Martin Baulig <martin@ximian.com>
14161 * mono-debug-debugger.c: Moved all code which interacts with the
14162 Mono Debugger here.
14164 * debug-mono-symfile.c: This code now just deals with the symbol
14165 file itself, the debugger code is now in mono-debug-debugger.c.
14167 2003-04-23 Martin Baulig <martin@ximian.com>
14169 * mono-debug.c (mono_debug_source_location_from_il_offset):
14170 New method; like mono_debug_source_location_from_address(), but
14171 takes an IL offset instead of a machine address.
14173 2003-04-23 Martin Baulig <martin@ximian.com>
14175 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14176 `line' field; this is now computed by the debugger.
14178 2003-04-23 Martin Baulig <martin@ximian.com>
14180 * mono-debug.[ch]: New files. This is the new debugging interface.
14182 * mono-debug-debugger.[ch]: New files. Moved all code which
14183 interacts with the Mono Debugger here.
14185 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
14187 * domain.c (mono_init): initialize mono_defaults.monitor_class
14189 2003-04-21 Miguel de Icaza <miguel@ximian.com>
14191 * reflection.c (method_encode_code): Add a spicy exception to help
14192 future compiler authors.
14194 2003-04-21 Martin Baulig <martin@ximian.com>
14197 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14198 Make this work with relative pathnames; g_filename_to_uri() needs
14199 an absolute filename.
14201 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
14203 * icall.c: Track name changes in Object and ValueType.
14205 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
14207 * metadata.c (mono_type_stack_size): size should be a multiple of
14210 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14213 (internal_domain_finalize): moved into mono_domain_finalize. No need
14214 to create another thread because the finalizers will be run in the
14217 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14218 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14219 to be run (MS does this too).
14221 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
14223 * object.c (mono_class_compute_gc_descriptor): Update comment.
14225 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14227 * image.h: Add synchronized wrapper cache.
14229 * image.c (do_mono_image_open): Initialize cache.
14231 * reflection.c (create_dynamic_mono_image): Initialize cache.
14233 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14235 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14236 ves_icall_System_Buffer_ByteLengthInternal.
14238 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14240 * reflection.c: setup klass->nested_in earlier. Allow
14241 a dash in the assembly name.
14243 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
14245 * metadata.c (mono_type_to_unmanaged): dont access
14246 type->data.klass for MONO_TYPE_OBJECT
14247 (mono_type_to_unmanaged): consider System.Delegate class
14249 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14251 * class.c: just setup supertypes in the proper place instead of
14252 initializing the full element class for arrays.
14254 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14256 * class.c: ensure the element class of arrays is initialized.
14257 Setup the supertype info for array classes, too.
14259 2003-04-14 Miguel de Icaza <miguel@ximian.com>
14261 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14263 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14265 * Makefile.am: re-added -m option when running cygpath. This way,
14266 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14268 * mono-config.c: same codepath for locating mono config file for WIN32
14270 * assembly.c: if mono_assembly_setrootdir is called, don't override
14273 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14275 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14276 MONO_ASSEMBLIES variable.
14278 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14280 * icall.c: added Assembly::GetNamespaces() icall.
14282 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14284 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14286 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
14288 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14289 * object.c: fixed bug in the construction of vtable for proxies
14291 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
14293 * object.c (mono_array_new): Mark mono_array_new as an icall.
14295 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14297 * class.c: fixed test for public method when overriding interfaces.
14300 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14302 * appdomain.h, domain.c: added mono_domain_foreach() to
14303 be able to access the currently loaded appdomains.
14304 * object.c: make string interning work across sppdomains.
14305 Mark some functions for use as icalls.
14307 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
14309 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14311 * reflection.h reflection.c: Allocate long living data using
14312 GC_MALLOC_ATOMIC so the collector does not need to scan it.
14314 * reflection.c: Double the allocation size in streams instead of
14315 increasing it, to prevent unneccesary copying on large assemblies.
14317 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14318 creation if the assembly does not have the Run flag set.
14320 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14322 * class.h: avoid the C++ keywords in header files (Jerome Laban
14323 spotted and fixed this).
14325 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14328 (mono_unhandled_exception): fill in the arguments for the
14329 UnhandledException event. Only trigger that event for the default
14330 domain (as MS does).
14332 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
14334 * object.c: Improve typed allocation stuff based on suggestions from
14335 Paolo. Also turn it on if the GC library supports it.
14337 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14339 * object.c object.h class.h: Added experimental typed allocation
14340 facility using the interfaces in gc_gcj.h.
14342 * os/gc_wrapper.h: Added new include files.
14344 2003-04-03 Martin Baulig <martin@ximian.com>
14346 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14347 which is not yet enabled by default.
14349 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14351 (mono_gc_lock, mono_gc_unlock): New static functions.
14353 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14354 functions; stop/start the world for the garbage collector. This
14355 is using the windows API; we need to complete the SuspendThread()/
14356 ResumeThread() implementation in the io-layer to make this work on Unix.
14357 (mono_gc_push_all_stacks): New public function; tells the garbage
14358 collector about the stack pointers from all managed threads.
14360 2003-04-03 Martin Baulig <martin@ximian.com>
14362 * object.h (MonoThread): Added `gpointer stack_ptr'.
14364 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14366 2003-04-03 Martin Baulig <martin@ximian.com>
14368 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14370 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14372 * reflection.c (typebuilder_setup_fields): Initialize field.first and
14375 2003-04-02 Miguel de Icaza <miguel@ximian.com>
14377 * loader.c (mono_lookup_internal_call): Report the corlib that is
14380 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
14382 * icall.c (ves_icall_type_GetTypeCode): fixed check for
14383 System.DBNull (it's class not valuetype).
14385 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14387 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
14388 if the array method was already assigned a token (fixes bug#40646).
14390 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
14392 * reflection.c (mono_reflection_get_type): Attempt type resolve even
14393 if no assembly is given.
14395 2003-04-01 Miguel de Icaza <miguel@ximian.com>
14397 * metadata.h: Added the new tables.
14399 * row-indexes.h: Added definitions for new tables.
14401 * metadata.c: Add schemas for new tables, and add support for
14402 computing the sizes of them.
14404 * class.c: Update for handling the new type cases.
14406 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
14408 * metadata.h (MONO_TYPE_IS_VOID): new macro
14410 2003-03-31 Martin Baulig <martin@ximian.com>
14412 * threads.h (MonoThreadCallbacks): Added `thread_created'.
14414 * threads.c (mono_thread_new_init): Call `thread_created' in the
14415 mono_thread_callbacks.
14417 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
14419 * loader.h: added marshalbyrefobject_class to mono_defaults
14420 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
14421 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14422 generation of output parameters.
14423 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14424 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14425 contextbound and the target object belongs to the context of the caller.
14426 * object.h: added context and unwrapped_server variables in MonoRealProxy.
14427 * object.c: Implemented support for interfaces and abstract classes
14428 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14429 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14431 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
14433 * class.h class.c (mono_class_is_subclass_of): New function.
14435 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14436 routines for most common case (calls from ArrayList::ToArray).
14438 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
14439 routine so programs which call Environment::Exit() can be profiled.
14441 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14442 Added MONO_ARCH_SAVE_REGS.
14444 * icall.c (ves_icall_type_is_subtype_of): Use new function.
14446 2003-03-29 Miguel de Icaza <miguel@ximian.com>
14448 * blob.h: Add a couple of new MonoType types definitions.
14450 * tabledefs.h: Add a couple of new call convs.
14452 2003-03-27 Zoltan Varga <vargaz@freemail.h>
14454 * reflection.h (MonoReflectionDynamicAssembly): track changes in
14455 the layout of the class.
14457 * reflection.c (alloc_table): double the size on overflow to avoid
14458 unnecessary copying.
14460 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14461 avoid filling out metadata tables and blobs. Also set mb->ilgen to
14462 null so it can be garbage collected.
14464 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
14466 * reflection.c (mono_reflection_get_type): Return the resolved type
14467 only if it is in the assembly we searched.
14469 * reflection.c (ensure_runtime_vtable): Initialize method slots.
14471 * class.c (mono_class_setup_vtable): Set the slot of the overriding
14474 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14477 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14478 the right one is 'file:///blah', but MS allows it.
14480 (mono_assembly_open): allow 'file://blah'
14482 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14484 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
14486 * socket-io.c: fixes bug #40310.
14488 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
14490 * reflection.c (mono_reflection_parse_type): handle deeply nested
14493 * reflection.c (mono_image_create_token): Use unique token values
14494 since they will be put into a hash table.
14496 * class.c (mono_class_setup_vtable): If a method occurs in more than
14497 one place in the vtable, and it gets overriden, then change the
14498 other occurances too.
14500 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14501 object as return type.
14503 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14505 * icall.c: Deleted "ToString" implementation for double and float
14506 because they are full implemented in managed code.
14508 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14510 * reflection.c, reflection.h: implemented and exported functions
14511 to retrieve info about custom attributes.
14513 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14515 * appdomain.c: moved Uri handling to assembly.c
14516 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14517 work when using a file Uri in *nix and windows.
14519 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14520 GetReferencedAssemblies.
14522 2003-03-18 Dick Porter <dick@ximian.com>
14524 * icall.c: Rename a couple of internal calls
14526 * threads.c: Set the thread state to Stopped when a thread exits.
14529 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14531 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14534 * object.c (mono_class_vtable): fix warning.
14536 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14538 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14540 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14542 (method_encode_clauses): Create exception info structures in the right
14544 (mono_reflection_setup_internal_class): Initialize supertypes field.
14546 * class.c object.c: Handle interfaces which implement other interfaces
14549 * class.h class.c: Move the supertypes array initialization code into
14550 a separate function so it can be used for dynamic types too. Also call
14551 it earlier, in mono_class_init(), since it can be used before the
14552 type is initialized.
14554 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14558 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14563 * object.c: remove warnings.
14565 2003-03-13 Martin Baulig <martin@ximian.com>
14567 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14568 (MonoDebugLexicalBlockEntry): New types.
14570 * debug-mono-symfile.c
14571 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14573 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14575 * process.c: ret can be any non-zero value accroding to MS doc.
14577 2003-03-07 Miguel de Icaza <miguel@ximian.com>
14579 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
14580 fixing a warning for a miss-used prototype, would have cause
14581 random memory corruption.
14583 2003-03-07 Martin Baulig <martin@ximian.com>
14585 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14586 getting really annoying ....
14588 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
14590 * reflection.c (fixup_method): added support for array methods.
14592 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14594 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
14595 (pointed out by Michael Adams).
14597 2003-03-04 Dick Porter <dick@ximian.com>
14599 * icall.c: Temporarily reverted the Double and Single ToString()
14600 change, because it broke nunit.
14602 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14604 * object.h, threads.h: make include files compatible with C++
14605 (patch by Jerome Laban <jlaban@wanadoo.fr>).
14607 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14609 * icall.c: Erased ToString helper functions for Double and Single.
14610 Now, that implementations ar all in managed code (Double and Single
14613 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
14615 * appdomain.c: Added method for initializing the default context of
14616 a domain. Added internal call for getting the default context.
14617 * appdomain.h: Added context variable in MonoDomain struct.
14618 * domain.c: mono_domain_set also sets the default context of the domain
14619 * icall.c: Mapped internal method InternalGetDefaultContext.
14620 * object.c: mono_object_get_virtual_method returns always a remoting
14621 wrapper if the object is a transparent proxy.
14622 mono_runtime_invoke_array: when creating an object by calling the
14623 constructor, if the created object is a proxy, then the constructor should
14624 be called using the a remoting wrapper.
14626 2003-03-03 Dick Porter <dick@ximian.com>
14628 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14629 variable so it compiles on solaris. Problem spotted by
14630 Christopher Taylor <ct@cs.clemson.edu>
14632 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14635 (get_info_from_assembly_name): don't leak value.
14638 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14641 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14643 * assembly.c: export mono_image_load_references ().
14644 * class.c: handle function pointers. mono_class_from_name() now
14645 supports nested type names directly.
14647 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
14649 * reflection.h reflection.c: Encode already created dynamic methods
14650 and fields correctly as a DEF instead of a REF.
14652 * reflection.c: Get rid of the force_ref argument to
14653 mono_image_typedef_or_ref since it was wrong in the first place.
14655 * string-icalls.c: add error checking to string constructors according
14658 * reflection.c: Emit types in the order their TypeBuilders were
14659 created. Previously, a new table index was assigned to each type before
14660 the tables were emitted. This was wrong because the signature blob
14661 might already refer to a type by its original table index.
14663 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14665 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14668 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14670 * Makefile.am: make assemblies dir have \ instead of / on windows.
14672 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14674 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14675 iterate over the NESTEDCLASS table using a linear search since the
14676 table is not guaranteed to be sorted by the secondary key.
14678 * class.c (mono_class_create_from_typedef): fixed up call to
14679 mono_metadata_nesting_typedef.
14681 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
14683 * marshal.c (mono_string_to_byvalstr): clear the memory as
14684 suggested by Jerome Laban <jlaban@wanadoo.fr>
14686 2003-02-26 Dick Porter <dick@ximian.com>
14688 * process.c: Cope with padding in .rsrc blocks
14690 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14692 * metadata.h: reverted the filter_len change, it breaks reflection
14694 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14696 * metadata.h: added a new field to store the filter_len
14699 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14701 * reflection.c: handle custom attributes for types and members
14702 created with Reflection.Emit (bug#38422).
14704 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
14706 * reflection.c: define RTSpecialName automatically for constructors for
14707 compatibility with MS.NET.
14709 * reflection.c (mono_reflection_create_runtime_class): initialize
14710 nested_in field of dynamically created classes.
14712 2003-02-22 Martin Baulig <martin@ximian.com>
14714 * debug-mono-symfile.h: Incremented version number.
14716 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14718 * object.h icall.c process.c: fix warnings.
14720 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14722 * appdomain.h appdomain.c:
14723 (mono_domain_try_type_resolve): split the
14724 name_or_tb argument into a name and a tb argument.
14725 (mono_domain_has_type_resolve): new function to check whenever the
14726 application has registered a TypeResolve event handler.
14728 * icall.c reflection.h reflection.c: move the type resolve logic into
14729 mono_reflection_get_type () so it will be invoked when
14730 Assembly::GetType () is called.
14733 (mono_reflection_get_type): renamed to get_type_internal.
14734 (mono_reflection_get_type): fixed type name generation so it works
14735 for nested types too.
14736 (mono_reflection_get_type): call has_type_resolve () to avoid the
14737 costly type name generation if there is no resolve event handler.
14739 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14741 * class.c, image.c: load exported types from file references.
14743 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
14745 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14746 used to cache the managed methods used to create proxies and make
14747 remote invocation of methods.
14748 * class.h: Added in MonoVTable a flag to indicate that a class needs
14749 to be remotely created.
14750 * object.c: Modified the method mono_class_vtable(). It now initializes
14751 the remote flag of the vtable. Modified mono_object_new_specific(),
14752 so now it checks the remote flag.
14753 * icall.c: Added a couple of internal methods, one for enabling instance
14754 creation interception for a type, and one for creating objects bypassing
14757 2003-02-18 Martin Baulig <martin@ximian.com>
14759 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14760 New interncall to get a method's metadata token.
14762 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14763 New interncall for the debugger.
14765 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
14767 * class.c (mono_class_setup_vtable): allocate supertype array
14769 2003-02-18 Martin Baulig <martin@ximian.com>
14771 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14773 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14776 (assembly_name_to_aname): jump over unknown properties (i've found
14777 something like: 'type, assembly, version=xxx, custom=null, public...',
14778 so now will ignore custom=null and still get the rest of the values).
14780 2003-02-17 Dick Porter <dick@ximian.com>
14782 * threads.c: Have Thread.Start() wait for a semaphore to signal
14783 that the thread has set up all its local data. This fixes bug
14784 34323, where Abort() raced the new thread's TLS data.
14786 Also removes the handle_store() call from start_wrapper, because
14787 threads are now always created suspended and there is no longer a
14788 race between the parent and child threads to store the info.
14790 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14792 * image.c: explain the #- heap issue in a message, hopefully
14793 avoiding FAQs on mono-list.
14795 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14798 (GetEntryAssembly): if the domain has not invoked
14799 AppDomain.ExecuteAssembly yet, return the assembly of the default
14802 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
14804 * class.c (mono_ldtoken): make it work in dynamic assemblies.
14806 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14808 * metadata.c, reflection.c: simple speedup to type hash
14811 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14813 * image.c, image.h, class.c, assembly.c: move module loading
14814 to MonoImage. When loading metadata, consider alignemnet from
14815 the start of metadata, not from the metadata address in memory.
14817 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
14819 * reflection.c (mono_reflection_get_custom_attrs): Added support for
14820 AssemblyBuilder objects. Factored out custom attribute creation into
14821 a separate function.
14822 (create_custom_attr): new function to create custom attributes.
14824 2003-02-12 Miguel de Icaza <miguel@ximian.com>
14826 * Makefile.am: Got tired of typing the full pathname to pedump.
14827 Until there is another option, am installing this.
14829 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
14831 * class.c (class_compute_field_layout): always set field->parent
14832 (mono_ldtoken): use mono_defaults.fieldhandle_class;
14834 2003-02-11 Dick Porter <dick@ximian.com>
14837 * monitor.c: Rewrote Monitor, making lock much faster and
14838 Pulse/Wait work as specified. Also uses much fewer handles, and only
14839 creates them as needed.
14841 * exception.c: Added SynchronizationLockException
14843 * threads.c: Deleted old Monitor implementation. The new one is
14846 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14848 * class.c: handled TypedReference type code. Set the correct size for
14849 class data. Setup interface_offsets for interface classes, too.
14851 2003-02-09 Martin Baulig <martin@ximian.com>
14853 * debug-mono-symfile.h: Reflect latest symbol writer changes.
14855 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14857 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14858 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14859 * object.c: fixed mono_object_get_virtual_method () for interfaces.
14860 * verify.c: check for code that runs after the end of the method.
14862 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14864 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14865 "System.Math::Round2".
14866 * sysmath.h: Added Floor, Round and Round2 definitions.
14867 * sysmath.c: Modified certain functions that were not 100% compliant
14868 with MS.NET (math precision) and added the implementation of Floor,
14871 2003-02-07 Martin Baulig <martin@ximian.com>
14873 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14875 2003-02-07 Martin Baulig <martin@ximian.com>
14877 * debug-mono-symfile.c: Reflected latest symwriter changes.
14878 (mono_debug_create_mono_symbol_file): Removed.
14879 (mono_debug_open_mono_symbol_file): Take an argument which
14880 specifies whether to create a dynamic symbol file.
14882 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
14884 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14886 2003-02-05 Martin Baulig <martin@ximian.com>
14888 * reflection.c (mono_image_build_metadata): Make this public,
14889 protect it against being called multiple times, don't create
14890 resources and don't build the compressed metadata here.
14891 (mono_image_create_pefile): Do this here.
14894 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14896 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14898 * socket-io.c: fixed bug #36322.
14900 2003-02-06 Piers Haken <piersh@friskit.com>
14904 * debug-mono-symfile.c:
14910 * socket-io.c: warning cleanups
14912 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
14914 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14915 function. works like remoting invoke, but does a check for the Proxy first.
14917 2003-02-05 Miguel de Icaza <miguel@ximian.com>
14919 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14921 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
14923 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14925 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14926 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14928 * object.c (mono_store_remote_field_new): used by the new jit
14929 instead of mono_store_remote_field
14930 (mono_load_remote_field_new): used by the new jit
14931 instead of mono_load_remote_field
14933 2003-02-05 Patrik Torstensson
14935 * appdomain.c: changed unload to take the domain id instead
14938 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14941 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14943 * appdomain.c: don't look for assemblies in ApplicationBase if
14944 PrivateBinPathProbe is set.
14946 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14948 * object.c: make the first argument in main_args contain the absolute
14949 path to the assembly. Fixes bug #37511.
14951 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14953 * icall.c: get correct UTC offset for countries not using daylight
14954 time saving. Fixes bug #30030.
14956 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14958 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14959 and 1 are the family).
14961 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
14963 * icall.c (ves_icall_InternalExecute): removed wrong assertion
14965 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14967 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
14969 * reflection.c: added support for SignatureHelper tokens, which is
14970 needed by the Calli opcode.
14972 * reflection.h: track changes to SignatureHelper class.
14974 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14976 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14978 * appdomain.c: fixed loading assemblies from PrivateBinPath.
14980 2003-02-03 Patrik Torstensson
14981 * appdomain.[c|h], domain.c :
14982 - Added support for getting a domain via domain id
14983 - Support for setting and getting domain from System.AppDomain
14984 (used in cross appdomain channel)
14985 - Added support for get/set for a MonoAppContext on a thread
14986 (Context class in System.Runtime.Remoting.Contexts),
14987 - Removed hack in Get/SetData and ExecuteAssembly.
14989 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14990 the managed world to get control when a proxy is created.
14992 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14994 2003-02-03 Miguel de Icaza <miguel@ximian.com>
14997 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14998 Populate the codebase field as well.
15000 2003-02-02 Martin Baulig <martin@ximian.com>
15002 * debug-mono-symfile.c
15003 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15004 (mono_debug_symfile_add_method): Allow interncalls.
15006 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15008 * icall.c: throw parse exception if strtod fails or the string is empty.
15010 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15012 * marshal.c: handle object type separately from defined
15015 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15017 * marshal.c: handle NATIVE_LPSTR for strings when it's
15018 explicitly specified.
15020 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15022 * reflection.c, reflection.h, icall.c: setup the reflection
15023 handle cache for ModuleBuilders and AssemblyBuilders.
15025 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
15027 * reflection.c (reflection_methodbuilder_to_mono_method): set
15030 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15032 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15034 2003-01-29 Dick Porter <dick@ximian.com>
15036 * threads.c: No need for the fake_thread kludge now that Thread
15037 doesn't run a class constructor
15039 2003-01-29 Dick Porter <dick@ximian.com>
15041 * threads.c: Use g_direct_hash instead of the rather bogus
15044 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
15046 * marshal.c (mono_marshal_get_native_wrapper): add check for null
15047 (fix pinvoke12.exe)
15048 (mono_marshal_get_struct_to_ptr): generate valid IL code
15049 (mono_marshal_get_ptr_to_struct): generate valid IL code
15050 (*): correctly set sig->pinvoke, we need to memdup the signature
15053 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15055 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15056 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15058 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15060 * profiler.c: provide more callers information.
15062 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
15064 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15066 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15068 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15070 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15072 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15073 exception instead of going into an infinite loop on dates which it
15076 * string-icalls.c (ves_icall_System_String_get_Chars): raise
15077 out-of-range exception if needed.
15079 * class.c (mono_class_setup_vtable): allow a virtual method to provide
15080 an implementation for an interface method and to override an inherited
15081 method at the same time.
15082 Imagine a scenario when a virtual method is used to override a
15083 virtual abstract method in a parent class, and this same method
15084 provides an implementation for an method inherited from an interface.
15085 In this case, the interface resolution code will set im->slot, which
15086 means that the virtual method override pass will skip this method
15087 which means a pointer to the abstract method inherited from the parent
15088 will remain in the vtable of this non-abstract class.
15090 * class.c: (mono_class_setup_vtable): continue search for a real
15091 method if only an abstract method is found.
15093 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15095 * reflection.c: add size to encoding for ByValStr and ByValArray
15096 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15098 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15100 * class.c (mono_class_setup_vtable): pass the override info as an
15103 * class.c (mono_class_setup_vtable): set the slot of overriding methods
15106 * reflection.c (ensure_runtime_vtable); add support for method
15109 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15111 * reflection.c (resolution_scope_from_image): Hack to work to work with
15112 dynamic assemblies.
15114 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
15115 added a 'force_ref' argument to force this function to allways return
15116 a TypeRef. This is needed by mono_image_get_memberref_token ().
15118 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15120 * reflection.c (mono_image_get_type_info): interfaces really don't have
15123 * reflection.c (mono_image_basic_init): fill out missing fields of
15126 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
15127 dynamic assemblies. This is required so dynamic assemblies show up in
15128 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15129 Type::GetType() etc. This is consistent with MS behaviour.
15131 * image.c image.h reflection.c: add newly created classes to the name
15132 cache so mono_class_get () will find them.
15134 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15136 First part of changes to get IKVM.NET running under mono.
15138 * appdomain.h, appdomain.c: added new function
15139 mono_domain_try_type_resolve() which will emit TypeResolve events.
15140 This function will call AppDomain::DoTypeResolve to do the actual work.
15142 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
15143 moved existing code dealing with dynamic tokens to a new function
15144 called mono_reflection_lookup_dynamic_token (). This function will
15145 raise TypeResolve events when appropriate. Since reflection.c is not
15146 part of libmetadata, a new hook function called
15147 mono_lookup_dynamic_token() is added to class.c which will call this.
15149 * assembly.h assembly.c: make the invoke_load_hook function public,
15150 so it can be called for dynamic assemblies.
15152 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15154 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
15157 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
15158 MonoGHashTable, since it contains pointers to objects which the GC
15161 * assembly.c (search_loaded): remove unused variable.
15163 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15165 * object.c: fixed issue exposed by gcc-generated IL programs
15166 that use RVA data for pointers.
15168 2003-01-25 Martin Baulig <martin@ximian.com>
15170 * threads.c (start_wrapper): Moved the initialization of
15171 `start_func' above the mono_new_thread_init() call to which we
15172 pass it as argument.
15174 2003-01-24 Martin Baulig <martin@ximian.com>
15176 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15177 the MonoThread pointer.
15179 2003-01-21 Miguel de Icaza <miguel@ximian.com>
15181 * icall.c: Rename `PowImpl' to Pow.
15183 2003-01-23 Dick Porter <dick@ximian.com>
15185 * threads.c (start_wrapper): Create a Thread object if needed, so
15186 the Main() thread can do the class initialisation in a subthread
15187 that has been set up to allow managed code execution.
15189 Pass the thread ID instead of the MonoThread pointer to the thread
15190 start and attach callbacks. This change is required, because the
15191 jit thread start callback must be called _before_ the Thread
15192 object can be created.
15194 (mono_thread_init): Removed much object creation code that is no
15195 longer needed. No managed code is called from here now.
15197 * object.c (mono_runtime_exec_managed_code): Create a subthread
15198 for Main, and call back to the runtime to use it.
15199 Set the exit code when Main exits.
15201 * gc.c: Make sure domain finalisation happens in a subthread.
15202 Re-enable threaded GC, fixing bug 31333 (again).
15204 * environment.c: System.Environment internall calls (so far just
15205 ExitCode is here, the others are still in icall.c)
15207 * appdomain.c (mono_runtime_cleanup): All threads running managed
15208 code should have finished before mono_runtime_cleanup() is
15209 reached, so no need to clean up threads.
15211 2003-01-22 Martin Baulig <martin@ximian.com>
15213 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15214 `gpointer func' arguments.
15215 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15216 but added `MonoThread *thread' argument.
15217 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15219 * threads.c (mono_new_thread_init): Added `gpointer func' argument
15220 and pass it to the mono_thread_start_cb callback.
15221 (mono_install_thread_callbacks): New public function to install a
15222 set of callbacks which are set by the debugger.
15223 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15225 2003-01-22 Martin Baulig <martin@ximian.com>
15227 * Makefile.am: Install debug-mono-symfile.h.
15229 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
15231 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15233 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
15235 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15236 * class.c (mono_ptr_class_get): correctly set access levels of pointers
15237 (mono_array_class_get): correctly set access levels of arrays
15239 2003-01-20 Patrik Torstensson
15240 * image.h (MonoAssemblyName): changed major, minor, build, revision
15241 from signed to unsigned.
15243 2003-01-20 sean kasun <skasun@azstarnet.com>
15245 * reflection.c (load_cattr_value): Now this handles
15246 MONO_TYPE_SZARRAY. Fixes bug #35629
15248 2003-01-20 Miguel de Icaza <miguel@ximian.com>
15250 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15253 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15255 * decimal.c: fixed bug #26056.
15257 2003-01-17 Martin Baulig <martin@ximian.com>
15259 * gc.c: Raise an ExecutionEngineException instead of using g_error().
15261 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15264 (mono_get_exception_type_initialization): new function.
15266 * object.c: throw a TypeInitializationException when an exception is
15267 thrown invoking the class constructor.
15269 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15271 * reflection.c: fixed attribute reading.
15273 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15276 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15277 provided, look for the type in the calling assembly and then in
15278 mscorlib; if the assembly name is provided, only try that one.
15280 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15282 * object.c: register the vtable before there is a chance it's
15283 queried again recursively.
15285 2003-01-13 Duncan Mak <duncan@ximian.com>
15287 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15290 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
15292 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15294 2003-01-11 Martin Baulig <martin@ximian.com>
15296 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15297 this to 20 for the release.
15299 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
15301 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15303 * loader.c (mono_method_get_marshal_info): bug fix
15305 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15306 structures with explicit layout
15308 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15310 * profiler.c: made the output more readable (and sorted).
15311 Added caller information for the allocation profiler.
15313 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
15315 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15317 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15319 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15320 to get value types.
15322 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15324 * object.c, profiler.h, profiler.c, profiler-private.h:
15325 Added object allocation profiler.
15327 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15329 * reflection.h, reflection.c: handle global methods.
15330 Compress blob entries.
15332 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15334 * marshal.c: fix compilation.
15336 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
15338 * loader.c (mono_method_get_marshal_info): impl.
15340 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15342 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15344 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15345 for reference types.
15347 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15349 * loader.c: fixed off by one error in loaded parameter names.
15351 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
15353 * marshal.c (mono_marshal_get_icall_wrapper): like
15354 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15355 instead of a MonoMethod.
15357 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15359 * decimal.c: fixed bug #36537.
15361 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15363 * marshal.c: throw a missing method exception if a
15364 P/Invoke method is not found.
15366 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15368 * icall.c: allow a null this for constructors.
15370 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15372 * icall.c: raise the proper exceptions if the arguments to the
15373 internal Invoke are incorrect.
15375 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
15377 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15379 2003-01-03 Martin Baulig <martin@ximian.com>
15381 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15383 2002-12-31 Martin Baulig <martin@ximian.com>
15385 * debug-mono-symfile.c: Completely rewrote the type section.
15386 Instead of using individual malloc()ed fields, we use one big
15387 continuous memory area and offsets into this area.
15388 See the comments in the source code for details.
15390 2002-12-30 Martin Baulig <martin@ximian.com>
15392 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15394 2002-12-30 Martin Baulig <martin@ximian.com>
15396 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15397 line number table in this data blob instead of using an external
15400 2002-12-28 Martin Baulig <martin@ximian.com>
15402 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15404 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
15406 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15407 as a boxed return type.
15409 2002-12-21 Miguel de Icaza <miguel@ximian.com>
15412 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15413 g_build_filename to properly get separators on the filename created.
15415 * object.h: Small change, introduce MonoMarshalByRefObject to
15416 track the layout of that structure in the C# universe as we make
15419 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15421 * object.c: removed assert to allow static fields on interfaces.
15422 * loader.c: a TypeSpec may be used for any type, not just arrays.
15424 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15426 * class.c, class.h: added mono_class_array_element_size ().
15427 Ignore static methods in interfaces.
15429 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15431 * threads.c: fixed the build under cygwin.
15433 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15435 * reflection.c: handle nullref constants. Allocate keys for
15436 reflection handles with the GC.
15438 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15440 * threads.c, threads.h: added mono_thread_get_abort_signal()
15441 to get a suitable signal for thread abort.
15443 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15445 * metadata.c: fix handling of ExportedType table.
15447 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15449 * icall.c: added WriteWindowsDebugString internal call.
15451 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15453 * reflection.h: added fields to match C# implementation.
15455 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15457 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15459 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
15461 * gc.h, gc-internal.h: Rename header for GC internal calls to
15462 gc-internal.h from gc.h as to not clash with Boehm GC having its
15463 header installed as <gc.h> in outside include paths.
15464 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15465 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15467 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15469 * icall.c: assign minor, build and revision in FillName.
15471 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
15473 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15474 Added support for running code generated by Reflection.Emit.
15476 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15478 * appdomain.c: check for NULL argument in LoadFrom.
15480 2002-12-10 Dick Porter <dick@ximian.com>
15482 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15484 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15486 * appdomain.c: fix buglet when building exe file name. Handle full
15487 assembly name (needed after latest changes to AssemblyName).
15489 (mono_image_close): free some hashtables.
15491 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
15493 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
15494 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
15495 on some systems (redhat 7.3)
15497 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15499 * threads.c: delete the critical section of a sync block,
15500 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15502 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15504 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15506 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15508 * appdomain.[ch]: handle the assembly preload event to try loading the
15509 assemblies using the paths we have in the current domain.
15511 * assembly.[ch]: created an assembly preload hook that is called to try
15512 loading the assembly by other means that the ones provided here.
15514 * domain.c: initialize the domain search path.
15516 From now on, assemblies (TODO: except corlib and System) are loaded
15517 according to these rules when using mono_assembly_load ():
15519 1. It tries to load the assembly from the ApplicationBase
15520 of the current domain appending .dll and .exe (TODO: have to
15521 try loading from name/name.dll and name/name.exe).
15523 2. It tries the search path specified in PrivateBinPath for the
15524 current domain (if any).
15526 3. Previous behavior.
15528 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15530 * icall.c: implemented GetInterfaceMap() related icall.
15531 * domain.c, loader.h: load MethodInfo in mono_defaults.
15533 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15535 * gc.c: disable the finalizer thread for now, untill all the issues
15536 with it are resolved.
15538 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15540 * string-icalls.c: handle embedded nulls in string ctor when the
15541 length is specified.
15543 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15545 * class.c: look for explicit interface implementation in parent
15548 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
15550 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
15552 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15554 * gc.c: protect handles with a critical section.
15556 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15559 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15560 parameters. If no assembly specified, try getting the type from all
15561 the assemblies in the current domain, else, load the assembly and get
15564 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15566 * marshal.c: applied patch from Aleksey Demakov that fixes
15567 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15569 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15571 * icall.c: fixed get_location.
15573 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
15575 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15576 declarations to make it work with older gcc.
15578 * loader.c (mono_get_method): set signature->pinvoke for native calls
15580 2002-11-20 Dick Porter <dick@ximian.com>
15582 * threads.c (mono_thread_init): Set the main thread's handle
15584 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15586 * gc.c: allow compilation without GC support. Changed to match the
15589 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15591 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15593 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15595 * reflection.c: set a public key token on the core assemblies.
15597 2002-11-18 Dick Porter <dick@ximian.com>
15599 * threads.c: Split out some thread initialisation so that other
15600 files can set the start callback function.
15602 * gc.c: Run finalisers in a separate thread, to avoid stack
15603 overflow. Fixes bug 31333.
15605 * appdomain.c: Set up GC finalisation thread.
15609 * domain.c: Use gc.h macros for GC_malloc
15611 2002-11-15 Dick Porter <dick@ximian.com>
15615 * appdomain.c: Removed mono_runtime_init_with_attach(),
15616 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15617 merging the extra parameter with the existing function. Removed
15618 unneeded code in mono_thread_attach().
15620 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
15622 * image.c (mono_image_loaded_by_guid): a method to get loaded
15624 (load_metadata_ptrs): we store the guid as string.
15626 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
15628 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15630 * metadata.c (mono_guid_to_string): imported method form Zoltan
15631 Varga (slightly modified)
15633 * assembly.c (mono_assembly_open): load precompiled code
15635 * loader.h (MonoMethod): we store the method token for use in the
15638 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15640 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15641 the hook function called when an assembly is loaded.
15643 * domain.c: Modified file.
15644 (mono_domain_assembly_load): removed hash table insertion of assemblies.
15648 2002-11-07 Miguel de Icaza <miguel@ximian.com>
15650 * reflection.c: Map PEFileKind to the value expected by the WinNT
15653 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15655 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15656 Read until the buffer is filled completely.
15658 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15660 * icall.c: implemented MonoType.InternalGetEvent ().
15662 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15664 * appdomain.c: implemented InitAppDomainSetup. Delayed
15665 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15666 the entry_assembly.
15668 * assembly.c: base_dir is now an absolute path ending with
15671 * icall.c: modified get_location according to the above changes.
15673 * object.c: init AppDomain.SetupInformation for the default domain after
15674 we have the entry assembly.
15676 * domain.c: when unloading a domain, setup = NULL.
15678 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
15680 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15682 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15684 * object.h, object.c: introduced mono_object_get_virtual_method ()
15685 to lookup the method invoked on an object when a callvirt is done on
15687 * icall.c: make MethodInfo::Invoke() always do a virtual call.
15689 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15691 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15692 current domain when loaded an assembly and failed to load it.
15694 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15696 2002-10-31 Dick Porter <dick@ximian.com>
15700 * file-io.c: Return the error status in a parameter, as the
15701 GetLastError() value has long since been blown away if we try and
15702 look it up in a subsequent internal call invocation. Delete the
15703 GetLastError() internal call, because it's useless.
15705 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
15707 * class.[ch]: added cast_class to fix bug 29517
15709 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15711 * marshal.c: create valid IL code in the filter clause:
15712 the new JIT is less forgiving:-)
15714 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15716 * icall.c: removed get_property internal call.
15718 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
15720 * appdomain.h domain.c: Added an ID to appdomains.
15722 * threads.c threads.h icall.c: Implement icall
15723 Thread:GetDomainID(), and remove unused icall
15724 CurrentThreadDomain_internal.
15726 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15728 * icall.c: Don't recurse through the base types in GetConstructor.
15731 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15733 * mempool.h, mempool.c: added mono_mempool_empty() and
15734 mono_mempool_stats().
15736 2002-10-23 Dick Porter <dick@ximian.com>
15740 * icall.c: Added MonoIO.GetFileType internal call
15742 2002-10-17 Dick Porter <dick@ximian.com>
15744 * appdomain.c (mono_runtime_cleanup): Don't signal the async
15745 delegate semaphore before waiting for all threads to finish,
15746 because new threads can also call async delegates. Fixes bug
15749 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15750 of 3 seconds, in case another async job is queued. (This part is
15751 needed because the bug fix reintroduced the 3s exit lag.) This
15752 makes the mono_runtime_shutdown flag superfluous.
15754 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15756 * reflection.c: include ehader size in method section headers.
15757 Really check for suplicated modules entries.
15759 2002-10-17 Martin Baulig <martin@gnome.org>
15761 * debug-mono-symfile.c: Added back support for locals.
15763 2002-10-14 Martin Baulig <martin@gnome.org>
15765 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15768 2002-10-14 Martin Baulig <martin@gnome.org>
15770 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15771 mono_class_get() instead of looking in the class cache.
15773 2002-10-13 Martin Baulig <martin@gnome.org>
15775 * debug-mono-symfile.c: Set version number to 28, include the
15776 signature in method names.
15778 2002-10-13 Martin Baulig <martin@gnome.org>
15780 * debug-mono-symfile.h: Set version number to 27.
15782 2002-10-11 Martin Baulig <martin@gnome.org>
15784 * gc.c: Don't register/unregister NULL pointers as disappearing links.
15786 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15788 * metadata.c, metadata.h: added helper function to allocate signatures.
15790 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15792 * icall.c: added internal call to get the location of machine.config.
15794 2002-10-08 Martin Baulig <martin@gnome.org>
15796 * debug-mono-symfile.c: Ignore classes with a pending init for the
15799 2002-10-03 Dick Porter <dick@ximian.com>
15801 * threads.c: Freebsd pthread_t is a pointer
15803 2002-10-03 Dick Porter <dick@ximian.com>
15805 * socket-io.c: Implemented GetHostName_internal
15807 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15810 (mono_config_parse_file): don't leak the text.
15812 2002-10-02 Martin Baulig <martin@gnome.org>
15814 * debug-mono-symfile.c: Added support for methods.
15816 2002-10-01 Martin Baulig <martin@gnome.org>
15818 * debug-mono-symfile.c: Don't emit methods and line numbers for
15819 the dynamic symbol file, just write the type table. We can easily
15820 have an external helper program which creates a symbol file for an
15823 2002-10-01 Dick Porter <dick@ximian.com>
15825 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15826 Only add the handle to the cleanup array when we're about to
15827 launch the thread. Bug 31425 deadlocked when the test was run on
15830 2002-10-01 Martin Baulig <martin@gnome.org>
15832 * debug-mono-symfile.c: Added support for properties.
15834 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15836 * reflection.c: unaligned store fix from Mark Crichton
15837 <crichton@gimp.org>.
15839 2002-09-27 Martin Baulig <martin@gnome.org>
15841 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15844 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15846 * assembly.h, assembly.c: use a sane API to hook into the assembly
15847 loading process instead of a useless special-purpouse hack
15848 (ngen needs a hook, too, for example).
15850 2002-09-27 Dick Porter <dick@ximian.com>
15852 * threads.c (mono_thread_init): Call GetCurrentProcess() so
15853 io-layer can set up some process handle info. Not needed on w32,
15854 but doesn't hurt either.
15856 * process.c: Pass the program name in the second parameter to
15857 CreateProcess, so the path is searched. Include the working
15858 directory. Implemented process name, process enumeration, and some
15859 process detail internal calls.
15861 * icall.c: Added internal calls for process lookup, and some
15864 2002-09-26 Martin Baulig <martin@gnome.org>
15866 * assembly.c (mono_install_open_assembly_hook): New global
15867 function to install a function to be invoked each time a new
15868 assembly is loaded.
15869 (mono_assembly_open): Run this callback function if set.
15871 * debug-mono-symfile.c: Put back line numbers for the dynamic
15872 symbol file and also record the .il file as source file. This
15873 allows us to install the temporary symbol file as `file.dbg' just
15874 like a compiler-generated one.
15876 2002-09-26 Nick Zigarovich <nick@chemlab.org>
15878 * Corrected typo in gc.c (BOHEM vs BOEHM).
15880 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15882 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15883 GetProperties. Also avoid calling g_slist_length in GetProperties and
15886 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15888 * reflection.c: avoid unaligned stores (bug spotted by
15889 Mark Crichton <crichton@gimp.org>).
15891 2002-09-25 Martin Baulig <martin@gnome.org>
15893 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15894 instead of guint64 for addresses and added prologue/epilogue info.
15896 2002-09-25 Martin Baulig <martin@gnome.org>
15898 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15899 store line number info. For the dynamic symbol file, we only need
15900 to provide the JIT generated dynamic line number info for the dynamic
15903 2002-09-25 Martin Baulig <martin@gnome.org>
15905 * debug-mono-symfile.h: Incremented version number.
15907 2002-09-24 Martin Baulig <martin@gnome.org>
15909 * class.c (mono_debugger_class_init_func): New global function
15911 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15914 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15915 function. This is called via the mono_debugger_class_init_func
15916 hook to add all types to the dynamic type table.
15917 (ves_icall_MonoDebugger_GetType): New interncall to get a class
15918 from its metadata token.
15920 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15921 New interncall for the debugger.
15923 2002-09-24 Nick Drochak <ndrochak@gol.com>
15925 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15926 before using it in case it is null.
15928 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15930 * metadata.c: allow custom modifiers in local var signatures
15931 (bug spotted by Zoltan Varga).
15933 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15935 * class.c: deal with the <Module> class that may have a NULL vtable.
15936 Eliminate warnings.
15938 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15940 * image.c, image.h: more strong name helpers.
15941 * monosn.c: more work: convert pem keys to cryptoapi format.
15943 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15945 * string-icalls.c: speedup IndexOf.
15947 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15949 * icall.c: updates from Zoltan.2.Varga@nokia.com.
15951 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15953 * icall.c: cleanup: use mono_object_domain ().
15955 2002-09-23 Martin Baulig <martin@gnome.org>
15957 * debug-mono-symfile.c: Improved type support.
15959 2002-09-22 Martin Baulig <martin@gnome.org>
15961 * debug-mono-symfile.c: Added support for reference types and strings.
15963 2002-09-22 Martin Baulig <martin@gnome.org>
15965 * debug-mono-symfile.c: Started to work on the type table.
15967 2002-09-21 Martin Baulig <martin@gnome.org>
15969 * debug-mono-symfile.c: Largely reworked the symbol table format.
15970 The symbol table is now incrementally updated each time a new
15971 method is added. We're now also using our own magic and version
15972 so that you don't need to recompile all your classes if the
15973 dynamic table changes.
15974 (mono_debug_update_mono_symbol_file): Removed.
15975 (mono_debug_symfile_add_method): New function to add a method.
15977 2002-09-21 Martin Baulig <martin@gnome.org>
15980 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15983 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15984 New interncall to get a method from its metadata token.
15986 2002-09-21 Martin Baulig <martin@gnome.org>
15988 * debug-mono-symfile.c: Create type table.
15990 2002-09-20 Martin Baulig <martin@gnome.org>
15992 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15994 2002-09-20 Martin Baulig <martin@gnome.org>
15996 * debug-mono-symfile.c: Provide information about params and locals.
15998 2002-09-20 Martin Baulig <martin@gnome.org>
16000 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16003 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16004 interncall to get a method from its metadata token.
16006 2002-09-20 Martin Baulig <martin@gnome.org>
16008 * debug-mono-symfile.c: Added a few checks for method->header
16009 being non-NULL. This should never happen, but for the moment
16010 let's use a g_warning() rather than a g_assert().
16012 2002-09-19 Mark Crichton <crichton@gimp.org>
16014 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16015 even if support for it isn't present. Added an #ifdef to fix this.
16017 * socket-io.c: Added checks back for Solaris support.
16019 2002-09-19 Martin Baulig <martin@gnome.org>
16021 * debug-mono-symfile.c (read_string, write_string): Reflect latest
16022 changes in the symbol file format.
16024 2002-09-18 Martin Baulig <martin@gnome.org>
16026 * debug-mono-symfile.c: Set version number to 21.
16028 2002-09-18 Dick Porter <dick@ximian.com>
16030 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16031 on netbsd. Fixes bug 30051.
16033 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16036 (set_version_from_string): little fix.
16038 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16040 * monosn.c, Makefile.am: added strong name utility.
16041 * reflection.h, reflection.c: implemented delayed signing,
16042 locale, version and hash id assembly attributes.
16044 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16046 * loader.c, metadata.c: load param attributes in signatures.
16048 2002-09-16 Martin Baulig <martin@gnome.org>
16050 * debug-mono-symfile.c: Added string table with all method names.
16052 2002-09-14 Martin Baulig <martin@gnome.org>
16054 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16055 fast method lookup.
16057 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16059 * reflection.c: record the public key token of referenced assemblies.
16061 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16063 * image.c, image.h: added functions to get the strong name and the
16064 public key of an assembly.
16065 * pedump.c: use them.
16067 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
16069 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16071 2002-09-12 Miguel de Icaza <miguel@ximian.com>
16073 * marshal.c (mono_marshal_get_managed_wrapper): Added
16076 2002-09-11 Martin Baulig <martin@gnome.org>
16078 * gc.c: Call GC_unregister_disappearing_link() on all links when
16079 finalizing them, this is necessary to aviod a crash in boehm's
16082 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16084 * gc.c: handle GetTarget for finalized objects spotted and fixed by
16087 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16089 * icall.c: implemented MonoType::Module.
16090 * reflection.c, reflection.h: mono_module_get_object () from
16091 Tomi Pakarinen <tomi.pakarinen@welho.com>.
16093 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16095 * icall.c: ignore overridden methods in GetMethods ().
16096 Fix for FieldInfo::SetValue().
16097 * object.c: handle float/double in runtime invoke.
16099 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16101 * object.c: allow a constructor to be called again on an object.
16103 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16105 * class.h, class.c: move field layout code to it's own function and
16106 export it. Get an interface id earlier. Move fields in MonoClass
16107 so they are more cache friendly and align the bitfields.
16108 * loader.c: temporary handle get_param_names() for a runtime method.
16109 * reflection.c, reflection.h: more code to handle runtime creation of
16112 2002-09-09 Martin Baulig <martin@gnome.org>
16114 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16115 signature with the pinvoke field being set for the actual call.
16117 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16119 * icall.c: removed some unused icalls. Start of map of glib charsets
16120 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16122 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16124 * debug-helpers.c: break infinite loop (found and fixed by
16125 Holger Arnold <harnold@gmx.de>).
16127 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16129 * icall.c: target may be null in create_delegate.
16131 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16133 * marshal.c: handle a boolean return type.
16135 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16137 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16139 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16141 * gc.c: fix weakreferences.
16143 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16145 * icall.c: added icall to get default codepage.
16147 2002-09-03 Dick Porter <dick@ximian.com>
16150 * threads.c: Use MonoThread instead of MonoObject where
16153 Store running thread objects in a hash table, so that we have all
16154 the info to hand when waiting for them to finish
16155 (means we don't need OpenThread() any more, so mingw builds should
16156 be fully functional again.)
16159 * object.h: Added thread ID to MonoThread
16161 2002-09-03 Martin Baulig <martin@gnome.org>
16163 * icall.c (System.Reflection.Assembly::get_location): New interncall.
16165 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16167 * icall.c: fixed leak in get_temp_path. Thanks lupus.
16169 2002-09-03 Martin Baulig <martin@gnome.org>
16171 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16172 argument to store the end address of the disassembled instruction.
16174 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16175 here from debug-symfile.h.
16176 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16177 JIT into this struct.
16178 (MonoSymbolFile): Added `char *image_file' field.
16179 (MonoDebugGetMethodFunc): Removed.
16180 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16181 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16182 (mono_debug_find_method): New method.
16184 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16185 create a full symbol file.
16186 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16187 and static symbol files.
16188 (mono_debug_find_method): The symbol file keeps an internal method hash,
16189 call this to get a MonoDebugMethodInfo from a MonoMethod.
16191 * debug-symfile.[ch]: Removed.
16193 2002-08-29 Miguel de Icaza <miguel@ximian.com>
16195 * image.c (do_mono_image_open): Remove linker version check.
16197 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
16199 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16200 wrappers for instance methods.
16202 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16204 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16206 2002-08-28 Dick Porter <dick@ximian.com>
16208 * Makefile.am: Export HOST_CC for w32 builds
16210 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16212 * file-io.c process.c: MonoString are null terminated, no
16213 need for mono_string_to_utf16() anymore.
16215 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16217 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16219 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16221 * icall.c, reflection.h: speedup System.MonoType.
16223 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16225 * reflection.c: allow null as the value of a string argument in
16226 custom attributes constructors.
16228 2002-08-27 Martin Baulig <martin@gnome.org>
16230 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16231 `trampoline_address' field.
16233 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
16235 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16236 check (fixes bug #29486)
16238 2002-08-27 Martin Baulig <martin@gnome.org>
16240 * debug-mono-symfile.c: Changed the file format in a way that allows us
16241 open it read-only and to use a specially malloced area for all the
16242 dynamic data. We can now also generate a symbol file on-the-fly if we're
16243 debugging IL code and there is no MCS generated symbol file for it.
16245 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16247 * object.c: added a define for a good string and array
16248 creation speedup (not enabled by default because we need to deal with
16251 2002-08-26 Martin Baulig <martin@gnome.org>
16253 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16254 function to create a dynamic symbol file. This is used by the
16255 debugger to create a symbol file for IL code on-the-fly.
16257 2002-08-26 Martin Baulig <martin@gnome.org>
16259 * loader.c (mono_lookup_pinvoke_call): Include the error message
16260 from g_module_error() in the error message.
16262 2002-08-24 Martin Baulig <martin@gnome.org>
16264 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16265 function to update the symbol file. The symbol file is mmap()ed
16266 writable, but private. This allows us to install the symbol file
16267 together with the assembly.
16269 2002-08-24 Martin Baulig <martin@gnome.org>
16271 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
16272 but they can read the new symbol file format which mcs is now creating.
16274 * debug-symfile.c (mono_debug_find_source_location): Moved to
16275 debug-mono-symfile.c; this is now operating on the new symbol file.
16277 2002-08-23 Martin Baulig <martin@gnome.org>
16279 * debug-helpers.c (mono_method_desc_from_method): New function to get
16280 a MonoMethodDesc from a MonoMethod.
16282 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16284 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16285 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16287 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16289 * string-icalls.[ch]: make helper methods static.
16291 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16293 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16294 types to it and to SetValueInternal.
16296 * object.c: Moved handle_enum label to its proper place. This was the
16299 This time i compiled mcs and gtk-sharp and they both work.
16301 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16303 * icall.c: reverted partially my previous patch until
16304 object.c:set_value handles enums correcly.
16306 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16309 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16310 (ves_icall_System_Environment_get_MachineName): removed warning when
16311 compiling under cygwin.
16313 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16315 * object.c: fixed field_get_value() for reference types.
16317 2002-08-22 Dick Porter <dick@ximian.com>
16319 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16320 Don't free a buffer while it's still needed. Patch from Jonathan
16321 Liger <Jonathan.liger@wanadoo.fr>
16323 2002-08-21 Miguel de Icaza <miguel@ximian.com>
16325 * icall.c (ves_icall_System_Environment_get_Platform): Add new
16328 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
16330 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16331 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16333 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16334 we call unmanaged code which throws exceptions.
16336 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16338 * appdomain.h: added per-domain entry_assembly.
16339 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16341 * icall.c: Assembly::GetEntryAssembly icall.
16342 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16343 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16345 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16347 * appdomain.h, gc.c: added mono_domain_finalize ().
16349 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16352 (mono_print_unhandled_exception): changed g_warning by g_printerr
16353 because g_log has a 1024 characters limit (yeah, i got a big stack
16354 trace). Don't print exception name, that should be in ToString
16357 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16359 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16360 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16362 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16365 (mono_print_unhandled_exception): after previous commit, i realized
16366 that MS calls ToString on the exception. I changed this function to
16367 do that. This way we get stack_trace for free.
16369 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16372 (mono_print_unhandled_exception): invoke Message property instead of
16373 getting 'message' field from Exception. Don't allocate memory for
16374 'trace' and 'message' if not needed.
16376 2002-08-18 Dick Porter <dick@ximian.com>
16378 * unicode.c: Fix asserts to match Encoder.cs checks
16380 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16382 * marshal.c: fix unaligned store issue and a few wrong
16383 opcode argument types.
16385 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16387 * icall.c: added GetUninitializedObjectInternal internal call.
16389 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
16391 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16392 to the right domain.
16394 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
16396 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16398 * class.c (class_compute_field_layout): set blittable to false for Strings
16400 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16402 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16404 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16405 first chunk of code to create types at runtime. Code to
16406 handle ReflectedType/DeclaringType. Make reflection handles
16409 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16411 * class.c: set correct name in arrays.
16413 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
16415 * appdomain.c (mono_domain_transfer_object): make it work with
16416 valuetypes. bug fixes.
16418 2002-08-12 Dick Porter <dick@ximian.com>
16420 * object.h: Rename some parameters to avoid c++ keywords (Patch
16421 from Joseph Wenninger <kde@jowenn.at>)
16423 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16425 * icall.c: added icall to implement Assembly.GetFile*.
16427 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16429 * reflection.h, reflection.c: code to embed managed resources.
16431 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16433 * class.c: move all the type size stuff into
16434 class_compute_field_layout().
16436 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16438 * class.c: ensure enums have always the correct instance size.
16439 * unicode.c: remove wrong assert.
16441 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16443 * assembly.c: fix mem corruption issue.
16444 * image.h, image.c: added mono_image_get_resource () to access
16446 * icall.c: implemented Assembly.EntryPoint property and some
16447 Managed Resources related internalcalls.
16450 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16452 * image.c, image.h: impemented mono_image_get_entry_point ().
16453 * appdomain.c: use mono_image_get_entry_point.
16455 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16457 * reflection.c: support the object type argument when loading
16460 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
16462 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16463 String as return type.
16465 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16467 * reflection.c: fix encoding of named args for custom attrs to match
16468 the ms implementation. Read them back when instantiating custom
16471 2002-08-02 Radek Doulik <rodo@ximian.com>
16473 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16474 by Dietmar as quick fix
16475 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16476 16 as stack size, used on more places as quick fix before Dietmar
16477 will fix it properly
16479 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16481 * object.h, object.c: added accessors for fields and properties.
16483 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16485 * class.c, class.h: made mono_class_get_field_from_name ()
16486 loop on parent types.
16487 Added mono_class_get_property_from_name ().
16489 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16491 * class.c, class.h: move the code to setup the type vtable in its own
16492 function so that it can be reused also for types created at runtime.
16493 Eliminate the "class" identifier from the header file.
16494 * reflection.c: setup the vtable for enums so that we can create
16495 objects for use in SetConstant ().
16497 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
16499 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16500 instead of the delegate itself as this pointer (bug #28383)
16502 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
16504 * marshal.c (mono_marshal_get_managed_wrapper): added return type
16507 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16509 * loader.c: don't set the pinvoke bit on icalls.
16511 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
16513 * debug-helpers.c (mono_method_full_name): only print a number to
16514 indicate wrapper type (so that the output is more readable in traces).
16516 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
16518 * class.c (mono_class_init): include method override patch from Paolo
16520 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16522 * icall.c: fixed GetTypeCode().
16524 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
16526 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16527 use real delegate invoke function to make it work with multicast
16528 delegates (fix bug# 28291).
16530 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16532 * object.c: load constant strings.
16534 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16536 * reflection.c: no magic numbers.
16537 * tabledefs.h: security action enum.
16539 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16541 * assembly.c: fix possible memory corruption.
16543 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16545 * reflection.h, reflection.c: added support for linking resources.
16546 * verify.c: check we have an updated corlib.
16548 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
16550 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16552 (mono_marshal_string_array): null terminate unmanaged string arrays.
16553 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16555 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16557 * icall.c: Type.GetType () can now return also types from the
16560 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16562 * loader.h, loader.c: stack walking support.
16563 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16564 GetCallingAssembly.
16566 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
16568 * marshal.c: added optimisations for blittable types
16570 * class.c (mono_array_class_get): do not set blittable attribute on arrays
16571 (mono_class_setup_mono_type): set blittable attribute for single
16574 * marshal.c (mono_string_utf8_to_builder): impl.
16575 (mono_string_builder_to_utf8): impl.
16576 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16578 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
16580 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16581 (mono_marshal_get_managed_wrapper): impl. byref types
16583 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16586 (search_method): don't display debug message.
16588 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16590 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16592 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16594 * appdomain.c: set the missing filename when throwing exception.
16596 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16598 * metadata.c (mono_type_size): code cleanup
16599 (mono_type_stack_size): removed some test code
16601 2002-07-21 Miguel de Icaza <miguel@ximian.com>
16603 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16604 mono_get_exception_file_not_found now.
16606 * exception.c (mono_exception_from_name_two_strings): New version
16607 that will call a constructor with two string arguments.
16608 (mono_get_exception_file_not_found): New helper routine, used to
16609 report file-not-found errors.
16611 2002-07-20 Dick Porter <dick@ximian.com>
16614 * process.c: Pass file handles to CreateProcess
16618 * file-io.c: Implemented CreatePipe
16620 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16622 * metadata.c (mono_get_param_info): set alignment for value types
16624 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16626 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16627 Constify mono_domain_assembly_open().
16628 * loader.c: handle null namespace in icalls.
16630 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16632 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16633 (emit_str_to_ptr_conv): marshal object as structs
16635 * metadata.c (mono_type_to_unmanaged): marshal object as structs
16637 * marshal.c (mono_marshal_get_runtime_invoke): support value types
16639 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
16641 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16642 (mono_marshal_get_native_wrapper): we an now return value types
16644 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16646 * verify.c: more checks implemented.
16648 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
16650 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16652 (mono_marshal_get_native_wrapper): allow byref arguments
16653 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16654 impl. PtrToStringXXX methods
16655 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16656 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16657 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16658 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16659 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16661 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16663 * reflection.c: fix buglet in parsing an assembly name.
16665 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16667 * marshal.c (emit_ptr_to_str_conv): first impl.
16669 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16671 * object.c, class.h: cache the vtable in the class as suggested by
16672 vargaz@freemail.hu (Zoltan Varga).
16674 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16676 * class.h, loader.c: added mono_field_from_token().
16677 * verify.c: first cut of type checking code.
16679 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16681 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16683 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
16685 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16687 (mono_marshal_get_remoting_invoke): impl.
16688 (mono_delegate_begin_invoke): impl.
16689 (mono_mb_emit_save_args): impl.
16690 (mono_delegate_end_invoke): impl.
16691 (mono_marshal_get_delegate_begin_invoke):
16692 (mono_marshal_get_delegate_end_invoke):
16693 (mono_marshal_get_delegate_invoke): generate a special name for
16694 those methods (including the signature) and associate them whith
16695 the delegate class.
16697 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16700 (mono_reflection_type_from_name): now it has a MonoImage parameter
16701 which is used as the default image to search the type in. If the image
16702 is NULL or getting the type from it fails, it defaults to corlib.
16704 * icall.c: changed 1 call to mono_reflection_type_from_name to match
16707 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16709 * reflection.c: update the parameter table index.
16711 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16713 * domain.c: don't include the mark byte in the string hash.
16715 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16717 * icall.cs: icall for Type.GetTypeCode ().
16718 * verify: a couple of fixes and disabled local initialization checks.
16720 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
16722 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16724 * debug-helpers.c (mono_method_full_name): print the type of the
16727 * metadata.c (mono_signature_hash): a hash function for signatures
16728 (mono_signature_hash): better hash algorithm
16730 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16732 * debug-helpers.c (mono_method_full_name): this can now generate
16733 method names with signatures
16735 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16736 method dont have this pointers.
16738 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16740 * reflection.c: fixup typebuilder tokens.
16741 * image.c: fix buglet.
16742 * marshal.h: remove whitespace.
16743 * metadata.h, metadata.c: reinstate code that was removed.
16744 * verify.c: handle catch directives and fix another couple of bugs.
16746 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
16748 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16749 (mono_marshal_get_native_wrapper): make it comp. with the old code
16750 (mono_marshal_get_native_wrapper): support boolean
16751 (mono_marshal_get_managed_wrapper): support more types
16753 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
16755 * class.c (class_compute_field_layout): compute class->blittable attribute.
16757 2002-07-09 Dick Porter <dick@ximian.com>
16759 * threads.c: Make the thread cleaning up cope with threads that
16762 2002-07-08 Radek Doulik <rodo@ximian.com>
16764 * reflection.c (method_encode_code): use non-translated values to
16765 compute finally_start, this fixes exception handling on ppc, yay!
16767 * decimal.h (struct signscale): fix endianess
16769 2002-07-07 Radek Doulik <rodo@ximian.com>
16771 * reflection.c: swap box_val and not val
16773 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16775 * reflection.c, reflection.h: handle full assembly info in type name.
16776 Handle Type arguments when loading custom attributes.
16777 * icall.c: updated to use new mono_reflection_type_from_name () method.
16779 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16782 (method_from_memberref): also print assembly name when method not found.
16784 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16787 (ves_icall_TypeGetProperties): fixed bug #27473.
16789 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16791 * reflection.c: display image name and token when cannot find the
16792 .ctor for an attribute.
16794 2002-07-05 Martin Baulig <martin@gnome.org>
16796 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16798 2002-07-04 Dick Porter <dick@ximian.com>
16800 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16801 compile on mingw. This will cause mingw builds to not wait for
16802 subthreads to terminate after the main thread does. I've lodged a
16803 bug with the mingw developers for them to wrap OpenThread().
16805 2002-07-03 Dick Porter <dick@ximian.com>
16807 * threads.c: Store thread IDs instead of handles, because
16808 GetCurrentThread() returns a pseudohandle and therefore stores
16809 useless values. mono_thread_cleanup() continues checking the
16810 array of threads until it is empty, to cope with subthreads
16811 spawning new threads after the main thread has finished.
16815 * profiler-private.h: Pass the thread ID to thread profiler
16816 functions, instead of a handle
16818 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16820 * verify.c: fixes to make it more usable.
16821 * pedump.c: added --verify code to verify IL code in an assembly.
16823 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16825 * reflection.c: turn errors into warnings to allow compiling corlib.
16827 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16829 * reflection.c: add special cases to compile corlib.
16831 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16833 * reflection.c: handle properties with only a set method.
16835 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16837 * opcodes.h: add enum with opcodes in opval order.
16839 2002-07-01 Dick Porter <dick@ximian.com>
16842 * object.c (mono_runtime_run_main): Removed unneeded argument
16844 2002-06-28 Martin Baulig <martin@gnome.org>
16846 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16848 2002-06-27 Dick Porter <dick@ximian.com>
16850 * threads.c: Store the handle in both the parent thread and in the
16851 subthread, to minimise the time between starting a new thread and
16854 2002-06-26 Dick Porter <dick@ximian.com>
16856 * appdomain.c (mono_runtime_cleanup): Close the socket library
16857 after all the threads have finished, not before
16859 2002-06-26 Martin Baulig <martin@gnome.org>
16861 * debug-symfile.c (mono_debug_find_source_location): Added
16862 `guint32 *line_number' argument. If it's not NULL, store the line number
16863 there and return the file name without the line number.
16865 2002-06-25 Dick Porter <dick@ximian.com>
16869 * process.c: Process forking and other support functions
16871 2002-06-25 Dick Porter <dick@ximian.com>
16873 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16874 things dont happen when the image is closed.
16875 (mono_image_lookup_resource): Walk the resource section looking
16876 for a particular entry
16878 * cil-coff.h: PE resource section decoding
16880 2002-06-25 Dick Porter <dick@ximian.com>
16884 (mono_assembly_foreach): Accessor functions to walk the list of
16886 (mono_assembly_set_main):
16887 (mono_assembly_get_main): Process methods need to know which
16888 assembly is the "main" one
16890 * object.c (mono_runtime_run_main): Record the main assembly
16892 * debug-helpers.c: Fix typo
16894 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
16896 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16897 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16899 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16901 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16903 2002-06-21 Miguel de Icaza <miguel@ximian.com>
16905 * image.c (do_mono_image_open): Initialize reference count,
16906 otherwise we leak the MonoImage.
16908 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16910 * reflection.c: small tweak to handle self-hosting.
16912 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16914 * reflection.c: fix type name parse code.
16916 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16918 * reflection.c: break out of the loop.
16919 * image.c: special case corlib.
16921 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16923 * reflection.c: add all the custom attrs at the end to ensure the
16924 ctors have been properly initialized when the attributes are defined
16925 in the current assembly.
16927 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16929 * reflection.c: handle correctly multiple-nested types.
16931 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16933 * row-indexes.h: fix typos.
16934 * reflection.c: adjust for typos and fix method_def_or_ref
16935 encoding in MethodImpl table.
16937 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16939 * reflection.c: fix entry point patching (thanks Serge!).
16941 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
16943 * verify.c: add check for System.Exception
16945 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16947 * image.c, class.c: minifix for code just c&p'ed.
16948 * reflection.c: warning fix.
16949 * object.h, loader.h, domain.c: load also StringBuilder.
16951 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16953 * marshal.h, marshal.c: some support code to handle complex marshaling.
16955 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16957 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16958 Better signatures with vtable error dump.
16960 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16962 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16964 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
16966 * icall.c (ves_icall_Type_GetField): impl.
16968 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16970 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16971 to retrieve a marshal description blob for a field or param.
16973 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16975 * reflection.h, reflection.c: change order of nested type emission
16976 to avoid table corruption. The NestedTypes table is sorted.
16977 * icall.c: change order of GetConstructor results to workaround mcs bug.
16979 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16981 * reflection.h, reflection.c: handle field and param marshal
16984 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16986 * icall.c, marshal.c marshal.h: more Marshal class implementation.
16988 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16990 * reflection.c: fix call convention.
16992 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16994 * reflection.h, reflection.c: mono_image_get_memberref_token()
16995 takes a type instead of a class, now. Added
16996 mono_image_get_array_token() to create tokens for the special
16997 multi-dim array methods.
16999 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17001 * assembly.c: handle modules (no assembly table). Split
17002 loading references in its own function.
17003 * class.c: handle moduleref resolution scope.
17004 * image.c, image.h: cache module name in image.
17006 2002-06-07 Martin Baulig <martin@gnome.org>
17008 * reflection.c (mono_image_get_type_info): Only add a class layout entry
17009 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17011 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17013 * icall.c: more signature fixes that used uint instead of int.
17015 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17017 * reflection.c: fixed signature of field refs.
17019 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17021 * class.c, reflection.c: handle typerefs of nested types
17022 (both on read and when writing files).
17024 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17026 * icall.c: fix method signatures that tried to workaround the previous
17029 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17031 * debug-helpers.c: fix typo.
17033 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17035 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17036 rewrote the PE/COFF writing code (our programs are understood by the
17039 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17041 * gc.c, gc.h, icall.c: weakreference support.
17043 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17045 * Makefile.am, mono-config.c: use $(sysconfdir).
17047 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17049 * icall.c: changed default precision of Double.ToString() to 15.
17050 Fixed memory leak. Unified with Single.ToString.
17052 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17054 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17056 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17058 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17059 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17060 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17063 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17065 * debug-symfile.c, sysmath.c: yet more compilation fixes.
17067 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17069 * reflection.c, socket-io.c: more compilation fixes.
17071 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17073 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17074 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17075 unicode.c: warning and compiler compatibility fixes.
17077 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17079 * class.h, metadata.c: fixed warnings/compilation errors.
17081 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17083 * Makefile.am, mono-config.c, mono-config.h: configuration file
17085 * loader.c, loader.h: make Dll mapping configurable at runtime in the
17086 config file. Export methods to insert and lookup mappings.
17088 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17090 * reflection.c: handle types and boxed objects in custom attr
17093 2002-05-30 Martin Baulig <martin@gnome.org>
17096 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17098 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17100 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17101 to lookup the implmap row for a P/Invoke method.
17102 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17103 P/Invoke method from the runtime on an as needed basis.
17105 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
17107 * metadata.c (mono_metadata_parse_signature): impl.
17109 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17111 * class.c: handle .pack directive.
17113 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17115 * object.c: initialize static fields with RVA data.
17117 2002-05-25 Martin Baulig <martin@gnome.org>
17120 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17122 2002-05-24 Martin Baulig <martin@gnome.org>
17125 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17126 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17127 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17129 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17131 * object.c: special case string ctros in invoke.
17132 * gc.c: silly whitespace changes.
17134 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
17136 * threadpool.[ch]: impl. a threadpool that can
17137 be used by mint and mono.
17139 2002-05-22 Martin Baulig <martin@gnome.org>
17141 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17142 The first argument is now a `MonoReflectionModuleBuilder *', the return
17143 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
17144 `methods' field to get the method builder. The `token' argument is the
17147 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17148 invalid characters instead of g_assert_not_reached()ing. This seems
17149 to be the behaviour of mscorlib.
17151 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
17153 * object.c (mono_runtime_invoke_array): applied patch from Rachel
17154 Hestilow to fix bug #25104
17156 2002-05-21 Martin Baulig <martin@gnome.org>
17158 * debug-symfile.c (mono_debug_find_source_location): New function.
17159 Looks up an IL offset in the line number table and returns the source
17160 location as a string.
17162 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17165 (mono_double_ToStringImpl): changed %f by %g until we have something
17168 2002-05-21 Nick Drochak <ndrochak@gol.com>
17170 * icall.c : Use different name for Math.Pow's icall. Needed to check
17171 parameters first in C#.
17173 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17175 * icall.c, reflection.h: added icall to get info about an event.
17177 2002-05-20 Radek Doulik <rodo@ximian.com>
17179 * object.c (mono_value_box): don't use memcpy for boxing on BIG
17181 (mono_value_box): don't use memcpy for small sizes on
17182 architectures with unaligned access
17184 2002-05-20 Martin Baulig <martin@gnome.org>
17186 * reflection.c (mono_reflection_setup_internal_class): Don't crash
17187 if `tb->parent == NULL'.
17188 (mono_reflection_create_internal_class): New function. This is
17189 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17192 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17195 2002-05-19 Martin Baulig <martin@gnome.org>
17197 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17198 argument to get the length, don't default to the array length.
17200 2002-05-18 Miguel de Icaza <miguel@ximian.com>
17202 * assembly.c (mono_assembly_setrootdir): New function used to
17203 override the MONO_ASSEMBLIES directory.
17205 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17207 * icall.c: ValueType_GetHashCode() initialize local var.
17209 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17211 * reflection.c: sort custom attributes table.
17213 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17215 * reflection.c: support named args in custom attributes (write support).
17217 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17219 * reflection.c: fix finally position calculation.
17221 2002-05-15 Radek Doulik <rodo@ximian.com>
17223 * reflection.c: fixed endianess at many places
17225 * icall.c (ves_icall_InitializeArray): comment out debug msg
17227 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
17229 * object.c (mono_unhandled_exception): new function to handle
17230 unhandled exceptions.
17231 (mono_unhandled_exception): call the UnhandledException event.
17232 (mono_runtime_delegate_invoke): impl.
17234 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17236 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17237 returns the RVA, not the direct pointer to the data. Handle the case
17238 when the class size is fixed.
17240 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17242 * reflection.c: fix some endianess issues.
17244 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
17246 * object.c (mono_runtime_invoke): is now able to catch exceptions.
17248 * threads.c (mono_thread_init): added a callback which is invoked
17251 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17253 * icall.c: make GetHashCode return non-negative values.
17255 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17257 * object.c, icall.c, gc.c: revert to address-based hashcode.
17259 2002-05-13 Miguel de Icaza <miguel@ximian.com>
17261 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17263 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17265 * icall.c, class.c: special case <Module>.
17267 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
17269 * icall.c: fix bug in GetNow().
17271 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
17273 * object.c (mono_runtime_class_init): make sure that we call all
17274 static class constructors.
17276 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17278 * reflection.c: sort methodsemantics table.
17280 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17282 * reflection.h, reflection.c: honour init locals setting.
17284 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17286 * icall.c: copied Double ToStringImpl for Single ToStringImpl
17288 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17290 * reflection.c: support ContructorBuilders in attribute blob creation.
17292 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17294 * reflection.c: some changes to build a binary that can be run
17295 directly in windows.
17297 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17299 * loader.c: print a big message when an icall can't be found.
17301 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17303 * string-icalls.c: fix bug 24248.
17305 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17307 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17308 icall.c, reflection.h: separate assembly loading by pathname and by
17309 assembly name. Use the MONO_PATH env var to search for assemblies.
17311 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17313 * assembly.c, image.h: add some support for assemblies
17314 with multiple modules.
17315 * class.c, class.h: export mono_class_from_typeref().
17316 * loader.c: remove duplicated code and use mono_class_from_typeref(),
17319 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17321 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17322 documentation says (the ECMA one is correct).
17324 2002-05-02 Dick Porter <dick@ximian.com>
17326 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17327 Don't name the synchronisation mutex.
17329 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
17332 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17333 Make the prototypes match.
17334 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17338 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17339 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17340 all systems have tm.tm_zone, so use strftime() with %Z to print
17341 the timezone abreviation into a temp string.
17343 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17344 rather than mono_array_addr() on a MonoString on Big Endian
17347 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
17349 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17352 2002-04-30 Dick Porter <dick@ximian.com>
17354 * socket-io.c: Cope with SOCKET being an integer rather than a
17357 * threads.c: Added Thread_free_internal, to deal with thread
17358 handle cleanup. Moved calls to handle_store() and handle_remove()
17359 to start_wrapper(), so each can only be called once. Allocate
17360 synchronisation blocks with GC_malloc(), and use GC finalisation
17361 to close the handles.
17363 * icall.c: added System.Threading.Thread::Thread_free_internal
17365 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17367 * icall.c: support Environment.Exit, CommandLineArgs().
17369 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17371 * object.c, object.h: added mono_runtime_run_main () and
17372 mono_runtime_get_main_args () for use in System.Environment.
17374 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17376 * gc.c: fix thinko, enable actual finalization since the jit is now
17379 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17381 * gc.c, object.c: take into account that an object may be offset wrt the address
17382 returned by GC_malloc().
17384 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17386 * image.c: handle files without entries in the assembly table (modules).
17388 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17390 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
17391 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17392 allowed to be null when it's System.Object class setup.
17394 2002-04-27 Martin Baulig <martin@gnome.org>
17396 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17397 if `tb->parent == NULL' rather than crashing.
17399 2002-04-28 Nick Drochak <ndrochak@gol.com>
17401 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
17402 calling acos() where asin() should have been called.
17404 2002-04-26 Martin Baulig <martin@gnome.org>
17406 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17407 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17408 there's a subdirectory called `System', but we don't want to read that
17409 subdirectory as an assembly.
17411 2002-04-25 Martin Baulig <martin@gnome.org>
17413 * debug-symfile.c: Reflect latest MonoString changes.
17415 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17417 * rand.c, rand.h: instance method icalls need to have an explicit
17418 this pointer as first argument in the C implementation.
17420 2002-04-25 Nick Drochak <ndrochak@gol.com>
17422 * icall.c: Fix typo in map for GetNonZeroBytes
17424 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17426 * string-icalls.c : String does now passes unit tests without any
17427 errors, the following changes has been made:
17429 Implemented replace methods.
17430 Renaming of methods to (try) follow the standard.
17431 Fixed compare ordinal
17432 Made all memory allocated directly to function instead of via icall function.
17433 Small performance fix in is_in_array function
17435 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17437 c (mono_string_Internal_ctor_charp_int_int):
17438 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
17439 sindex < 0, throw ArgumentOutOfRangeException instead of
17440 ArgumentNullException.
17442 Added new check for length == 0, however
17443 I need to make it return String.Empty from the C code.
17445 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17446 that calculate the length for us here.
17448 (mono_string_Internal_ctor_sbytep_int_int): Replaced
17449 mono_string_new_utf16 with mono_string_new, since value is utf8.
17451 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17453 * object.c: register the object for finalization if needed.
17454 Allocate one more char in the string for the terminating 0 char.
17456 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17458 * class.c, class.h, image.c: check if a type implemenst a destructor.
17459 Use the proper key for array class lookups.
17460 * icall.c: register the icalls in the System.GC class.
17461 * gc.c, gc.h: GC-related functions and icalls.
17463 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17467 * unicode.c: free some strings gotten from mono_string_to_utf8 and
17468 changed a couple of free () by g_free ().
17470 * decimal.c: one-liner in the comments for decimal2string ().
17472 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17474 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17476 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17478 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17479 * object.c (mono_runtime_invoke_array) : handle null in params
17481 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17483 * string-icalls.c: fixed bug in split (one off bug)
17485 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17487 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17488 * icalls.c: added String::Equals as internal method
17490 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17492 * threads.c: fixed bug in the double interlocked functions
17494 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
17496 * threads.c: implemented all of the new interlocked icalls.
17497 * string-icalls.c: fix a bug in insert.
17498 * icalls.c: added the icalls for interlocked, removed old string functions.
17500 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17502 * loader.c: fix off-by-one error when reading argument names.
17504 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17506 * profiler.c: win32 counter implementation (untested).
17507 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17508 (the latter needs testing and more complete impl. from win32 folks).
17510 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
17512 * object.c: mono_array_new_full workaround mono_array_class_get
17515 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17517 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17518 * object.h (mono_string_chars): Changed casting type.
17520 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17522 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17523 method signatures to use gunichar2 instead of gint16.
17525 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
17527 * object.h, object.c: domain-specific versions of mono_object_new and
17530 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
17532 * object.c: changed String layout
17534 * string-icalls.c (mono_string_Internal_ctor_chara): added
17535 internal string constructors.
17537 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17539 * threads.c: pass 'this' to the thread start routine.
17541 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17543 * string-icalls.c: fix IndexOf and LastIndexOf. Now
17544 InternalCompareStr don't call twice mono_string_cmp_char for the last
17545 character. Improved performance in mono_string_cmp_char.
17547 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17549 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17550 code into its own library: libmonoruntime.
17552 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
17554 * object.h, object.c: changed array format so that szarrays do not
17555 require a bounds structure.
17556 * icall.c, appdomain.c: support for new szarray format.
17558 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17560 * metadata.c: compare also the retuns type when comparing signatures:
17561 we didn't do this as an optimization since really overloaded methods
17562 must differ also in the arguments, but this doesn't work with
17563 low-level IL code (or when using explicit conversion operators: see
17564 bug#23498 for an example).
17566 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17568 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17570 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17572 * icall.c: make MonoType::GetElementType its own icall.
17574 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17576 * icall.c: remove MonoMethod_get_Name().
17577 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17580 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17582 * string-icalls.c: optimized a few methods.
17584 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17586 * icall.c: added all new string internal calls
17587 * string-icalls.c: added, new string internal call implementation.
17588 * object.c: added mono_string_new_size for allocating a string a size
17590 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
17592 * object.c (mono_object_isinst): use the same code as in the
17593 optimized x86 version.
17595 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17597 * profiler.c: TSC-based timer code (faster and more accurate).
17598 Not hooked up in configure, yet (set USE_X86TSC to 1).
17600 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17602 * profiler.c, profiler.h: track time spent compiling methods.
17603 * threads.c: track thread creation/destruction.
17605 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17607 * profiler.c, profiler.h, profiler-private.h: profiling interface
17608 and sample implementation. Moved here so that it can be used also by
17611 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17613 * reflection.c, reflection.h: keep types and other handles separate in
17614 the hash tables for referred tokens. Add guid for modules.
17616 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17618 * assembly.c: fix bugs found with valgrind.
17619 * metadata.h, metadata.c: added mono_metadata_guid_heap().
17621 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
17623 * threads: added icall support for getting current domain for
17626 2002-04-13 Martin Baulig <martin@gnome.org>
17628 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17629 (MonoDebugVarInfo): Added `index' field for register based addresses.
17630 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17631 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17632 `MonoDebugVarInfo *params' and `guint32 this_offset' with
17633 `MonoDebugVarInfo *this_var'.
17635 * debug-symfile.c (relocate_variable): New static function to write
17636 a location description for a local variable or method parameter.
17638 2002-04-12 Martin Baulig <martin@gnome.org>
17640 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17641 stack offset and begin/end scope address of a local variable.
17642 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17643 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17644 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17646 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17647 Added new relocation types for start/end scope of a local variable.
17649 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17651 * object.h: add mono_object_domain() macro.
17652 * reflection.c: handle typespecs.
17653 * icall.c: MonoMethod::get_Name() implementation.
17655 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17657 * icall.c: String::GetHashCode() icall implementation.
17659 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17661 * icall.c: String::IndexOfAny icall.
17662 * object.c, object.h: make array->max_length more useful.
17663 Intrduced mono_object_class() and mono_string_length() macros.
17665 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17667 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17668 instead of g_unichar_isdigit.
17670 2002-04-11 Nick Drochak <ndrochak@gol.com>
17672 * icall.c: Implement a simple Double.ToString().
17674 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17676 * appdomain.h: only io-layer.h is supposed to be included.
17677 * icall.c: explicitly import environ. Fix warning.
17679 2002-04-10 Nick Drochak <ndrochak@gol.com>
17681 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17682 return true even if it's not Daylight Savings time.
17683 Only return false for the case where the function isn't
17684 implemented for a plaform (read Windows).
17686 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17688 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17691 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
17693 * mempool.c (mono_mempool_alloc): only use g_malloc when
17694 absolutely necessary.
17696 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17698 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17700 * class.c (mono_class_vtable): use domain mempool to allocate vtable
17701 (mono_class_proxy_vtable): use domain mempool
17703 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17705 * appdomain.h, appdomain.c: split initialization that requires the
17706 execution engine support into mono_runtime_init().
17708 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17710 * class.c (mono_class_init): don't include vtable inside MonoClass
17711 to save some memory, gather some statistics.
17712 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17714 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17716 * icall.c: internalcall implementation for ValueType.Equals().
17718 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
17720 * object.c (mono_message_init): moved
17721 (mono_runtime_exec_main): new arch. independent impl.
17722 (mono_runtime_invoke_array): new method - like
17723 mono_runtime_invoke, but you can pass an array of objects.
17724 (mono_remoting_invoke): new arch. independent impl.
17725 (mono_message_invoke): new arch. independent impl.
17726 (mono_runtime_class_init): new arch. independent impl.
17727 (mono_runtime_object_init): new arch. independent impl.
17729 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17731 * metadata.c, object.c, reflection.c: documented the exported
17734 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17736 * icall.c: simpler code to pass the assembly builder data to corlib.
17737 Implement GetNestedTypes() internalcall.
17739 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17741 * class.c: warn if a type can't be loaded.
17743 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
17745 * image.h: typedef MonoImageOpenStatus
17746 * types.h: removed unused file
17748 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
17750 * icall.c: Enum_ToObject accepts enum value arguments.
17752 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17754 * class.c: move initialization of properties, events and nested
17755 classes, so that they happen for interfaces, too.
17757 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17759 * icall.c: cleanup some ugly casts in Array_SetValue*.
17761 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17763 * icall.c: the values array fro enums is of the correct type, now.
17764 Implement (correctly) getFullName instead of assQualifiedName for
17766 * reflection.h, reflection.c: added mono_type_get_name ().
17768 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17770 * assembly.c, image.h: for each MonoImage, record from wich assembly
17772 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17773 Make Type.Assembly work.
17775 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
17777 * debug-symfile.h: use char* instead of gpointer to avoid
17780 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17782 * icall.c (ves_icall_InternalExecute): impl. FielSetter
17783 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17785 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
17787 * icall.c (mono_message_init): impl. (code cleanup)
17788 (ves_icall_InternalExecute): impl. FieldGetter
17790 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17791 defined we call all (non-static)methods through the vtable.
17793 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17795 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17796 finalizer even though the memory is still referenced (and the chunk of
17797 memory is not freed).
17799 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17801 * assembly.c: fix brokeness.
17803 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17805 * class.c: kill some warnings. Check explicit interface method
17806 implementation also without considering the namespace.
17807 Load also literal strings in static class data.
17809 2002-03-29 Miguel de Icaza <miguel@ximian.com>
17811 * assembly.c (default_assembly_name_resolver): Kill memory leak.
17812 (default_assembly_name_resolver): Make the resolver take the
17813 "base" directory where the assembly was originally defined, so we
17814 can load DLLs that are in the same directory as the assembly that
17815 is being referenced.
17817 2002-03-28 Dick Porter <dick@ximian.com>
17823 * unicode.c: Warning cleanups
17825 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17827 * object.h, reflection.h: use the correct type instead of MonoObject.
17829 2002-03-28 Martin Baulig <martin@gnome.org>
17831 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17832 (mono_debug_update_symbol_file): Initialize classes if necessary.
17834 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17836 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17837 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17839 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17841 * assembly.h: fix function prototype.
17842 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17843 * mono-endian.h: use const cast.
17845 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17847 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17849 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17851 * loader.c: don't assert when a typeref can't be loaded, give
17852 a chance to the runtime to trow an exception instead.
17853 * loader.h: fix warning.
17855 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17857 * class.c (mono_class_proxy_vtable): added proxy support
17859 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
17861 * icall.c: removed last of PAL calls, added System.Environment
17862 * file-io.h, file-io.c: MonoIO implementation
17863 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17865 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17867 * appdomain.c: do not use the byte marker in ldstr table lookup.
17868 * debug-helpers.c: allow two ':' to separate class and method name.
17869 * object.c: allocate arrays bounds with the GC, too.
17870 * verify: add a few more checks.
17872 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17874 * reflection.c: output also literal strings. Allocate parameter data
17875 with GC_malloc() (thanks, Martin, for catching this!).
17877 2002-03-26 Martin Baulig <martin@gnome.org>
17879 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17880 include the `this' offset in the `param_offsets'.
17882 2002-03-25 Martin Baulig <martin@gnome.org>
17884 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17885 mono_debug_get_class() function to get the classes. Added new
17886 relocation types for arrays and strings.
17887 (mono_debug_get_class): New static function to search in all
17888 referenced assemblies for a metadata token.
17890 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17892 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17894 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17895 hold gc-allocated objects. Make the string heap a stream like the
17896 others. Removed duplicated code when writing stream info.
17897 Added asserts to catch possible buffer overflows. Set the sorted map
17898 for tables that need sorting. Added some documentation.
17900 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17902 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
17903 for interned strings and vtables.
17905 2002-03-24 Martin Baulig <martin@gnome.org>
17907 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17908 it in the array since it was created with g_slist_prepend().
17910 2002-03-24 Martin Baulig <martin@gnome.org>
17912 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17913 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17914 (mono_debug_method_from_token): Renamed to
17915 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17916 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17918 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17921 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17923 2002-03-24 Martin Baulig <martin@gnome.org>
17925 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17926 (mono_debug_method_from_token): New func.
17928 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17929 New interncall, calls mono_debug_local_type_from_signature().
17930 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17931 calls mono_debug_method_from_token().
17933 2002-03-23 Martin Baulig <martin@gnome.org>
17935 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17936 specifies the number of bytes to be converted, not the array size.
17937 Return the number of chars, not the number of bytes.
17938 (ves_icall_iconv_get_chars): The `byteCount' argument
17939 specifies the number of bytes to be converted, not the array size.
17941 2002-03-23 Martin Baulig <martin@gnome.org>
17943 * reflection.h (MonoReflectionSigHelper): New type.
17945 * reflection.c (mono_reflection_sighelper_get_signature_local),
17946 (mono_reflection_sighelper_get_signature_local): New functions.
17948 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17949 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17952 2002-03-23 Martin Baulig <martin@gnome.org>
17954 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17955 is_writeable is set.
17956 (mono_raw_buffer_update): New function to write the modified map
17959 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17961 * debug-symfile.c (mono_debug_update_symbol_file): Call
17962 mono_raw_buffer_update() when done writing.
17964 2002-03-23 Martin Baulig <martin@gnome.org>
17966 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17968 * debug-symfile.c: Added support for arguments and local variables.
17970 2002-03-23 Dick Porter <dick@ximian.com>
17972 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17973 protected by ifdefs, hence breaking the w32 build.
17975 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17977 * object.c: implement is_interned() the right way.
17979 2002-03-21 Martin Baulig <martin@gnome.org>
17981 * debug-symfile.[ch]: New files to handle debugging information
17982 files. There's also support to dynamically update these symbol
17983 files to include machine dependent information.
17985 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
17987 * threads.c (mono_thread_create): new function to create thread
17990 2002-03-20 Martin Baulig <martin@gnome.org>
17992 * icall.c (ves_icall_InternalInvoke): Create a new object if the
17993 method is a constructor.
17994 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17995 points to ves_icall_InternalInvoke().
17997 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
17999 * file-io.c: Flush shouldn't throw exceptions.
18001 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
18003 * file-io.c: FileStream flush support; FileSetLength now
18004 restores file pointer.
18006 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18008 * class.c: set image for pointer classes.
18010 2002/03/19 Nick Drochak <ndrochak@gol.com>
18012 * sysmath.c: Forgot one.
18014 2002-03-18 Miguel de Icaza <miguel@ximian.com>
18016 * sysmath.c: Avoid redefining existing names.
18018 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
18020 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18021 handled by runtime as icall rather than dllimport from libm.so
18022 * file-io.c, file-io.h: fixed handle argument type.
18024 2002-03-18 Dick Porter <dick@ximian.com>
18026 * reflection.c (mono_image_get_type_info): rename interface to
18027 iface, because of "#define interface struct" on windows.
18029 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18031 * class.c, class.h: rename and export mono_ptr_class_get().
18032 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18033 * reflection.c, reflection.h, icall.c: better/saner type name
18034 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18037 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
18039 * class.c (mono_class_init): removed hardcoded GHC_SLOT
18041 * icall.c (ves_icall_InternalInvoke): impl.
18043 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18045 * reflection.c: output the interface map table, too.
18047 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18049 * class.c (class_compute_field_layout): separate computation of
18050 static field layout
18052 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
18054 * icall.c: added System.Buffer support.
18055 * file-io.c: moved file icalls from PAL to FileStream.
18057 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18059 * icall.c (ves_icall_System_Object_GetHashCode): impl.
18061 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
18063 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18065 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18067 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18069 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18071 * debug-helpers.{c,h}: moved here from monograph some useful functions
18072 to locate a method by name/signature in a class or image. Included
18073 also a small and flexible IL disassembler.
18075 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18077 * reflection.c: fixup tokens in methods with small header size, too.
18079 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
18081 * object.c (mono_string_to_utf8): remove assert(!error), instead
18084 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18086 * icall.c: update to the new mono_Array_class_get interface.
18088 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18090 * appdomain.c, object.c: Boehm-GC enable.
18091 * icall.c: make get_data_chunk() support split data requests.
18092 Ensure a class is initialized in more cases. Return only the first
18093 property found in GetProperties() or the compiler gets confused.
18094 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18095 * reflection.h, reflection.c: add fixup mechanism for field and method
18096 tokens. Initialize assembly->typeref in a single place. Output
18097 properties after events. Support custom attributes for events, too.
18098 Typo fix for paramter custom attrs.
18100 2002-03-07 Martin Baulig <martin@gnome.org>
18102 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18104 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
18106 * class.c (mono_array_class_get): fix. for multi. dim. arrays
18108 2002-03-06 Martin Baulig <martin@gnome.org>
18110 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18111 non-zero lower bounds. See testcases #F10-#F13.
18113 2002-03-05 Martin Baulig <martin@gnome.org>
18115 * exception.c (mono_get_exception_argument_out_of_range): New exception.
18117 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18118 ves_icall_System_Array_GetValue(), only calculate the absolute array position
18120 (ves_icall_System_Array_SetValue): Likewise.
18121 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18122 as argument and does the actual work. This function is used when copying a
18123 multi-dimensional array.
18124 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18125 now do all the widening conversions of value types.
18126 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18128 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18130 * class.c: remove some magic numbers and use the smbolic names,
18131 instead. Added init_events() to load event info at class init time.
18132 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18133 and mono_metadata_methods_from_event().
18134 * reflection.h, reflection.c: added support for writing out the evnets
18135 related information.
18137 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18139 * reflection.h, icall.c: use a different method (GetInterfaces)
18140 to gather interface info and add isbyref, isprimitive and
18141 ispointer to the ves_icall_get_type_info() return value.
18143 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18145 * class.h: stared adding support for events.
18146 * icall.c: split find_members implementation. Added debug icall to get
18147 the address of an object.
18148 * reflection.c: handle TypeBuilders in mono_type_get_object().
18150 2002-03-01 Martin Baulig <martin@gnome.org>
18152 * icall.c (ves_icall_System_Array_GetLength): This must throw an
18153 ArgumentOutOfRangeException(), not an ArgumentException().
18154 (ves_icall_System_Array_GetLowerBound): Likewise.
18155 (ves_icall_System_Array_GetValue): Improved argument checking.
18156 (ves_icall_System_Array_SetValue): Improved argument checking.
18158 2002-03-01 Martin Baulig <martin@gnome.org>
18160 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18161 called with invalid arguments rather than just dying with g_assert().
18162 (ves_icall_System_Array_SetValue): Likewise.
18163 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18164 raise a NotImplementedException instead.
18165 (ves_icall_System_Array_GetLength): Added argument checking.
18166 (ves_icall_System_Array_GetLowerBound): Added argument checking.
18168 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
18170 * object.h (mono_assert): new macros mono_assert and
18171 mono_assert_not_reached
18173 2002-02-28 Martin Baulig <martin@gnome.org>
18175 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18176 and "System::String::IsInterned" to "System::String::_IsInterned".
18178 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18180 * icall.c: remove hacks for typebuilder. Added icall to create a
18181 modified type from a tybebuilder.
18182 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18183 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18184 to create a backing MonoClass for a TypeBuilder.
18186 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18188 * class.c, class.h: more refactoring of class init.
18189 Export mono_class_setup_mono_type() and mono_class_setup_parent().
18191 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18193 * marshal.c, marshal.h: start of marshaling interface.
18195 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18197 * icall.c: fix order in assembly qualified name icall.
18199 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18201 * class.c: do not free str, since we store it in the hash table.
18202 * reflection.h: add label field to MonoILExceptionInfo.
18203 * reflection.c: handle references to more than one assembly. Handle
18204 case when there isn't a module created in the assembly.
18206 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18208 * class.c: Fix typo. Start refactoring of class init code.
18210 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18212 * appdomain.c: exit with 1 on error.
18213 * class.c: we already have the name in MonoClassField.
18214 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18215 MonoStreamHeader instead of an offset of image->raw_metadata.
18217 2002-02-26 Miguel de Icaza <miguel@ximian.com>
18219 * appdomain.c (mono_init): Be even more descriptive about the error.
18221 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18223 * appdomain.c: give the user an informative message when corlib can't
18226 2002-02-26 Martin Baulig <martin@gnome.org>
18228 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18229 New icall to get the time zone data.
18231 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18233 * reflection.c: set virtual and raw size of section correctly.
18234 * threads.c: transfer domain information to newly created threads.
18236 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18238 * class.c: when instancing a class in a domain, load the default
18239 vaules for static fields from the constant table. Fix System.Enum to
18241 * icall.c: implement Object::GetType() internalcall. Implemented
18242 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18243 Fixed checking of binding flags in find_members().
18244 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18245 * reflection.c: handle enumerations when writing to the constant
18246 table. Use a different object cache for types.
18249 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
18251 * object.c (mono_object_isinst): fix for arrays
18253 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18255 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18257 * object.c: don't use mprotect () and fix intern pool hash table
18258 lookup for big endian systems.
18260 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18262 * icall.c: change type_is_subtype_of () signature.
18264 2002-02-21 Mark Crichton <crichton@gimp.org>
18266 * rand.c, rand.h: Added random number generator for
18267 System.Security.Cryptography classes.
18269 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18271 * icall.c: Added System.Security.Cryptography calls.
18273 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18275 * class.c, icall.c, metadata.c: better support for pointer types.
18276 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18277 * reflection.c: Add support for getting custom attrs for properties
18278 and simplify some code.
18280 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18282 * icall.c: change getToken () and add custom attribute GetBlob()helper
18284 * reflection.h: add custom attrs array to the reflection builder structures.
18285 * reflection.c: encode and emit custom attributes for all the relevant
18286 reflection objects. Cache fieldref and methodref tokens. Change
18287 mono_image_create_token() interface to take a MonoDynamicAssembly.
18288 More complete custom attributes decoder. Load custom attributes for
18289 Assembly, Field, Method and Constructor objects, too. Make the
18290 returned array an Attribute[] one, not object[]. Added
18291 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18292 custom attribute constructor.
18294 2002-02-20 Dick Porter <dick@ximian.com>
18298 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18299 problem code out for now).
18301 2002-02-19 Radek Doulik <rodo@ximian.com>
18303 * object.c (mono_ldstr): use hash table to avoid multiple swapping
18305 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18307 * icall.c: register the GetCustomAttributes method.
18308 * object.c, object.h: add mono_string_new_len ().
18309 * reflection.h, reflection.c: added mono_runtime_invoke(),
18310 mono_install_runtime_invoke(). Added
18311 mono_reflection_get_custom_attrs () to load custom attributes and
18312 create the attribute objects.
18314 2002-02-19 Dick Porter <dick@ximian.com>
18315 * threads-dummy-types.c:
18316 * threads-dummy-types.h:
18319 * threads-pthread-types.c:
18320 * threads-pthread-types.h:
18321 * threads-pthread.c:
18322 * threads-pthread.h: Deleted obsolete files
18324 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
18326 * class.c (mono_class_vtable): runtime init the class when we
18327 allocate static class data.
18329 * icall.c (ves_icall_System_Array_SetValue): check for null values.
18331 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18332 and String - but we will need generic marshalling support in the
18334 (mono_init): set the domain name in a ms compatible way
18336 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18339 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
18341 * object.c (mono_array_clone): use alloca() instead of g_malloc
18344 * appdomain.c (mono_domain_unload): impl.
18346 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18348 * appdomain.c, object.c: fix intern pool implementation.
18349 * class.c: fix alignment code.
18351 2002-02-16 Radek Doulik <rodo@ximian.com>
18353 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18354 and s2 > s1, just copy lower bytes to be compatible with little
18355 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18356 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18358 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18359 force big_endian to be 1 for big endian machines
18360 (ves_icall_iconv_new_decoder): ditto
18362 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
18364 * socket-io.c (convert_sockopt_level_and_name): If the system
18365 doesn't define SOL_IP or SOL_TCP, get them by hand using
18366 getprotobyname() and caching the values (because this could be a
18368 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18369 Use the appropriate struct when the system does support it. Ie,
18370 not all systems have struct ip_mreqn so use struct ip_mreq when
18373 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18375 * reflection.c: handle finally clauses.
18377 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18379 * socket-io.c: use g_snprintf() instead of snprintf.
18381 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18383 * reflection.c (mono_param_get_objects): Cast second argument to
18384 mono_method_get_param_names to a const char** to silence the
18387 * appdomain.c (mono_domain_assembly_open): Put parens around the
18388 truth statement in the for-loop.
18390 * unicode.c (iconv_convert): Got rid of a compiler warning about
18391 int i being unused when the system has a new iconv.
18392 (iconv_get_length): Same.
18394 * image.c (load_class_names): Cast the second argument to
18395 g_hash_table_insert() to char* to hush compiler warnings about the
18397 (mono_image_open): Same here.
18399 * socket-io.c: Don't conditionally include sys/filio.h or
18400 sys/sockio.h here anymore since we now get them from
18401 io-layer/io-layer.h
18402 (inet_pton): If the system doesn't support inet_aton, implement
18403 using inet_addr and also #define INADDR_NONE if it isn't defined
18406 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18408 * metadata.c, metadata.h: added function to get packing and size info
18410 * reflection.h, reflection.c: handle field RVA data. Save info about
18411 the table layout if needed. Assign typedef indexes to all the types
18412 before dumping the info about them to avoid forward reference problems.
18414 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
18416 * socket-io.c (convert_sockopt_level_and_name): ifdef
18417 SO_ACCEPTCONN because it is not defined on my system (old debian)
18419 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18421 * opcode.c: use stddef.h to get NULL.
18423 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18425 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18426 for FIONBIO, FIONREAD and SIOCATMARK.
18427 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18428 define INADDR_NONE and besides, inet_addr() is deprecated and
18429 should not be used. Use inet_pton() instead - it also has the
18430 added bonus that it can easily handle IPv6 addresses as well.
18431 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18433 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18435 * decimal.c: remove _MSC_VER conditional.
18437 2002-02-13 Dick Porter <dick@ximian.com>
18440 * icall.c: Internal calls for Blocking, Select, Shutdown,
18441 GetSocketOption and SetSocketOption
18443 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18445 * assembly.cs: better resolver: use it instead of some kludgy
18448 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18450 * reflection.c: the best way to speed-up the compiler is to avoid
18453 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
18455 * class.c (mono_class_vtable): changed the object layout
18456 (obj->vtable->class).
18457 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18459 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18461 * assembly.c: look for assemblies in the assembly dir, too.
18463 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18465 * class.c: fix thinko in mono_class_from_type().
18467 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18469 * exception.h, exception.c: added TypeLoadException.
18470 * object.h, object.c: added mono_array_clone ().
18471 * icall.c: handle throwOnError in AssemblyGetType().
18472 Added Array.Clone().
18473 * opcode.h, opcode.c: use a single value for the opcode val.
18474 Compile fix for non-gcc compilers.
18476 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18478 * opcodes.c, opcodes.h: export interesting info about opcodes.
18480 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
18482 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18485 * class.c (class_compute_field_layout): set element_class for enums
18486 (mono_class_create_from_typedef): set element_class for normal classes
18488 * icall.c (ves_icall_System_Enum_get_value): impl.
18490 * class.c (mono_class_create_from_typedef): do not set valuetype
18491 flag for System.ValueType and System.Enum
18493 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
18495 * unicode.c (iconv_convert): fix big endian problem.
18497 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18499 * class.c: add asserts if we are ever going to scribble over memory.
18500 * socket-io.c: not all systems have AF_IRDA defined.
18502 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
18504 * class.c (class_compute_field_layout): do not consider static
18505 fields to compute alignment
18507 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
18509 * appdomain.c (mono_appdomain_get): impl.
18510 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18512 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18514 * icall.c: ignore "file://" prefix when loading an assembly.
18516 2002-01-23 Dick Porter <dick@ximian.com>
18520 * Makefile.am: Added socket support
18522 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18524 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18525 code back. This should return the assemblies that are loaded by
18526 the runtime on behalf of an application domain.
18528 The current implementation is still broken, it just returns every
18529 assembly loaded, but until we get real applications domain this
18532 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
18534 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18537 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18539 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18540 the mono_class_from_name lookup.
18541 (ves_icall_get_parameter_info): ditto.
18542 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18544 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18546 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18548 * class.c: load also nested classes on class init.
18549 System.ValueType instance methods gets passed boxed
18550 values, unless methods in derived classed that get a pointer to the
18552 * icall.c: use better name parsing code in GetType().
18553 * image.c, image.h: add mono_image_loaded ().
18554 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18555 * reflection.c, reflection.h: added mono_reflection_parse_type().
18557 2002-01-22 Veronica De Santis <veron78@interfree.it>
18559 * icall.c : Added mapping of internal calls for Manual and Auto reset events
18560 * threads.c : Added the implementation of internal calls for events
18561 * threads.h : Added prototypes of internal calls for events
18563 2002-01-21 Radek Doulik <rodo@ximian.com>
18565 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18567 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
18569 * class.c (mono_class_init): set min_align to 1 (instead of 0)
18570 (mono_class_value_size): use min_align
18572 2002-01-20 Dick Porter <dick@ximian.com>
18575 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18576 so it compiles on w32.
18578 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
18580 * metadata.c (mono_type_stack_size): impl.
18582 * class.c (mono_class_get_field): impl. memberref token
18584 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18586 * icall.h : Added the internal calls mapping for CreateMutex_internal
18587 and ReleaseMutex_internal.
18588 * threads.h : Added the prototype of mutexes internal calls.
18589 * threads.c : Added the implementations of mutexes internal calls.
18591 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18593 * metaparse.h: removed unused file.
18594 * reflection.c, reflection.h: added stream_data_align () function
18595 to align data in streams and keep stream aligned. Add support for
18596 exception support in method headers.
18598 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18600 * unicode.c: make iconv_convert () return the number of bytess written
18601 in the output buffer.
18603 2002-01-15 Dick Porter <dick@ximian.com>
18604 * threads.c: Make the runtime's idea of infinite timeouts coincide
18605 with the class library's
18607 Fix a particularly egregious bug in mono_thread_cleanup(). That
18608 code was so utterly bogus it must have been written on a Monday.
18610 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18612 * reflection.h: add subtypes field to TypeBuilder.
18613 * reflection.c: encode constants for literal fields.
18614 Handle subtypes. Fix user string token (and add a zero byte)
18617 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
18619 * class.c (mono_class_init): bug fix: assign slot numbers for
18622 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18624 * reflection.c: don't try to output a code RVA for abstract methods.
18625 Small fixes for method header format. Output parameter info to the
18626 ParamDef table. Save method overriding info to MethodImpl table.
18627 Fix property support. Allow typedef.extends to be a type in the
18629 * verify.c: fix off-by-one error.
18631 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18633 * class.c: fix mono_class_from_mono_type () for szarray types.
18634 Remove unused cache check in mono_class_from_type_spec().
18635 * icall.c: *type_from_name () functions handle simple arrays and byref.
18636 * reflection.c: handle byref and szarray types. Handle methods without
18637 body (gets P/Invoke compilation working). Handle types and fields in
18639 * reflection.h: add rank to MonoTypeInfo.
18641 2002-01-10 Dick Porter <dick@ximian.com>
18643 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18646 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18648 * icall.c: initialize class in type_from_handle ().
18649 Loop also in parent classes for get_method ().
18650 * reflection.c: properly encode class and valuetype types.
18651 Start on encoding TypeBuilder types. Handle fieldrefs.
18652 Use correct length when registering a user string.
18653 Handle ConstructorBuilder and MonoMethod in get_token ().
18654 Make mono_type_get_object () aware of cached types.
18655 * object.c: back out change to mono_string_new ().
18657 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18658 * object.c: mono_string_new should return a NULL when the string
18659 passed in is NULL -- not try to deference it.
18661 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18663 * icall.c: hack to make IsSubType work for TypeBuilders.
18664 * reflection.c: emit constructors before methods.
18665 Retrieve param names in mono_param_get_objects().
18667 2002/01/05 Nick Drochak <ndrochak@gol.com>
18669 * Makefile.am: fix list of headers and sources so automake 1.5
18670 doesn't complain. Removed \# at end of list.
18672 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18674 * reflection.c: get token for a method ref. Set return type of
18675 constructor to void.
18676 * loader.c: debug message.
18677 * class.c: typo fix.
18679 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18681 * icall.c: fix array init with rank > 1. FindMembers
18682 loops in parent class as well.
18683 * image.c: do not insert nested types in name cache.
18684 * reflection.c: warning fix.
18685 * reflection.h: add override method (for interface impl).
18687 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18689 * metadata.c: fix customattr decoding.
18691 2001-12-21 Miguel de Icaza <miguel@ximian.com>
18693 * rawbuffer.cs: Added native Win32 implementation, avoids using
18694 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18696 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18698 * class.c: make the low-level routines handle the cache.
18700 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18702 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18704 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18706 * class.c: fix mono_array_element_size() for objects.
18707 * class.h, class.c: add properties to MonoClass and load them
18709 * icall.c: check with isinst() when assigning a value to an array
18710 instead of requiring the classes to match exactly.
18711 Implemented icall for System.Type::GetType().
18712 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18713 enums. Handle bindingflags when looking for methods and fields.
18714 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18715 and mono_metadata_methods_from_property().
18716 * reflection.h, reflection.c: added structures for propreties,
18717 parameters and enums. Implemented mono_property_get_object() and
18718 mono_param_get_objects().
18720 2001-12-18 Dick Porter <dick@ximian.com>
18722 * file-io.c: Use mono_string_to_utf16() instead of
18723 mono_string_chars()
18725 * object.c: Added mono_string_to_utf16(), which copies the non
18726 NULL-terminated MonoString into a new double-null-terminated
18729 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
18731 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18733 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
18735 * file-io.c: raise exceptions if handle is invalid.
18737 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18739 * assembly.c: yet another check for mscorlib.
18740 * class.c, class.h: load nesting info for classes.
18741 * icall.c: many new functions to support the Reflection classes.
18742 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18743 * reflection.h, reflection.c: mono_image_create_token(),
18744 mono_assembly_get_object(), mono_type_get_object(),
18745 mono_method_get_object(), mono_field_get_object(): methods to return
18746 objects that parallel the C representation of assemblies, types,
18749 2001-12-11 Dick Porter <dick@ximian.com>
18752 * file-io.c: Internal calls for file IO.
18754 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18756 * tabledefs.h: missing FileAttributes.
18757 * verify.h, verify.c: use is_valid_string () to simplify and check for
18758 valid strings more correctly. Fix warnings and speeling.
18759 Check more tables: Filed, File, ModuleRef, StandAloneSig.
18760 Check code: branches, maxstack, method calls.
18762 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
18764 * object.c (mono_object_allocate): removed static, so that the jit
18765 can allocate value types.
18767 * icall.c (ves_icall_System_DateTime_GetNow): impl.
18769 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18771 * class.c: init enum types right away and register the
18772 token->MonoClass map in mono_class_create_from_typedef ().
18773 * verify.h, verify.c: first cut of the verifier.
18774 * pedump.c: add --verify switch to verify metadata tables.
18775 * tabledefs.h: add some missing enums.
18777 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
18779 * class.c (mono_install_runtime_class_init): impl.
18780 (mono_class_init): renamed mono_class_metadata_init to
18781 mono_class_init, also removed the metadata_inited flag
18783 * object.c (mono_object_isinst): use faster algorithm
18785 2001-11-30 Radek Doulik <rodo@ximian.com>
18787 * mono-endian.h: reverted last change
18788 added function prototypes
18790 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18791 add mono-endian.c back
18793 * mono-endian.c: returned back, as Paolo pointed out, it's needed
18794 for unaligned access, I've mistaked it with endianess. I am
18796 (mono_read16): fix reverted endianess
18797 (mono_read64): ditto
18798 (mono_read32): ditto
18800 2001-11-30 Dick Porter <dick@ximian.com>
18802 * exception.c: Implement mono_exception_from_name()
18804 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18806 * metadata.h, metadata.c: remove params_size and locals_size and their
18807 calculation from the metadata code: they are only usefult to the
18810 2001-11-29 Radek Doulik <rodo@ximian.com>
18812 * object.c (mono_ldstr): swap bytes here, it's probably not the
18813 best place, but works for me now, I'll redo it once I know mono
18814 better, also note that I add PROT_WRITE and don't reset back, also
18815 note that it's only affects big endians, so x86 should be OK
18817 * mono-endian.h (read16): use just glib macros for both endians
18819 * mono-endian.c: removed as glib macros are used in in
18820 mono-endian.h so we don't need to care about endianess for read
18821 macros as glib does that for us already
18823 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18825 * class.h, class.h: take minimum alignment into consideration so
18826 that the fields of a class remain aligned also when in an array.
18828 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18830 * loader.h, loader.c: add mono_method_get_param_names().
18831 * class.c: 0-init class fields.
18833 2001-11-26 Dick Porter <dick@ximian.com>
18837 * threads.c: New file that handles System.Threading on all platforms
18840 * object.h: Remove the synchronisation struct from MonoObject,
18841 replace it with a pointer that gets initialised on demand
18843 * Makefile.am: Replace all the system-specific threading code with
18844 a single file that uses the new wrapper library
18846 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18848 * class.c, class.h: add mono_install_trampoline() so that the runtime
18849 can register a function to create a trampoline: removes the ugly
18850 requirement that a runtime needed to export arch_create_jit_trampoline.
18851 * object.h, object.c: added mono_install_handler() so that the runtime
18852 can install an handler for exceptions generated in C code (with
18853 mono_raise_exception()). Added C struct for System.Delegate.
18854 * pedump.c: removed arch_create_jit_trampoline.
18855 * reflection.c: some cleanups to allow registering user strings and
18856 later getting a token for methodrefs and fieldrefs before the assembly
18858 * row-indexes.h: updates and fixes from the new ECMA specs.
18860 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18862 * class.h, class.c: add enum_basetype field to MonoClass.
18863 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18864 to get index in the constant table reated to a field, param or
18866 * reflection.h, reflection.c: handle constructors. Set public-key and
18867 version number of the built assembly to 0.
18868 * row-indexes.h: update from new ECMA spec.
18870 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18872 * class.h, class.c: add a max_interface_id to MonoClass.
18873 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18874 since it's used to do that. Added mono_type_type_from_obj().
18875 Make GetType() return NULL instead of segfaulting if the type was not
18876 found. Handle simple arrays in assQualifiedName.
18877 * object.h: add a struct to represent an Exception.
18878 * reflection.c: output call convention in method signature.
18879 Add code to support P/Invoke methods and fixed offsets for fields.
18881 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18883 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18885 * icall.c: use mono_array_addr instead of array->vector: fixes the
18886 reflection image writing.
18887 * reflection.c: init call convention byte to 0 in method signature.
18888 Encode the property signature. Don't output property-related methods
18889 twice. Really process the properties for a type (don't cast a field to
18890 a property, my mom always told me that).
18891 Fix 64 bit issues in pointer alignment in a different and more
18894 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
18896 * loader.h: Removed type class from MonoDefaults, added monotype
18898 * loader.c: Loaded MonoType, removed loading of Type
18900 * icall.c (my_mono_new_object): Now returns a System.MonoType,
18901 and fills in System.Type._impl with a RuntimeTypeHandle rather
18902 than the actual MonoClass *
18904 (ves_icall_type_from_handle): change from type_class to
18907 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18910 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18913 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18915 (ves_icall_System_Reflection_Assembly_GetType): implemented
18917 (ves_icall_System_MonoType_assQualifiedName): implemented
18919 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18921 2001-11-09 Miguel de Icaza <miguel@ximian.com>
18923 * assembly.c (mono_assembly_open): Implement a cache for the
18926 (mono_assembly_close): only destroy the assembly when the last
18929 2001-11-09 Dick Porter <dick@ximian.com>
18931 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18933 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
18935 * class.c (mono_class_metadata_init): bug fix: compute the right slot
18937 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18939 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18940 from Martin Weindel.
18941 * object.h: add mono_string_chars ().
18943 2001-11-07 Miguel de Icaza <miguel@ximian.com>
18945 * reflection.c (build_compressed_metadata): Eliminates warnings
18946 and uses 64-bit clean code.
18948 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18949 (mono_type_equal): Change signature to eliminate warnings.
18951 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18953 * icall.c, loader.c: remove the internalcall array constructors.
18954 Changes to match the new MonoArray structure.
18955 * object.h, object.c: an array object doesn't allocate an extra
18956 vector. Add mono_array_new_full () to create jagged arrays easily.
18958 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18960 * metadata.h, metadata.c: add mono_metadata_field_info () to
18961 retreive all the info about a field from vairous tables.
18962 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18963 * class.h, class.c: augment MonoClassField with more info.
18964 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18965 policy and load a field's RVA if needed.
18967 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
18969 * class.c (mono_class_metadata_init): create a trampoline for all
18970 virtual functions instead of actually compiling them.
18972 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18974 * class.h, class.c: include name in MonoClassField.
18975 * class.c: fix fundamental type of System.Object and System.String.
18976 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18978 * icall.c: remove internalcalls for the Reflection stuff that is now
18980 * loader.c: mono_field_from_memberref () implementation.
18981 * mono-endian.c: thinko (s/struct/union/g).
18982 * object.c, object.h: make the mono_string_* prototypes actually use
18983 MonoString instead of MonoObject.
18984 * reflection.c, reflection.h: updates for changes in the reflection
18985 code in corlib: we use C structures that map to the actual C# classes.
18986 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18987 fat method header if needed and use the info from the ILGenerator for
18988 methods. Handle fields in types. Misc fixes.
18990 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
18992 * class.c (mono_class_metadata_init): bug fix: always allocate
18993 space for static class data
18995 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
18997 * class.c (mono_compute_relative_numbering): use relative
18998 numbering to support fast runtime type checks.
19000 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
19002 * class.c (mono_class_create_from_typeref): added debugging output
19003 to print class name when MonoDummy is returned instead of real class
19005 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
19007 * class.c (mono_class_metadata_init): interface offset table now
19008 contains pointers into the vtable - this is more efficient for the jit
19010 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
19012 * class.c (mono_class_metadata_init): use a temporary vtable (the
19013 old algorithm only worked for the interpreter, but not for the jit)
19015 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
19017 * loader.c (method_from_memberref): use mono_class_get to get the
19018 class of an array instead of using System.Array directly.
19019 (mono_get_method): also add MEMBERREF methods to the method cache
19020 which usefull for arrays.
19022 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
19024 * pedump.c (arch_compile_method): added to compute vtable entry
19026 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19027 number of interfaces.
19029 * class.h: merged MonoArrayClass into MonoClass
19031 * class.c (mono_class_create_from_typedef): compute the vtable size and
19032 allocate space to include the vtable inside MonoClass
19033 (mono_class_metadata_init): initialize the vtable
19035 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19037 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19038 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19039 * image.c: endian fixes by Laurent Rioux.
19040 * object.h, object.c: rename MonoStringObject to MonoString and
19041 MonoArrayObject to MonoArray. Change some function names to conform to
19042 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19043 guint16* as first argument, so don't use char*.
19044 Provide macros to do the interesting things on arrays in a portable way.
19045 * threads-pthread.c: updates for the API changes and #include <sched.h>
19046 (required for sched_yield()).
19047 * icall.c: updates for the API changes above.
19048 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19049 platforms that need them.
19051 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19053 * class.c: set the correct type for all the fundamental
19054 type when loading the class.
19056 2001-10-05 Dick Porter <dick@ximian.com>
19058 * threads-pthread.c (pthread_mutex_timedlock): Simple
19059 compatibility version for C libraries that lack this call.
19061 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19063 * class.c: MonoTypes stored in MonoClass are stored as
19064 fundamental MonoTypes when the class represents a
19065 fundamental type (System.Int32, ...).
19066 The TypeHandle return by ldtoken is a MonoType*.
19067 * icall.c: ves_icall_get_data_chunk () write out all the
19068 PE/COFF stuff. Implement ves_icall_define_method (),
19069 ves_icall_set_method_body (), ves_icall_type_from_handle ().
19070 * image.c: properly skip unknown streams.
19071 * loader.h, loader.c: add type_class to mono_defaults.
19072 * metadata.c, metadata.h: export compute_size () as
19073 mono_metadata_compute_size () with a better interface.
19074 Typo and C&P fixes.
19075 * pedump.c: don't try to print the entry point RVA if there is no entry point.
19076 * reflection.c, reflection.h: many cleanups, fixes, output method
19077 signatures and headers, typedef and typeref info, compress the metadata
19078 tables, output all the heap streams, cli header etc.
19079 * row-indexes.h: typo fixes.
19081 2001-10-04 Dick Porter <dick@ximian.com>
19083 * object.h: Add a synchronisation mutex struct to MonoObject
19085 * object.c (mono_new_object): Initialise the object
19086 synchronisation mutexes
19088 * icall.c: System.Threading.Monitor internal calls
19090 * threads-pthread.h:
19091 * threads-pthread.c: System.Threading.Monitor internal calls
19093 * threads-types.h: New file, includes the system-specific thread
19096 * threads-pthread-types.h:
19097 * threads-pthread-types.c: New files, handle pthread-specific
19098 synchronisation types
19100 * threads-dummy-types.h:
19101 * threads-dummy-types.c: New files of dummy support for
19102 thread-specific types
19106 * pedump.c: include mono-endian.h not endian.h
19108 * Makefile.am: More threads files.
19109 Name mono-endian.h not endian.h
19111 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19113 * Makefile.am, reflection.h, reflection.c: move here the reflection related
19114 stuff and implement a few more bits.
19115 * icall.c: a field needs to be dereferenced twice. Do not use the same
19116 name for two variables in the same scope.
19117 * image.c, image.h: cleanups.
19119 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
19121 * class.c (mono_class_metadata_init): bug fix: compute the right size
19123 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19125 * icall.c: implemented some of the Reflection internalcalls.
19126 * image.c, image.h: start writing out the PE/COFF image.
19127 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19128 that does the reverse than decode_blob_size ().
19129 * object.c: use mono_metadata_encode_value (). Move here
19130 temporary implementation of mono_string_to_utf8 ().
19131 * rawbuffer.c: make malloc_map static.
19133 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19135 * metadata.c: fix type comparison for arrays.
19136 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19137 Added a couple of new classes to monodefaults.
19138 * icall.c: added a couple of Reflection-related internalcalls.
19139 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19140 Added a byval_arg MonoType to MonoClass.
19142 2001-09-28 Dick Porter <dick@ximian.com>
19145 * threads-pthread.h:
19146 * threads-pthread.c: Implemented internal calls for
19147 LocalDataStoreSlot operations. Applied mutexes around all shared
19148 data. Reworked the thread creation and Start() operations to
19149 avoid a race condition.
19152 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19154 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19156 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19158 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19160 * class.c, loader.c: warn and return NULL instead of erroring out.
19161 * icall.c: added System.AppDomain::getCurDomain().
19162 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19164 2001-09-25 Dick Porter <dick@ximian.com>
19166 * threads-pthread.h:
19167 * threads-pthread.c: Implemented timed thread joining and added
19168 System.Threading.Thread::Join_internal internal call
19170 * icall.c: Added System.Threading.Thread::Join_internal internal call
19173 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19175 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19177 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19178 mono_string_intern () to implement the semantics of the ldstr opcode
19179 and the interning of System.Strings.
19180 * icall.c: provide hooks to make String::IsIntern and String::Intern
19183 2001-09-23 Dick Porter <dick@ximian.com>
19186 * threads-dummy.h: New files of dummy threading routines
19188 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19189 support code based on system specifics
19191 Rename PTHREAD_LIBS to THREAD_LIBS
19193 2001-09-23 Dick Porter <dick@ximian.com>
19195 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19196 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19198 (mono_thread_init): Set up a Thread object instance to return when
19199 the main thread calls Thread.CurrentThread
19200 (mono_thread_cleanup): Wait for all subthreads to exit
19202 * icall.c: New internal calls for System.Threading.Thread::Sleep
19203 (including Schedule) and CurrentThread
19205 * threads.h: New file, to insulate thread-specific stuff from the
19208 2001-09-21 Dick Porter <dick@ximian.com>
19210 * threads-pthread.h:
19211 * threads-pthread.c: New file, for handling pthreads-style
19212 threading support. Start() now starts a new thread and executes
19213 the ThreadStart delegate instance.
19215 * icall.c: Added the internalcall for
19216 System.Threading.Thread::Start_internal
19218 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19220 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19222 * loader.c: work around the different signatures for delegates
19223 constructors csc generates in compiled code vs the ones compiled in mscorlib.
19225 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19227 * class.h, class.c: add mono_class_get_field_from_name ().
19228 * *: Fix C comments and other ANSI C issues.
19230 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19232 * endian.h, assembly.c: fix some endianness issues.
19234 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19236 * loader.h, load.c: add delegate_class to mono_defaults.
19237 Handle runtime provided methods in mono_get_method ().
19239 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
19241 * loader.c (mono_get_method): use pinvoke for internal call
19243 * icall.c: use pinvoke for internal call
19245 * loader.c (method_from_memberref): set the method name
19247 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19249 * metadata.c: help the compiler generate better code for
19250 mono_class_from_mono_type ().
19252 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
19254 * class.c (mono_class_metadata_init): delayed computing of the
19255 class size to mono_class_metadata_init ()
19257 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19259 * class.c, class.h: add an interfaces member to MonoClass.
19260 * image.c, image.h: add assembly_name field to MonoImage
19261 from the assembly table.
19262 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19264 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19266 * class.c: Handle Array in mono_class_from_mono_type ().
19267 * metadata.c, pedump.c: some endian fixes.
19269 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19271 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19272 * metadata.c: fix small problem introduced with the latest commit.
19274 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19276 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19277 We don't need a MonoMetadata pointer anymore to compare signatures in
19278 mono_metadata_signature_equal (), update callers.
19279 Reduced memory usage an number of allocations for MonoMethodHeader and
19280 MonoMethodSignature.
19282 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19284 * metadata.c: added compare for szarray.
19286 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19288 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19289 and add a couple more types to it and mono_defaults. Give an hint on
19290 classes that need implementing in our corlib and are referenced
19293 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19295 * class.h, class.c: keep track if a class is also an Enum.
19296 * loader.c: Implement a couple more types for use in libffi
19297 marshalling. Gives better diagnostics when failing to dlopen
19298 a library. Set method->klass for P/Invoke methods, too.
19300 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19302 * class.c, class.h: add a MonoType this_arg to MonoClass that
19303 represents a pointer to an object of the class' type that
19304 can be used by the interpreter and later the type cache.
19305 Add best guess alignment info for valuetype objects.
19307 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19309 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19310 into MonoType: one less level of indirection and allocation and
19311 simplifies quite a bit of code. Added cache for MonoTypes that are
19312 used frequently, so that we don't need to allocate them all the time.
19314 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
19316 * class.c (mono_class_create_from_typedef): System.Enum is also a
19317 value type, although it does not derive from System.ValueType
19318 (maybe a bug in the ms compiler?)
19320 * metadata.c (mono_type_size): return the right size for value types
19322 * loader.c (mono_get_method): only initialize method header if not abstract
19324 * class.c (mono_class_from_mono_type): use mono_default values.
19326 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
19328 * *: use MonoClass pointers instead of <type_tokens>
19330 * class.h: new flag: metadata_inited.
19332 * class.c (mono_class_metadata_init): impl.
19333 (mono_class_instance_size): impl.
19334 (mono_class_data_size): impl.
19336 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19338 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19339 MonoClass now has the name and name_space fields.
19340 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19341 mono_get_method () takes and optional MonoClass as argument.
19342 Removed mono_typedef_from_name() and added mono_class_token_from_name()
19343 instead that takes advantage of a map from class names to typedef
19344 tokens in MonoImage.
19346 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19348 * metadata.c: zero is not a valid alignment boundary.
19349 Merge MONO_TYPE_VOID in default decoding code.
19351 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
19353 * image.h: merged MonoMetadata into MonoImage
19355 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19356 identify the type of elements.
19358 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19360 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19361 * cil-coff.h: split MonoMSDOSHeader and add size info.
19362 * image.c: add some consistency checks.
19363 * metadata.c: fix row size computation: one programmer
19364 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19365 add explanation for the locator routine.
19366 Fix decoding of size in method header.
19368 2001-08-20 Miguel de Icaza <miguel@ximian.com>
19370 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
19371 (g_concat_dir_and_file): Bring g_concat_dir_and_file
19372 function from gnome-libs. This uses the right path separator
19373 based on the OS, and also works around a bug in some systems where
19374 a double slash is not allowed.
19375 (default_assembly_name_resolver): Use g_concat_dir_and_file
19376 (mono_assembly_open): ditto.
19378 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
19380 * metadata.c (mono_metadata_signature_equal): impl.
19382 * *: void is now a realy MonoType (instead of using NULL)
19384 * metadata.c (do_mono_metadata_parse_type): use
19385 mono_metadata_parse_type to parse void value.
19387 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19389 * metadata.c, metadata.h: in the signature and method header store
19390 only the space required for holding the loca vars and incoming arguments.
19392 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
19394 * metadata.c (do_mono_metadata_parse_type): treat void like any
19395 other type (instead of assigning NULL);
19397 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
19399 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19401 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
19403 * image.c (do_mono_image_open): added a cache for arrays.
19405 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19407 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19408 decode a single column from a row in a metadata table and changes
19409 to take advantage of it in the typedef locator (gives a nice speed up).
19410 Store offset info for function params.
19412 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
19414 * image.h (MONO_IMAGE_IS_CORLIB): removed
19416 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19418 * assembly.c: how could mono_assembly_close () had ever worked?
19419 * metadata.c, metadata.h: provide offset info for local vars.
19420 Implement mono_type_size () to take care of alignment as well
19421 as size (it was mono_field_type_size in cli/class.c before).
19423 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
19425 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19427 * assembly.h (CORLIB_NAME): set to corlib.dll
19429 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19431 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19433 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19434 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19435 tokentype.h: massive namespace cleanup.
19437 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19439 * metadata.h, metadata.c: decode exception clauses when parsing method header.
19441 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
19443 * metadata.c (mono_metadata_free_type): added check for type !=
19444 NULL (void) before calling mono_metadata_free_type()
19446 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19448 * metadata.h, row_indexes.h: added header with enumerations to use
19449 to index in the columns from tables in metadata and to decode coded
19450 tokens: we should start using this instead of embedding magic numbers
19453 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19455 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19456 Move metadata_t info from cli_image_info_t to MonoImage, where
19457 it's easily accessible. Changed all the uses accordingly.
19458 Added the method and class caches to MonoImage.
19459 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19460 and mono_metadata_decode_value () signature to be more consistent
19461 with the other parse functions (and simplify code). Taken advantage
19462 of zero-length array allocation with GCC. Removed reduntant (and
19463 wrong) MonoFieldType struct and use MonoParam instead. Changed
19464 mono_metadata_parse_field_type () to use common code for parsing.
19465 Added mono_metadata_typedef_from_field () and
19466 mono_metadata_typedef_from_method () to lookup a typedef index from a
19467 field or method token.
19468 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19470 2001-07-23 Miguel de Icaza <miguel@ximian.com>
19472 * metadata.c (mono_metadata_parse_field_type): Implement.
19473 (do_mono_metadata_parse_type): Split engine from
19474 mono_metadata_parse_type, so that we can create smaller structures
19475 for things that just have one pointer to the MonoType (look at
19478 2001-07-20 Miguel de Icaza <miguel@ximian.com>
19480 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19481 as Jan Gray found out, it is incorrect.
19483 2001-07-18 Miguel de Icaza <miguel@ximian.com>
19485 * assembly.c: Implement asssembly loading. This loads an image
19486 and loads all the referenced assemblies. Come to think of it, we
19487 could always do lazy loading of the assemblies.
19489 * image.c (mono_image_open): Keep loaded images in a hashtable.
19491 * image.h (MonoImage): Add reference count.
19493 2001-07-17 Miguel de Icaza <miguel@ximian.com>
19495 * assembly.c (mono_assembly_open): Keep track of the file name in
19496 case the assembly has no ASSEMBLY table.
19498 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
19501 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19503 * metadata.c, metadata.h: decode local vars in method header
19504 parse function. Change callers accordingly.
19506 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19508 * metadata.h, cil-coff.h: protect against multiple inclusion.
19509 Added some new structures to hold information decoded from metadata:
19510 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19511 and relevant decoding/free functions.
19512 * metadata.c: implement decoding functions. Add warning for out of bounds
19513 index in mono_metadata_locate(). Implement mono_get_method () to retreive
19514 all the info about a method signature and invocation. Remove check on
19515 uninitialized local var in parse_mh() and fix memory leak.
19517 2001-07-12 Miguel de Icaza <miguel@ximian.com>
19519 * metadata.h: More macros.
19521 * tokentype.h: New file.
19523 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19525 * assembly.c: added a consistency check and initialize
19526 some structures with g_new0().
19527 * metadata.c: fixed a couple more bugs in table size computation
19528 and add other checks for out-of bound access to metadata.
19530 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19532 * metatada.c: fix bugs computing table sizes. Spew a
19533 warning when index in string heap is out of bounds.
19535 2001-07-04 Miguel de Icaza <miguel@ximian.com>
19537 * metadata.h: Add a couple of macros to manipulate tokens.
19539 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19541 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19542 cli_section_tables).
19544 2001-07-01 Miguel de Icaza <miguel@ximian.com>
19546 * metadata.c (mono_metadata_user_string): New function, provides
19547 access to the UserString heap.
19549 2001-06-27 Miguel de Icaza <miguel@ximian.com>
19551 * metadata.c: Add inline documentation.
19553 2001-06-26 Miguel de Icaza <miguel@ximian.com>
19555 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19558 2001-06-22 Miguel de Icaza <miguel@ximian.com>
19560 * typeattr.h: New file, TypeAttribute flags.
19562 2001-06-21 Miguel de Icaza <miguel@ximian.com>
19564 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19565 mono_assembly_ensure_section): Section loading code.
19566 (load_section_tables): Load the sections.
19568 * mono/metadata/metadata.c (mono_metadata_locate_token,
19569 mono_metadata_locate): Functions to locate the information
19570 definition given a token or a table and an index.
19571 (mono_metadata_compute_table_bases): New.
19572 (compute_size): New function to compute the sizes of the various
19575 * mono/metadata/metadata.h: Finish listing the different index
19578 * mono/metadata/pedump.c: Improve to dump new information.
19580 2001-06-19 Miguel de Icaza <miguel@ximian.com>
19582 * mono/metadata/metadata.c: Entered all the tables matching
19585 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2