1 2006-10-04 Zoltan Varga <vargaz@gmail.com>
3 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4 sequences which can be unbounded in size. Fixes #79583.
6 2006-10-02 Zoltan Varga <vargaz@gmail.com>
8 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
11 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
13 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
15 * domain.c (mono_domain_free): Free up type_init_exception_hash.
17 * object.c (mono_runtime_class_init): Implement correct semantics when a static
18 ctor fails, i.e. throw the same exception on subsequent accesses.
20 2006-09-0 Jonathan Chambers <joncham@gmail.com>
22 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
23 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
24 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
25 Handle marshalling of interfaces and VARIANTs contained in structs.
27 Code is contributed under MIT/X11 license.
29 2006-09-30 Zoltan Varga <vargaz@gmail.com>
31 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
33 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
36 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
38 * console-io.c: ignore previous SIGINT handler.
40 2006-09-27 Zoltan Varga <vargaz@gmail.com>
42 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
43 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
44 #79460, #79461, #79485.
46 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
48 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
51 2006-09-26 Zoltan Varga <vargaz@gmail.com>
53 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
54 could be generated from it.
56 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
58 * rand.c: fix read loop to correctly handle EINTR.
60 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
62 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
63 internal calls are defined to keep methods closer to the declaring
64 type and allow a significant reduction in runtime relocations and
67 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
69 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
70 exception message to have FileNotFoundException use the default
71 assembly load error message. Fixes bug #79426.
72 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
74 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
76 * threadpool.c: (start_thread_or_queue) use the root domain when
77 creating the thread instead of the async object one.
79 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
81 * class.c, object.c, class-internals.h, reflection.c:
82 for arrays, store element_size inside MonoClass (speedup
83 for array object creation).
85 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
87 * icall.c: fixed CodeBase to use the file name and not the module
90 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
92 * mono-debug.c, mono-debug.h: export find_method as
93 mono_debug_find_method ().
95 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
97 * debug-helpers.c, class-internals.h: added a few functions useful
98 when debugging under gdb.
100 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
102 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
103 characters that need special handling.
105 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
107 * mono-config.c: make the os/cpu specification more flexible,
108 allowing lists and negation.
110 2006-09-18 Jonathan Chambers <joncham@gmail.com>
112 * marshal.c: COM Interop fixes. Handle case where method->klass.
113 is interface. Handle BSTR/MonoString when null. Use CDECL as
114 calling convention on non-windows platforms. This is for
115 compatibility with XPCOM and MainWin COM.
117 Code is contributed under MIT/X11 license.
120 2006-09-18 Zoltan Varga <vargaz@gmail.com>
122 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
123 correctly. Fixes #79217.
125 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
127 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
129 * mono-config.c: allow both an os and cpu attribute for dllmap
130 and dllentry elemnets to enable a single config file to be used
131 for multiple architectures.
133 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
135 * loader.c: MonoLoaderError was cleared too soon on load failure.
138 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
140 * icall.c: use the defining class vtable when accessing a
141 static field, not a pobblibly derived class.
143 2006-09-17 Zoltan Varga <vargaz@gmail.com>
145 * icall.c string-icalls.c: Remove references to unicode.h.
147 * unicode.h unicode.c Makefile.am: Remove these unused source files.
149 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
151 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
152 indicating the image where custom marshaller types should be looked up.
153 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
154 custom marshallers, instead of corlib. Fixes #79425.
156 2006-09-14 Zoltan Varga <vargaz@gmail.com>
158 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
160 2006-09-14 Jonathan Chambers <joncham@gmail.com>
162 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
163 Implement Environment.ProcessorCount.
165 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
166 Implement Environment.ProcessorCount.
169 Add Environment.ProcessorCount icall.
171 Patch by Jason McFall.
173 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
175 * assembly.c: don't append .exe/.dll when the filename already contains
176 one of those extensions.
178 2006-09-12 Martin Baulig <martin@ximian.com>
180 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
183 2006-09-11 Martin Baulig <martin@ximian.com>
185 * reflection.c (mono_image_build_metadata): Create the
186 MethodImpl's after emitting all types and methods, so we don't
187 need another fixup pass for them.
189 2006-09-11 Zoltan Varga <vargaz@gmail.com>
191 * class.c (mono_class_from_name_case): Fix regression introduced by the last
194 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
196 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
199 2006-09-10 Zoltan Varga <vargaz@gmail.com>
201 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
202 args is not set. Fixes #78926.
204 2006-09-08 Zoltan Varga <vargaz@gmail.com>
206 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
208 * image.c (load_class_names): Move this to class.c, and rename it to
209 'mono_image_init_name_cache'.
210 (load_modules): Fix a warning.
212 * class.c icall.c image.c: Initialize image->name_cache lazily.
214 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
215 on its name using information in the AOT file.
217 * class.c (mono_class_from_name): Use the new hook function.
219 2006-09-06 Zoltan Varga <vargaz@gmail.com>
221 * reflection.c (mono_param_get_objects): Handle enum default parameter values
224 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
227 2006-09-06 Martin Baulig <martin@ximian.com>
229 * icall.c (mono_lookup_internal_call): Small fix.
231 2006-09-05 Raja R Harinath <rharinath@novell.com>
233 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
236 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
238 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
239 when --debug is specified.
241 2006-09-04 Zoltan Varga <vargaz@gmail.com>
243 * class.c (setup_generic_array_ifaces): Fix a warning.
245 2006-09-04 Miguel de Icaza <miguel@novell.com>
247 * Temporarily remove the patch to assemly.c that checks the
248 assembly versions as it breaks our gacutil.
250 2006-09-03 Zoltan Varga <vargaz@gmail.com>
252 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
254 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
257 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
258 created using the default ctor. Fixes #79152.
259 (mono_string_builder_to_utf16): Ditto.
261 2006-09-01 Martin Baulig <martin@ximian.com>
263 Fix handling of the generic array interfaces.
266 (MonoDefaults): Removed `generic_array_class' and added
267 `generic_ilist' class.
270 (mono_bounded_array_class_get): Add the new generic array interfaces.
271 (setup_generic_array_ifaces): New static method; create vtable
272 entries for each method in the generic array interfaces.
275 (select_container): Allow "parent-less" generic methods.
278 (mono_marshal_get_generic_array_helper): New public method.
281 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
282 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
283 moved the interncall into System.Array.
285 2006-09-01 Raja R Harinath <rharinath@novell.com>
287 A few more cases of avoiding work on types with ->byref set.
288 Has the real fix for #79238
289 * icall.c (is_generic_parameter): New helper.
290 (ves_icall_Type_GetGenericParameterPosition): Use it.
291 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
292 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
293 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
294 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
296 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
298 (ves_icall_Type_get_IsGenericInstance): Likewise.
299 (ves_icall_Type_get_IsGenericType): Likewise.
301 2006-09-01 Zoltan Varga <vargaz@gmail.com>
303 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
306 * mempool.h (mono_mempool_get_allocated): New helper function.
308 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
311 * mempool.c: Fix warnings and the calculation of stats.
313 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
315 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
317 * loader.c (mono_get_method_from_token): Update method_count stat.
319 * class-internals.h (MonoStats): Add some stats.
321 2006-08-31 Robert Jordan <robertj@gmx.net>
323 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
324 with managed variants.
325 All code is contributed under the MIT/X11 license.
327 2006-08-31 Zoltan Varga <vargaz@gmail.com>
329 * reflection.c (reflection_methodbuilder_to_mono_method): Set
330 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
332 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
334 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
335 with cycles in classes.
337 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
339 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
340 missing a [MarshalAs] directive. Fixes #79203.
342 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
343 klass->marshal_info. Fixes #79217.
345 2006-08-30 Martin Baulig <martin@ximian.com>
347 Committing a patch from Joachim Ante <joe@otee.dk>:
348 Add support for binary data symbol stores.
350 * debug-mono-symfile.c
351 (mono_debug_open_mono_symbol_file): Renamed into
352 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
356 (mono_debug_open_image): Added `raw_contents' and `size' args.
357 (mono_debug_init_2_memory): New public function.
359 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
361 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
363 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
365 * appdomain.c: implement support for ShadowCopyFiles.
367 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
369 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
370 when value is NULL (and should remove CID #51).
372 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
374 * image.c: moved 2 functions to ../utils.
376 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
378 * gc.c: cope with the target object of a GC handle being NULL
381 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
383 * class.c: recursively check parent's explicit implementations
384 of interface methods (fixes bug #79125).
386 2006-08-19 Miguel de Icaza <miguel@novell.com>
388 * filewatcher.c: Avoid warnings when building, do not redefine
389 constants that are defined.
393 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
395 * image.c: don't fail when the link points to an absolute path.
397 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
399 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
402 2006-08-17 Miguel de Icaza <miguel@novell.com>
404 * image.c (full_path): A new method used to obtain the actual path
405 of an assembly even in the presence of symbolic links.
407 This is necessary for the case where we are running a binary that
408 has been GACed, but we are using the "published" path name
409 ($prefix/mono/1.0/blah.exe) which happens to point to the real
412 This was the source of the failure for the `xsp' command with the
413 recent AppDomain changes, as far as the runtime was concerned,
414 there were two different assemblies: $prefix/mono/1.0/blah.exe and
415 $prefix/mono/gac/blah/version/blah.exe.
417 (do_mono_image_open): use full path
419 2006-08-17 Zoltan Varga <vargaz@gmail.com>
421 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
423 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
425 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
426 domain_id is supplied. Fix CID #241 and corlib's unit tests.
428 2006-08-17 Zoltan Varga <vargaz@gmail.com>
430 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
431 small structures. Fixes #78990.
433 2006-08-17 Zoltan Varga <vargaz@gmail.com>
435 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
437 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
439 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
442 * marshal.c: don't load all the assemblies from a domain into newly
443 created ones. The new domains might have different rules and load
444 assemblies from different locations. Fixes bug #76757.
446 Patch by Lluis. Conflicts resolved by Brian Crowell.
448 2006-08-16 Alp Toker <alp@atoker.com>
450 * socket-io.c: First half of the fix for #79084.
451 Set sa_size to the length of the content, not that of the struct.
452 Don't add NULL suffix to the content, this should be done in
453 managed code if needed.
455 2006-08-14 Raja R Harinath <rharinath@novell.com>
458 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
459 mono_metadata_parse_type returns NULL.
461 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
463 * normalization-tables.h : new file for string normalization data.
464 * locales.c, locales.h, icall.c :
465 added load_normalization_resource() for string normalization,
467 * Makefile.am : added normalization-tables.h to the sources.
469 2006-08-13 Zoltan Varga <vargaz@gmail.com>
471 * marshal.c: Add more helper functions to reduce code duplication and use them
474 2006-08-12 Zoltan Varga <vargaz@gmail.com>
476 * marshal.c: Fix non-x86 stdcall warnings.
478 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
481 2006-08-11 Jonathan Chambers <joncham@gmail.com>
483 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
484 type check on multi-dimensional arrays. Fixes #79000.
486 2006-08-10 Jonathan Chambers <joncham@gmail.com>
488 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
489 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
490 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
491 * class-internals.h: add is_com_object to class structure.
492 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
493 null checks to COM object marshalling. Fix .ctor call on RCW.
494 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
496 All code is contributed under the MIT/X11 license.
498 2006-08-09 Dick Porter <dick@ximian.com>
500 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
501 racing mono_monitor_allocator_lock() somewhere, so don't delete
502 the critical section for now. Found by running and exiting
505 2006-08-10 Zoltan Varga <vargaz@gmail.com>
507 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
508 (ves_icall_System_ComObject_FindInterface): Ditto.
509 (ves_icall_System_ComObject_CacheInterface): Ditto.
511 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
512 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
514 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
516 * threadpool.c: treat pipes from process asynchronous reads as sockets
517 when reading from them, so we get select/poll or epoll to wait for
520 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
522 * loader.c: Fix a typo (CID #233) in the null check.
524 2006-08-07 Zoltan Varga <vargaz@gmail.com>
526 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
527 Hopefully fixes #78949.
529 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
530 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
533 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
535 * filewatcher.c: we need to set errno here.
537 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
539 * filewatcher.c: let Win32Exception get the error value.
541 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
543 * filewatcher.c: translate errno into win32 errors for Win32Exception
544 to know what happened.
546 2006-08-01 Zoltan Varga <vargaz@gmail.com>
548 * threadpool.c: Fix more warnings.
550 * assembly.c (search_loaded): Fix warnings.
552 * threadpool.c (mono_thread_pool_finish): Fix warnings.
553 (mono_async_invoke): Ditto.
555 2006-07-28 Jonathan Chambers <joncham@gmail.com>
557 * object.c (mono_remote_class_vtable): Need to create proxy vtable
558 entries for __ComObject type in addition to ComImport types.
559 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
562 All code is contributed under the MIT/X11 license.
564 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
566 * image.c: avoid tentative loading of modulerefs that contain
567 no metadata (P/Invoke library names).
569 2006-07-28 Dick Porter <dick@ximian.com>
571 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
572 mono_loader_lock() somewhere, so don't delete the critical section
573 for now. Found by running and exiting monodevelop.
575 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
577 * filewatcher.c: define the inotify syscalls when we're building on
578 linux and have sys/syscall.h. The build system might not have support
579 for inotify but the target system might have it.
581 2006-07-26 Miguel de Icaza <miguel@novell.com>
583 * domain.c: Documentation updates.
585 * loader.c (mono_free_method): Do not release the method
586 information if we are being profiled, as profilers will use this
587 information at shut down to present some data to the user.
589 This is needed so that the profiler does not crash, as the
590 profiler tends to keep MonoMethods around, and they might become
591 invalid if we free these.
593 (mono_get_method_constrained): Return the original CIL stream
594 method as well, so verification can be performed against it.
596 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
598 * filewatcher.[ch]: support for inotify file system watcher.
599 * icall.c: add new internal calls for the inotify file system watcher.
601 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
603 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
606 2006-07-20 Dick Porter <dick@ximian.com>
608 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
611 2006-07-20 Dick Porter <dick@ximian.com>
613 * threads.c (start_wrapper): Do the thread cleanup while we still
614 hold a reference to its object. Fixes bug 78123.
616 2006-07-18 Kornél Pál <kornelpal@gmail.com>
618 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
619 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
620 "managed-to-managed".
621 * icall.c: Redirect string constructors that take sbyte* to
622 ves_icall_System_String_ctor_RedirectToCreateString.
623 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
624 to CreateString () methods with matching signature.
625 * reflection.c: Use original security informations for
626 MONO_WRAPPER_MANAGED_TO_MANAGED.
627 * security-manager.c: Use original security informations for
628 MONO_WRAPPER_MANAGED_TO_MANAGED.
629 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
630 that is a placeholder and only its address should be used.
631 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
632 that is a placeholder and only its address should be used.
634 2006-07-15 Jonathan Chambers <joncham@gmail.com>
636 Begin implementing COM Interop.
637 * appdomain.c: Increment corlib version.
638 * class.c: Set ComImport classes' parent to __ComObject.
639 * loader.c: Mark cominterop methods as such.
640 * domain.c: Add __ComObject class to MonoDefaults structure.
641 * image.c: Add 2 hashtables to the image for COM Interop related methods
642 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
643 using the mempool allocator
645 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
646 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
647 declaration for mono_metadata_type_dup_mp.
649 * debug-helpers.c: Added strings for two additional wrapper types
650 * object.c: Create proxy objects for ComImport classes
651 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
652 and added __ComObject class to MonoDefaults structure.
654 * object-internals.h: Finish MonoRealProxy definition, and add definition of
655 MonoComInteropProxy and MonoComObject.
657 * marshal.c: Added support for COM Interop
658 (signature_cominterop): Converts managed signature to corresponding
659 unmanaged COM signature.
660 (cominterop_get_function_pointer): gets unmanaged function pointer via
662 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
663 (cominterop_get_method_interface): returns interface type that method is defined on
664 (mono_mb_emit_cominterop_call): emits native call to function pointer
666 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
667 that matches signature of unmanaged function.
668 (cominterop_get_native_wrapper): wrapper around adjusted method call.
669 (cominterop_get_invoke): forwards call from proxy to __ComObject
670 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
671 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
672 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
674 * marshal.h: Added Marshal icall declarations.
675 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
676 so we can access them in finalizer
678 2006-07-14 Dick Porter <dick@ximian.com>
680 * object.c (mono_type_initialization_cleanup): Fix a race
681 condition by temporarily commenting out the critical section
684 2006-07-14 Zoltan Varga <vargaz@gmail.com>
686 * reflection.c (create_custom_attr): Fix some warnings.
687 (create_custom_attr_data): Ditto.
688 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
691 2006-07-11 Zoltan Varga <vargaz@gmail.com>
693 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
695 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
697 2006-07-08 Zoltan Varga <vargaz@gmail.com>
699 * reflection.c (resolve_object): Add support for DynamicMethod.
701 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
702 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
704 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
706 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
707 don't leak GPtrArray's pdata has we have no use (nor free) for it.
709 2006-07-01 Zoltan Varga <vargaz@gmail.com>
711 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
714 2006-06-30 Raja R Harinath <rharinath@novell.com>
716 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
717 slightly: remove a shadow local variable.
719 2006-06-29 Raja R Harinath <rharinath@novell.com>
721 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
722 definition that introduces the virtual function slot.
723 Also fix Coverity #105.
725 2006-06-29 Zoltan Varga <vargaz@gmail.com>
727 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
728 for dynamic assemblies. Fixes #78724.
730 2006-06-28 Zoltan Varga <vargaz@gmail.com>
732 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
735 2006-06-21 Martin Baulig <martin@ximian.com>
738 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
741 2006-06-21 Zoltan Varga <vargaz@gmail.com>
743 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
745 2006-06-20 Raja R Harinath <rharinath@novell.com>
747 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
749 * class.c (mono_class_create_from_typespec): Add 'context' argument.
750 Inflate result if necessary.
751 (mono_class_get_full): Remove old version. Rename from
752 'mono_class_get' and add 'context' argument. Pass it to
753 ..._create_from_typespec.
754 (mono_class_get): New. Simple wrapper to mono_class_get_full.
755 (mono_ldtoken): Revert change below.
757 2006-06-20 Martin Baulig <martin@ximian.com>
759 * class.c (mono_ldtoken): Don't pass the generic context to
760 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
762 2006-06-15 Zoltan Varga <vargaz@gmail.com>
764 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
765 and later freeing it. Fixes #78638.
767 2006-06-15 Miguel de Icaza <miguel@novell.com>
769 * icall.c (mono_class_get_throw): Revert over-zealous error
770 throwing, the caller for mono_class_get_throw will cope with
771 errors when classes are not properly initialized already.
773 The code still copes with loader exceptions though.
775 Fixes the regression in reftype1 and reftype3 from the CAS tests.
777 2006-06-14 Miguel de Icaza <miguel@novell.com>
779 Fixes the `make run1' version of RuntimeAbort (to be commited,
780 source is in Bugzilla).
782 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
783 FALSE on class loading failure instead of returning true.
785 * class.c (mono_class_create_from_typedef): It is possible for
786 mono_metadata_interfaces_from_typedef_full to fail if a class is
787 not found, cope with this.
790 2006-06-14 Dick Porter <dick@ximian.com>
793 * process.c: Fix a bunch of signed/unsigned warnings from gcc
796 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
798 * culture-info-table.h : oops, forgot to make it nsync with r61548.
800 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
802 * icall.c: Another fix for building mono in Visual Studio.
804 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
806 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
808 2006-06-09 Martin Baulig <martin@ximian.com>
810 * debug-mono-symfile.c: Put this back and really fix it this
811 time. Sorry for all the trouble.
813 2006-06-08 Zoltan Varga <vargaz@gmail.com>
815 * icall.c (mono_class_get_throw): Fix a warning.
816 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
817 ReflectionTypeLoadException if needed. Fixes #78606.
819 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
820 (mono_class_init): Ditto.
822 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
824 (mono_loader_clear_error): Make this work even if there is no error.
826 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
828 * object-internals.h marshal.c marshal.h icall.c: Implement method
829 Marshal.GetComSlotForMethodInfo using internal call.
831 2006-06-07 Zoltan Varga <vargaz@gmail.com>
833 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
834 a function for signalling it.
836 * class.c (mono_class_from_typeref): Use the new kind of loader error when
837 a referenced assembly is not found.
839 * loader.c (mono_loader_error_prepare_exception): Add support for
840 LOADER_ERROR_ASSEMBLY. Fix formatting.
842 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
844 * domain.c appdomain.c class-internals.h marshal.c: Add support
845 for VARIANT marshalling on windows and increment corlib version
846 since Variant struct was added.
848 2006-06-03 Miguel de Icaza <miguel@novell.com>
850 * debug-mono-symfile.c: Revert Martin's previous patch which broke
851 stack trace line information:
853 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
854 (Martin) when looking up B which is between A and C, return A not C.
858 Thanks to Alexander Olk for tracking this down.
860 2006-06-02 Zoltan Varga <vargaz@gmail.com>
862 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
864 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
865 avoid clobbering its value.
866 (mono_string_to_lpstr): Fix a warning on windows.
868 2006-05-31 Zoltan Varga <vargaz@gmail.com>
870 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
872 * reflection.c loader.c: Removed references to 'dummy' flag.
874 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
876 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
879 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
882 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
884 * marshal.c threadpool.c: Update callers of mono_async_result_new.
886 * appdomain.c: Bump corlib version.
888 2006-05-30 Zoltan Varga <vargaz@gmail.com>
890 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
891 CEE_STIND_REF when working with object references.
893 2006-05-31 Zoltan Varga <vargaz@gmail.com>
895 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
898 2006-05-30 Miguel de Icaza <miguel@novell.com>
900 * loader.c (method_from_memberref): Fix argument value for
901 mono_loader_set_error_method_load (I was passing the MonoClass
902 instead of the class name char *).
904 2006-05-30 Zoltan Varga <vargaz@gmail.com>
906 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
907 CEE_STIND_REF when working with object references.
909 2006-05-30 Martin Baulig <martin@ximian.com>
911 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
912 mono_method_full_name() change and replace the ':' with a '.'
915 2006-05-30 Martin Baulig <martin@ximian.com>
917 * debug-mono-symfile.c
918 (mono_debug_symfile_lookup_location): Fix the algorithm:
919 when looking up B which is between A and C, return A not C.
921 2006-05-29 Martin Baulig <martin@ximian.com>
924 (MonoDebugMethodInfo): Make the typedef public.
925 (MonoDebugSourceLocation): New public struct.
928 (mono_debug_source_location_from_address): Removed.
929 (mono_debug_source_location_from_il_offset): Removed.
930 (mono_debug_il_offset_from_address): Removed.
931 (mono_debug_address_from_il_offset): Removed.
932 (mono_debug_lookup_method): New public function.
933 (mono_debug_lookup_source_location): New public function; replaces
934 the old mono_debug_source_location_from_*() functions; see the
935 inline documentation.
936 (mono_debug_free_source_location): New public function.
937 (mono_debug_print_stack_frame): New public function; see the
938 inline documentation.
940 * debug-mono-symfile.c
941 (mono_debug_find_source_location): Renamed into
942 mono_debug_symfile_lookup_location(); only take a
943 `MonoDebugMethodInfo *' and an `offset' argument; added inline
945 (mono_debug_find_method): Renamed into
946 mono_debug_symfile_lookup_method().
948 2006-05-27 Zoltan Varga <vargaz@gmail.com>
950 * assembly.c (mono_assembly_open_full): Dont overwrite the status
951 returned by mono_image_open_full ().
953 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
954 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
957 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
960 2006-05-27 Miguel de Icaza <miguel@novell.com>
962 * class.c (mono_class_from_typeref): handle missing images
963 earlier, deals with bug #78418. Refactor code;
965 Fix a warning introduced in my previous commit (some stale code
966 from before I revisited my patch).
968 * class.c (mono_class_create_from_typedef): On failure, remove the
969 class from the MonoImage->class_cache as the class is not
970 initialized; Fixes the leak pointed out by Paolo.
972 2006-05-25 Dick Porter <dick@ximian.com>
974 * threads.c (mono_thread_cleanup): Build fix. Comment out the
975 DeleteCriticalSections until I figure out which one may still be
976 sometimes locked when mono_thread_cleanup is called.
978 2006-05-24 Dick Porter <dick@ximian.com>
980 * threads.c (mono_thread_cleanup): Move the threading cleanup out
981 of mono_thread_manage and back into its own function, so it can be
982 called after the finalizer thread has finished.
984 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
986 2006-05-24 Zoltan Varga <vargaz@gmail.com>
988 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
991 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
992 with non-blittable elements.
993 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
995 2006-05-24 Martin Baulig <martin@ximian.com>
997 * mono-debug-debugger.h (MonoDebuggerEvent): Added
998 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
1000 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
1001 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
1002 `mono_debugger_event_handler' to NULL.
1004 2006-05-24 Martin Baulig <martin@ximian.com>
1006 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
1008 2006-05-24 Martin Baulig <martin@ximian.com>
1010 * mono-debug-debugger.h
1011 (mono_debugger_create_notification_function): Added
1012 `MonoCodeManager *' argument.
1014 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
1016 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
1018 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
1020 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
1021 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
1024 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
1026 * icall.c: precise GC support: objects can't be stored in unmanaged
1027 memory anymore, even if they are kept alive by other references: since
1028 they can move the GC needs to be able to always find them.
1030 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1032 * object.c: precise GC support for static fields. Support
1033 for moving GCs: write barriers and pinned allocation for interned
1036 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1038 * domain.c, domain-internals.h: precise GC support for the MonoDomain
1041 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1043 * class.c, gc.c: sgen and precise GC updates.
1045 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
1047 * marshal.h, marshal.c: added write barrier wrapper and precise type
1050 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
1052 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
1055 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
1057 * reflection.c: precise and sgen GC updates.
1059 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
1061 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
1063 2006-05-22 Zoltan Varga <vargaz@gmail.com>
1065 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
1067 2006-05-20 Zoltan Varga <vargaz@gmail.com>
1069 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
1070 MONO_TYPE_OBJECT. Fixes #78462.
1072 2006-05-18 Zoltan Varga <vargaz@gmail.com>
1074 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
1075 and blittable types.
1077 2006-05-17 Miguel de Icaza <miguel@novell.com>
1079 * class.c (mono_class_get_exception_for_failure): Implement parts
1080 of a TODO: if the loader error is set (instead of the class
1081 error), we return a Loader exception that can be properly thrown
1084 This was exposed by some Winforms 2.0 code that I tried to run
1085 (Atsushi pointed me to it).
1087 2006-05-17 Zoltan Varga <vargaz@gmail.com>
1089 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
1090 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
1092 * marshal.c (emit_marshal_vtype): Add limited support for
1093 UnmanagedType.LPStruct. Fixes #78427.
1095 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
1096 Applied a patch from kangaroo to fix #77523.
1098 2006-05-17 Martin Baulig <martin@ximian.com>
1101 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
1102 (debugger_thread_created): Removed.
1103 (debugger_thread_exited): Removed.
1105 2006-05-15 Zoltan Varga <vargaz@gmail.com>
1107 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1109 * object-internals.h (MonoReflectionResource): Sync with managed version.
1111 2006-05-12 Wade Berrier <wberrier@novell.com>
1113 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
1115 2006-05-12 Zoltan Varga <vargaz@gmail.com>
1117 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
1118 functions try to allocate from the image mempool.
1120 2006-05-12 Dick Porter <dick@ximian.com>
1122 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
1124 2006-05-12 Lluis Sanchez <lluis@ximian.com>
1126 * object.c: The FieldGetter and FieldSetter methods require the full
1127 name of the class, not only the name. Fixes bug #78277.
1129 2006-05-11 Miguel de Icaza <miguel@novell.com>
1131 * loader.c (method_from_memberref): Do not pass the NULL klass to
1132 mono_loader_set_error_() methods. Pass the non-NULL value
1135 2006-05-11 Zoltan Varga <vargaz@gmail.com>
1137 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1138 (mono_assembly_close): Null out assembly->image->references after freeing it.
1140 * image.c (mono_image_close): Free image->references.
1142 * reflection.c (mono_image_basic_init): Fix a small memory leak.
1144 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1146 * marshal.c: In function mono_mb_add_local don't use the mb pointer
1147 before checking if it's NULL (g_assert).
1149 2006-05-10 Martin Baulig <martin@ximian.com>
1151 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1152 I thought I already killed that two months ago, but now it somehow reappeared.
1154 2006-05-10 Martin Baulig <martin@ximian.com>
1156 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1158 2006-05-10 Zoltan Varga <vargaz@gmail.com>
1160 * reflection.c: Allocate memory for dynamically created methods in the image
1163 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1165 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
1166 don't use the ad pointer before checking if it's NULL (g_assert).
1168 2006-05-09 Zoltan Varga <vargaz@gmail.com>
1170 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1171 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1173 * marshal.c: Allocate all signatures from mempools.
1175 * marshal.c: Allocate some more signatures from mempools.
1177 2006-05-09 Miguel de Icaza <miguel@novell.com>
1179 * object.c (mono_load_remote_field): The code used to provide a
1180 temporary variable for returning results if the user did not
1181 provide a result pointer. But our temporary variable was allocted
1184 Fix calling code to always pass a result area. Coverity ID 103.
1186 2006-05-06 Zoltan Varga <vargaz@gmail.com>
1188 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1189 value, not the old. Fixes #78312.
1190 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1192 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1193 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
1196 * assembly.c (mono_assembly_close): Free image->references.
1198 * assembly.c (mono_assembly_names_equal): Fix a warning.
1199 (mono_assemblies_cleanup): Cleanup more global data.
1201 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1203 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1204 ptr_cache and image->modules.
1206 * image.c (mono_image_init): Allocate array_cache lazily.
1208 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1210 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1211 behavior was changed recently and has bad side effects.
1213 2006-05-05 Zoltan Varga <vargaz@gmail.com>
1215 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1217 * assembly.c (mono_assembly_close): Remove a debug printf.
1219 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1221 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1222 to also allow for temporary references between mono_image_open ()/close ().
1224 * domain.c (get_runtimes_from_exe): Add a FIXME.
1226 2006-05-04 Zoltan Varga <vargaz@gmail.com>
1228 * marshal.c: Fix support for dynamic methods.
1230 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1232 * marshal.c (mono_marshal_cleanup): New cleanup function.
1234 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
1237 * class.c (mono_class_init): Fix leaking class->nested_classes.
1239 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1241 * image.c (mono_image_init): Initialize the new cashes.
1243 * image.c (mono_image_close): Destroy the new cashes.
1245 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1247 * mempool.c (mono_mempool_strdup): New helper function.
1249 * class-internals.h: Add prototype for mono_loader_unlock ().
1251 * domain.c (mono_jit_info_table_find): Fix a warning.
1252 (mono_debugger_check_runtime_version): Ditto.
1254 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
1255 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1256 functions to these modules.
1258 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1261 * marshal.c (mono_free_bstr): Fix a warning.
1263 * assembly.c (mono_assembly_open_full): Fix another small leak.
1265 * object.c: Fix some unload leaks in the remoting code.
1267 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1270 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1272 * reflection.c: Fix some unload leaks in dynamic assemblies.
1274 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
1276 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1277 * marshal.h: Add BSTR support on Win32
1278 * icall.c: Add BSTR icalls
1279 * metadata.h: Add BSTR enums
1281 2006-04-28 Miguel de Icaza <miguel@novell.com>
1283 Work to catch the crash from #76795 and turn it into an
1284 exception. As I stubbed out pieces of the VisualBasic support,
1285 I found a number of places where the code was failing and I added
1286 checks to those places.
1288 * metadata.c (do_mono_metadata_parse_generic_class): Make this
1289 function return a status code. If we fail to parse the signature
1290 from mono_metadata_parse_generic_inst, return FALSE.
1292 * loader.c (mono_get_method_from_token): If we fail to load the
1293 method (mono_class_get) return NULL.
1295 * (method_from_memberref): Return NULL if we are unable to parse
1296 the method signature
1298 (mono_loader_error_prepare_exception): Since we now use the
1299 loader_error flag internally to stop processing, and obtaining
1300 exceptions that might be thrown will walk this code path the
1301 proper way of going from a MonoLoaderError into a
1302 MonoException was convoluted. This new routine encapsulates the
1303 process of turning the error into an exception and *clearing* the
1306 2006-04-27 Miguel de Icaza <miguel@novell.com>
1308 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1309 with missing assemblies), and to cope with:
1311 * Missing fieldref from a non-existing assembly.
1312 * Missing methodref from a non-existing assembly.
1314 The first batch of work to address *some* of the issues from 76661.
1316 * object.c (mono_class_create_runtime_vtable): If we fail to
1317 initialize the class raise the exception here.
1319 * metadata.c (mono_class_get_overrides_full): If any methods fail
1320 to load return the failure to the caller.
1322 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1323 flagging assemblies that failed to load.
1325 Do not crash if we are unable to load the assembly.
1327 (mono_assembly_close): Do nothing with REFERENCE_MISSING
1330 * loader.c (mono_loader_set_error_type_load): Change the
1331 convention to always pass unallocated strings, so we make our own
1332 copies (I know our own code had duplicated strings before, but
1333 this keeps the normal conventions).
1334 (method_from_memberref): Call mono_loader_set_error_method_load
1335 for all possible failures of loading the class.
1336 Remove assert, turn into a loader error.
1338 (mono_loader_error_to_exception): Move this routine from mini
1339 (mini_loader_error_to_exception) there was no need to have that in
1342 * class.c (mono_class_from_typeref): If we were not able to load
1343 the assembly with mono_assembly_load_reference, call the
1344 mono_loader_set_error_type_load to register the problem.
1346 (mono_class_setup_fields): If we fail to load the type from
1347 mono_metadata_parse_type_full, call mono_class_set_failure and
1348 break from the loop.
1350 If class->exception_type is set, we do not layout the fields as
1351 that might crash the runtime, and instead return (from breaking
1352 from the previous loop).
1354 (mono_class_setup_vtable): This now returns a boolean indicating
1355 whether the table was properly setup. The decision is driven by
1356 mono_class_get_overrides_full which might run into non-existing
1359 (mono_class_init): Returns TRUE on success or FALSE if there was a
1360 problem in loading the type (incorrect assemblies, missing
1361 assemblies, methods, etc).
1363 When we call mono_class_setup_fields we also check for a potential
1364 error inside this call (either a class exception or a general
1367 (mono_class_create_from_typedef): If the parent fails to load
1368 (calling mono_class_get_full) return NULL.
1372 calls to mono_metadata_parse_type_full should be checked
1373 everywhere and set the mono_class_set_failure
1374 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1376 The current patch checks the places where my manually constructed
1377 tests show the errors are showing up, but we should do it
1382 mono_class_init return values should be tested everywhere, like
1383 the previous case this is something that we should audit
1384 everywhere and not only on the cases exposed by the tests I
1387 2006-04-26 Miguel de Icaza <miguel@novell.com>
1389 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1390 boolean parameter and instead pass the information on `options'
1391 parameter (FileOptions).
1393 * icall.c: Register the new signature for MonoIO.Open.
1395 * debug-helpers.c (dis_one): Trying to understand how coverity
1396 works. Fix Run 5, item 78.
1398 2006-04-26 Dick Porter <dick@ximian.com>
1400 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1403 2006-04-25 Martin Baulig <martin@ximian.com>
1405 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1407 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1408 debugger_thread_created().
1409 (debugger_gc_push_all_stacks): Don't handle the main thread in any
1411 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1412 (mono_debugger_finalize_threads): New function; undo the effects
1413 of mono_debugger_init_threads().
1414 (mono_debugger_create_all_threads): Removed.
1416 2006-04-24 Zoltan Varga <vargaz@gmail.com>
1418 * image.c (mono_image_close): Tidy up trace messages.
1420 * assembly.c (mono_assembly_close): Ditto.
1422 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1423 no longer references an already freed assembly. Fixes #78168.
1425 2006-04-21 Dick Porter <dick@ximian.com>
1427 * threads.c (mono_thread_detach): Fix reference counting when
1430 2006-04-21 Zoltan Varga <vargaz@gmail.com>
1432 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1435 2006-04-19 Zoltan Varga <vargaz@gmail.com>
1437 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1438 (mono_type_to_stind): Ditto.
1440 * marshal.c: Use the new helper functions to simplify code.
1442 * image.c (mono_image_close): Add some code for help debug assembly unloading
1445 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1448 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1449 assembly was already loaded in another appdomain. Fixes #78083.
1451 2006-04-13 Zoltan Varga <vargaz@gmail.com>
1453 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1454 referenced assemblies.
1455 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1457 * domain.c (mono_domain_free): Add a trace message.
1459 * appdomain.c (add_assemblies_to_domain): Ditto.
1461 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1464 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1466 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1468 2006-04-12 Martin Baulig <martin@ximian.com>
1470 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1471 `USE_INCLUDED_LIBGC'.
1473 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1475 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1476 the patch contains ../ and a small directory name later. Hopefully fixes
1479 2006-04-10 Martin Baulig <martin@ximian.com>
1481 Clean up the debugger's thread-handling code.
1483 The debugger's thread-handling code has been moved from
1484 ../mini/debug-debugger.c to threads.c. We now iterate directly
1485 over the `threads' hash, keep track of exiting threads and also
1488 We can now debug XSP and XSP based applications with the debugger.
1490 * object-internals.h (MonoThread): Added `gpointer end_stack'.
1493 (MonoThreadCallbacks): Removed; this was only used by the debugger.
1494 (mono_install_thread_callbacks): Likewise.
1496 * threads.c (mono_thread_callbacks): Removed.
1497 (debugger_thread_created, debugger_thread_exited): New static functions.
1498 (start_wrapper): Call debugger_thread_created().
1499 (thread_cleanup): Call debugger_thread_exited().
1500 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1501 (mono_debugger_init_threads): New public function.
1502 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1503 iterate directly over the `threads' hash and also use proper locking.
1505 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1507 * mono-debug-debugger.h
1508 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1510 2006-04-10 Zoltan Varga <vargaz@gmail.com>
1512 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
1513 argument type=array. Fixes #78057.
1515 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
1517 * culture-info-table.h : regenerated. Fixed bug #69652.
1519 2006-04-07 Zoltan Varga <vargaz@gmail.com>
1521 * loader.c metadata.c: Reapply a variant r59116.
1523 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1525 * class.c (mono_class_setup_interface_offsets): New internal function.
1527 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1528 interfaces too. Fixes #77398.
1530 * reflection.c (encode_cattr_value): Add support for
1531 parameter type=object, argument type=array.
1532 (load_cattr_value): Ditto. Fixes #77916.
1534 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1535 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1537 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1538 a byval char array and CharSet is Ansi.
1540 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1542 2006-04-06 Zoltan Varga <vargaz@gmail.com>
1544 * metadata.c: Add some locking comments.
1546 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1548 (mono_metadata_free_method_signature): Don't free the signature itself.
1550 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
1552 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1553 reference the same MonoImage.
1554 (mono_assembly_load_from_full): Add an assert.
1556 2006-04-05 Zoltan Varga <vargaz@gmail.com>
1558 * image.c (mono_image_close): Don't put the image we are about to free into the
1559 loaded_images_guid_hash.
1561 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1562 to reduce code duplication.
1564 * marshal.c: Register the native functions called by this module as icalls, to
1565 somewhat centralize the creation of MonoMethodSignature's.
1567 * loader.c (mono_method_signature): Add a cache for method signatures.
1569 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1570 the parameter attributes of a method.
1571 (mono_metadata_parse_method_signature_full): Refactored the computation of
1572 parameter attributes into a separate function. Also avoid one allocation in
1575 * assembly.c (mono_assembly_close): Ditto.
1577 * image.c (mono_image_close): Log trace messages with INFO level.
1579 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1581 * image.c reflection.c: Correct reference counting of image modules.
1583 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1584 of this function from the image mempool.
1586 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1587 to allow more cached types to be used.
1589 * mono-debug.c (mono_debug_add_method): Appled patch from
1590 David S. Miller <davem@sunset.davemloft.net>: Access
1591 minfo->lexical_blocks[] entry elements using read32().
1593 2006-04-04 Zoltan Varga <vargaz@gmail.com>
1595 * loader.c (mono_free_method): No longer free the method header for non-dynamic
1596 methods as it is allocated from the mempool.
1598 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1601 * metadata-internals.h: Add comments describing the reference counting scheme
1602 used for MonoImage and MonoAssembly.
1604 * image.c assembly.c reflection.c: Rework reference counting of images and
1605 assemblies so they are freed when the runtime is shut down. Free some
1606 additional memory structures when an image is unloaded.
1608 2006-04-03 Zoltan Varga <vargaz@gmail.com>
1610 * class.c loader.c reflection.c: Allocate more data structures in
1613 2006-03-31 Miguel de Icaza <miguel@novell.com>
1616 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1617 build on pre glib 2.4 systems.
1619 2006-03-31 Zoltan Varga <vargaz@gmail.com>
1621 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1623 * icall.c: Fix some warnings.
1625 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
1627 * culture-info-table.h : regenerated.
1629 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1631 * threads.c, object-internals.h, verify.c: changed the culture caching
1632 code to use a normal MonoArray for storage so the GC can keep track of
1633 them easily. Fixed bits of the cache logic, too and simplified the
1636 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1638 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1639 thread for non-Boehm GCs.
1641 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1643 * domain.c, object.c, domain-internals.h: reduce the amount of memory
1644 needed to keep track of the data for static fields.
1646 2006-03-29 Raja R Harinath <rharinath@novell.com>
1649 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1650 for interface classes. Use 'num_methods' instead.
1651 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
1652 before using '->vtable_size' field.
1654 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1656 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1657 doesn't contain managed pointers, so use a normal hashtable.
1659 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1661 * reflection.c, class-internals.h, domain.c: fixed handling of types
1662 used as values for objects in custom attributes (bug #77915):
1664 2006-03-24 Martin Baulig <martin@ximian.com>
1666 * class.c (mono_class_setup_fields): Added support for generic
1667 instances; fixes #77580.
1669 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1671 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1673 2006-03-24 Dick Porter <dick@ximian.com>
1675 * file-io.c (get_file_attributes): More stat macro breakage.
1678 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1680 * profiler.c: added the file=filename option in the default profiler
1681 to output the profile data to filename.
1683 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1685 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1688 2006-03-22 Martin Baulig <martin@ximian.com>
1690 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1691 allocated `MonoClassField *' in `fb->handle'.
1693 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1695 * class.c, image.c, metadata-internals.h: implemented new mechanism to
1696 allocate interface ID to save memory and allow better ID reuse on
1697 appdomain unload. setup_generic_vtable () removal from Martin.
1699 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1701 * object.h, appdomain.c, domain.c, exception.c, icall.c,
1702 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1703 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1704 write barriers for reference stores with managed objects accessed with
1705 C structures in the runtime and in embedding programs.
1707 2006-03-20 Raja R Harinath <rharinath@novell.com>
1709 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1710 'interface_id' and 'max_interface_id' fields of MonoClasses
1711 representing open generic types.
1713 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1715 * object.h, object.c, icall.c: added functions to deal with
1716 storing valuetypes that contain references in managed objects.
1717 * reflection.c, string-icalls.c, threads.c, marshal.c: small
1718 fixes and comments around uses of mono_array_addr ().
1720 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1722 * object.h, icall.c, monitor.c: object.GetHashCode ()
1723 implementation that supports the moving garbage collector.
1725 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1727 * icall.c, threads-types.h, threads.c: implemented finalizer for
1730 2006-03-15 Zoltan Varga <vargaz@gmail.com>
1732 * metadata.c (mono_type_size): Add a fixme.
1733 (mono_type_stack_size): Ditto.
1735 * object-internals.h (MonoReflectionAssemblyBuilder): Added
1736 'type_forwarders' field.
1738 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1739 attribute from net 2.0.
1741 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1744 * class.c (mono_class_setup_fields): Fix a warning.
1746 * class.c (mono_class_from_name): Add support for assemblyref entries
1747 in the EXPORTEDTYPE table.
1749 * reflection.c: Add support for handling type forwarders under net 2.0.
1751 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1753 2006-03-14 Zoltan Varga <vargaz@gmail.com>
1755 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1756 overwriting entries in ModuleBuild->types, also clean up the code
1757 a little. Fixes #77774.
1759 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1761 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1762 load friend assembly info when present.
1764 2006-03-14 Raja R Harinath <rharinath@novell.com>
1766 Fix crasher on gtest-158.cs.
1767 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1768 the return value if the MonoClass we want is yet in an
1770 * class.c (mono_class_create_from_typedef): Add an comment
1771 explaining an order dependency between mono_class_setup_parent and
1772 mono_class_setup_mono_type.
1774 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1776 * class.c: documentation updates and events bug fix.
1778 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1780 * class.c: some cleanup, locking fixes.
1782 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1784 * class.c: fix the generics code to setup nested
1785 type info to the instantiated type (bug #77770).
1787 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1789 * marshal.c: fixed a few type correctness issues.
1791 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1793 * loader.c: the Set/Get/Addrtess array methods should be public.
1795 2006-03-11 Zoltan Varga <vargaz@gmail.com>
1797 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1799 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1802 2006-03-10 Zoltan Varga <vargaz@gmail.com>
1804 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1806 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1808 * mempool.c (mono_mempool_alloc): Speed this up a bit.
1809 (mono_mempool_alloc0): Ditto.
1811 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1814 (create_object_from_sockaddr): it was allocating 4 extra bytes
1815 for the AF_UNIX data. Fixes bug #77747.
1817 2006-03-09 Zoltan Varga <vargaz@gmail.com>
1819 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1821 2006-03-09 Dick Porter <dick@ximian.com>
1823 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1824 Fixes bug 76966 again.
1826 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
1828 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1830 * appdomain.c: Bumped corlib version to 48 (due to r57532)
1832 2006-03-07 Martin Baulig <martin@ximian.com>
1835 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1837 2006-03-07 Martin Baulig <martin@ximian.com>
1840 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1841 regression introduced in r56970; see gtest-252.cs.
1843 * loader.c (mono_get_method_constrained): Correctly handle generic
1844 methods; see gtest-253.cs.
1846 2006-03-04 Zoltan Varga <vargaz@gmail.com>
1848 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1850 2006-03-04 Martin Baulig <martin@ximian.com>
1852 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1853 compute the parent type at runtime, just like we're already doing
1857 (mono_reflection_bind_generic_parameters): Don't compute the
1858 parent type anymore.
1860 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1862 2006-03-04 Martin Baulig <martin@ximian.com>
1864 * mono-debug-debugger.h
1865 (mono_debugger_create_notification_function): Allocate memory at
1866 runtime and return a pointer to it.
1868 2006-03-03 Zoltan Varga <vargaz@gmail.com>
1870 * assembly.c: Fix windows build.
1872 * assembly.c: Fix build.
1874 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
1876 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1878 2006-03-03 Dick Porter <dick@ximian.com>
1881 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1882 Check parameters before dereferencing them. Fixes Aaron's part of
1885 2006-03-03 Raja R Harinath <rharinath@novell.com>
1887 Fix performance regression.
1888 * loader.c (find_method_in_class): Add 'from_class' argument.
1889 Rename 'klass' argument to 'in_class'. The signature is compared
1890 against the method in 'in_class', and the corresponding method is
1891 returned from 'from_class'.
1892 (find_method): Walk both 'in_class' and 'from_class' in parallel.
1893 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1894 type definition and generic instantiation in parallel.
1895 (mono_get_method_constrained): Update to changes.
1897 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1899 * threads.c: make sure the domain is correct, too when doing
1900 mono_thread_attach ().
1902 2006-03-01 Zoltan Varga <vargaz@gmail.com>
1904 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1905 windows. Fixes #77683.
1907 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1909 * object.h, *: introduced specific way to set elements of an array
1910 of references to be used as write barrier. Still need to audit the
1911 uses of mono_array_addr.
1913 2006-03-01 Miguel de Icaza <miguel@novell.com>
1915 * object-internals.h: New field to cache the assmebly name, patch
1916 from Tambet Ingo (tambet@ximian.com)
1918 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1920 * decimal.h, class-internals.h, metadata-internals.h,
1921 file-io.h: mark a few function declarations as internal, to
1922 reduce the number of PLT entries.
1924 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1926 * file-io.c: fix typo in warning message.
1928 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1930 * loader.c: on unix, lookup the "*A" version of a function
1931 if charset is auto as a second option before failing.
1933 2006-02-28 Raja R Harinath <rharinath@novell.com>
1935 * class.h (mono_class_inflate_generic_method): Revert to two
1937 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1938 (mono_class_inflate_generic_method_full): Add.
1939 * class.c (mono_class_inflate_generic_method_full): Rename from
1940 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
1941 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
1942 * loader.c, reflection.c: Update to changes.
1944 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1946 * icall.c: const fixes and small improvements.
1948 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1950 * threadpool.c: for asynchronous connect(), enable the same workaround
1951 for BSD 6 as for the Mac. Fixes bug #77637.
1953 2006-02-24 Zoltan Varga <vargaz@gmail.com>
1955 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1956 formatted classes. Fixes #77524.
1958 2006-02-24 Raja R Harinath <rharinath@novell.com>
1960 * class.c (inflate_generic_type): Add a couple more
1961 micro-optimizations.
1962 (inflate_generic_context): Don't use the 'gmethod' from
1964 (mono_class_inflate_generic_method): If the method has generic
1965 parameters, but the passed-in context doesn't have a 'gmethod',
1966 create one. Use the possibly simplified generic instantiation
1967 from the declaring class instead of the one passed in.
1969 2006-02-24 Raja R Harinath <harinath@gmail.com>
1971 Make generic method signature and method header handling lazy.
1972 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1973 (inflate_generic_header): Likewise.
1974 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
1975 parameter to avoid inflating types.
1976 (mono_get_inflated_method): Empty out.
1977 * class.h (mono_class_inflate_generic_method): Update to changes.
1978 * loader.c (mono_get_method_from_token): Don't parse signature for
1979 generic methods, nor methods of generic classes.
1980 (mono_method_signature): Rename from 'mono_method_signature'.
1981 Inflate signature on demand.
1982 (mono_method_get_header): Inflate method header on demand.
1983 * reflection.c: Update to changes.
1985 2006-02-23 Raja R Harinath <rharinath@novell.com>
1987 * metadata.c (mono_metadata_inflate_generic_inst): If the
1988 instantiation is closed, don't bother expanding it in the new
1990 * class.c (inflate_generic_class): If the generic instantiation
1991 doesn't change after inflation, return the argument itself.
1992 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1994 (inflate_generic_context): If neither the generic class nor the
1995 generic method instantiations change, return the original context.
1996 * reflection.c (mono_method_get_object): Do
1997 'mono_get_inflated_method' before accessing the ->klass field.
1998 (inflate_mono_method): Don't create a MonoGenericMethod unless
2000 (inflate_method): Don't pass a constructed type as the declaring
2001 type of a methodbuilder.
2003 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
2005 * object.c: fix memory overwrite.
2007 2006-02-22 Dick Porter <dick@ximian.com>
2009 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
2010 it doesn't work any more.
2011 (mono_threads_request_thread_dump): Fix unused variable warnings.
2013 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2015 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
2016 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
2017 the public header file.
2019 2006-02-21 Zoltan Varga <vargaz@gmail.com>
2021 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
2023 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2025 * class-internals.h, object.c: reduce the size of MonoVTable
2026 and store the interface_offsets array at negative offsets.
2028 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
2030 * metadata.c: tweak table descriptors data structures to reduce
2031 size and runtime relocations.
2033 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2035 * marshal.c: fix some types and opcodes to be type-safe
2036 in marshaling wrappers.
2038 2006-02-21 Ankit Jain <jankit@novell.com>
2040 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
2042 2006-02-21 Raja R Harinath <rharinath@novell.com>
2044 * metadata.c (get_constraints): Relax debugging checks for monodis.
2046 2006-02-21 Ankit Jain <jankit@novell.com>
2048 * metadata.c (mono_metadata_load_generic_params): Move the code
2049 checking for ambiguous generic params from here to mono/dis/get.c
2050 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
2052 2006-02-21 Raja R Harinath <harinath@gmail.com>
2054 Fix assertion triggered when compiling nemerle.
2055 * class.c (mono_get_shared_generic_inst): Rename from
2056 get_shared_inst and make non-static.
2057 * loader.c (mono_get_shared_generic_method): New. Used to create
2058 the MonoGenericContext-equivalent of a MonoGenericContainer.
2059 (mono_get_method_from_token): Initialize the 'context' field of
2060 the created MonoGenericContainer.
2061 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
2062 * metadata.c (get_constraints): Add sanity check.
2063 * class-internals.h: Add new internal methods.
2065 * reflection.c (verify_safe_for_managed_space): New sanity check.
2066 Currently checks that owner-less generic parameters aren't allowed
2068 (mono_type_get_object): Use it.
2069 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
2070 that are now in mono_type_get_object.
2071 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
2073 2006-02-19 Raja R Harinath <harinath@gmail.com>
2075 * metadata.c (mono_type_create_from_typespec): Rename from
2076 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
2077 argument and caching of types in the generic container.
2078 (unwrap_arrays, find_generic_param): Remove.
2079 * metadata-internals.h: Update.
2080 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
2082 2006-02-18 Zoltan Varga <vargaz@gmail.com>
2084 * class.c (mono_class_get_exception_for_failure): Fix a warning.
2086 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
2087 return values. Fixes #77581.
2089 * class.c (mono_fnptr_class_get): Switch name and name_space.
2091 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
2092 classes and add support for [In, Out] attributes.
2093 (mono_marshal_free_asany): Ditto. Fixes #77524.
2095 2006-02-18 Raja R Harinath <harinath@gmail.com>
2097 * class.c (mono_class_from_generic_parameter): Make more robust to
2098 incomplete MonoGenericContainers from monodis.
2100 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2102 * class-internals.h: added some more exception types.
2103 * class.c, metadata.c: added a few checks to handle missing
2106 2006-02-17 Raja R Harinath <rharinath@novell.com>
2108 Use owner-less generic-params some more.
2109 * class.c (my_mono_class_from_generic_parameter): Remove.
2110 (mono_class_from_generic_parameter): Handle null image,
2111 param->name and param->owner.
2112 (mono_class_from_mono_type): Update.
2113 (mono_class_create_from_typespec): Remove 'container' parameter.
2114 If that parameter is non-null, the result is always inflated by
2115 'mono_class_get_full' anyway.
2116 (mono_class_get): Rename from _mono_class_get. Remove 'container'
2118 (mono_class_get_full): Update.
2120 * class.c (inflate_generic_type) [GENERICINST]: If the generic
2121 instance is not open, don't bother inflating.
2122 (mono_class_setup_fields): Hoist some loop-invariants. Don't
2123 parse metadata for inflated classes.
2124 (_mono_class_get): Change GenericContext* parameter to
2126 (mono_class_create_from_typespec): Likewise. Simplify, and
2127 implement trivially. All the cases are handled in
2128 mono_class_from_mono_type. Don't inflate returned class.
2129 (mono_class_get_full): Delegate GENERICINST optimization to
2130 inflate_generic_type.
2131 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
2133 2006-02-16 Dick Porter <dick@ximian.com>
2135 * socket-io.c (create_object_from_sockaddr): Fix typo.
2136 (create_sockaddr_from_object): Check array lengths before
2137 potentially accessing items off the end.
2138 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2139 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2140 (ves_icall_System_Net_Sockets_Socket_Send_internal)
2141 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2142 length checks to avoid wraparound overflows.
2143 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2144 contents of the array of sockets
2145 (hostent_to_IPHostEntry2)
2146 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2147 Check return value of inet_ntop ().
2148 (addrinfo_to_IPHostEntry): Fix typo
2150 2006-02-16 Raja R Harinath <rharinath@novell.com>
2152 Type metadata parsing doesn't use generic-instantiation information.
2153 * metadata.c (mono_metadata_parse_array_full): Change
2154 MonoGenericContext* parameter to MonoGenericContainer*.
2155 (mono_metadata_parse_type_full): Likewise.
2156 (mono_type_create_from_typespec_full): Likewise.
2157 (mono_metadata_parse_mh_full): Likewise.
2158 (mono_metadata_parse_generic_inst): Likewise.
2159 (do_mono_metadata_parse_generic_class): Likewise.
2160 (do_mono_metadata_parse_type): Likewise.
2161 * metadata-internals.h: Update to changes.
2162 * class.c (mono_class_find_enum_basetype): Likewise.
2163 (mono_class_setup_fields): Likewise.
2164 (mono_class_create_from_typespec): Likewise.
2165 * loader.c (method_from_methodspec): Likewise.
2166 (mono_get_method_from_token): Likewise.
2167 (mono_method_get_header): Likewise.
2169 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2171 * marshal.c: handle additional GENERICINST case (patch from
2172 Thong Nguyen <tum@veridicus.com>).
2173 Fix a few cases where LDIND_I/STIND_I was used for references.
2175 2006-02-16 Raja R Harinath <rharinath@novell.com>
2177 * reflection.c (mono_reflection_get_token): Remove unused variable.
2179 2006-02-16 Martin Baulig <martin@ximian.com>
2181 * reflection.c (mono_reflection_get_token): Add support for fields
2182 in instantiated generic types.
2185 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2187 2006-02-15 Martin Baulig <martin@ximian.com>
2190 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2191 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2192 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2193 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2195 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2197 * class.c, metadata.c, metadata.h, object.c, icall.c,
2198 marshal.c: changed mono_type_get_underlying_type () to do
2199 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2200 Fixed handling of instantiated generic valuetypes (bug #75479).
2202 2006-02-15 Raja R Harinath <rharinath@novell.com>
2204 * metadata.c (mono_metadata_decode_signed_value): Simplify.
2205 Delegate to mono_metadata_decode_value, and work on the returned value.
2207 * icall.c (ves_icall_MonoType_GetGenericArguments):
2208 Add consistency check here too.
2210 2006-02-15 Ankit Jain <jankit@novell.com>
2212 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2215 2006-02-15 Ankit Jain <jankit@novell.com>
2217 * metadata.c (mono_metadata_decode_signed_value): New function to decode
2218 signed values, used only for representing lower bounds of arrays.
2219 (mono_metadata_parse_array_full): Use new
2220 mono_metadata_decode_signed_value to decode lower bounds.
2222 2006-02-14 Martin Baulig <martin@ximian.com>
2225 (mono_reflection_get_token): Support "MonoGenericMethod" and
2226 "MonoGenericCMethod" and allow generic instances / methods.
2228 2006-02-11 Zoltan Varga <vargaz@gmail.com>
2230 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2231 to obtain the terminal size using an ioctl.
2233 * object.c (mono_nullable_init): Revert this as nullable reference
2234 types are not valid.
2235 (mono_nullable_box): Ditto.
2237 2006-02-09 Dick Porter <dick@ximian.com>
2239 * threads.c (mono_thread_detach): Drop a reference to the thread
2242 2006-02-09 Zoltan Varga <vargaz@gmail.com>
2244 * object.c (mono_nullable_init): Handle nullable reference types.
2245 (mono_nullable_box): Ditto. Fixes #77446.
2247 2006-02-07 Martin Baulig <martin@ximian.com>
2249 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2251 2006-02-07 Ankit Jain <jankit@novell.com>
2253 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2254 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2255 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2256 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2257 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2258 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2260 2006-02-02 Zoltan Varga <vargaz@gmail.com>
2262 * class.c (mono_class_create_generic): Set type_token as well.
2264 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2267 2006-02-02 Martin Baulig <martin@ximian.com>
2269 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2270 has never been used so far.
2272 2006-02-02 Martin Baulig <martin@ximian.com>
2274 * mono-debug-debugger.h: Changed comment at the top of this file;
2275 the header is not installed, but it's safe to #include it from
2278 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2279 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2281 2006-02-02 Martin Baulig <martin@ximian.com>
2284 (MonoSymbolTable): Removed the `metadata_info' field.
2287 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2289 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2290 (mono_debugger_add_builtin_types): Removed.
2291 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2292 (mono_debugger_create_notification_function): We now operate on a
2293 pre-allocated area; take a `gpointer' and return `void'.
2295 * mono-debug-debugger.c
2296 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2297 (mono_debugger_add_builtin_types): Removed.
2299 2006-02-02 Martin Baulig <martin@ximian.com>
2301 * threads.c (mono_debugger_create_all_threads): New public method.
2303 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2305 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2306 breaks on several platforms.
2308 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
2310 * assembly.c: the VS.NET build doesn't supply default values for
2311 MONO_ASSEMBLIES and MONO_CFG_DIR.
2313 2006-02-01 Zoltan Varga <vargaz@gmail.com>
2315 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2318 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2320 * loader.c (method_from_memberref): Fix a warning.
2322 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2324 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2325 with explicit layout. Fixes #77433.
2327 2006-01-31 Zoltan Varga <vargaz@gmail.com>
2329 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
2330 max_interface_id is initialized before using it. Fixes #77398.
2331 (ves_icall_Type_GetInterfaces): Ditto.
2333 2006-01-30 Raja R Harinath <rharinath@novell.com>
2335 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2336 allocate memory for parameter attributes when parsing memberref
2338 * loader.c (mono_loader_set_error_method_load): Don't warn.
2339 (method_from_memberref): Ensure MissingMethodException gets thrown
2340 if method is not found. Make warning more informative.
2342 2006-01-29 Raja R Harinath <harinath@gmail.com>
2345 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2346 return true if is byref.
2347 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2348 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2349 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2351 2006-01-27 Raja R Harinath <rharinath@novell.com>
2353 Fix tests/find-method.2.il
2354 * loader.c (find_method, find_method_in_class): Remove is_inflated
2355 argument. Revert 2006-01-18 change.
2356 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2357 is generic, search for method in its generic definition.
2358 * class.c (mono_class_setup_vtable_general): Print generic
2359 arguments of generic types in debugging printf.
2361 2006-01-26 Zoltan Varga <vargaz@gmail.com>
2363 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2365 * threads.c (mono_threads_request_thread_dump): New helper function.
2367 2006-01-25 Raja R Harinath <rharinath@novell.com>
2369 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2371 2006-01-25 Ankit Jain <jankit@novell.com>
2373 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2374 move definition to ..
2375 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2377 2006-01-25 Ankit Jain <jankit@novell.com>
2378 Raja R Harinath <rharinath@novell.com>
2380 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2381 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2384 2006-01-25 Martin Baulig <martin@ximian.com>
2386 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2387 `MonoDebuggerThread' into debug-debugger.c.
2389 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2391 * profiler.c: fix printing of data.
2393 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
2395 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2396 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2398 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2400 * object.c: fix deadlock related to string interning.
2402 2006-01-23 Martin Baulig <martin@ximian.com>
2404 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2406 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2408 2006-01-23 Martin Baulig <martin@ximian.com>
2410 * mono-debug.h: Moved the prototypes of some functions which are
2411 used by the JIT here from mono-debug-debugger.h.
2413 2006-01-21 Martin Baulig <martin@ximian.com>
2415 * Makefile.am: Don't install mono-debug-debugger.h.
2417 2006-01-21 Martin Baulig <martin@ximian.com>
2419 * mono-debug-debugger.h: Enforce the private status of this header
2420 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2421 Moved some stuff from mono-debugger-jit-wrapper.h here.
2423 2006-01-20 Raja R Harinath <rharinath@novell.com>
2425 * class.c (mono_class_from_typeref): Add a sanity test to help
2426 catch lack of assembly load/search hooks.
2428 2006-01-19 Zoltan Varga <vargaz@gmail.com>
2430 * marshal.c (emit_struct_conv): Relax the fields with same offset
2431 check even more. Fixes #77230.
2433 2006-01-18 Martin Baulig <martin@ximian.com>
2435 * loader.c (find_method_in_class): Added `gboolean is_inflated'
2436 argument; if false, we compare the uninstantiated signatures.
2437 (method_from_memberref): Compare the uninstantiated signatures;
2440 2006-01-18 Robert Jordan <robertj@gmx.net>
2442 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2443 Clear the weak link. Fixes bug #77170.
2445 * gc.c (mono_gchandle_free):
2446 Reflect *-gc.c changes (tiny optimization).
2448 2006-01-18 Zoltan Varga <vargaz@gmail.com>
2450 * metadata.c (mono_metadata_signature_dup): Applied patch from
2451 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2454 2006-01-17 Zoltan Varga <vargaz@gmail.com>
2456 * marshal.c (emit_struct_conv): Allow fields with the same offset when
2457 marshalling from native to managed code. Fixes #77230.
2459 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2461 * threadpool.c: fix problem (Mac only) when more than one asynchronous
2462 connect. Fixes bug #77020.
2464 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2466 * class.c: fixed id assignement for nested interfaces (bug #77275).
2467 Added also better info for --print-vtable debugging.
2469 2006-01-12 Martin Baulig <martin@ximian.com>
2471 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2472 interfaces on-the-fly; fixes #76625.
2475 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2476 don't need that anymore.
2478 2006-01-12 Miguel de Icaza <miguel@novell.com>
2481 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2482 To avoid initing the nested_classes when not needed I turned the
2483 PeerCredData as a toplevel internal class, as it has to be shared
2486 Fixes the CASA issue.
2488 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
2490 * domain.c: Accessors for MonoJitInfo
2492 * profiler-private.h: Add jitinfo to the end jit hook
2494 * profiler.[ch]: Define new hooks, called after jitting which give
2495 the MonoJitInfo that was compiled
2497 2006-01-10 Martin Baulig <martin@ximian.com>
2499 * class.c (mono_class_setup_events): Add support for generic
2500 classes; fixes #76440.
2502 2006-01-06 Raja R Harinath <rharinath@novell.com>
2505 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2506 on passed-in method.
2508 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2510 * object.c (mono_runtime_invoke_array): Add Nullable support.
2512 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2514 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
2516 * file-io.c: Don't consider sockets as directory and avoid an endless
2517 loop. Fix bug #76966.
2519 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2521 * object.c (mono_nullable_init): New helper function.
2522 (mono_nullable_box): Ditto.
2524 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2526 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2528 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2530 2006-01-02 Zoltan Varga <vargaz@gmail.com>
2532 * class.c (mono_class_is_assignable_from): Make T assignable to
2535 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
2537 * appdomain.c: Bump corlib version to 46.
2538 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2539 serialization purpose) and changed ves_icall_System_Reflection_
2540 Assembly_get_code_base signature to accept a boolean (to escape, or
2541 not, the assembly code base).
2543 2005-12-23 Dick Porter <dick@ximian.com>
2547 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2548 CreateEvent icall now returns "created" boolean parameter.
2550 2005-12-22 Zoltan Varga <vargaz@gmail.com>
2552 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2555 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
2556 when attr_klass is an interface. Fixes #77045.
2558 2005-12-20 Zoltan Varga <vargaz@gmail.com>
2560 * marshal.c (emit_struct_conv): Fix previous patch.
2562 * marshal.c (emit_struct_conv): Add a check for fields with the same
2565 2005-12-20 Raja R Harinath <rharinath@novell.com>
2567 Fix regression in Mono.C5.
2568 * class.c (mono_class_create_generic): If 'klass' is an interface
2569 set up the interface offsets.
2570 (mono_class_is_assignable_from): Don't throw away generic arguments.
2572 2005-12-19 Raja R Harinath <rharinath@novell.com>
2574 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2577 2005-12-15 Raja R Harinath <rharinath@novell.com>
2579 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2581 (do_mono_metadata_parse_generic_class): Don't pass the current
2582 generic context when parsing the type being instantiated: it
2583 cannot use it, anyway.
2585 * loader.c (method_from_memberref): Don't inflate a signature if
2586 it doesn't contain any type parameters.
2588 2005-12-15 Zoltan Varga <vargaz@gmail.com>
2590 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2592 2005-12-14 Martin Baulig <martin@ximian.com>
2595 (mono_type_get_name_recurse): Don't return null for type
2596 parameters and open generic classes.
2597 (mono_class_setup_methods): Don't exclude generic instances.
2598 (mono_get_unique_iid): Use different IDs for different
2599 instantiations of the same generic type.
2600 (mono_class_setup_vtable): Only use setup_generic_vtable() for
2601 open generic instances; create a normal vtable for closed generic
2603 (mono_class_setup_vtable_general): We're now also called for
2604 closed generic instances.
2607 (mono_reflection_bind_generic_parameters): Correctly use
2608 mono_metadata_lookup_generic_inst() everywhere.
2610 2005-12-14 Zoltan Varga <vargaz@gmail.com>
2612 * object.c (mono_class_create_runtime_vtable): Call
2613 mono_class_setup_vtable ().
2615 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2617 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2620 * loader.c (mono_loader_set_error_type_load): Print the type load
2621 warnings to the console so they are more visible to the user.
2622 (mono_loader_set_error_method_load): Ditto.
2624 * reflection.c (ensure_runtime_vtable): Revert the last change as it
2627 * reflection.c (ensure_runtime_vtable): Fix build.
2629 * reflection.c (ensure_runtime_vtable): Disable an optimization which
2630 doesn't work in all cases.
2632 2005-12-13 Zoltan Varga <vargaz@gmail.com>
2634 * object.c (mono_array_new_full): Treat a single dimensional array
2635 with 0 lower bounds as an szarray. Fixes #76973.
2637 * reflection.c (custom_attr_visible): Really fix this.
2639 2005-12-12 Zoltan Varga <vargaz@gmail.com>
2641 * reflection.c (custom_attr_visible): Allow nested public attributes
2644 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2647 2005-12-12 Raja R Harinath <harinath@gmail.com>
2649 * class.c (set_generic_param_owner): Delete.
2650 (mono_class_create_from_typedef): Don't set ->owner field of
2651 generic parameters to "param containers" of enclosing classes.
2652 * reflection.c (mono_reflection_initialize_generic_parameter):
2655 2005-12-11 Zoltan Varga <vargaz@gmail.com>
2657 * reflection.c (custom_attr_visible): Fix build.
2659 2005-12-10 Zoltan Varga <vargaz@gmail.com>
2661 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2664 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2665 handling of null parameter defaults.
2667 2005-12-09 Raja R Harinath <rharinath@novell.com>
2669 * class.c (mono_class_from_generic_parameter): Don't set
2670 klass->generic_container.
2671 (my_mono_class_from_generic_parameter): Likewise.
2673 2005-12-07 Zoltan Varga <vargaz@gmail.com>
2675 * reflection.c (load_public_key): Fix a warning.
2676 (method_encode_code): Fix unaligned accesses.
2678 2005-12-07 Martin Baulig <martin@ximian.com>
2680 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2683 (write_generic_param_entry): Encode our custom attrs.
2685 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2687 2005-12-07 Martin Baulig <martin@ximian.com>
2689 * reflection.c (encode_new_constraint): Removed; we don't use the
2690 `NewConstraintAttribute' anymore.
2692 2005-12-06 Zoltan Varga <vargaz@gmail.com>
2694 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2695 not fire a TypeResolve event when Assembly.GetType () is called.
2697 2005-12-05 Ben Maurer <bmaurer@ximian.com>
2699 Beginning of support for nullable types in the runtime. Parts of
2700 this patch are from Martin.
2702 * appdomain.c (MONO_CORLIB_VERSION): Bump
2704 * domain.c (mono_init_internal): get the nullable type
2706 * class.c (mono_class_is_nullable): New method
2707 (mono_class_get_nullable_param): New mehod
2708 (mono_class_create_generic): In types T? set cast_class to T
2710 * class-internals.h (MonoDefaults): new nullable default class
2711 (mono_class_get_nullable_param, mono_class_get_nullable_param):
2714 2005-12-05 Raja R Harinath <rharinath@novell.com>
2716 * metadata.c (select_container): New. Refactor code to select the
2717 appropriate GenericContainer given the type of generic parameter
2719 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2720 not a MonoGenericContext. Use select_container. Update parameters.
2721 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2723 (unwrap_arrays): Remove duplicate tests.
2724 (find_generic_param): Rename from 'has_same_context'. Now walks a
2725 generic instantiated class to find any arguments that are generic
2727 (mono_type_create_from_typespec_full): Use find_generic_param to
2728 avoid evicting some generic instantiations from the typespec
2731 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2733 * reflection.c: fixed writing of doubles on ARM FPA.
2735 2005-12-02 Robert Jordan <robertj@gmx.net>
2737 * icall.c: Fixed EventInfo.ReflectedType (#76829).
2739 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2741 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2742 least on SUSE 10 they are not the same (on debian, they are just the
2745 2005-12-01 Raja R Harinath <rharinath@novell.com>
2747 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2748 DeclaringType for VARs and MVARs.
2749 * class.c (set_generic_param_owner): Fix initialization of owner
2752 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2754 * icall.c: fixed Enum.ToObject() to correctly convert the values.
2756 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2758 * threadpool.c: workaround for a bug that shows up on the Mac:
2759 select()+connect() on a blocking socket is not like it should
2760 be, so we proceed to connect() in that case, wasting the I/O
2761 threadpool thread until connect succeedes. Fixes bug #75436.
2763 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2765 * threadpool.c: fix typo when setting file descriptor states.
2767 2005-11-28 Raja R Harinath <rharinath@novell.com>
2769 * class-internals.h (MonoGenericContainer.is_signature): Remove.
2770 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2771 create a temporary signature container.
2772 (mono_metadata_parse_generic_param): Update to changes.
2773 (mono_type_create_from_typespec_full): Update to changes.
2774 * loader.c (method_from_memberref): Don't use a
2775 MonoGenericContainer while parsing a memberref signature.
2776 (method_from_methodspec): Remove dead-store of the 'container'
2777 variable. It's overwritten before use.
2779 * metadata.c (mono_type_create_from_typespec_full): Make debugging
2781 (mono_metadata_parse_generic_param): Likewise.
2782 * loader.c (find_method_in_class): Does not need a
2783 MonoGenericContainer. Use 'mono_method_signature' rather than
2784 'mono_method_signature_full'.
2785 (find_method, mono_get_method_constrained, method_from_memberref):
2788 * metadata.c (mono_type_create_from_typespec_full): Ensure that
2789 owner-less generic-parameters are never evicted from the typespec
2792 * loader.c (method_from_memberref): Don't use the current context
2793 when parsing signatures.
2794 (method_from_methodspec, mono_get_method_from_token): Update to changes.
2796 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2797 side-effects in g_assert.
2798 * loader.c (mono_get_method_from_token): Resolve klass earlier so
2799 that we don't potentially lose information.
2801 2005-11-26 Dick Porter <dick@ximian.com>
2804 * threads.c: icalls to implement basic (ie, not named)
2805 System.Threading.Semaphore.
2807 2005-11-24 Dick Porter <dick@ximian.com>
2810 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2811 Use GetProcessId() if it's available.
2813 2005-11-23 Zoltan Varga <vargaz@gmail.com>
2815 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2817 2005-11-23 Raja R Harinath <rharinath@novell.com>
2818 Ankit Jain <jankit@novell.com>
2820 * loader.c (mono_get_method_from_token): Initialize 'method' field
2821 of all generic parameters before parsing the signature. Remove
2822 code that "fixed"-up MVAR references.
2824 2005-11-23 Ankit Jain <jankit@novell.com>
2826 * metadata.c (mono_metadata_has_generic_params):
2827 (mono_metadata_load_generic_param_constraints):
2828 (mono_metadata_load_generic_params): Move duplicate code ...
2829 (mono_metadata_get_generic_param_row): ... here. Returns the
2830 first row-id in GenericParam table for a given owner (token).
2831 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2834 2005-11-23 Raja R Harinath <rharinath@novell.com>
2835 Ankit Jain <jankit@novell.com>
2837 * metadata.c (mono_metadata_class_equal): Pass signature_only when
2839 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
2840 type->data.generic_param only if the type is an MVAR.
2841 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2842 leak owner-less VARs and MVARs into managed space.
2844 2005-11-21 Martin Baulig <martin@ximian.com>
2847 (MonoMethod): Moved the `generic_container' here from
2848 `MonoMethodNormal' since we now also need it for
2849 `MonoMethodPInvoke';
2850 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2851 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2852 an union containing both `MonoMethodNormal' and
2853 `MonoMethodPInvoke'.
2856 (mono_get_method_from_token): Allow implementing generic methods
2860 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2863 2005-11-17 Dick Porter <dick@ximian.com>
2867 * process.c: Split the Process Start_internal icall into
2868 ShellExecuteEx_internal and CreateProcess_internal, which are
2869 called depending on whether UseShellExecute is true. Fixes bug
2872 * appdomain.c (MONO_CORLIB_VERSION): Incremented
2874 2005-11-17 Zoltan Varga <vargaz@gmail.com>
2876 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2877 'msize' parameters, use the information in 'mspec' instead.
2878 (emit_object_to_ptr_conv): Ditto.
2880 * marshal.c (emit_struct_conv): Handle explicit layout structs with
2881 fields out of order. Fixes #76733.
2883 2005-11-17 Ankit Jain <jankit@novell.com>
2885 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2887 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
2889 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2892 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2894 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2895 for types with non-auto layout. Fixes #76717.
2897 2005-11-16 Ankit Jain <jankit@novell.com>
2899 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2900 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
2901 if generic_context is null.
2902 (mono_metadata_generic_param_equal): param->owner can be null.
2903 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2906 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2908 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2911 2005-11-15 Martin Baulig <martin@ximian.com>
2913 * object.c (set_value): Use mono_class_from_mono_type() instead of
2914 the hack for generic instances; fixes #76136.
2916 2005-11-15 Zoltan Varga <vargaz@gmail.com>
2918 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2921 * image.c (load_metadata_ptrs): Initialize the new fields.
2923 * reflection.c (create_dynamic_mono_image): Ditto.
2925 * reflection.c (build_compressed_metadata): Use the new fields.
2927 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2930 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2933 2005-11-15 Ankit Jain <jankit@novell.com>
2934 Raja R Harinath <harinath@gmail.com>
2936 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2937 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2938 new per-generic_container cache if the cached MonoType's context matches
2939 the current context.
2940 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2941 to the expected context.
2942 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2944 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2946 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2947 we changed the signature of an icall.
2948 * icall.c: Modify to mono_double_ParseImpl return true/false
2949 depending on the success, instead of throwing the exception. This will
2950 help us in Double.TryParse methods.
2952 2005-11-14 Zoltan Varga <vargaz@gmail.com>
2954 * marshal.c (emit_marshal_object): Throw an exception when
2955 marshalling 'object' instead of crashing. Fixes #76696.
2957 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2959 * class-internals.h: Add prototype for mono_type_get_full_name ().
2961 2005-11-11 Dick Porter <dick@ximian.com>
2963 * threads.c (mono_thread_manage): Make sure the main thread has
2964 abandoned all its mutexes when cleaning up. Fixes bug 74680.
2966 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2968 * loader.c (mono_loader_set_error_type_load): Log a warning to the
2969 console about the missing type.
2970 (mono_loader_set_error_method_load): Ditto.
2972 2005-11-09 Miguel de Icaza <miguel@novell.com>
2974 * mono-config.c (mono_get_config_dir): Set the system defaults if
2977 * assembly.c (mono_set_dirs): New API entry point to set the
2978 assembly and the config directory in one call
2980 2005-11-09 Zoltan Varga <vargaz@gmail.com>
2982 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2983 the ftnptr was created from a delegate in a domain other than the
2984 current domain. Fixes #75377.
2986 * exception.h exception.c: Add mono_get_exception_not_supported ().
2988 2005-11-08 Martin Baulig <martin@ximian.com>
2990 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2992 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
2994 * security-manager.h: Added definitions to deal with strongname key
2995 pairs bigger (and smaller) than 1024 bits.
2996 * reflection.c: Remove hardcoded strongname size (128 bytes) and
2997 adjust wrt the public key length being used.
2999 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
3001 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
3002 Windows build (r51396-51397).
3004 2005-11-03 Martin Baulig <martin@ximian.com>
3006 * class.c (mono_class_setup_vtable_general): Also add generic
3007 methods to the vtable; fixes #76581.
3009 2005-11-01 Miguel de Icaza <miguel@novell.com>
3011 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
3012 sure that we lookup GetString method from the System.Text.Encoding
3013 class, not the derived class or we get an empty method.
3017 2005-10-25 Miguel de Icaza <miguel@novell.com>
3019 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
3020 if it has been previously set (embedders).
3022 Make mono_set_rootdir available also on Unix.
3024 005-10-24 Robert Jordan <robertj@gmx.net>
3026 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
3028 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
3030 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
3031 only calls which are made to native code use this flag.
3033 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
3035 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
3037 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
3038 Add support for FieldBuilders.
3040 2005-10-29 Martin Baulig <martin@ximian.com>
3043 (mono_debug_using_mono_debugger): New public method; returns
3044 whether we're running inside the debugger.
3046 2005-10-27 Zoltan Varga <vargaz@gmail.com>
3048 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
3049 for Method/Constructor/FieldBuilders.
3051 2005-10-26 Zoltan Varga <vargaz@gmail.com>
3053 * reflection.c (module_add_cattrs): Save custom attributes for global methods
3056 2005-10-26 Martin Baulig <martin@ximian.com>
3058 * mono-debug-debugger.c
3059 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
3061 2005-10-24 Raja R Harinath <harinath@gmail.com>
3063 * icall.c (base64_to_byte_array): Don't pass an out-of-range
3066 2005-10-21 Zoltan Varga <vargaz@gmail.com>
3068 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
3069 when passing valuetypes byref. Fixes #76502.
3071 2005-10-19 Jackson Harper <jackson@ximian.com>
3073 * profiler.c: Don't put a . in front of types that are not in a
3076 2005-10-18 Zoltan Varga <vargaz@gmail.com>
3078 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
3080 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
3082 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
3084 (mono_marshal_get_ldflda_wrapper): Fix a warning.
3086 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3088 * assembly.c metadata-internals.h icall.c: Define an additional
3089 parameter for mono_assembly_name_parse_full, so we can avoid creating
3090 S.R.AssemblyName.Version when no version info wasn't passed.
3092 2005-10-09 Miguel de Icaza <miguel@novell.com>
3094 * class.c (mono_type_get_full_name): Reimplement method that was
3097 * image.c: Some docs
3099 2005-10-10 Zoltan Varga <vargaz@gmail.com>
3101 * profiler.c (output_newobj_profile): Fix printing of Total memory
3104 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
3106 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
3108 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
3110 * threads.c: remove debug output.
3112 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
3114 * threads.c (mono_thread_manage): Fix crashes if more than 64
3115 threads need to be aborted. Hopefully fixes #75899.
3117 * assembly.c (mono_stringify_assembly_name): New helper function.
3119 * class.c: Use mono_stringify_assembly_name instead of the similar
3122 * assembly.h assembly.c: Add support for calling a postload search
3123 hook if an assembly cannot be loaded.
3125 * appdomain.c: Register new search hooks which call the AssemblyResolve
3126 events in AppDomain. Fixes #75231
3128 2005-10-07 Martin Baulig <martin@ximian.com>
3130 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
3131 methods without debug info.
3133 2005-10-07 Zoltan Varga <vargaz@gmail.com>
3135 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3138 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3140 * file-io.c: now that we return symlinks, use lstat and, when the file
3141 is a symbolic link, stat, to get the file attributes. Also avoid the
3142 conversion to/from utf16/external.
3144 2005-10-06 Zoltan Varga <vargaz@gmail.com>
3146 * class.c (mono_class_layout_fields): Compute klass->has_references
3147 correctly if an embedded valuetype is not yet initialized. Fixes
3150 2005-10-04 Martin Baulig <martin@ximian.com>
3153 (mono_metadata_load_generic_param_constraints): New public
3154 function; splitted the constraints loading out from
3155 mono_metadata_load_generic_params().
3157 * class.c (mono_class_create_from_typedef): Call
3158 mono_metadata_load_generic_param_constraints() after setting up
3159 the type and creating our parent; fixes #75329.
3161 2005-10-04 Martin Baulig <martin@ximian.com>
3163 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3164 non-dynamic parent classes.
3166 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
3168 * file-io.c : win32 build fix (ETXTBSY seems not found).
3170 2005-10-04 Martin Baulig <martin@ximian.com>
3173 (mono_image_get_methodspec_token): Make the cache actually work;
3176 2005-10-04 Martin Baulig <martin@ximian.com>
3178 * class.c (mono_class_name_from_token): Removed the unneccessary
3179 `MonoGenericContext *' argument.
3181 2005-10-04 Martin Baulig <martin@ximian.com>
3184 (method_from_methodspec): Make the caching work again; fixes the
3185 performance regression from #76262.
3187 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3191 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3192 GetFileSystemEntries that performs the same work but without going
3193 into io-layer, locking, etc.
3195 2005-09-30 Zoltan Varga <vargaz@gmail.com>
3197 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
3198 ThreadState_Stopped as well. Fixes #76047.
3200 2005-09-29 Martin Baulig <martin@ximian.com>
3203 (inflate_generic_context): If the new context has a `gmethod', set
3204 its `container' that that gmethod's `container'.
3207 (mono_metadata_parse_generic_param): Simplify things;
3208 `generic_container = generic_context->container;' is just fine.
3210 * loader.c (method_from_methodspec): Code cleanups.
3212 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3214 * decimal.c: fix warning (and let gcc generate correct
3215 code on ARM with optimizations).
3217 2005-09-28 Martin Baulig <martin@ximian.com>
3220 (method_from_memberref): Added `MonoGenericContext *class_context'
3221 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3222 (method_from_methodspec): If we're a memberref, use the enclosing
3223 context when parsing its parent. Fixes #76262; see gtest-206.cs.
3225 2005-09-28 Martin Baulig <martin@ximian.com>
3227 * object.c (mono_runtime_invoke_array): Added support for
3228 MONO_TYPE_GENERICINST; fixes #75917.
3230 2005-09-27 Martin Baulig <martin@ximian.com>
3232 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3233 `k->byval_arg.type' to determine the actual type.
3235 * loader.c (method_from_methodspec): Removed some hacks.
3237 2005-09-27 Ben Maurer <bmaurer@ximian.com>
3239 * class-internals.h (mono_field_is_deleted): Do the test for
3240 rtspecialname before we check the actual name of the field. This
3241 prevents us from dereferencing a pointer into the string table,
3242 saving us from accessing a few pages
3244 * *.c: Replace the use of {Enter,Leave}CriticalSection with
3245 macros. This will allow a deadlock debugger to easily be plugged
3248 2005-09-27 Martin Baulig <martin@ximian.com>
3250 * loader.c (method_from_methodspec): Create a "signature"
3251 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
3253 2005-09-27 Martin Baulig <martin@ximian.com>
3256 (inflate_generic_class): Correctly set the new context's
3260 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3261 instead of a `MonoGenericContext *'.
3262 (mono_method_signature_full): Take a `MonoGenericContainer *'
3263 instead of a `MonoGenericContext *'.
3266 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3267 instead of a `MonoGenericContext *'.
3268 (mono_metadata_parse_method_signature_full): Likewise.
3270 2005-09-26 Martin Baulig <martin@ximian.com>
3273 (mono_class_from_generic_parameter): Set `klass->generic_container'
3274 (mono_class_from_generic_parameter): Likewise.
3275 (mono_bounded_array_class_get): We inherit the generic container
3276 from the element class.
3279 (find_method, find_method_in_class): Take a `MonoGenericContext *'
3280 argument rather than computing it here.
3281 (method_from_memberref): Correctly set the generic context before
3282 parsing the signature. Fixes #75681.
3284 2005-09-26 Zoltan Varga <vargaz@gmail.com>
3286 * object.c (mono_class_has_special_static_fields): Fix warnings.
3288 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3290 * assembly.c: Add parse_public_key function, to
3291 par the public keys. Also added mono_assembly_name_parse_full,
3292 to define it the parsed key should be freed or not.
3293 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3294 to parse a long format assembly name.
3295 * metadata-internals.h: Keep mono_assembly_name_parse_full as
3296 private, since calling it to preserve the key requires
3297 freeing it manually.
3299 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
3301 * locales.c : removed HAVE_ICU part.
3303 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
3305 * object.c (mono_class_create_runtime_vtable): Avoid calling
3306 field_is_special_static if the klass has no special static fields.
3308 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3309 (MonoCachedClassInfo): Likewise.
3311 * object.c (mono_class_has_special_static_fields): New helper function.
3313 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3315 * class.c (mono_class_create_from_typedef): Don't call
3316 interfaces_from_typedef_full for enums.
3317 (mono_class_create_from_typedef): Compute the base types of enums directly
3318 without calling mono_class_setup_fields ().
3319 (mono_class_find_enum_basetype): New helper function.
3321 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3322 one place inside the string heap.
3324 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3326 * class.c: locking fixes, code cleanups, some docs added.
3327 Allocate some data structures in the image mempool.
3329 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3331 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3334 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3336 * class-internals.h, class.c, reflection.c: reduce memory taken by
3339 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3341 * metadata.c, metadata.h, loader.h: documentation updates, code and
3344 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3346 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3349 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3350 page faults caused by the runtime while reading metadata.
3352 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3354 * socket-io.c: the field names were changed 3 months ago and no one
3355 realized until bug #76077 got filed!
3357 2005-09-20 Martin Baulig <martin@ximian.com>
3359 * icall.c (assembly_icalls): Removed some unused debugger icalls.
3361 2005-09-20 Martin Baulig <martin@ximian.com>
3363 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3364 write the rank into the class entry.
3366 2005-09-20 Martin Baulig <martin@ximian.com>
3368 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3370 2005-09-19 Zoltan Varga <vargaz@gmail.com>
3372 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3374 * icall.c (custom_attrs_defined_internal): New icall.
3376 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3378 (mono_custom_attrs_construct_by_type): New helper function.
3380 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
3382 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3383 terminate the resulting string. Fixes #76123.
3385 2005-09-16 Martin Baulig <martin@ximian.com>
3388 (mono_debug_add_method): Ignore inflated methods for the moment.
3390 2005-09-14 Martin Baulig <martin@ximian.com>
3392 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3394 2005-09-13 Zoltan Varga <vargaz@gmail.com>
3396 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3397 return a success/failure indication.
3398 (mono_metadata_interfaces_from_typedef_full): Ditto.
3399 (get_constraints): Ditto.
3401 2005-09-12 Zoltan Varga <vargaz@gmail.com>
3403 * marshal.c (emit_marshal_array): Fix handling of null arrays.
3405 * marshal.c (emit_marshal_array): Add support for returning string
3406 arrays from delegates. Fixes #76063.
3408 * marshal.c: Use the emit_ldloc/stloc macros where possible.
3410 2005-09-11 Zoltan Varga <vargaz@gmail.com>
3412 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3415 2005-09-09 Zoltan Varga <vargaz@gmail.com>
3417 * reflection.c icall.c: Fix after mono_get_exception_type_load
3420 * assembly.c (mono_assembly_get_assemblyref): New helper function.
3421 (mono_assembly_load_reference): Use the new helper.
3423 * class-internals.h (MonoLoaderError): New structure containing
3424 information about type loading errors.
3426 * class-internals.h loader.c: Add APIs to store per-thread loader
3429 * loader.c class.c: Set the loader error if needed.
3431 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3433 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3435 * decimal.c: fixed to handle the broken ARM fp format.
3437 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3439 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3442 2005-09-06 Martin Baulig <martin@ximian.com>
3444 * domain.c (supported_runtimes): Added v2.0.50727.
3446 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3448 * culture-info.h: reduce the size of some structures.
3450 2005-09-05 Martin Baulig <martin@ximian.com>
3452 Reflect latest API changes in the August CTP.
3455 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3456 ("MonoType.HasGenericArguments"): Removed.
3457 ("MonoMethod.BindGenericParameters"): Renamed to
3458 "MakeGenericMethod".
3459 ("MethodBuilder.BindGenericParameters"): Renamed to
3460 "MakeGenericMethod".
3462 2005-09-05 Martin Baulig <martin@ximian.com>
3464 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3466 2005-09-05 Martin Baulig <martin@ximian.com>
3468 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3470 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3471 generic_container is non-NULL.
3473 2005-09-05 Martin Baulig <martin@ximian.com>
3475 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3477 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3479 2005-08-29 Michal Moskal <malekith@nemerle.org>
3481 * reflection.c (encode_locals,
3482 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3483 for large generic types.
3485 2005-09-05 Martin Baulig <martin@ximian.com>
3487 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3489 * class.c (mono_dup_array_type): New public method.
3490 (mono_metadata_signature_deep_dup): New public method.
3491 (dup_type): Correctly duplicate array and function types.
3493 2005-09-05 Martin Baulig <martin@ximian.com>
3495 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3497 * reflection.c (get_default_param_value_blobs): Handle generic types
3498 and generic methods.
3500 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
3502 * class.c: Fixed error reporting (method/class were inversed) for
3503 inheritance demands.
3504 * security-manager.c|h: Added the AppDomain when calling the managed
3505 System.Security.SecurityManager.InheritanceDemand method.
3507 2005-09-01 Raja R Harinath <rharinath@novell.com>
3509 * reflection.c (encode_marshal_blob): 'marshaltype' and
3510 'marshaltyperef' are alternate sources for the custom marshaler
3513 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3515 * class.c: fix creation of array classes with rank == 1
3516 (patch by Ankit Jain <jankit@novell.com>).
3518 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3520 * object.c: fix check for creating the bound data for arrays vs
3523 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3525 * object.c: configuration file name is now based on the executable name,
3526 not the image name. Fixes bug #75931.
3528 2005-08-29 Zoltan Varga <vargaz@gmail.com>
3530 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3531 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3533 2005-08-25 Zoltan Varga <vargaz@gmail.com>
3535 * rand.c: Use wincrypt.h instead of WinCrypt.h.
3537 2005-08-24 Ankit Jain <jankit@novell.com>
3538 Raja R Harinath <rharinath@novell.com>
3540 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3541 called by it recursively.
3542 (mono_class_init): Remove special case in pending_init handling, since it's
3543 superseded by the fix to mono_class_from_typeref.
3545 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
3547 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
3548 BROKEN_THREAD_START stuff.
3550 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
3552 * class-internals.h object.c: Add a new kind of trampoline called a delegate
3555 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3557 * object.c (mono_delegate_ctor): Replace the original function address with
3558 a delegate trampoline.
3560 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3562 * icall.c: add boolean argument to base64_to_byte_array and
3563 InternalFromBase64String to control whether a whitespace-only string
3564 is allowed (or should casue a FormatException to be thrown). We need
3565 this as the behavior has changed between MS.NET 1.x and 2.0, and we
3566 to match the MS behaviour in both profiles.
3567 * appdomain.c: Bump corlib version.
3569 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3571 This patch implements a big portion of publisher policy
3572 support, used to bind assembly versions and redirect
3573 one assembly from version A to version B.
3576 New GSList loaded_assembly_bindings, for storing the cached
3578 (assembly_binding_maps_name): New static function for checking if a
3579 assembly binding information maps an assembly name.
3580 (mono_assembly_binding_info_free): New function for freeing
3581 assembly binding information resources.
3582 (get_publisher_policy_info): New static function for retrieving
3583 assembly binding information from a MonoImage.
3584 (compare_versions): New static function for comparing an assembly
3585 binding information data and the version of an assembly name.
3586 (check_policy_versions): New static function for checking if an
3587 assembly binding info mapping an assembly name is valid for it.
3588 (mono_assembly_load_publisher_policy): New static function for
3589 loading the 'policy.major.minor.MyAssembly' image for an assembly
3590 with an assembly name 'aname'.
3591 (mono_assembly_bind_version): New static function for updating
3592 assembly redirection.
3593 (mono_assembly_apply_binding): New static function for applying
3595 (search_binding_loaded): New static function for searching
3596 loaded assembly binding infos in the cache domain.
3597 (mono_assembly_load_full): Don't apply assembly binding for
3598 reflection only assemblies.
3600 * metadata-internals.h: Add MonoAssemblyBindingInfo,
3601 which contains information about assembly binding. Also
3602 declare signature for mono_config_parse_publisher_policy ()
3603 function, used to retrieve pub policy info.
3606 (publisher_policy_start): New static function used to parse publisher
3607 policy config files.
3608 (publisher_policy_parser): New static MonoParseHandler containing
3609 the functions used when parsing config files.
3610 (mono_config_parse_publisher_policy): New function for parsing
3611 publisher policy files.
3613 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
3615 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3617 * marshal.c (mono_delegate_free_ftnptr): Ditto.
3619 * object.c (mono_get_addr_from_ftnptr): New helper function.
3621 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3623 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3625 2005-08-19 Dick Porter <dick@ximian.com>
3627 * threads.c, threads.h, appdomain.c, appdomain.h,
3628 profiler-private.h, monitor.c, object.c, object-internals.h,
3629 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3630 store the thread ID, so it can hold a 64 bit value if needed.
3632 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
3634 * reflection.c (mono_reflection_create_dynamic_method): Store the
3635 handle class into the method references as well so ldtoken works in
3638 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3641 2005-08-19 Ankit Jain <jankit@novell.com>
3644 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
3645 here rather than using the method signature of a arbitrary function
3646 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
3648 Hack done with Harinath.
3650 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3652 * threadpool.c: disable printing stack traces when we get a exception
3653 in a threadpool thread. I need to do more testing to figure out which
3654 cases actually print this. Fixes bug #75828.
3656 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3658 * icall.c: there might be ignored whitespace after the last '='. This
3659 fixes length computation and bug #75840.
3661 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
3663 * assembly.c (mono_assembly_load_full): Consider .exe extension as
3666 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3669 * reflection.c (create_custom_attr_data): Ditto.
3671 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
3673 * locales.c, culture-info.h : removed RegionLCIDMap.
3674 * culture-info-tables.h : regenerated.
3676 2005-08-16 Martin Baulig <martin@ximian.com>
3678 * class.c (mono_type_get_name_recurse): Small fix.
3680 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
3682 * locales.c : indentation fixie.
3684 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
3686 * object-internals.h,
3690 icall.c : added RegionInfo table support.
3691 * culture-info-table.h : regenerated for region support.
3693 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
3695 * reflection.c (resolve_object): handle all kinds of MonoMethod
3696 including generic ones
3698 2005-08-12 Ankit Jain <jankit@novell.com>
3700 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3701 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
3703 2005-09-12 Lluis Sanchez <lluis@ximian.com>
3705 * process.c: Don't close a thread handle when it's NULL. This is a
3706 workaround for bug #75733.
3708 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
3710 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3712 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
3714 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3716 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3718 * threadpool.c: if a work item in the thread pool has a callback that
3719 catches a exception, don't propagate it after invoking the callback.
3722 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
3724 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3726 * class-internals.h (MonoCachedClassInfo): Add some new fields.
3728 * class.c (mono_class_init): Load field info lazily in the AOT case.
3730 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3732 2005-08-03 Ankit Jain <jankit@novell.com>
3735 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3736 PInvoke calling convention is 0.
3738 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
3740 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
3741 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3743 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3745 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3746 to handle threads not started by the GC (patch by Michael Meeks
3747 <michael.meeks@novell.com>).
3749 2005-07-31 Kamil Skalski <nazgul@omega.pl>
3751 * reflection.c: Make buffer used in emitting types larger for some
3752 big generic types (patch by Michal Moskal).
3754 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
3756 * mono-debug.c: Fix some (not all) alignment problems.
3758 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3760 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3761 Invoke mono_image_load_from_data_full passing the refonly
3765 (mono_assembly_open_from_bundle): Add the refonly argument,
3766 in order to pass it to other methods it calls to.
3767 (do_mono_assembly_open): Add the refonly argument, in order
3768 to pass it to other methods it calls to.
3769 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3770 the refonly parameter to it.
3772 * image.c: Add loaded_images_refonly_hash and
3773 loaded_images_refonly_guid_hash to cache the reflection
3775 (mono_images_init): Initialize the hash tables used for
3776 caching the reflection only images.
3777 (load_modules): Invoke mono_image_open_full passing the refonly
3778 parameter to load the modules the correct way.
3779 (build_guid_table): Add the refonly argument, to re-build the
3781 (do_mono_image_open): Added the refonly argument, in order to
3782 define it for the loaded image.
3783 (mono_image_loaded_full): New function, which receives an
3784 additional parameter to look for the image in the refonly or
3785 non-refonly section.
3786 (mono_image_loaded): Updated, using mono_image_loaded_full.
3787 (mono_image_loaded_by_guid_full): The same case that happens
3788 with mono_image_loaded_full.
3789 (mono_image_loaded_by_guid): Likewise.
3790 (register_image): Use the ref_only variable inside MonoImage
3791 to decide in which hash table store the current image.
3792 (mono_image_open_from_data_full): Rename
3793 mono_image_open_from_data to mono_image_open_from_data_full,
3794 adding the refonly argument, to define the ref_only variable
3796 (mono_image_open_from_data): Return
3797 mono_image_open_from_data_full.
3798 (mono_image_open_full): Rename mono_image_open to
3799 mono_image_open_full, receiving the new refonly argument,
3800 to pass it to inner methods.
3801 (mono_pe_file_open): Update this function, to open
3802 a MonoImage as a non-refonly image.
3803 (mono_image_close): Use the refonly variable inside
3804 MonoImage to remove the image from the correct caches.
3806 * image.h: Add the signatures of mono_image_open_full,
3807 mono_image_open_from_data_full, mono_image_loaded_full,
3808 mono_image_loaded_by_guid_full.
3810 * metadata-internals.h: Add the ref_only field to
3813 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3815 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3816 Fix the last behavior, which used to load the assemblies and
3817 extract MonoReflectionAssemblyName information, instead of
3818 extract it from the metadata tables. Needed for Reflection
3821 2005-07-29 Martin Baulig <martin@ximian.com>
3823 * mono-debug-debugger.c
3824 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3828 (mono_debug_address_from_il_offset): Check whether we have
3829 debugging support before attempting to take the lock.
3830 (mono_debug_source_location_from_address): Likewise.
3831 (mono_debug_source_location_from_il_offset): Likewise.
3832 (mono_debug_il_offset_from_address): Likewise.
3833 (mono_debug_address_from_il_offset): Likewise.
3835 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
3837 * class.c (mono_class_from_name_case): Add support for dynamic images.
3840 * object.c (mono_class_compute_gc_descriptor): Add a workaround
3843 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3845 * reflection.c (mono_method_get_object): Fix warning.
3847 2005-07-28 Martin Baulig <martin@ximian.com>
3850 (mono_debug_add_wrapper): Also write the wrapper type.
3852 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3854 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3856 * class.c (mono_class_init): Avoid reading nested classes if the AOT
3857 data indicates the class has none.
3859 2005-07-26 Ben Maurer <bmaurer@ximian.com>
3861 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3862 loader lock with the debugger lock. Prevents deadlocks for beagle.
3864 Beagle can now run on an smp box for a weekend without any
3867 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
3869 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3870 in a module. Fixes #75629.
3872 2005-07-26 Martin Baulig <martin@ximian.com>
3874 * mono-debug.c (mono_debug_add_wrapper): New static method.
3875 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3876 interncall or a wrapper.
3878 * mono-debug.h (MonoDebugWrapperData): New public typedef.
3879 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3880 (MONO_DEBUGGER_VERSION): Bump to 51.
3882 * mono-debug-debugger.c
3883 (mono_debugger_add_type): Removed this empty function.
3884 (mono_debugger_add_method): Likewise.
3886 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
3888 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
3889 before accessing method->slot.
3891 2005-07-21 Jb Evain <jbevain@gmail.com>
3893 * reflection.c (method_encode_clauses/class): Handle filters clauses.
3896 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
3898 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3901 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
3903 * image.h image.c: Add mono_image_get_guid () API function.
3905 2005-07-19 Ben Maurer <bmaurer@ximian.com>
3907 There were issues when multiple threads tried to load
3908 assemblies. A deadlock was created between assemblies_mutex and
3909 mono_domain_assemblies_lock. This fixes the issue by making the
3910 assembly ref counting be lock free. See bug 75586.
3912 * image.c (mono_image_close): The add ref function here was using
3913 Interlocked operations while the unref was using a mutex and a
3914 --. I don't think this was ever a bug that would be exposed in a
3915 non-pendantic way (ie, by an embedder doing a ref on one thread
3916 and an unref on another), but for the sake of correctness, this is
3919 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3920 (mono_assembly_load_reference): Call mono_assembly_addref rather
3921 than touching the refcount ourselves.
3922 (mono_assembly_close): Use InterlockedDecrement to unref the
3923 assembly. Don't acquire the lock unless it is actually needed.
3925 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3927 * class.c (mono_class_layout_fields): Fix calculation of has_references
3930 2005-07-12 Martin Baulig <martin@ximian.com>
3932 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3935 (mono_type_hash): Provide better hashing for generic instances.
3936 (mono_generic_inst_hash): Improve hashing.
3937 (mono_generic_class_hash): Likewise.
3939 * reflection.c (mymono_metadata_type_hash): Improve hashing for
3942 2005-07-12 Martin Baulig <martin@ximian.com>
3944 * reflection.c (mono_reflection_create_runtime_class): Remove the
3945 hack for generic type definitions and non-`Run' assemblies.
3946 (mono_reflection_bind_generic_parameters): Also use
3947 `klass->wastypebuilder' to check for TypeBuilders.
3949 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3951 * class.c (mono_class_layout_fields): Fix calculation of has_references
3954 * class.c (inflate_generic_class): Fix a leak.
3955 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3958 2005-07-11 Martin Baulig <martin@ximian.com>
3960 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3963 2005-07-11 Martin Baulig <martin@ximian.com>
3965 * loader.c (find_method): Also lookup in
3966 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3968 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3970 * appdomain.c (mono_domain_unload): Don't free the error message
3971 before passing it to mono_get_exception_...
3973 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3975 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3977 * threads.c: try to better guess an available RT signal (bug #75387).
3979 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3981 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3984 2005-07-07 Martin Baulig <martin@ximian.com>
3986 * class.c (mono_type_get_name_full): Return NULL for
3987 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3990 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3992 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3993 exit the appdomain as well being aborted.
3995 * threadpool.c: Create all threadpool threads inside the root appdomain, and
3996 change back to the root domain after calling managed code. This enables
3997 appdomains using threadpools to be unloaded.
3999 2005-07-07 Martin Baulig <martin@ximian.com>
4002 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
4003 into `MonoDynamicGenericClass' since we only need it for dynamic
4006 * reflection.c (mono_class_bind_generic_parameters): We don't need
4007 to compute the `parent' here.
4009 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
4011 * culture-info-table.h : regenerated.
4013 2005-07-06 Martin Baulig <martin@ximian.com>
4016 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
4018 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
4020 2005-07-06 Martin Baulig <martin@ximian.com>
4022 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
4023 we're doing a signature-only comparision; fixes #74945.
4025 2005-07-06 Martin Baulig <martin@ximian.com>
4027 * class-internals.h (MonoGenericClass): Moved some things out into
4028 a new `MonoInflatedGenericClass' type.
4029 (MonoInflatedGenericClass): New type; the `klass' of a
4030 `MonoGenericClass' is now computed lazyly in
4031 mono_get_inflated_generic_class().
4033 * class.c (mono_get_inflated_generic_class): New public function.
4034 (mono_class_inflate_generic_method): Removed the unused
4035 `MonoClass *' argument.
4036 (setup_generic_vtable): Don't call mono_get_inflated_method() on
4038 (mono_class_create_generic): Make this static and merge it with
4039 mono_class_create_generic_2(); we're now called automatically from
4040 mono_get_inflated_generic_class().
4042 * loader.c (mono_method_signature): Call
4043 mono_get_inflated_method() here.
4045 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
4047 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
4048 type of fields with RVA.
4050 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
4051 for this pseudo class.
4052 (my_mono_class_from_generic_parameter): Likewise.
4053 (mono_class_init): Allow interfaces to have cctors.
4055 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
4057 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
4058 lazily for AOT methods.
4060 2005-07-05 Martin Baulig <martin@ximian.com>
4062 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
4063 returns FALSE for a successful match, not TRUE.
4065 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
4067 * loader.c (mono_method_get_index): Optimize this a bit.
4069 2005-07-04 Martin Baulig <martin@ximian.com>
4072 (class_compute_field_layout): Move the check for generic type
4073 definitions into mono_class_layout_fields(). Fixes #74684.
4074 (mono_class_from_generic_parameter): Correctly compute
4075 `klass->parent'; fixes #75457.
4077 * reflection.c (register_assembly, register_module): Make sure
4078 `domain->rejobject_hash' is already created.
4080 2005-07-02 Martin Baulig <martin@ximian.com>
4083 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
4084 `MonoDynamicGenericClass'.
4086 2005-07-01 Lluis Sanchez <lluis@ximian.com>
4088 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
4089 returned by a field getter is null, since null is a valid value.
4091 2005-07-01 Martin Baulig <martin@ximian.com>
4093 * reflection.c (mono_reflection_generic_class_initialize): Update
4094 the `dgclass->fields [i].parent' to the correct class.
4095 (mono_image_get_fieldref_token): Use the declaring type, not the
4098 2005-07-01 Martin Baulig <martin@ximian.com>
4100 * loader.c (find_method): Also look in the interfaces; fixes #75429.
4102 2005-06-30 Ben Maurer <bmaurer@ximian.com>
4104 * threads.c (thread_cleanup): assert that thread != NULL
4105 (wait_for_tids_or_state_change): We were using the wrong variable
4106 when accessing wait->threads. `i' was always out of the bounds of
4109 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4111 * loader.c: map user32 and kernel32 to libMonoSupportW
4113 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
4115 * appdomain.c (unload_thread_main): Mark this as WINAPI.
4117 2005-06-28 Martin Baulig <martin@ximian.com>
4119 * loader.c (method_from_methodspec): Fix #75334.
4121 2005-06-28 Martin Baulig <martin@ximian.com>
4123 Fix #74953 - Arrays now implement the generic IList<T> interface
4124 on the 2.0 platform.
4126 * class-internals.h (MonoDefaults): Added `generic_array_class'.
4128 * reflection.c (mono_class_bind_generic_parameters): New public
4129 function; similar to mono_reflection_bind_generic_parameters(),
4130 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
4132 * domain.c (mono_init_internal): Try to initialize.
4133 `mono_defaults.generic_array_class' here; this'll only succeed if
4134 we're using the 2.0 corlib.
4137 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4138 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4139 (mono_lookup_internal_call): Added support for nested classes.
4142 (mono_get_method_from_token): Set `result->signature->pinvoke' if
4143 we're an interncall and have generic arguments.
4146 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4147 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4148 instance of System.Array.InternalArray<T> for arrays, so they
4149 implement the generic IList<T> interface.
4151 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
4153 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4154 (chastamar@yahoo.com). Fixes #75374.
4156 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
4158 * culture-info-table.h: regenerated.
4160 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4162 * icall.c: handle spaces correctly for base64 strings.
4164 2005-06-26 Ben Maurer <bmaurer@ximian.com>
4166 * *.c: Kill some warnings.
4168 2005-06-23 Duncan Mak <duncan@novell.com>
4170 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4171 that this builds on Solaris 10 (x86).
4173 2005-06-23 Martin Baulig <martin@ximian.com>
4176 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4177 generic type definitions.
4179 2005-06-23 Martin Baulig <martin@ximian.com>
4183 * metadata.c (mono_class_get_overrides): Renamed to
4184 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4185 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4186 pass it to mono_get_method_full().
4188 2005-06-22 Ben Maurer <bmaurer@ximian.com>
4190 * reflection.c (mono_reflection_create_runtime_class): take the
4191 mono_domain_lock in this method. Prevents deadlocks
4193 2005-06-22 Martin Baulig <martin@ximian.com>
4195 * loader.c (method_from_methodspec): Fix #75330.
4197 2005-06-22 Martin Baulig <martin@ximian.com>
4199 * reflection.c (type_get_qualified_name): Use
4200 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4201 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4202 argument; use it if we don't have an assembly name.
4204 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
4206 * object.c: In mono_message_init, set "copy out" flag for in
4207 parameters with the [Out] flag.
4209 2005-06-21 Martin Baulig <martin@ximian.com>
4212 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4215 2005-06-21 Martin Baulig <martin@ximian.com>
4217 * class.c (mono_class_init): Don't initialize `class->fields' for
4218 generic instances since they're initialized again in
4219 compute_field_layout().
4220 (compute_field_layout): Set the field's `generic_info' here; fix
4223 2005-06-21 Martin Baulig <martin@ximian.com>
4226 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4228 * metadata.c (mono_metadata_generic_method_equal): Also
4229 distinguish the `generic_class'; fixes #75334.
4231 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4235 * domain-internals.h:
4236 * reflection.c: 'domain_assemblies' field is now protected by its own
4237 lock. Don't call into managed code to run the AssemblyLoad event if we
4238 now there are no registered delegates for it.
4240 2005-06-20 Martin Baulig <martin@ximian.com>
4242 * class.c (mono_class_is_assignable_from): Use a custom version of
4243 mono_class_has_parent() to make things work for generic instances;
4246 2005-06-20 Martin Baulig <martin@ximian.com>
4248 * loader.c (method_from_methodspec): Apply a patch from
4249 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4251 2005-06-20 Martin Baulig <martin@ximian.com>
4253 * class.c (mono_class_init): Reverted Zoltan's last change; it
4256 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
4258 * threads.c (wait_for_tids_or_state_change): Add missing locking.
4260 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4262 * socket-io.c: fix the index in the socket array for writable/error
4263 sockets. Fixes bug #75306.
4265 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
4267 * class.c (mono_class_init): Allow interfaces to have static ctors.
4269 2005-06-17 Martin Baulig <martin@ximian.com>
4271 * loader.c (method_from_methodspec): Use `context->container' when
4272 parsing the `gmethod->inst'.
4274 2005-06-17 Martin Baulig <martin@ximian.com>
4276 * class.c (mono_type_get_name_recurse): Don't add the assembly
4277 name for type arguments.
4279 2005-06-15 Martin Baulig <martin@ximian.com>
4281 * reflection.c (mono_image_get_inflated_method_token): Encode
4282 correct klass; fixes #75260.
4284 2005-06-13 Michal Moskal <malekith@nemerle.org>
4286 * icall.c: Make GetCorrespondingMethod/Constructor take
4287 MonoReflectionMethod method not MonoMethod. Removed
4288 MonoType.GetCorrespondingField, and make
4289 MonoGenericType.GetCorrespondingField take name not
4292 2005-06-13 Michal Moskal <malekith@nemerle.org>
4294 * reflection.c (field_encode_signature, encode_locals):
4295 Make sizes of buffers for types larger (for big generic types).
4296 (create_generic_typespec,
4297 mono_reflection_sighelper_get_signature_local,
4298 mono_reflection_sighelper_get_signature_field):
4299 Add asserts for too small buffers.
4301 2005-06-15 Martin Baulig <martin@ximian.com>
4303 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4304 if our parent is not a dynamic type.
4306 2005-06-15 Martin Baulig <martin@ximian.com>
4308 * class-internals.h (MonoTypeNameFormat): New enum.
4311 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4312 (mono_type_get_full_name): Removed.
4313 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4314 argument instead of the boolean's.
4316 * icall.c (ves_icall_System_MonoType_getFullName):
4317 Added `gboolean assembly_qualified'.
4320 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4322 * reflection.c (mono_reflection_parse_type): Parse the new type
4325 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4327 * icall.c: no need to convert from utf16 to utf8 and then back again
4328 after the call to GetLogicalDrives.
4330 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4332 * icall.c: frombase64. Fix problems exposed by new tests.
4334 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4336 * icall.c: added internal calls for converting char [] and strings in
4337 base64 into byte [].
4339 2005-06-10 Martin Baulig <martin@ximian.com>
4341 * class.c (mono_class_create_generic_2): Read the nested classes
4342 from the metadata rather than from `gklass->nested_classes' since
4343 `gklass' might not be initialized yet.
4345 2005-06-09 Duncan Mak <duncan@novell.com>
4347 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4348 all public headers. Fixes #74919.
4350 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
4352 * domain.c: The key for proxy_vtable_hash is now a pointer
4353 array. Added new GHashFunc and GCompareFunc functions for this.
4355 * class.h: The list of interfaces in MonoRemoteClass is known in
4356 advance and can't grow (we create a new MonoRemoteClass if needed),
4357 so now the interface array can be allocated together with
4360 * object.c: Added a new method create_remote_class_key.
4361 Fixed mono_remote_class so it does not depend on
4362 mono_upgrade_remote_class.
4363 Removed extend_interface_array.
4364 Added new method clone_remote_class(), which makes a copy of a remote
4365 class and adds a new interface or class to it.
4366 mono_upgrade_remote_class() now creates a new remote class (or gets
4367 it from the cache) if an vtable upgrade is needed. In this way
4368 we make sure that other objects sharing the same remote class
4369 don't get the new vtable with unwanted interfaces.
4371 * object-internals.h:
4372 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4374 * marshal.c: Track changes in mono_upgrade_remote_class().
4376 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
4377 * icall.c: Add runtime methods for obtaining members of inflated
4378 class, which were created from supplied non-inflated members. It
4379 is used in internal Get{Method,Constructor,Field} methods in
4382 2005-06-09 Martin Baulig <martin@ximian.com>
4385 (mono_reflection_bind_generic_method_parameters): Fix #75169.
4387 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4388 * reflection.c (mono_image_basic_init): Define
4389 Version in MonoDynamicAssembly.
4391 2005-06-08 Martin Baulig <martin@ximian.com>
4396 (mono_method_signature_full): New public method; takes a
4397 `MonoGenericContext *'.
4398 (find_method): Use mono_method_signature_full() and pass the
4399 klass'es context to it.
4401 * class.c (mono_class_is_inflated_method): Use
4402 mono_method_signature_full() and pass the context to it.
4404 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4406 * object.c: add proper locking in mono_remote_class_vtable(),
4407 fixes possible memory corruption.
4409 2005-06-08 Michael Meeks <michael.meeks@novell.com>
4411 * marshal.c (mono_remoting_marshal_init): set
4412 initialized after initialization.
4414 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
4418 2005-06-06 Michael Meeks <michael.meeks@novell.com>
4420 * object.c (extend_interface_array): fix really silly
4421 memory corrupting / comparison bug.
4423 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4425 * reflection.c: Functions added to support the creation
4426 of CustomAttributeData, which includes Attribute data
4427 used by ReflectionOnly methods.
4429 * reflection.h: mono_reflection_get_custom_attrs_data and
4430 mono_custom_attrs_data_construct added (functions exposed).
4432 * icall.c: Added mono_reflection_get_custom_attrs_data
4435 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
4437 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4440 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
4442 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4444 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4445 dynamic DllImportAttribute.
4447 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
4448 dynamic DllImportAttribute.
4450 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4453 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4455 * threads.c: avoid segfault when an unstarted thread is aborted.
4457 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
4459 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4460 Returns the name and version of the runtime for reporting.
4462 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4464 * appdomain.c: bump corlib version.
4465 * object-internals.h: new field in MonoReflectionAssembly.
4467 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4469 * object-internals.h: Carlos forgot to add this field.
4471 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4473 * icall.c: Added create_version to create instances
4474 of Version of MonoReflectionAssemblyName. This change helps
4475 the AssemblyName tests to keep running fine.
4477 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
4479 * object.c (mono_method_return_message_restore): A somehow less
4480 intrusive fix for #75138.
4482 2005-06-03 Raja R Harinath <rharinath@novell.com>
4484 * object.c (mono_method_return_message_restore): Fix computation
4485 of expected number of out args.
4487 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4489 * reflection.c (mono_image_get_method_info): Fix the case when the
4492 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4494 * object.c: Added missing null check in
4495 mono_method_return_message_restore.
4497 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4499 * reflection.c (mono_image_get_method_info): Handle the case when
4502 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4504 * object.c: When creating the vtable for a proxy, take into account
4505 all inherited interfaces, not only the ones registered in
4506 iclass->interfaces. This fixs bug #74996.
4507 Also, in mono_method_return_message_restore, verify that the array
4508 of out args has the expected lengh.
4510 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4512 * socket-io.c: update the timeout in Poll when the call is interrupte.
4514 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4516 * socket-io.c: support abort/suspend in Select_internal after last
4519 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4521 * threadpool.c: remove warning.
4523 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4526 * socket-io.[ch]: Select_internal uses poll() now when available, thus
4527 removing the 1024 limit from select(). Runtime part of the fix for
4530 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4532 * socket-io.c: when resolving the addresses for the same
4533 host returned by gethostname(), get the local IPs from the interface
4534 list. Loopback addresses are discarded if the are interfaces up with
4535 non-loopback ones. Fixes bug #63265.
4537 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
4539 * appdomain.c, verify.c, object-internals.h, reflection.c:
4540 bumped corlib number to 36, and added new extra_flags field
4541 to ReflectionMethodBuilder and friends. Fixes #75060.
4543 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4545 * gc.c: register a new weak link only if the object is non-null
4548 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4550 * culture-info.h : short time pattern too.
4552 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4554 * culture-info.h : expand long time pattern string length.
4556 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4558 * culture-info-table.h : update (more French date format; #72788).
4560 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
4562 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4563 the method is static. Fixes #75029.
4565 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
4567 * reflection.c: Update the table_idx field of method builders after
4568 saving the module, since it can change. This is a workaround for
4571 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4573 * culture-info-table.h : update (additional French date format).
4575 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
4577 * icall.c (ves_icall_type_Equals): Revert last change.
4579 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4581 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4583 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
4585 * class-internals.h: Added executioncontext_class field to
4586 MonoDefaults structure.
4587 * domain.c: Cache System.Threading.ExecutionContext class in
4589 * object.c: Capture the ExecutionContext for asynchroneous calls in
4590 mono_async_result_new.
4591 * object-internals.h: Added execution_context and original_context
4592 fields to MonoAsyncResult. Added execution_context to MonoThread.
4593 * security-manager.c|.h: Added mono_get_context_capture_method to
4594 return the capture method (if required by the security manager or by
4595 the framework version used).
4596 * threadpool.c: Apply capture (if present) ExecutionContext in
4597 mono_async_invoke and revert to original context after it completes.
4599 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
4601 * culture-info-table.h : updated (real hacky solution for zh-CHT).
4603 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
4605 * culture-info-table.h : zh-CHT related workaround.
4607 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4609 * marshal.c (emit_marshal_custom): Add some error checking and call the
4610 methods in the ICustomMarshaler interface. Fixes #74875.
4612 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4613 native->managed wrappers.
4615 2005-05-12 Martin Baulig <martin@ximian.com>
4617 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4618 here and use the loader lock.
4620 * mono-debug.c: Properly lock when the debugger is not attached.
4621 (mono_debug_init): Release the initial lock if we're not running
4624 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4626 * marshal.c (emit_marshal_custom): Pass through NULL values without
4627 calling the custom marshalling routines.
4629 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4630 conversion in structures. Fixes #74882.
4632 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
4634 * culture-info-table.h : zh-* cultures were missing.
4636 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
4638 * threads.c: Added a new event background_change_event which is signaled
4639 when a thread changes its background mode.
4640 Moved here several checks previously done in managed code. The checks
4641 require the thread lock, and using the thread lock in managed code
4642 can result in deadlocks.
4643 Merged Start_internal and Thread_internal into a single method. Now
4644 Thread_internal does all work of creating and starting a thread.
4645 Added icalls for setting and getting the state of the object. Moved from
4646 managed code to avoid locking there.
4647 Added wait_for_tids_or_state_change() which is called instad of
4648 wait_for_tids when waiting for non-backround threads to end. This method
4649 will return if one of the threads ends or the background_change_event
4651 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4652 the background mode. This method signals the background_change_event
4655 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4656 removed Start_internal.
4658 2005-05-11 Martin Baulig <martin@ximian.com>
4660 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4661 to order of some fields to get proper alignment on 64-bit machines.
4663 2005-05-11 Martin Baulig <martin@ximian.com>
4665 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4666 changes as they're broken and completely fuck up the debugger.
4668 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4670 2005-05-10 Martin Baulig <martin@ximian.com>
4672 * reflection.c (mono_reflection_generic_class_initialize): Don't
4673 call mono_class_setup_parent() here.
4675 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4677 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4678 send/receive timeout use an integer in milliseconds. We were using a
4681 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4684 (internal_get_cultures): reserve the first slot of the array for the
4685 InvariantCulture, which will be filled in managed code.
4687 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
4689 * reflection.c (mono_image_fill_module_table): Initialize the
4690 GENERATION field as well.
4692 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4694 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4695 Monitor.Enter on the object.
4697 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
4699 * threads.c: Enable the wait for running threads when exiting.
4700 * icall.c: Suspend all threads before exiting.
4702 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
4704 * assembly.c (mono_assembly_load_reference): Fix warning.
4706 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4708 * threadpool.c: changed the default number of threads per cpu. From now
4709 on, the default will be 20 + (5 * number of cpus) instead of 50.
4711 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
4713 * loader.c (mono_method_get_signature_full): Add locking here.
4715 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
4717 * appdomain.c: Moved methods for parsing and freeing assembly
4718 names to assembly.c.
4719 * assembly.c, domain-internals.h: Created public methods for parsing
4720 assembly names. Fixed mono_assembly_load_with_partial_name:
4721 it now finds the best match, taking into account the version,
4722 token and culture specified in the partial name. Also return
4723 the latest version if no version information is specified.
4725 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4727 * threadpool.c: replace check for SocketAsyncCall class.
4729 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4731 * threadpool-internals.h:
4732 * Makefile.am: added threadpool-internals.h
4734 * threadpool.c: call mono_unhandled_exception on exceptions not handled
4735 that happen in threadpool threads (tested on MS).
4736 (mono_thread_pool_remove_socket): new function that dispatch any pending
4737 AIO call on a socket that is closing. By now only epoll really needs it,
4738 as select/poll wake up when the socket closes.
4741 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4743 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
4745 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4747 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
4749 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4751 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
4753 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4754 has an abort request, convert it into a suspend request.
4756 2005-04-30 Ben Maurer <bmaurer@ximian.com>
4758 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4759 warning for the usage of `UnmanagedFunctionPointerAttribute' which
4760 is not supported yet.
4762 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4764 * image.c: register assemblies loaded from data (bundles) in the loaded
4765 assemblies hash. Fixes bug #74772.
4767 2005-04-29 Martin Baulig <martin@ximian.com>
4769 * class.c (mono_type_get_name_recurse): Update to the new naming
4770 schema from the latest .NET 2.x beta2.
4771 (mono_class_setup_vtable_general): If we're a generic instance,
4772 copy the vtable from our generic type definition and inflate all
4775 * loader.c (find_method): Update to the new naming schema from the
4776 latest .NET 2.x beta2.
4778 2005-04-29 Raja R Harinath <harinath@gmail.com>
4780 * class.c (mono_class_init): Add a mono_loader_unlock to the
4783 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
4785 * icall.c (ves_icall_System_Environment_Exit): Remove the
4786 suspend_all_other_threads () call for the time being, since it can hang.
4788 * threads.c (mono_thread_manage): Similarly, disable the waiting for
4789 the background threads to exit, since it can also hang.
4791 * class.c (mono_class_init): Applied patch from Ankit Jain
4792 (radical@gmail.com). Avoid pending init errors when a field refers
4793 to a nested class using a typeref. Fixes #74734.
4795 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4796 this for dynamic modules.
4798 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4800 * threads.c: don't wait for threads that are in the process of aborting
4801 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4802 and waiting for background threads to finish. This makes xsp and
4803 mod-mono-server exit without random length delays and/or hangs.
4805 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4807 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4809 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
4811 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4812 dynamic types to prevent infinite loops. Fixes #74727.
4814 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4815 ..._is_assignable_to.
4817 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
4819 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4821 2005-04-25 Martin Baulig <martin@ximian.com>
4823 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4826 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4828 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4830 * reflection.c (build_compressed_metadata): Set metadata header
4833 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
4835 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4836 number into an integral and a decimal part. Fixes #70473.
4838 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4840 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
4842 * culture-info-table.h : reflected the latest locale-builder output.
4844 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4846 * threadpool.c: check for SuspendRequested too when deciding if
4847 mono_thread_interruption_checkpoint should be called.
4849 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4851 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4852 * threads.c: remove interruption_mutex and use Interlocked instead. When
4853 suspending all the threads, wait for all the suspended events at once.
4854 If we're shutting down and get an APC that is going to be queued,
4855 call mono_thread_execute_interruption immediately, as the thread might
4856 be sleeping on a pthread condition or mutex.
4858 * icall.c: call mono_runtime_set_shutting_down before suspending the
4861 Fixes bug #74693. And now xsp is happier when exiting.
4863 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
4865 * loader.c (mono_stack_walk): Fix #74690.
4867 2005-04-22 Martin Baulig <martin@ximian.com>
4869 * mono-debug.h (MonoDebugMethodJitInfo): Added
4870 `MonoDebugMethodJitInfo *jit'.
4872 * mono-debug.c (mono_debug_read_method): Cache the
4873 MonoDebugMethodJitInfo in `address->jit'.
4874 (mono_debug_free_method_jit_info): New public method.
4876 2005-04-22 Martin Baulig <martin@ximian.com>
4878 * class.c (mono_class_is_assignable_from): Disallow
4879 type parameter -> interface.
4881 2005-04-21 Dick Porter <dick@ximian.com>
4883 * threads.c (mono_thread_create): Turn an assertion into an error.
4885 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
4887 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4889 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
4890 Fix some gcc 4.0 warnings.
4892 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4894 * file-io.c: fix alt dir separator char on unix systems
4895 and cleanup (fixes bug #71214).
4897 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
4899 * marshal.c: Use CALLVIRT instead of CALL when dispatching
4900 a call to a remote domain, since the method may be an
4901 interface method in the client domain. This fixes bug #74192.
4903 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4905 * threadpool.c: recv/send are now performed before going back to managed
4906 code to save one transition.
4908 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4910 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4912 * metadata/threadpool.c: removed hack to workaround the bug above.
4916 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
4918 * reflection.c reflection.h: Fix handling of parameter defaults in
4919 dynamic methods. Also fixes handling of parameter attributes.
4922 * mono-debug.c (mono_debug_close_image): Fix warning.
4924 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4926 * socket-io.h: replaced old unused field with new 'blocking'.
4927 * threadpool.c: restore socket blocking state on windows(tm).
4929 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
4931 * icall.c: don't return the codebase in the AssemblyName[] returned by
4932 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4933 * object-internals.h: Removed FIXME (fields were presents) and fixed
4934 versioncompat declaration.
4936 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4938 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4939 not closed, so don't cleanup when it happens.
4941 2005-04-13 Chris Toshok <toshok@ximian.com>
4943 * mono-debug-debugger.h: change prototype for
4944 mono_debugger_lookup_type.
4946 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4947 this function, although it should probably be named
4948 mono_debugger_init_type.
4950 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4952 * threadpool.c: fix non-AIO case.
4954 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
4956 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4957 the built-in profiler to measure just JIT compilation times.
4959 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4961 * threadpool.c: the epollfd might be closed by another thread at
4962 any time, so ignore EBADF at treat it as a "we're closing" sign.
4964 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4966 * threadpool.c: release the semaphores with a count equals to the number
4967 of working threads in both IO and regular pools. Fixed typo that messed
4968 up the count of IO pool threads. Don't initialize the pipe handles if
4971 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4973 * threadpool.c: some systems don't like a NULL when deleting the socket
4976 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4978 * threadpool.c: fix semaphore allocation.
4980 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4982 * threadpool.c: added epoll() based implementation for asynchronous IO
4983 that is used instead of the default poll() when available.
4984 It can be disabled by setting MONO_DISABLE_AIO.
4986 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4988 * threadpool.c: windows needs 'closesocket' and instead of returning
4989 0 when the stream is closed while in select, it returns -1. Fixes bug
4992 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
4994 * class.c (class_compute_field_layout): Fix the regression caused by
4997 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4999 * threadpool.c: separate pool for socket async. IO.
5000 * threadpool.h: mono_max_worker_threads is not a global any more.
5002 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
5004 * class.c (class_compute_field_layout): Fix #74549.
5006 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5008 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
5009 use 2 connected sockets instead.
5011 2005-04-08 Miguel de Icaza <miguel@novell.com>
5013 * mono-config.c: Add new entry point for mkbundle
5014 mono_config_parse_memory.
5016 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5018 * threadpool.c: removed another unused function.
5020 2005-04-08 Ankit Jain <radical@corewars.org>
5022 * reflection.c (get_default_param_value_blobs): Add 'types'
5023 parameter to get the types encoded in the constant table.
5024 (mono_param_get_objects): Use the type from the constant table,
5025 not the type of the parameter, when creating default values.
5026 Handle null default values correctly.
5028 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5035 * socket-io.c: removed dead code for async IO.
5037 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5039 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
5041 * threadpool.c: intercept socket async. calls and pass them to a thread
5042 that is polling and dispatching the job items to the threadpool as
5043 socket become ready. Fixes bugs #71217, #71933.
5045 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
5046 between char and short/ushort arrays.
5048 * socket-io.c: remove dead code.
5050 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
5053 icall.c : removed InternalToUpper_Comp() and
5054 InternalToLower_Comp().
5056 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
5058 * char-conversions.h : The tables were incorrectly generated. Should
5059 be generated against invariant culture.
5061 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
5063 * object.c (mono_runtime_invoke_array): Fix return value when
5064 passing pre-created valuetype objects to ctors.
5066 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
5067 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
5070 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
5072 * domain.c: removed g_assert for runtimesecurityframe_class. This is
5073 only used with --security and hides the wrong corlib version error.
5075 2005-03-30 Joshua Tauberer <tauberer@for.net>
5077 * class.c: Changed mono_class_name_from_token so that types
5078 outside of a namespace don't have an initial period. Improved
5079 the g_warning message used in _mono_class_get when loading
5081 * assembly.c: In mono_assembly_load_reference, when an assembly
5082 can't be found, "No such file or directory" is misleading and
5083 unhelpful because a few paths were checked for the presence of
5084 the assembly. When that happens (ENOENT), display a nicer
5085 message indicating the directories that were searched. In all
5086 cases, the warning is made easier to read for non-hackers.
5088 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
5090 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
5092 * appdomain.h|domain.c: Removed inline from functions.
5093 * appdomain.c: Reduced warnings when compiling on windows.
5094 * icall.c: Fixed output_debug declaration to gunichar2*.
5095 * mono-config.c: Reduced warnings when compiling on windows.
5096 * rand.c: Added missing "windows.h". Added missing return value.
5097 * rawbuffer.c: Added missing winsock2.h for windows.
5098 * sysmath.h: Added mono-compiler.h header to allow/ease
5099 compilation with non-GCC compilers.
5100 * threads.c: Fixed declarations to compile with VS.NET C compiler.
5101 Removed cast warnings.
5103 Adapted from the work of J Lothian (for VC6).
5105 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
5107 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
5110 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
5112 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
5115 2005-03-27 Raja R Harinath <harinath@gmail.com>
5117 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
5118 has to be in $(exec_prefix). $(prefix) is for arch-independent
5119 stuff, and it would probably use $(prefix)/share rather than
5122 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5124 * console-io.c: added 2 includes that might be missing.
5126 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
5128 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
5131 * reflection.c (create_custom_attr): Allocate the params array using
5132 alloca so it gets GC tracking.
5134 2005-03-23 Chris Toshok <toshok@ximian.com>
5136 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5139 2005-03-24 Raja R Harinath <rharinath@novell.com>
5141 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5142 changes to pick up any changes in prefix, etc.
5144 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5146 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5148 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5149 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5151 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5153 * class-internals.h object-internals.h class.c reflection.c: Extend the
5154 mono_lookup_dynamic_token () function to return the class of the
5157 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5160 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
5162 * security-manager.c: Skip inheritance checks for intra-corlib
5163 class inheritance and method overrides. This skips a lot of checks
5164 and (anyway) permissions cannot work until corlib is loaded.
5166 2005-03-23 Martin Baulig <martin@ximian.com>
5168 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5169 MONO_TYPE_GENERICINST.
5171 2005-03-23 Martin Baulig <martin@ximian.com>
5173 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5175 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5177 * class.c: added locking comments to some functions.
5178 Cache the interface offsets arrays (saves about 20 KB
5179 of runtime memory in a typical app).
5180 Reduce the time overhead in mono_class_setup_supertypes ().
5182 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5184 * icall.c: speedup and fix leaks in GetMethodsByName and
5185 GetPropertiesByName.
5187 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5189 * reflection.c: some locking fixes.
5191 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5193 * metadata.c: added missing break in case statement.
5195 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
5197 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5198 typedbyref return values. Fixes #73941.
5200 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
5202 * security-manager.c|h: Added demandunmanaged method and
5203 suppressunmanagedcodesecurity class to MonoSecurityManager.
5204 Renamed aptc class to allowpartiallytrustedcallers.
5206 2005-03-17 Martin Baulig <martin@ximian.com>
5208 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5210 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5212 * file-io.c: disabled file async. IO using aio_*. It uses the
5213 threadpool now. Workaround for bug #73718.
5215 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5217 * assembly.h, mono-config.c: added code to deal with bundled configs
5218 for bundled assemblies.
5220 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5222 * *.c, private.h: cleanup, removing old private.h header file.
5224 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
5226 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5227 and throw_on_unmappable_char attributes.
5229 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
5231 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5232 _ProcessName_internal.
5234 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
5236 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5239 * icall.c threads.c threads-types.h: Remove slothash icalls as they
5242 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
5244 * object.c (compute_class_bitmap): Add support for generics. Fixes
5247 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5249 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5251 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5253 * filewatcher.c: commented out the code for windows watcher, as we don't
5254 use it (we use the managed implementation instead).
5256 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5258 * object-internals.h (MonoThread): Remove 'unused1' field.
5260 * appdomain.c: Bump corlib version.
5262 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5264 * reflection.c (mono_reflection_create_runtime_class): Remove the
5265 AssemblyBuilder.Save optimization since it causes too many problems.
5267 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
5269 * exception.c|h: Added mono_get_exception_reflection_type_load to
5270 create a ReflectionTypeLoadException object.
5271 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5272 to return NULL is a InheritanceDemand fails during reflection. Updated
5273 ves_icall_System_Reflection_Assembly_GetTypes to throw a
5274 ReflectionTypeLoadException if an InheritanceDemand fails during
5275 reflection. Added icall mapping for GetLinkDemandSecurity.
5276 * security-manager.c|h: Added ves_icall_System_Security_
5277 SecurityManager_GetLinkDemandSecurity internal call to return the
5278 class and methods permissions set for a LinkDemand. Removed unused
5279 fields in MonoSecurityManager.
5281 2005-03-10 Martin Baulig <martin@ximian.com>
5283 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5284 it's a generic instance.
5286 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
5288 * reflection.c (mono_get_object_from_blob): Applied patch from
5289 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5291 * class.c (mono_class_is_assignable_from): Another try at fixing
5292 #73469 without breaking anything.
5294 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
5296 * class.c: (mono_class_is_assignable_from): Revert the last changes
5297 since they don't work with generics.
5299 * class.c (mono_class_is_assignable_from): Fix build bustage.
5301 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5302 the managed IsAssignableFrom method. Fixes #73469.
5304 * reflection.c (mono_reflection_call_is_assignable_from): New helper
5307 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
5309 * object.c (mono_load_remote_field_new): Fix returning uninitialized
5310 memory when the remoting callback does not sets the out arguments.
5313 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5316 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5318 * object-internals.h (MonoStackFrame): Sync with managed object layout.
5320 * appdomain.c: Bump corlib version.
5322 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
5324 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5327 * threads.c (mono_thread_attach): Detect threads which are not started
5328 by the GC pthread wrappers.
5330 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
5332 * icall.c: Added new icall for RNG.
5333 * rand.c|h: Added new icall to open the RNG. This allows to share a
5334 single handle on Linux to access /dev/urandom and fix #73183.
5336 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5338 * object.c: setting the new vtable in a transparent proxy object must
5339 not change the GC descriptor.
5341 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5343 * object.c: fixed compilation without GCJ support.
5344 * reflection.c: for runtime-created types ensure klass->has_references
5345 is correct (bug #73215).
5347 2005-03-02 Martin Baulig <martin@ximian.com>
5349 * class.c (mono_class_is_assignable_from): Make this work if
5350 `oklass' is a generic instance; fixes #72831.
5352 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5354 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5357 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5359 * marshal.c: Reorganize native->managed marshalling code to also use
5360 the emit_marshal_... functions.
5362 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5364 * object.c: typed allocs have issues with bitmap sizes > 30,
5365 so check for max_set >= 30.
5367 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5369 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5370 managed code. Fixes #73012.
5372 * metadata.h (MonoMarshalSpec): Add elem_mult field.
5374 * metadata.c reflection.c: Load/Emit elem_mult as well.
5376 * metadata.h (MonoMarshalSpec): Add comment.
5378 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5380 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5381 num_elem to -1 if not given.
5383 * object-internals.h (MonoReflectionMarshal): Add has_size field.
5385 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5388 2005-03-01 Marek Safar <marek.safar@seznam.cz>
5390 * null-gc.c (mono_gc_free_fixed): Was not compilable.
5392 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
5394 * reflection.c (encode_marshal_blob): Encode param_num field as well.
5396 * object-internals.h (MonoReflectionMarshal): Add param_num field.
5398 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5400 * object.c: generalized the reference bitmap creation
5401 and added hooks for the new GC.
5402 * class-internals.c: removed the gc_bitmap field from MonoClass.
5404 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5406 * domain.c: help the compiler to produce better code
5407 in mono_jit_info_table_find ().
5409 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5411 * object.c: make all allocations look typed.
5413 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5415 * socket-io.c: load Mono.Posix if it's not loaded already
5418 2005-02-24 Martin Baulig <martin@ximian.com>
5420 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5421 * reflection.c (dup_type): Likewise.
5423 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
5425 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5426 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5428 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5430 * domain.c, threads.c, object-internals.h: make the critical thread
5431 local vars use the fast access mode (even when we're compiled in
5432 a lib). Provide accessors to be used by the jit during codegen.
5434 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5436 * appdomain.c: Changed hook functios behavior to include
5437 support for the reflection only assemblies. Some icalls were changed
5438 to support the mentioned assemblies too. Signatures of static methods
5439 try_assembly_resolve and real_load now have an additional parameter:
5442 * assembly.c: General changes to mono_assembly_ methods to support
5443 reflection only api. Functions mono_assembly_open, mono_assembly_load,
5444 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5445 suffix, to support an additional gbool parameter to specify whether
5446 the assembli is reflection only or not. Created some new hook functions
5447 to add support for reflection only assemblies. Signatures of static
5448 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
5449 have now an additional parameter: refonly.
5451 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5452 indicating whether the assembly is reflection only or not.
5454 * exception.c: Add mono_get_exception_invalid_operation.
5456 * icall.c: Throw an InvalidOperationException when trying to invoke
5457 a property/method/event, or trying to set/get the value of a field.
5458 Also add an icall to retrieve the ref_only flag to the
5459 MonoReflectionAssembly.
5461 2005-02-23 Chris Toshok <toshok@ximian.com>
5463 Part of fix for #72827.
5464 * mono-debug.c (mono_debug_add_method): add lexical block data to
5465 the info we write. Kind of a hack at the moment - we copy the
5466 lexical block info from the MonoDebugMethodInfo to the
5467 MonoDebugMethodJitInfo here, before writing it.
5468 (mono_debug_read_method): read the lexical block info.
5470 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5472 * debug-mono-symfile.h: add lexical block support.
5474 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5477 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5479 * loader.c (mono_lookup_pinvoke_call): Fix warning.
5481 * object.c (mono_runtime_free_method): Call mono_free_method () and
5482 put the TODOs there.
5484 * loader.c (mono_free_method): Free up most memory allocated for
5487 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5489 * reflection.c: properly flag a Type argument to a
5490 named custom attr value (bug #72248).
5492 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5494 * reflection.c: reduce code duplication in named custom
5497 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5499 * reflection.c: properly encode custom attrs of type object
5502 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5504 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5506 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5508 * socket-io.c: load System.dll if it's not loaded already
5509 (bug #72850 and #70477).
5511 2005-02-21 Martin Baulig <martin@ximian.com>
5513 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5516 2005-02-21 Martin Baulig <martin@ximian.com>
5518 * reflection.c (mono_image_build_metadata): We also need to
5519 "fixup" the MethodImpl table after we computed the final method
5520 indices. Call fixup_methodimpl() to do that.
5521 (fixup_methodimpl): New private method.
5523 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5525 * assembly.c: special case mscorlib.dll (bug#72536),
5526 patch from Carlos Alberto Cortez.
5528 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
5530 * threads-types.h threads.c: Fix build bustage.
5532 * threads.c: Use a union for long<->double conversions.
5534 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5535 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5537 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
5538 containing the checkpoint call with NOT_TAKEN.
5540 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
5541 checkpoint before pushing the arguments, so they won't have to be
5544 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5546 * domain.c, assembly.c, domain-internals.h: make some data
5547 const and relocation-free.
5549 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5551 * object.c, appdomain.c, class-internals.h: introduce the
5552 MonoClassRuntimeInfo structure to hold the info needed to
5553 use a class at runtime. Made mono_class_vtable() lock-free
5554 for all the appdomains.
5556 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5558 * metadata-internals.h, image.c: introduce a per-image mempool to
5559 be used for memory that has the same lifetime as the image.
5561 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
5563 * domain.c: In mono_init_internal(), instead of selecting the first
5564 runtime version supported by an executable, get a list of all
5565 supported versions and select the one for which an mscorlib exists
5566 (since even if the runtime supports a given version, it doesn't mean
5567 that the framework for that version is installed).
5568 Modified get_runtimes_from_exe to support this behavior.
5569 In supported_runtimes, added information about additional system
5572 * assembly.c: Added support for more than one system assembly version
5573 per runtime version. Updated the assembly list.
5574 In mono_assembly_remap_version, removed the initial version check,
5575 since we don't know to which version we need to compare until we
5576 get the version set on which the assembly is based.
5577 Moved the code for loading corlib into the new method
5578 mono_assembly_load_corlib(), so it can be used by the initialization
5581 * domain-internals.h: Updated data structures and added declaration
5582 for mono_assembly_load_corlib.
5584 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5586 * reflection.c (resolve_object): Fix the creation of the signature in
5587 the SignatureHelper case.
5589 * assembly.c (mono_assembly_remap_version): Fix binary search.
5591 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
5593 * class.c: Added inheritance check when a method is overloaded (from a
5594 virtual method or when implementing an interface) and when a class is
5595 inherited. Added functions to set a failure for a class and to
5596 retreive the exception from a failure.
5597 * class-internals.h: Added fields to MonoClass to keep the exception
5598 information status for inheritance (or other exceptions) to be thrown
5599 later (i.e. not at load time).
5600 * object.c: Throw the inheritance SecurityException when a type is to
5601 be created with either class or method inheritance violations.
5602 * reflection.c|h: Fix when getting declsec from a class. Removed
5603 unrequired code for class. Improved sanity in parameter naming.
5604 * security-manager.c|h: Added functions to check for class and method
5607 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5609 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5610 and has_finalize in dynamic types as well.
5612 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
5614 * culture-info-table.h : fixed currency format for en-GB (and so on).
5616 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5618 * gc.c: ensure the GC handles never have 0 as a value.
5620 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5622 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5623 a pointer to a struct to unmanaged code. Fixes #72625.
5625 2005-02-16 Martin Baulig <martin@ximian.com>
5627 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5629 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5631 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5633 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5635 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5637 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
5638 UnmanagedFunctionPointerAttribute, use it for determining calling convention
5641 * reflection.c (mono_custom_attrs_get_attr): New helper function.
5643 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5645 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5647 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5648 changes to make the current context a field in MonoThread.
5650 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5652 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5655 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5656 extracted from mono_marshal_get_native_wrapper.
5658 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5659 to create wrappers around native functions.
5661 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
5662 delegates for arbitrary function pointers. Fixes #71472.
5664 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5666 * threads.c: cleaned up the code a little.
5668 2005-02-15 Martin Baulig <martin@ximian.com>
5670 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5673 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5674 allocate larger chunks if needed.
5676 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5678 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5681 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5683 * domain.c: keep the domains in an array and ensure the domain ids
5684 are kept small, so they can be used as indexes to domain-specific data
5685 with a small memory overhead.
5687 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5689 * icall.c: Handle byref types in Type icalls. Fixes #72544.
5691 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5693 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5695 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
5697 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5699 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5702 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5704 2005-02-12 Ben Maurer <bmaurer@ximian.com>
5706 * domain-internals.h: add the hashtable here.
5708 * class-internals.h: Remove `info' from MonoMethod
5710 * domain.c: Add a new hashtable, jit_trampoline_hash
5712 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5714 * object.c: don't set the value of static fields
5717 2005-02-11 Martin Baulig <martin@ximian.com>
5719 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5720 (mono_debug_add_method): Silently ignore the method if it's too big.
5721 (mono_debug_add_type): Likewise.
5723 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5725 * threads.c, appdomain.c: remove #ifdefs from the code.
5727 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
5729 * metadata-internals.h: Added flags to MonoAssembly to cache the most
5730 common security informations. This allows us to stay in unmanaged code
5731 when doing LinkDemand and it's special cases (except for the first
5732 time for initialization). The flags a very much used with --security.
5733 * reflection.c|h: Added code to get declarative security attributes
5734 for LinkDemand and InheritanceDemand. This required to refactor the
5735 existing code for Demand.
5736 * security-manager.c|h: Added new method fields for the special cases
5739 2005-02-10 Martin Baulig <martin@ximian.com>
5741 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5742 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5744 2005-02-10 Martin Baulig <martin@ximian.com>
5746 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5747 debugging code; this is almost a complete rewrite.
5749 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5751 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5753 * domain.c, object.h: expose mono_string_equal () and
5754 mono_string_hash ().
5755 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5756 it's implemented in managed code.
5758 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5760 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5761 lo leak objects between appdomains.
5763 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5765 * assembly.c: old compilers compilation fix from
5766 robertj@gmx.net (Robert Jordan).
5768 2005-02-09 Ben Maurer <bmaurer@ximian.com>
5770 * class-internals.h: Little reminder for the future.
5772 * debug-helpers.c: Fix up wrapper_type_names
5774 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5776 * image.c, metadata-internals.h: when loading an image from a file,
5777 mmap all of it and use the same codepaths as when using a
5778 in-memory image: the code is simpler and we use less memory
5779 (both writable and readonly).
5781 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5783 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5784 API to alloc runtime data structures that need to be tracked by the
5785 GC and contain pointers.
5786 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5787 make the code more readable and eventually use a different GC.
5789 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
5791 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5794 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
5796 * object.c: In release_type_locks(), don't release the cctor lock
5797 if it has already been released. This fixes a crash in the
5800 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5802 * gc.c, marshal.c, icall.c: register a delegate for finalization
5803 only when the native function pointer has been allocated for it.
5805 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5807 * object.c: cleaned up some code, allocate objects that are
5808 pointer free with the atomic malloc variant. Allocate memory
5809 for static data from the mempool if it's pointer-free.
5810 Allocate the bounds array at the end of the array data, when needed.
5811 * object-internals.h, object.h: move a private function in a private
5813 * class.c: handle missing case in tracking references in fields.
5815 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5817 * class.c, class-internals.h: keep track if a type has
5818 reference fields in either the instance or static fields.
5820 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
5822 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5823 and renamed to MonoRuntimeInfo. Added fields to store the expected
5824 framework assembly version. Changed mono_get_framework_version and
5825 mono_get_runtime_version for a single mono_get_runtime_info method.
5827 * assembly.c: Added method to remap system assembly versions to the
5828 current executing runtime version. Removed old mapping code.
5829 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5831 * icall.c, reflection.c: Track api changes.
5833 2005-02-06 Miguel de Icaza <miguel@novell.com>
5835 * loader.c (method_from_memberref): Improve error reporting,
5836 produce the class name instead of the typeref/typedef index.
5838 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
5840 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5842 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5844 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5845 stdcall and charset name mangling. Reorganize the code and add
5848 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5850 * monodiet.c: More iters!
5852 * marshal.c: Iter usage.
5854 * icall.c: Iter usage.
5856 * object.c: Use iters.
5858 * debug-helpers.c: More iters
5860 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5862 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5865 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5867 * mono-debug-debugger.c: use iters
5869 * class.c, class-internals.h: mono_class_setup_events is static
5872 * All callers: use iters
5874 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5876 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5877 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5879 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5881 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5883 * marshal.h: Add prototypes for ldfld/stfld_remote.
5885 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5886 this is called during startup.
5888 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5890 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5891 MonoThreadsSync struct private in monitor.c. Changed the way
5892 MonoThreadsSync is allocated so it's faster and there is no
5893 need to keep track of it with a finalizer and it uses less memory.
5894 This also finally allows us to allocate mono objects as ptrfree when
5895 there are no reference fields.
5897 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5899 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5900 disappearing link to the GC interface and use them to simplify
5903 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5905 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5906 stfld_remote which call mono_load/store_field_new. This allows methods
5907 calling ldfld/stfld wrappers to be AOTed.
5909 * console-io.c: Include sys/filio.h under solaris.
5911 * console-io.c: Include curses.h if needed correctly.
5913 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5915 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5916 method->klass as well.
5918 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5920 * class.c (mono_class_init): Switch on lazy initialization of
5923 * class.c (mono_class_get_finalizer): Handle the case when the
5924 finalizer is inherited.
5926 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5928 * console-io.c: <curses.h> is needed by term.h on solaris.
5930 2005-02-03 Ben Maurer <bmaurer@ximian.com>
5932 * icall.c, class-internals.h, monodiet.c, class.c: Remove
5933 mono_class_setup_properties where possible. Remove this ftn from
5934 the header file, and make it static.
5936 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5938 * loader.c: Add missing setup_... call.
5940 * class.c: Add missing setup_... calls.
5942 * class.c (mono_class_init): Switch on lazy initialization of
5945 * class.c (mono_class_init): Fix generics broken by the recent changes.
5947 * monodiet.c (handle_type): Add missing setup_... calls.
5949 * class.c: Back out garbage in previous patch.
5951 * class.c: Add missing setup_... calls.
5953 * class.c (mono_class_get_method_from_name_flags): Avoid calling
5954 mono_class_setup_methods () if possible.
5956 * class-internals.h (MonoClass): Add 'has_cctor' flag.
5958 * class-internals.h (MonoCachedClassInfo): New structure.
5960 * class.c: Initialize properties and events fields of MonoClass lazily.
5962 * class.c: Add infrastructure for lazily initializing the methods and
5963 vtable fields of MonoClass. Not yet used.
5965 * class.c (mono_class_get_finalizer): New helper function.
5967 * class.c: Add infrastructure for loading some class related data from
5970 * object.c: Add infrastructure for initializing the vtable from data
5973 * gc.c (run_finalize): Use mono_class_get_finalizer ().
5975 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5976 appropriate initialization function before accessing parts of the
5977 MonoClass structure.
5979 * marshal.c: Fix warnings.
5981 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5983 * mono-debug-debugger.c (get_exception_message): Use
5984 mono_class_get_method_from_name_flags ().
5986 2005-02-02 Ben Maurer <bmaurer@ximian.com>
5988 * reflection.c, appdomain.c: Replace a few manual searches that
5989 Zoltan missed. (Paolo approved this part of my initial patch).
5991 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5993 * profiler.c: disable recording statistical events at report time.
5995 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5997 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5998 to byteswap arrays of enum values, too (bug #72080).
6000 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
6002 * appdomain.c (set_domain_search_path): Allow this to be called if
6003 domain->setup is not yet set.
6005 * loader.c (mono_method_get_index): New helper function.
6007 * loader.c reflection.c: Use mono_method_get_index ().
6009 * class.c (mono_class_get_method_from_name_flags): New helper method.
6011 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
6014 * class.c (mono_class_get_cctor): New helper method.
6016 * string-icalls.c object.c class.c marshal.c reflection.c: Use
6017 mono_class_get_method () to look up methods.
6019 2005-02-01 Miguel de Icaza <miguel@novell.com>
6021 * console-io.c: Fix the build, this should work on Windows.
6023 2005-01-31 Ben Maurer <bmaurer@ximian.com>
6025 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
6026 be set to null to keep things valid
6028 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6030 * icall.c: added Console 2.0 icalls.
6031 * Makefile.am: added console-io.[ch]
6032 * console-io.[ch]: internal calls for Console 2.0 API.
6034 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6036 * class.c: make sure we consider all the interfaces
6037 when calculating max_interface_id (bug found by
6038 Jeroen Frijters running ikvm).
6040 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
6042 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
6043 valuetype fields to null.
6045 * object.c (set_value): Ditto. Fixes #71669.
6047 2005-01-31 Martin Baulig <martin@ximian.com>
6049 * metadata.c (mono_metadata_has_generic_params): New public
6050 function; checks whether something is a generic method.
6052 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6054 * appdomain.c: fix infinite recursion when adding assemblies.
6056 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
6058 * object.c: Fix small typo to return all items for Environment.
6061 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6063 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
6064 reflection.c: more domain and assembly-unload related fixes
6065 and memory leaks plugs.
6067 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
6069 * 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.
6071 2005-01-29 Ben Maurer <bmaurer@ximian.com>
6073 * loader.c (mono_method_signature): Make this method lazy
6074 (mono_get_method_from_token): Don't computate the signature here.
6076 Doing this saves quite a bit of memory. I got 90 kb on starting up
6077 monodoc. It should also save some disk reads on startup.
6079 * *: MonoMethod->signature might be NULL now. You *MUST* use
6080 mono_method_signature.
6082 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
6084 * object.c (mono_runtime_get_main_args): Return an array from the
6085 current domain here. Fixes #71938.
6087 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
6089 * monitor.c: formatting changes to comply with the
6090 mono coding style and remove #ifdefs from the code.
6092 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6094 * metadata.c, private.h: remove some unneeded data
6095 and use a more compact representation for table schemas.
6097 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
6099 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
6100 to get a better distribution in hash tables.
6101 * *.c: use mono_aligned_addr_hash() where appropriate.
6102 * assembly.c: make var static.
6104 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
6106 * domain-internals.h: Put MonoJitInfo on a diet.
6108 * domain.c: Fix a warning.
6110 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6112 * gc.c: rework the gc handles code to reuse handles
6115 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6117 * domain.c: fixed long standing bug in mono_string_equal() which
6118 was brought to light with the ldstr changes.
6120 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
6122 * reflection.c: Remove warning by adding missing include for marshal.h
6124 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6126 * domain.c, object.c: change the ldstr_table to hold
6127 MonoString* as keys: makes the runtime isinterned lookup
6128 faster and simplifies memory management.
6130 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
6132 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
6133 possible to add imperative security checks before calling the icall.
6134 * reflection.c: Return security attributes on the original MonoMethod
6135 (and not the wrapped one). This fix permissions on icalls.
6137 2005-01-25 Dick Porter <dick@ximian.com>
6139 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6140 the check for mktime() support actually test the mktime() return
6141 value. "Fixes" bug 71682, though the output is still different to
6144 2005-01-25 Martin Baulig <martin@ximian.com>
6146 * class.c (mono_class_is_assignable_from): Make this work for
6149 2005-01-24 Ben Maurer <bmaurer@ximian.com>
6151 * marshal.c (mono_string_utf8_to_builder)
6152 (mono_string_builder_to_utf16): We might not have ownership of the
6153 string. In thise case, we need to create a new buffer.
6155 * object-internals.h (mono_stringbuilder_capacity): sb->str might
6156 be null, in which case, use the default capacity.
6158 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6160 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6161 GC events to the profiler.
6163 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6165 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6166 if you don't want the GC to run.
6168 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6170 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6171 start providing a GC API and keeping different implementations in
6173 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6175 2005-01-22 Ben Maurer <bmaurer@ximian.com>
6177 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6178 mmap rather than allocating a huge buffer.
6179 (mono_debug_close_mono_symbol_file): Free the buffer allocated
6182 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
6184 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6185 and CheckExecutionRights.
6186 * reflection.c|h: Keep the index of the declarative security to be
6187 used, instead of the pointer, when AOT compiler is used. Also add
6188 class initialization when requesting demands.
6189 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6190 CheckExecutionRights. Both properties are now FALSE by default, and
6191 unmodifiable, unless the --security option is used.
6193 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6195 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6196 reflection.c: properly refcount images and assemblies, many leaks fixed.
6198 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6200 * threadpool.c: increase the timeout for threads in the thread pool to
6201 10s. Fixes bug #67159.
6203 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
6205 * class-internals.h: Sun's compiler insists on explicit
6206 signed on bit fields to handle then correctly.
6208 2005-01-19 Miguel de Icaza <miguel@ximian.com>
6210 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6211 Make the size of the array fit only the number of invalid path
6214 * class.c (_mono_class_get): Improve the error reporting when a
6215 class referenced is not found, to assist debugging.
6217 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6219 * threads.c: fix off-by-one error.
6220 * domain.c: free data allocated in the domain.
6222 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6224 * reflection.c (mono_method_body_get_object): Fill out exception info
6227 * object-internals.h: Add MonoReflectionExceptionHandlingClause
6230 2005-01-19 Martin Baulig <martin@ximian.com>
6232 * loader.c (mono_get_method_constrained): Make this work again.
6234 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6236 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
6237 guint16 to match the managed side.
6239 * reflection.c (mono_reflection_body_get_object): Fill out local
6242 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6245 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6246 'local_var_sig_token'.
6248 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
6250 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
6253 * reflection.c (mono_method_body_get_object): Handle abstract and
6256 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6258 * marshal.c, loader.c, class-internals.h, reflection.c:
6259 store the emthod data for a wrapper in an array instead of a list.
6261 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6263 * marshal.c: change the code to allocate memory more
6264 conservatively for method wrappers.
6266 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6268 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6269 fields from MonoClass to the marshal info structure where they belong.
6271 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6273 * class.c, object.c, class-internals.h, marshal.c: rearrange
6274 some fields and tweak some types to lower memory usage.
6276 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
6278 * threads.c (signal_thread_state_change): Handle the case when the
6279 target thread is the current thread.
6281 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6283 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
6284 emit_ptr_to_object_conv.
6286 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6287 marshalling. Fixes #71352.
6289 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6291 * metadata.h, blob.h: move table enum to blob.h so it can be included
6293 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6294 cut the size of MonoImage/MonoDynamicImage.
6296 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
6298 * profiler.c (mono_profiler_install_simple): Fix default arguments.
6300 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6302 * reflection.c, reflection.h, icall.c: add a function to check
6303 if an attribute type is defined for a metadata object.
6305 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
6307 * object-internals.h: Added some needed fields from StringBuilder class.
6308 * marshal.c: Set the maxCapacity when creating a StringBuilder.
6310 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
6312 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6313 threads before shutting down the runtime.
6315 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6317 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6319 * object-internal.h, threads.c: implement stacksize and
6320 parameterized thread start functionality (requires
6321 matching corlib). Marked broken code for later removal.
6323 2005-01-12 Martin Baulig <martin@ximian.com>
6325 * class-internals.h (MonoGenericClass): Moved the `initialized'
6326 flag to MonoDynamicGenericClass, removed `init_pending'.
6327 (MonoGenericInst): Added `is_reference' flag.
6329 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
6331 * reflection.c (mono_image_create_pefile): Only set the pe_offset
6332 inside the MSDOS header. Fixes #71201.
6334 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6336 (mono_domain_finalize): Ditto.
6338 2005-01-12 Martin Baulig <martin@ximian.com>
6340 * class.c (mono_get_shared_generic_class): Use the cache for
6341 non-dynamic generic classes.
6343 * class-internals.h (mono_class_create_generic_2): Removed
6344 function prototype, this function is now static inside class.c.
6346 * class.c (mono_class_create_generic_2): Made this static, only
6347 call it from mono_class_init() and mono_class_setup_parent().
6348 (collect_implemented_interfaces_aux): Call mono_class_init() on
6349 the interfaces we collect.
6350 (mono_class_setup_vtable): Call mono_class_init (class->parent).
6352 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6354 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6355 it a real thread handle.
6357 * domain-internals.h: Move exvar_offset from MonoJitInfo to
6358 MonoJitExceptionInfo, since each catch clause needs its own variable.
6360 2005-01-11 Dick Porter <dick@ximian.com>
6362 * image.c (mono_pe_file_open): New variant on mono_image_open()
6363 that does not set up the CLI metadata; used for FileVersionInfo so
6364 it can get the data for windows binaries too.
6366 * process.c (process_read_string_block): Don't read off the end of
6367 the StringTable block.
6369 These both fix bug 70766.
6371 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6373 * gc.c: set some fields to NULL at GC cleanup time.
6374 * threads.c: if we quit the main thread, call exit ().
6376 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6378 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6380 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6382 * threads.h, threads.c, object.c: added accessor and settor for
6383 main_thread. Handle it specially when exiting from it: wait
6384 for other foreground threads to exit.
6386 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6388 * process.c, verify.c: remove some bloat.
6390 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
6392 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6393 the calling convention to cdecl under win32.
6395 2005-01-08 Ben Maurer <bmaurer@ximian.com>
6397 * object.c (mono_object_get_size): New function to get the size of
6400 * profiler.c (simple_allocation): Use above.
6402 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
6404 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6405 ves_icall_System_AppDomain_getRootDomain (as it's not required to
6406 get an appdomain by it's id and we can't assume the root's id is 0).
6407 * domain-internals.h: Change the function prototype to match.
6408 * icall.c: Change the icall table for AppDomain.
6410 2005-01-08 Miguel de Icaza <miguel@ximian.com>
6412 * locales.c (string_invariant_compare_char): Only compute
6413 GUnicodeTypes in the case where we need them. Test for ordinality
6414 first and return if so.
6419 * FIXME: here we must use the information from c1type and c2type
6420 * to find out the proper collation, even on the InvariantCulture, the
6421 * sorting is not done by computing the unicode values, but their
6422 * actual sort order.
6425 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6427 * loader.c: for P/Invoke methods, allow the "Internal" shared
6428 library name to refer to the calling process symbol namespace.
6430 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
6432 * Makefile.am: Add the security manager to the build.
6433 * security-manager.c|h: New. Initialization of the security manager.
6435 2005-01-07 Dick Porter <dick@ximian.com>
6438 * monitor.c: Update thread state during Monitor and WaitHandle
6439 waits. Fixes bug 71031.
6441 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
6443 * reflection.c (property_encode_signature): Correctly handle when the
6444 property has no methods.
6446 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
6448 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6450 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6451 fields from mb, not rmb. Fixes #71017.
6453 * marshal.c (emit_ptr_to_str_conv): Add support for
6454 ByValTStr -> string conversion. Fixes #71015.
6456 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6458 * mempool.c (mono_mempool_contains_addr): New helper function.
6460 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6462 * metadata.c (mono_metadata_compute_size): Fix size calculation of
6463 HasSematics encoded fields.
6465 * metadata.c (mono_type_to_unmanaged): Improve error message for
6466 invalid string marshalling.
6468 * metadata.c: Fix warnings.
6470 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6472 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6475 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6477 * domain.c object.c domain-internals.h: Revert part of r38077 since the
6478 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6481 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
6483 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6484 so methods containing these can be AOTed.
6486 2005-01-03 Martin Baulig <martin@ximian.com>
6488 * loader.c (find_method): Removed the hack for generic instances.
6489 (method_from_memberref): If our parent is a generic instance, pass
6490 its generic type definition to find_method() and then inflate the
6492 (mono_get_method_constrained): Pass the generic type definition to
6493 find_method() and inflate the method later.
6495 * class-internals.h (MonoStats): Added `generic_class_count'.
6497 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6498 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6500 * reflection.c (mono_custom_attrs_from_params): Don't ignore
6501 generic type definitions.
6503 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
6505 * loader.c icall.c: Fix warnings.
6507 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
6509 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6510 blittable types. Fixes #70864.
6512 2004-12-29 Martin Baulig <martin@ximian.com>
6515 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6517 * reflection.c (mono_method_get_object): Create a
6518 "System.Reflection.MonoGenericMethod" for inflated methods; don't
6519 call mono_get_inflated_method().
6521 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6523 2004-12-27 Martin Baulig <martin@ximian.com>
6525 * class-internals.h (MonoMethod): Added `is_inflated' flag.
6526 (MonoMethodInflated): Added `inflated' field.
6528 * class.c (mono_class_inflate_generic_method): Don't really
6529 inflate the method here; just set the `is_inflated' flag in the
6531 (mono_class_get_inflated_method): Actually inflate the method here
6532 if it's not already inflated; we use the MonoMethodInflated's new
6533 `inflated' field as a cache.
6535 2004-12-26 Martin Baulig <martin@ximian.com>
6538 (inflate_generic_class): Moved some code out of inflate_generic_type().
6539 (mono_class_inflate_generic_method): If we're already inflated,
6540 inflate the context and use the declaring method; ie. make sure
6541 the declaring method of an inflated method is always the generic
6543 (mono_class_create_from_typedef): Create
6544 `class->generic_container->context->gclass'.
6546 2004-12-24 Ben Maurer <bmaurer@ximian.com>
6548 * metadata-internals.h, marshal.c, reflection.c: More
6549 MonoGHashTable->GHashTable.
6551 * domain-internals.h, class.c: Change MonoGHashTable's into
6552 GHashTables for some cases where no gc stuff is used
6554 All users: update apis
6556 2004-12-23 Ben Maurer <bmaurer@ximian.com>
6558 * metadata.c (builtin_types): Make this `const'. Makes this get
6559 put into the shareable section.
6560 (mono_metadata_init): Casts to make gcc happy.
6562 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
6564 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6566 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
6568 * icall.c: Added an internal call to retrieve the position and length
6569 of assembly-level declarative security attributes (RequestMinimum,
6570 RequestOptional and RequestRefuse). This is used by the Assembly class
6571 to re-create the corresponding permission sets.
6573 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6575 * marshal.c: fix the stelemref wrapper to be type correct
6578 2004-12-20 Ben Maurer <bmaurer@ximian.com>
6580 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6581 to do key & 0x7fffffff. Hashtable already does this. It just
6582 results in longer code.
6584 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
6586 * appdomain.c: Bump corlib version.
6587 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6588 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6589 * reflection.c|h: Add functions to get declarative security infos
6590 (blob position and length) for assemblies, classes and methods.
6592 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6594 * reflection.c: sort the constant table (bug #70693).
6596 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6598 * object-internals.h, threads.c, domain.c: add accessors for
6599 the MonoThread and MonoDomain tls keys.
6601 2004-12-18 Martin Baulig <martin@ximian.com>
6603 * class.c (inflate_generic_type): If we're inflating a generic
6604 instance, set `ngclass->context->container = context->container';
6605 ie. the container we inflated into.
6607 * metadata.c (mono_metadata_parse_generic_param): Reflect above
6608 inflate_generic_type() changes.
6610 2004-12-17 Martin Baulig <martin@ximian.com>
6613 (MonoGenericClass): Replaced `MonoType *generic_type' with
6614 `MonoClass *generic_class'. Removed `dynamic_info'; if
6615 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6616 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6618 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
6620 * exception.c (mono_exception_from_token): New helper function.
6622 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
6624 * assembly.c (mono_assembly_load_with_partial_name): Call
6625 mono_assembly_loaded before invoking the preload hooks. Fixes
6628 * object-internals.h (MonoThread): Change culture_info and
6629 ui_culture_info into an array.
6631 * threads.c: Cache culture info objects from more than one appdomain.
6633 * threads.c threads-types.h icall.c: Add icalls for manipulating the
6636 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
6638 * threads.h threads.c appdomain.c: Clear the culture_info field of
6639 all threads during unloading if they point to an object in the dying
6642 2004-12-13 Ben Maurer <bmaurer@ximian.com>
6644 * culture-info.h (TextInfoEntry): New struct
6645 * object-internals.h: sync with managed
6646 * locales.c: fill the `text_info_data' field
6647 * culture-info-tables.h: update
6649 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6651 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6654 2004-12-12 Ben Maurer <bmaurer@ximian.com>
6656 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6657 (ves_icall_ModuleBuilder_getMethodToken): Ditto
6659 2004-12-12 Martin Baulig <martin@ximian.com>
6661 * mono-debug-debugger.c (write_type): If we're an enum and the
6662 builtin types have already been initialized, call mono_class_init().
6664 2004-12-11 Martin Baulig <martin@ximian.com>
6666 * metadata.c (mono_metadata_load_generic_params): Added
6667 `MonoGenericContainer *parent_container' argument; automatically
6668 compute `container->is_method'; pass the correct owner to
6671 * reflection.c (compare_genericparam): Sort the GenericParam table
6672 according to increasing owners.
6674 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6676 * profiler.c: allow disabling the default profiler.
6678 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6680 * decimal.c, icall.c: allow disabling System.Decimal support.
6682 2004-12-09 Marek Safar <marek.safar@seznam.cz>
6684 * reflection.c: Add support for null attribute arguments.
6686 2004-12-09 Martin Baulig <martin@ximian.com>
6688 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6689 names to get rid of compiler warnings.
6691 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6693 * marshal.c (mono_marshal_get_struct_to_ptr): Call
6694 mono_marshal_load_type_info (). Fixes #69625.
6695 (mono_marshal_get_ptr_to_struct): Likewise.
6697 2004-12-08 Martin Baulig <martin@ximian.com>
6699 * mono-debug.h: Bumped version number to 47.
6701 * mono-debug-debugger.c
6702 (mono_debugger_event_handler, mono_debugger_event): Take two
6703 guint64 arguments insteed of a gpointer and a guint32.
6705 2004-12-08 Martin Baulig <martin@ximian.com>
6707 * debug-mono-symfile.h
6708 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6709 `address' to `native_offset'.
6711 2004-12-08 Martin Baulig <martin@ximian.com>
6713 * class.c (mono_class_create_from_typespec): Only inflate if we
6714 either have `context->gclass' or `context->gmethod'.
6716 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6718 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6720 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6722 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6724 * reflection.c (mono_assembly_get_object): Remove the workaround put
6727 * appdomain.c: Use the corlib_internal field from MonoAssembly.
6729 * appdomain.c: Bump corlib version.
6731 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6732 be visible in other appdomains.
6734 2004-12-07 Ben Maurer <bmaurer@ximian.com>
6736 * threads.c: Interlocked inc and dec for longs were messed up,
6737 use a KISS based impl for this. Fixes 70234
6739 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
6741 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6743 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6745 * icall.c: fix to follow policy not to allow struct
6746 arguments in icalls.
6748 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6750 * process.c: make the patch that handles spaces in file paths work
6751 on mono/windows too.
6753 2004-12-06 Martin Baulig <martin@ximian.com>
6755 * class.c (mono_class_create_generic): Call
6756 mono_class_setup_supertypes() if we're dynamic.
6757 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6759 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
6761 * object-internals.h: Add new fields to MonoThread.
6763 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6765 * icall.c threads-types.h threads.c: Add new icalls.
6767 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6769 * object-internals.h (MonoReflectionAssembly): Sync object layout with
6772 * appdomain.c: Bump corlib version.
6774 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6775 internal assemblies. Fixes #69181.
6777 2004-12-05 Martin Baulig <martin@ximian.com>
6779 * class.c (mono_class_inflate_generic_signature): Make this a
6780 no-op if `context' is NULL or we don't have any type parameters;
6781 also copy `sentinelpos'.
6783 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
6785 * image.c: Add unbox_wrapper_cache.
6787 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6789 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6792 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6795 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6797 2004-12-04 Martin Baulig <martin@ximian.com>
6799 * loader.c (mono_method_get_signature_full): New public function;
6800 like mono_method_get_signature(), but with an additional
6801 `MonoGenericContext *' argument.
6803 * class.c (mono_class_inflate_generic_signature): Formerly known
6804 as inflate_generic_signature(); make this public.
6806 2004-12-04 Martin Baulig <martin@ximian.com>
6809 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6810 instead of a `MonoGenericContainer *'.
6811 (mono_metadata_parse_array_full): Likewise.
6812 (mono_metadata_parse_signature_full): Likewise.
6813 (mono_metadata_parse_method_signature_full): Likewise.
6814 (mono_metadata_parse_generic_inst): Likewise.
6815 (mono_metadata_parse_generic_param): Likewise.
6816 (mono_metadata_parse_mh_full): Likewise.
6817 (mono_type_create_from_typespec_full): Likewise.
6819 2004-12-03 Martin Baulig <martin@ximian.com>
6821 * class-internals.h (MonoGenericContainer): Replaced the
6822 `MonoGenericContext * pointer with a `MonoGenericContext'
6823 structure and made it the first element.
6825 2004-12-03 Martin Baulig <martin@ximian.com>
6828 (inflate_generic_type): Set the `context->container' when creating
6829 a new MonoGenericContext.
6830 (mono_class_inflate_generic_method): Likewise.
6831 (mono_class_create_from_typespec): Just use `context->container'
6832 to get the container.
6834 * loader.c (method_from_methodspec): Set `context->parent' from
6835 `context->container' - and if that's a method container, use its
6836 parent. Also set the `context->container' when creating a new
6838 (mono_get_method_from_token): Use just `context->container' to get
6841 * metadata.c (do_mono_metadata_parse_generic_class): Also set
6842 `gclass->context->container'.
6844 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6845 the `context->container' when creating a new MonoGenericContext.
6847 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
6849 * reflection.c (compare_genericparam): Sort params with identical
6850 owner by their number. Fixes gen-111 on sparc.
6852 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6854 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6855 around the domain changes.
6857 * appdomain.c (mono_domain_unload): Handle the case when the thread
6858 calling Unload is itself being aborted during unloading. Fixes #70022.
6860 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6862 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
6863 checkpoint_func as an icall so it gets a wrapper.
6864 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6865 in the cross-appdomain wrappers too.
6867 * threads.c (mono_thread_has_appdomain_ref): Make this public.
6869 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6871 * reflection.c: Fix some memory leaks.
6873 2004-12-02 Martin Baulig <martin@ximian.com>
6875 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6877 * metadata.c (generic_class_cache): New static hashtable.
6878 (mono_metadata_lookup_generic_class): New public method.
6880 2004-12-02 Martin Baulig <martin@ximian.com>
6882 * class.c (mono_class_create_from_typedef): Call
6883 mono_class_setup_parent() and mono_class_create_mono_type() before
6884 parsing the interfaces.
6886 2004-12-02 Martin Baulig <martin@ximian.com>
6888 * metadata.c (generic_inst_cache): New static hashtable.
6889 (mono_metadata_lookup_generic_inst): New public function.
6890 (mono_metadata_inflate_generic_inst): New public function.
6891 (mono_metadata_parse_generic_inst): New public function.
6892 (do_mono_metadata_parse_generic_class): Use the new
6893 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6894 since this'll also use the cache.
6896 * reflection.c (mono_reflection_bind_generic_method_parameters):
6897 Use mono_metadata_lookup_generic_inst() to use the new cache.
6899 * class.c (inflate_mono_type): Use
6900 mono_metadata_inflate_generic_inst() to inflate a generic
6901 instance; this'll also use the new cache.
6903 * loader.c (method_from_methodspec): Use
6904 mono_metadata_parse_generic_inst() and
6905 mono_metadata_inflate_generic_inst() rather than parsing it
6906 manually, so we can use the new cache.
6908 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6910 * threads.c (wait_for_tids): Do not incorrectly free threads when
6913 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6915 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6916 iter->args based on whether parameters are passed in registers (i.e.
6917 MONO_ARCH_REGPARMS is defined)
6919 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
6921 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6922 the exception message. Fixes #70070.
6923 (method_from_methodspec): Fix warnings.
6925 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6927 * process.c: (complete_path) return the path quoted
6929 2004-12-01 Martin Baulig <martin@ximian.com>
6931 * class-internals.h (MonoGenericInst): New structure.
6932 (MonoGenericClass): Replaced `type_argc', `type_argv' and
6933 `is_open' with `MonoGenericInst *inst'.
6934 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6935 `is_open' with `MonoGenericInst *inst'.
6937 2004-11-30 Martin Baulig <martin@ximian.com>
6939 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6941 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6942 to `generic_class_cache'.
6945 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6946 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6947 (mono_generic_inst_is_valuetype): Renamed to
6948 mono_generic_class_is_valuetype().
6951 (MonoGenericInst): Renamed to MonoGenericClass.
6952 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6953 (MonoClass): Renamed `generic_inst' to `generic_class'.
6954 (MonoGenericContext): Renamed `ginst' to `gclass'.
6956 * object-internals.h
6957 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6959 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6960 mono_reflection_generic_class_initialize().
6962 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6963 now known as "System.Reflection.MonoGenericClass".
6964 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6966 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
6968 * class-internals.h: Added a flag field to MonoClass to cache the
6969 declarative security attributes actions associated with the class.
6970 * domain-internals.h: Added booleans to MonoJitInfo to cache the
6971 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6972 applicable to the JITted method.
6973 * reflection.c|h: Added functions to extract (as flags) which security
6974 actions are available (declaratively) for a method, class or assembly.
6975 * metadata.c|h: Added functions to search the declarative security
6976 table in the metadata.
6978 2004-11-29 Ben Maurer <bmaurer@ximian.com>
6980 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6981 EXPORTEDTYPES are already in the class name cache, so there is no
6982 need to add extra code here to look at them. Just removes a bit of
6985 (ves_icall_System_Environment_get_TickCount): No need for #if
6986 WINDOWS. We already have the code in io-layer.
6988 2004-11-28 Martin Baulig <martin@ximian.com>
6991 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6994 2004-11-27 Miguel de Icaza <miguel@ximian.com>
6996 * assembly.c (do_mono_assembly_open): Instead of having a
6997 conditional WITH_BUNDLE, incorporate support for bundles here, by
6998 having a global `bundles' variable holding a pointer to the actual
7001 (mono_register_bundled_assemblies): New API call used by the
7004 See mkbundle.1 for details.
7006 2004-11-27 Martin Baulig <martin@ximian.com>
7008 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
7009 the vtable for generic methods.
7011 2004-11-26 Martin Baulig <martin@ximian.com>
7014 (mono_metadata_generic_method_hash): New public function.
7015 (mono_metadata_generic_method_equal): Likewise.
7018 (MonoGenericContainer): Added `GHashTable *method_hash'.
7020 * reflection.c (ReflectionMethodBuilder): Added
7021 `MonoGenericContainer *generic_container'.
7022 (reflection_methodbuilder_to_mono_method): Don't create a new
7023 MonoGenericContainer each time we're called.
7024 (mono_reflection_bind_generic_method_parameters): Use
7025 `container->method_hash' to cache the results so we don't create a
7026 different method if we're called several times with the same
7029 * loader.c (method_from_methodspec): Use the new
7030 `container->method_hash' here, too.
7032 2004-11-26 Martin Baulig <martin@ximian.com>
7034 * class.c (inflate_generic_signature): Correctly compute
7035 `res->has_type_parameters'.
7036 (mono_class_vtable): Use the `has_type_parameters' flag to
7037 determine whether we're a generic method.
7039 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
7041 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
7043 * object.c (mono_runtime_run_main): Fix a small memory leak.
7045 2004-11-25 Martin Baulig <martin@ximian.com>
7047 * class.c (set_generic_param_owner): Fixed the loop.
7049 2004-11-25 Martin Baulig <martin@ximian.com>
7051 * object.c (mono_class_vtable): Don't create any JIT wrappers for
7054 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
7056 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
7057 names. Fixes #69787.
7059 2004-11-24 Martin Baulig <martin@ximian.com>
7061 * class.c (mono_class_create_generic_2): If we don't have a
7062 `ginst->parent', inflate `gklass->parent' to get our parent.
7064 2004-11-24 Martin Baulig <martin@ximian.com>
7066 * reflection.c (compare_genericparam): Correctly sort the
7067 GenericParam table; fixes #69779.
7069 2004-11-23 Ben Maurer <bmaurer@ximian.com>
7071 * reflection.c: When writing a PE file, don't create a huge
7072 buffer in memory. Just write the arrays we have to the file.
7073 This reduces memory usage.
7075 * metadata-internals.h: MonoDynamicStream pefile is no longer used
7078 2004-11-17 Martin Baulig <martin@ximian.com>
7080 * class.c (mono_class_init): Don't setup `class->parent' for
7081 dynamic instances; moved this to mono_class_generic_2().
7082 (mono_class_create_generic): Also set `klass->inited' for dynamic
7084 (mono_class_create_generic_2): Don't do anything for dynamic
7085 generic instances. Set `klass->parent' here and also call
7086 mono_class_setup_parent() here.
7088 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
7089 `MonoType *parent' argument; set `ginst->parent' before calling
7090 mono_class_create_generic_2(), so we set the correct parent.
7092 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
7094 * reflection.c: allow getting attributes from ModuleBuilder
7097 2004-11-17 Martin Baulig <martin@ximian.com>
7099 * class.c (mono_class_create_from_typedef): If a type parameter is
7100 inherited from an outer class, set its owner to that class.
7102 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
7104 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
7105 for (int*) written size. This fixes bug #69592.
7107 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
7109 * icall.c: Added IsAuthenticodePresnet internal call.
7110 * image.c|h: New function that check a MonoImage for an Authenticode
7111 signature in the certificate PE data directory.
7112 * security.c|h: New internal call to ask the runtime if an
7113 Authenticode signature seems referenced in the PE header.
7115 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
7117 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
7119 * reflection.c (mono_image_create_pefile): Free the assembly streams
7120 after writing out the assembly file.
7122 * object.c (mono_runtime_run_main): Fix small memory leak.
7124 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
7125 property access modifiers. Fixes #69389.
7127 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
7129 * domain.c, object.c, object-internals.h, domain-internals.h,
7130 object.h, marshal.c: keep dynamic code info per domain.
7132 2004-11-15 Martin Baulig <martin@ximian.com>
7134 * class.c (mono_type_get_name_recurse): Put type arguments in
7135 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
7138 2004-11-15 Martin Baulig <martin@ximian.com>
7140 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7141 (mono_class_setup_vtable): When computing `the_cname' for a
7142 generic instance, don't include the namespace since we'd otherwise
7145 2004-11-15 Martin Baulig <martin@ximian.com>
7147 * class.c (mono_class_create_generic): Changed return type to void.
7148 (mono_class_create_generic_2): New public function; setup
7149 `class->method', `class->field' and `class->interfaces' here
7150 instead of in mono_class_init().
7152 * class.h (mono_class_create_generic): Moved to class-internals.h.
7154 2004-11-14 Ben Maurer <bmaurer@ximian.com>
7156 * reflection.c (mono_image_create_pefile): take a file HANDLE.
7157 rather than writing to memory, write to this file. Right now,
7158 we are just writting into a buffer, and copying that. However
7159 we can avoid the buffer later.
7161 (mono_dynamic_stream_reset): new function
7163 * icall.c, object-internals.h: update for the above.
7165 2004-11-13 Ben Maurer <bmaurer@ximian.com>
7167 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7168 have been using gc'd memory. First it is slower, unlikely
7169 the comment in the source code said, secondly, it increases
7170 our footprint to do it in the gc.
7172 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7173 the method so that it does not have to copy to managed code.
7175 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
7177 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7179 2004-11-12 Martin Baulig <martin@localhost>
7181 * reflection.c (mono_image_create_token): Allow generic method
7182 definitions here, since they may appear in an `.override'; see
7183 gen-98/gen-99 for an example.
7185 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
7187 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7190 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7193 2004-11-11 Martin Baulig <martin@ximian.com>
7195 * class.c (mono_class_setup_vtable): In an explicit interface
7196 implementation, the method name now includes the arity.
7198 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
7200 * object.c (mono_array_full_copy): Fix warning.
7202 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
7204 * appdomain.c: Removed look_for_method_by_name(). Use the new method
7205 mono_class_get_method_from_name() instead.
7207 * class-internals.h: Added two new types of wrappers.
7208 Added MonoRemotingTarget enum. Added new trampoline function type, which
7209 takes an additional MonoRemotingTarget value as parameter, so it is
7210 possible to request a trampoline for a specific target.
7212 * class.c: Added new mono_class_get_method_from_name() method.
7214 * class.h: In MonoRemoteClass, we can have now to vtables, one for
7215 general remoting sinks and one specific for cross domain calls.
7217 * debug-helpers.c: Added new wrapper names.
7219 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7222 * image.c: Porperly delete value objects form the remoting invoke hashtable.
7224 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7225 with several other methods (mono_marshal_get_xappdomain_dispatch,
7226 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7227 and others) can generate a fast remoting wrapper for cross domain calls.
7228 More information can be found in docs/remoting.
7229 Other changes: Removed mono_find_method_by_name, and used
7230 mono_class_get_method_from_name instead.
7231 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7232 is stored in the remoting invoke hashtable.
7234 * marshal.h: published the new method for getting the xdomain wrapper,
7235 and also added a method for getting the adequate wrapper for a given
7238 * object-internals.h, object.c: Added a couple of methods for capying and
7240 Modified mono_install_remoting_trampoline, which takes the new remoting
7241 trampoline that has a remoting target as parameter.
7242 mono_class_proxy_vtable now also takes a remoting target as parameter, and
7243 will return the most suitable vtable for the target.
7244 Added mono_remote_class_vtable, which returns the vtable of a remote class
7245 (which can be the normal remoting vtable or the xdomain vtable).
7247 * threads.c: the xdomain invoke and dispatch wrappers must also be
7248 protected against interruptions.
7250 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7252 * icall.c: use memmove in BlockCopyInternal when the source and
7253 destination arrays are the same.
7255 2004-11-09 Martin Baulig <martin@ximian.com>
7257 * class-internals.h (MonoGenericContainer): Removed `method' and
7258 `signature', replaced them with `is_method' and `is_signature'
7259 flags. Added `context'.
7261 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7262 instead of a `MonoGenericContainer *'.
7264 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7265 for dynamic type parameters.
7266 (mono_metadata_load_generic_params): Setup `container->context'.
7268 * reflection.c (mono_reflection_setup_generic_class): Setup
7269 `tb->generic_container->context'.
7270 (do_mono_reflection_bind_generic_parameters): Use
7271 mono_class_inflate_generic_type() to correctly inflate types,
7272 rather than using our own hack just for MONO_TYPE_VAR.
7274 2004-11-09 Martin Baulig <martin@ximian.com>
7276 * class.c (mono_class_inflate_generic_method): Small fix; don't
7280 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7281 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7282 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7283 (ves_icall_Type_BindGenericParameters): Likewise.
7284 (ves_icall_Type_get_IsGenericInstance): Likewise.
7285 (ves_icall_Type_GetGenericParameterPosition): Likewise.
7286 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7287 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7288 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7290 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
7292 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7293 assembly versions and public key tokens. Fixes #69113.
7295 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7297 * metadata.c: fix bug introduced with the type cache changes
7300 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7302 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7303 the MonoClass pointer instead of the token in exception clauses.
7304 * reflection.c: updates for the above and make the code not depend
7305 on the structure of MonoExceptionClause.
7307 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
7309 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7310 Add support for dynamic assemblies. Fixes #69114.
7312 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7314 2004-11-07 Ben Maurer <bmaurer@ximian.com>
7316 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7317 since most only those methods use it. the code member of
7318 MonoMethodPInvoke was dead, so that can be removed too. Also,
7319 remove inline_count (again, not used), and move slot so that it
7320 can share bits with some other flags. This saves 8 bytes in the
7321 structure and gives us about 50 kb back for mcs helloworld.cs
7323 * *.[ch]: Do naming changes for the above.
7325 * loader.c (mono_method_get_header): Lazily init the header
7327 (mono_get_method_from_token): don't init the header here
7328 (mono_free_method): the header may never be allocated
7330 Overall, this saves 150 kb of unmanaged allocations
7331 for mcs helloworld.cs. That accounts for 10% of the unmanaged
7334 * loader.c, loader.h (mono_method_get_header): new accessor.
7336 * *.[ch]: use the above method. Prepares us to lazily load
7339 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7340 three warnings, which are actual bugs (see 69206).
7342 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7343 unused. Saves a cool 4 bytes / method.
7345 2004-11-06 Ben Maurer <bmaurer@ximian.com>
7347 * metadata.c (builtin_types): Add types for System.Object here.
7348 (mono_metadata_parse_type_full): Cache MonoType*'s that are
7349 for a class or valuetype from klass->this_arg or klass->byval_arg.
7351 On mcs for a hello world, this gets us down from 21836 MonoType's
7354 (mono_metadata_free_type): Account for the above change.
7356 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
7358 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
7359 exception instead of asserting if name is null.
7360 (ves_icall_System_AppDomain_GetData): Ditto.
7362 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
7364 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7367 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
7368 Return NULL when the domain does not have entry_assembly set.
7370 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
7371 Add a 'resource_modules' argument.
7372 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7374 * reflection.c (mono_reflection_create_runtime_class): Move setting
7375 of wastypebuilder here, so mono_get_type_object () returns a MonoType
7378 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7379 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7380 Throw an ArgumentNullException if 'ptr' is null.
7382 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7383 assemblies here. Fixes #69020.
7385 2004-11-05 Geoff Norton <gnorton@customerdna.com>
7387 * reflection.c (build_compressed_metadata): Fix the previous patch for
7388 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
7391 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
7393 * assembly.c (mono_assembly_names_equal): Allow a match if one of
7394 the cultures is false. Fixes #69090.
7396 * reflection.c (build_compressed_metadata): Fix invalid memory read
7397 detected by valgrind.
7399 * reflection.c (mono_reflection_get_type): Avoid triggering a
7400 TypeResolve multiple times for the same type. Fixes #65577.
7402 2004-11-04 Ben Maurer <bmaurer@ximian.com>
7404 * marshal.c: Avoid using ldftn to call managed functions. It is
7405 much slower than just a call.
7407 * reflection.c (mono_module_get_object): free the basename we
7408 allocate here from glib.
7410 * reflection.c (ensure_runtime_vtable): make sure to free
7411 overrides. Also, we were allocating an array of MonoMethod not an
7412 array of MonoMethod*.
7414 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7416 * image.c (mono_image_close): free image->guid here.
7418 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
7420 * reflection.c: Fix some spec conformance issues with the PE file
7421 structures so mcs compiled apps run on the Net 2.0 beta.
7423 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
7425 * string-icalls.c (ves_icall_System_String_ctor_encoding):
7426 Implement this. Fixes #67264.
7428 * debug-helpers.h debug-helpers.c marshal.c: Move
7429 mono_find_method_by_name to debug-helpers.c.
7431 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
7433 * object.c (mono_release_type_locks): type_initialization_hash is
7436 * reflection.c object.c object-internals.h: Fix warnings.
7438 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7439 without accessors. Fixes #61561.
7441 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7442 application base from the root domain if not set. Fixes #65641.
7443 (mono_runtime_init): Fix warning.
7445 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7447 * appdomain.c: call mono_thread_pool_init.
7448 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7449 of worker threads based on the number of CPUs and the environment
7450 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7451 for non-windows (windows) systems.
7453 2004-10-27 Chris Toshok <toshok@ximian.com>
7455 * mono-debug-debugger.c (write_class): don't call mono_class_init
7456 here, as even with the check for (!klass->init_pending), we get
7457 into a situation where we're hitting cycles in class
7458 initialization. Fixes #68816.
7460 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
7462 * image.c: Avoid overwriting values in the loaded_images_hash when an
7463 assembly is loaded multiple times. Fixes #61152.
7465 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7466 so multiple satellite assemblies for the same name can be loaded.
7469 * mono_domain_assembly_preload: Actually return the loaded assembly,
7472 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7473 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7475 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7476 pending finalizers are not invoked after the appdomain has been
7477 unloaded. Fixes #67862.
7479 2004-10-22 Martin Baulig <martin@ximian.com>
7481 * mono-debug-debugger.c
7482 (mono_debugger_runtime_invoke): Don't box valuetypes.
7484 2004-10-22 Chris Toshok <toshok@ximian.com>
7486 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7487 don't hide private methods.
7489 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
7491 * icall.c: Allows the runtime to "share" (when known) the public key
7492 token of an assembly. This avoid the need to recalculate the token
7493 (from the public key) in managed code.
7495 2004-10-21 Chris Toshok <toshok@ximian.com>
7497 * debug-helpers.c (append_class_name): argh, revert last patch.
7499 2004-10-21 Chris Toshok <toshok@ximian.com>
7501 * debug-helpers.c (append_class_name): use '+' as the delimiter,
7502 not '/', so that it matches what the debugger uses to look up
7505 2004-10-21 Martin Baulig <martin@ximian.com>
7507 * mono-debug-debugger.c (mono_debugger_throw_exception): New
7508 public method; this is called each time an exception is thrown and
7509 allows the debugger to use exception catch points.
7511 2004-10-21 Martin Baulig <martin@ximian.com>
7513 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7514 the stack pointer and the exception object in some struct and pass
7515 that to the debugger.
7517 2004-10-21 Chris Toshok <toshok@ximian.com>
7519 * mono-debug-debugger.c (do_write_class): add instance/static
7520 event support. We don't expose "raise" or "other" yet.
7521 (event_is_static): new method.
7523 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
7525 * mono-debug-debugger.c
7526 (mono_debugger_handle_exception): Remove
7527 bogus return value for fussy compilers.
7529 2004-10-20 Martin Baulig <martin@ximian.com>
7531 * mono-debug-debugger.c
7532 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7533 (mono_debugger_handled_exception): Likewise.
7535 2004-10-20 Martin Baulig <martin@ximian.com>
7537 * mono-debug-debugger.h (MonoDebuggerEvent): Added
7538 MONO_DEBUGGER_EVENT_EXCEPTION.
7540 * mono-debug-debugger.c (mono_debugger_handle_exception): New
7541 public function to send the debugger a notification for an
7542 exception and inform it about a catch/finally clause.
7544 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
7546 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7547 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7550 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7552 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
7554 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7555 marshalled as [In,Out]. Fixes #58325.
7557 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
7559 * reflection.c (mono_method_body_get_object): Implement some fields.
7561 2004-10-12 Martin Baulig <martin@ximian.com>
7563 * reflection.c (mono_reflection_bind_generic_parameters): Small
7564 fix, correctly retrieve our parent from a generic instance.
7566 2004-10-12 Martin Baulig <martin@ximian.com>
7568 * metadata.c (mono_metadata_generic_param_equal): We always have
7572 (mono_class_from_generic_parameter): We need to have an owner.
7573 (my_mono_class_from_generic_parameter): Likewise.
7575 * reflection.c (mono_reflection_setup_generic_class): Renamed to
7576 mono_reflection_create_generic_class() and added a new
7577 mono_reflection_setup_generic_class().
7578 (mono_reflection_initialize_generic_param): If we're a nested
7579 generic type and inherited from the containing class, set our
7580 owner to the outer class.
7582 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
7584 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7586 * reflection.c (mono_method_body_get_object): New function to create
7587 a MethodBody object.
7589 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7591 2004-10-11 Martin Baulig <martin@ximian.com>
7593 * metadata.c (_mono_metadata_type_equal): Renamed to
7594 do_mono_metadata_type_equal() and made static.
7596 2004-10-11 Martin Baulig <martin@ximian.com>
7598 * appdomain.c: Bump corlib version number to 28.
7600 2004-10-10 Martin Baulig <martin@ximian.com>
7603 (MonoGenericInst): Added `MonoGenericContainer *container'.
7604 (MonoGenericMethod): Likewise.
7605 (MonoGenericContext): Likewise.
7606 (MonoGenericParam): Added `MonoGenericContainer *owner'.
7609 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7610 (do_mono_metadata_parse_generic_inst): Likewise.
7611 (mono_metadata_parse_type_full): New public method. This is the actual
7612 mono_metadata_parse_type() implementation - with an additional
7613 `MonoGenericContainer *' argument.
7614 (mono_metadata_parse_array_full): Likewise.
7615 (mono_metadata_parse_signature_full): Likewise.
7616 (mono_metadata_parse_method_signature_full): Likewise.
7617 (mono_metadata_parse_mh_full): Likewise.
7618 (mono_type_create_from_typespec): Likewise.
7619 (mono_metadata_interfaces_from_typedef_full): New public method;
7620 this is similar to the other _full() methods, but we take a
7621 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7622 (mono_metadata_parse_generic_param): Take an additional
7623 `MonoGenericContainer *' argument and lookup the MonoGenericParam
7624 from that container.
7625 (mono_metadata_generic_param_equal): New static method to compare
7626 two type parameters.
7627 (_mono_metadata_type_equal): New static method; takes an
7628 additional `gboolean signature_only' argument - if true, we don't
7629 compare the owners of generic parameters.
7630 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7631 with a TRUE argument - do a signature-only comparision.
7633 * loader.c: Use the new _full() methods and pass the
7634 MonoGenericContainer to them.
7636 * object-internals.h (MonoReflectionTypeBuilder): Added
7637 `MonoGenericContainer *generic_container' field.
7638 (MonoReflectionMethodBuilder): Likewise.
7640 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
7642 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7643 case initial images of dynamic assemblies.
7645 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7647 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7649 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7650 length of event->other array.
7651 (typebuilder_setup_events): Ditto.
7653 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7654 'assembly_by_name' and add an 'assemblies' list.
7656 * assembly.h assembly.c: Add a new search hook for determining whenever
7657 an assembly is already loaded. Use this instead of searching in the
7658 loaded_assemblies list.
7660 * domain.c appdomain.c: Implement the new search hook so loaded
7661 assemblies are now scoped by appdomain. Fixes #67727.
7663 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
7665 * threads.c (mono_thread_attach): Initialize synch_lock field so
7666 mono_thread_detach works again.
7668 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7669 'lib' too. Fixes #63130.
7671 2004-10-06 Jackson Harper <jackson@ximian.com>
7673 * culture-info-tables.h: regenerated.
7675 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
7677 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
7678 implemented by other interfaces in the result. Fixes #65764.
7680 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7681 Handle unloadable modules without crashing.
7683 * image.c (load_modules): Revert the previous patch since modules must
7684 have a fixed index inside the array.
7686 * image.c (load_modules): Don't include native modules in the modules
7689 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
7691 * reflection.h: Add param_defaults field.
7693 * reflection.c: Add support for parameter defaults in dynamic methods.
7696 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7697 an empty string when a type has no namespace. Fixes #64230.
7699 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
7701 * tabledefs.h: Added "internal" security actions to support non-CAS
7702 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
7703 Note: they do not seems to be used anymore in 2.0 (new metadata format)
7705 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
7707 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7708 constructor of abstract class. Fixes #61689.
7710 2004-10-04 Martin Baulig <martin@ximian.com>
7712 * class-internals.h (MonoGenericContainer): New type.
7713 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7714 `MonoGenericContainer *generic_container'.
7715 (MonoClass): Replaced `gen_params' and `num_gen_params' with
7716 `MonoGenericContainer *generic_container'.
7718 * metadata.c (mono_metadata_load_generic_params): Return a
7719 `MonoGenericContainer *' instead of a `MonoGenericParam *';
7720 removed the `num' argument.
7722 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
7724 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7727 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7730 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7732 * reflection.c: Save pe_kind and machine values into the generated
7735 * appdomain.c: Bump corlib version number.
7737 * object-internals.h: Reorganize layout of LocalBuilder.
7739 * class-internals.h class.c (mono_class_get_implemented_interfaces):
7740 New helper function.
7742 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7743 created MonoType for dynamic types. Fixes #66180.
7745 2004-10-02 Ben Maurer <bmaurer@ximian.com>
7747 * threadpool.c: the ares hashtable needs a critical section around it.
7748 this prevents some nasty segfaults
7750 2004-10-02 Massimiliano Mantione <massi@ximian.com>
7752 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7753 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7756 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7758 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7760 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
7762 * image.c: Always canonicalize image file names, to avoid loading
7763 the same assembly twice when referenced using a relative path.
7765 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7767 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7769 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7771 * marshal.c: Fix warnings.
7773 2004-09-29 Geoff Norton <gnorton@customerdna.com>
7775 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7776 attempting to marshal the delegate_trampoline as the method_addr.
7777 This patch has a static hashtable of marshalled delegates so that
7778 we can map delegate_trampoline addresses back to delegates. This
7779 allows a delegate passed to managed code to be passed back into native
7782 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7784 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7786 * reflection.c (method_encode_code): Align method headers properly.
7789 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7791 * marshal.c: In the runtime invoke wrapper, reset the abort
7792 exception if it is cached. This avoids the automatic rethrowal of
7793 the exception after the catch of the wrapper. Also check for pending
7794 interruptions before calling the managed method. This is done using
7795 the new method emit_thread_force_interrupt_checkpoint, since the
7796 normal checkpoint method is ignored when running the invoke wrapper.
7797 * object.c: If the abort exception is rethrown, set the abort_exc
7798 field of the thread, so it will be rethrown aftere every catch.
7799 * threadpool.c: Only run an interruption checkpoint if what has been
7800 requested is a stop of the thread (aborts will be ignored).
7801 * threads.c: By default, a thread will now never be interrumped while
7802 running the runtime invoke wrapper (this ensures that runtime_invoke
7803 will always return to the caller if an exception pointer is provided).
7804 There is a new special method mono_thread_force_interruption_checkpoint()
7805 to force an interruption checkpoint even if running a protected
7806 wrapper, which is used by the same runtime invoke wrapper to do a check
7809 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7811 * object.c, object-internals.h: Implemented mono_release_type_locks,
7812 which releases the cctor locks held by a thread.
7813 * threads.c, threads.h: In thread_cleanup, release cctor locks held
7814 by a thread. Added mono_thread_exit() method to be used to safely stop
7817 2004-09-28 Raja R Harinath <rharinath@novell.com>
7819 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7820 Move null check before dereference. Avoid indexing beyond the end
7821 of the 'modules' array.
7823 2004-09-28 Raja R Harinath <rharinath@novell.com>
7825 * metadata-internals.h (MonoImage): Add module_count field.
7826 * image.c (load_modules): Set image->module_count.
7827 (mono_image_load_file_for_image): Use image->module_count.
7828 * reflection.c (mono_image_load_module): Append to image->modules array
7829 of dynamic assembly.
7830 (mono_module_get_object): Fix loop to actually increment index.
7831 Use image->module_count.
7832 * assembly.c (mono_assembly_load_references): Use image->module_count.
7833 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7836 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7838 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7839 Avoid assert on generic types.
7841 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
7843 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7845 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7847 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
7848 function to convert a MarshalSpec structure to its managed counterpart.
7850 * reflection.c: Fix warnings.
7852 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7855 * icall.c (mono_create_icall_signature): Fix build.
7857 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
7859 * icall.c: Add MakePointType icall.
7861 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7864 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7866 * threadpool.c: reuse allocated slots in the queue.
7868 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
7870 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7872 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7874 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7877 * tabledefs.h: Add constants for pinvoke attributes BestFit and
7878 ThrowOnUnmappableChar.
7880 * icall.c (ves_icall_Type_GetPacking): New icall.
7882 2004-09-24 Martin Baulig <martin@ximian.com>
7884 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7886 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7889 (mono_domain_set): allow setting a domain that is being unloaded.
7890 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7893 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7895 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7896 the GetCustomAttributes icall.
7898 2004-09-23 Martin Baulig <martin@ximian.com>
7900 * object-internals.h (MonoReflectionGenericParam): Replaced
7901 'has_ctor_constraint', `has_reference_type' and `has_value_type'
7902 with `guint32 attrs'.
7904 2004-09-23 Martin Baulig <martin@ximian.com>
7906 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7908 2004-09-23 Martin Baulig <martin@ximian.com>
7910 * object-internals.h (GenericParameterAttributes): New enum.
7912 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7914 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7916 * class.c (init_events): Fill out event->other field.
7918 * class.c: Fix warnings.
7920 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7922 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7924 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7925 walk which doesn't supply the IL offset.
7927 2004-09-22 Martin Baulig <martin@ximian.com>
7929 * reflection.c (mono_reflection_setup_internal_class): If we're
7930 System.ValueType, System.Object or System.Enum, set
7931 `klass->instance_size' and create the vtable.
7932 (mono_reflection_create_internal_class): If we're an enum type,
7933 get the base class from our current corlib.
7935 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
7937 * reflection.h (MonoResolveTokenError): New type.
7939 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7942 * icall.c: Add an 'error' argument to the ResolveToken icalls.
7944 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
7946 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7947 Support also calling constructors, but only for already allocated objects.
7949 2004-09-17 Geoff Norton <gnorton@customerdna.com>
7951 * reflection.c (type_get_qualified_name): If the klass is null
7952 return the typename to avoid a NullRefEx.
7953 (encode_cattr_value): Get the qualified name of the boxed type,
7954 not the underlying enumtype. Fixes #62984.
7956 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
7958 * marshal.c: Fix problems with previous checkin.
7960 2004-09-21 <vargaz@freemail.hu>
7962 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7963 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7965 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7967 2004-09-21 Geoff Norton <gnorton@customerdna.com>
7969 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7970 should only return a type for pointers, arrays, and passbyref types.
7973 2004-09-21 Martin Baulig <martin@ximian.com>
7975 * domain.c (mono_debugger_check_runtime_version): New public
7978 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
7980 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
7982 * reflection.c: Added missing sort to the declarative security
7983 attributes table. MS implementation stops seeing the attributes if the
7984 token number regress in the table (as shown by ildasm and permview).
7986 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
7988 * object-internals.h (MonoReflectionModule): Add 'token' field.
7990 * reflection.c (mono_reflection_get_token): Add support for Module
7992 (mono_module_get_object): Set 'token' field.
7993 (mono_module_file_get_object): Set 'token' field.
7995 * icall.c: Add new Assembly and Module icalls.
7997 * appdomain.c: Bump corlib version.
7999 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
8001 * loader.h loader.c class.h class.c: Add helper functions for obtaining
8002 tokens of metadata objects.
8004 * reflection.h reflection.c (mono_reflection_get_token): New function
8005 to obtain the token of a metadata object.
8007 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
8009 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
8011 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
8013 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
8015 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
8017 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
8018 * object-internals.h: Added 3 MonoArray* members to MonoReflection
8019 AssemblyBuilder to access the permissions set in the class lib.
8020 * reflection.c: Added security attributes encoding step in
8021 mono_image_build_metadata.
8022 * tabledefs.h: Added new security actions defined in 2.0:
8023 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
8025 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
8027 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
8030 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
8032 * locales.c: nullify the ICU_collator member of CompareInfo when it is
8033 finalized. There where random SIGSEVs at program termination, when
8034 an object being finalized was trying to do a string comparison and
8035 the current culture was already finalized.
8037 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8039 * threads.c: call thread_cleanup before finishing the thread if we get
8042 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
8044 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
8045 assemblies from the parent. Fixes #65665.
8047 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
8049 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
8052 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
8054 * reflection.h: add prototype for mono_get_dbnull_object
8055 * reflection.c: add prototypes for get_default_param_value_blobs
8056 and mono_get_object_from_blob for fussier compilers
8058 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
8060 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
8061 false deadlock checks in class initialization.
8063 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
8065 * image.c (mono_image_addref): Fix comment.
8067 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
8070 2004-09-12 Jambunathan K <kjambunathan@novell.com>
8072 * reflection.c (mono_param_get_objects): Modified to return
8073 ParameterInfo.DefaultValue object.
8075 (get_default_param_value_blobs):
8076 (mono_get_object_from_blob):
8077 (mono_get_dbnull_object): New helper routines.
8079 * object.c (mono_get_constant_value_from_blob): New helper routine
8080 carved out from get_default_field_value ()
8082 * object-internals.h (mono_get_constant_value_from_blob): Added
8083 function declaration.
8085 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
8087 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
8088 referenced assemblies. Fixes #62135.
8090 * exception.h exception.c (mono_get_exception_file_not_found2): New
8093 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
8095 * class.h class.c: Add mono_type_get_underlying_type ().
8097 2004-09-09 Geoff Norton <gnorton@customerndna.com>
8099 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
8100 Fix GetTypes() to support dynamically created assemblies.
8102 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
8104 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
8106 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
8109 * reflection.h reflection.c loader.c: Allow dynamic construction of
8110 pinvoke methods. Fixes #65571.
8112 * reflection.c (mono_reflection_get_type): Revert previous change since
8113 it causes regressions.
8115 2004-09-08 Martin Baulig <martin@ximian.com>
8117 * class.c (class_compute_field_layout): Don't call
8118 mono_class_layout_fields() for open generic instances.
8120 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
8121 * threads.c appdomain.c: fix typo in GC macro
8123 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8125 * threads.c: don't call mono_thread_detach() in start_wrapper(),
8126 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
8128 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
8130 * image.c (mono_image_close): Applied patch from
8131 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
8132 assembly is loaded multiple times from data.
8134 * image.c (mono_image_open): Fix warning.
8136 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8138 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8141 * reflection.c (mono_reflection_create_runtime_class): Initialize
8142 klass->nested_classes. Fixes #61224.
8144 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8146 * threads.c: sched_yield() on exit, to allow threads to quit.
8148 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8150 * object.c (mono_unhandled_exception): Remove leftover debug code.
8152 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
8154 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8156 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8158 * marshal.c (emit_marshal_array): Really null terminate string arrays.
8160 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8162 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8164 * marshal.c (emit_marshal_array): Null terminate string arrays.
8166 * marshal.c (raise_auto_layout_exception): Fix warning.
8168 * reflection.c (mono_param_get_objects): Initialize the default value
8169 with DBNull.Value, not null. Fixes #62123.
8171 2004-09-01 Miguel de Icaza <miguel@ximian.com>
8173 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8174 throw an exception with a cute explanation.
8176 2004-09-06 Dick Porter <dick@ximian.com>
8178 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8179 Close the new process's thread handle, as we don't use it. The
8180 handle stays around forever otherwise.
8182 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8184 * object.c (arith_overflow): Fix warning.
8186 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8187 calling conventions in method refs. Fixes #65352.
8189 * reflection.c: Fix warnings.
8191 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8193 * icall.c: Add a new icall for Array.Clear
8195 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8197 * object.c: When allocating an array, we have to throw
8198 an overflow exception if any of the lengths are < 0.
8200 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8202 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8203 properly. Also move implementation of string array marshalling to
8204 managed code. Fixes #42316.
8206 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8208 * assembly.c: provide more information when loading an assembly fails.
8210 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8212 * filewatcher.c: don't expect the development fam package to be
8215 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
8217 * marshal.c: Make a copy of the signature cookie since it will be
8218 freed by the caller.
8220 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8222 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8224 * metadata.c (mono_metadata_free_marshal_spec): New function to free
8227 * marshal.c: More refactoring.
8229 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8232 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
8234 * object.c: In mono_message_invoke, fill the output parameter array after
8235 calling the managed method (it was done before the call). This fixes
8238 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8240 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8243 2004-09-02 Martin Baulig <martin@ximian.com>
8245 * class.c (mono_class_instance_size): Don't allow generic type
8246 definitions or open generic instances.
8247 (mono_class_array_element_size): If we're a value type, call
8248 mono_class_instance_size() on the original class.
8250 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8251 handle generic instances.
8253 * mono-debug-debugger.c (write_type): Handle generic instances
8256 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8258 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8259 the allocation request fails. Fixes #65089.
8261 * object.c (mono_runtime_free_method): Do not call mono_free_method.
8263 * object.c (mono_runtime_free_method): New function to free a dynamic
8266 * marshal.c (mono_delegate_free_ftnptr): New function to free the
8267 delegate trampoline.
8269 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8270 with hasthis as dynamic,
8272 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8274 * domain.c (mono_jit_info_table_remove): New function to remove an
8275 entry from the jit info table.
8277 * class-internals.h (MonoMethod): Add 'dynamic' field.
8279 * loader.c: Fix warnings.
8281 2004-09-01 Martin Baulig <martin@ximian.com>
8283 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8284 instead of mono_debugger_lock() because the latter one is a no-op
8285 unless running in the debugger.
8287 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8289 * class.c (class_compute_field_layout): Classes with auto-layout or
8290 reference fields are not blittable.
8292 2004-09-01 Dick Porter <dick@ximian.com>
8294 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8295 mono_image_get_filename() to get the assembly location.
8298 * metadata.h: Fix compile warnings
8300 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8302 * class.c (class_compute_field_layout): System.Object is blittable.
8304 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8305 as in/out. Fixes #59909.
8307 2004-09-01 Martin Baulig <martin@ximian.com>
8309 * metadata.h (MONO_TYPE_ISREFERENCE): Call
8310 mono_metadata_generic_inst_is_valuetype() if we're a generic
8311 instance to check whether our underlying type is a reference type.
8313 2004-09-01 Martin Baulig <martin@ximian.com>
8315 * metadata.c (mono_type_size): If we're a generic instance, call
8316 mono_class_value_size() for value types.
8318 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
8320 * marshal.c: Implement more custom marshalling functionality. Fixes
8323 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8325 * mono-debug.c, debug-mono-symfile.c: add some locking love.
8327 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
8329 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8331 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8333 * icall.c: Fix some warnings.
8335 * threads.c (abort_appdomain_thread): Fix unref errors.
8336 (mono_thread_current): Fix THREAD_DEBUG define.
8338 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
8340 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8342 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8344 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
8346 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
8349 2004-08-28 Martin Baulig <martin@ximian.com>
8352 (mono_metadata_generic_inst_is_valuetype): New public function.
8354 * metadata.h (MONO_TYPE_ISSTRUCT): Call
8355 mono_metadata_generic_inst_is_valuetype() if we're a generic
8356 instance to check whether our underlying type is a valuetype.
8358 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
8360 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8363 2004-08-25 Martin Baulig <martin@ximian.com>
8365 * loader.c (mono_get_method_from_token): Abstract methods can also
8366 be generic and thus have type parameters.
8368 * metadata-internals.h
8369 (MonoDynamicImage): Added `GPtrArray *gen_params'.
8371 * reflection.c (mono_image_get_generic_param_info): Don't create a
8372 metadata row, just add an entry to the `gen_params' array.
8373 (build_compressed_metadata): Sort the `gen_params' array and then
8374 actually create the metadata.
8376 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8378 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8380 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
8382 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8384 2004-08-24 Martin Baulig <martin@ximian.com>
8386 * class.cs (mono_class_is_subclass_of): Like an interface, a
8387 generic instance also derives from System.Object.
8389 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
8391 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8392 custom modifiers to be in any order. Fixes #61990.
8394 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
8396 * object.c: Register mono_object_new_fast icall.
8398 * object.c (mono_class_get_allocation_ftn): Return to calling
8399 mono_object_new_fast, since it seems faster to compute the object
8400 size in unmanaged code than passing it as a parameter.
8402 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8404 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8405 this function with Boehm as the oom handler, so we don't have to check
8406 the result of GC_malloc.
8408 * object.c: Remove checks for oom.
8410 * object.h object.c (mono_class_get_allocation_ftn): New function to
8411 return the icall which can be used to allocate an instance of a given
8414 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8416 * class-internals.h: Add 'enabled' field.
8418 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
8420 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8422 2004-08-18 Jambunathan K <kjambunathan@novell.com>
8423 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8426 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
8428 * appdomain.c: use the Tls function for appdomain too,
8429 at Zoltan's request. Actually return in mono_context_get
8431 * appdomain.c, profiler.c, threads.c: use __thread
8433 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
8435 * appdomain.c threads.c: Call GC_CreateThread on windows.
8437 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8438 multiple libraries since this don't work on windows.
8440 2004-08-18 Martin Baulig <martin@ximian.com>
8443 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8446 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8447 MonoMethodNormal since we also need it for abstract and interface
8451 (build_compressed_metadata): Sort the GenericParam table.
8452 (mono_image_create_token): Added `gboolean create_methodspec'
8453 argument; this is false when generating a MethodImpl token.
8454 (reflection_methodbuilder_to_mono_method): Abstract and interface
8455 methods may also have generic parameters.
8457 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
8459 * appdomain.c: thread local alloc
8461 2004-08-17 Martin Baulig <martin@ximian.com>
8463 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8466 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8469 * class.c (mono_type_get_full_name): New public function.
8470 (mono_type_get_name): Don't include the type arguments.
8472 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
8474 * Makefile.am: Build static versions of libmetadata and libmonoruntime
8475 for inclusion into the mono executable.
8477 2004-08-16 Martin Baulig <martin@ximian.com>
8479 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8480 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8482 2004-08-14 Martin Baulig <martin@ximian.com>
8484 * class.c (dup_type): Also copy the `byref' field.
8486 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
8488 * reflection.c (create_dynamic_mono_image): Revert the last change
8489 since it breaks bootstrap.
8491 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
8493 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8495 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8496 not free them with g_free.
8498 2004-08-11 Martin Baulig <martin@ximian.com>
8500 * reflection.c (mono_reflection_setup_internal_class): Also call
8501 mono_class_setup_mono_type() if we already have a `tb->type.type'.
8503 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
8505 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
8506 called during default (first) AppDomain creation. Keep track of
8507 Evidence when loading assemblies.
8509 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8511 * opcodes.c, opcodes.h: reduce runtime relocations.
8513 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8515 * culture-info.h, locales.c: fixes and chages to sue the new
8516 optimized format of the locale data.
8517 * culture-info-tables.h: regenerated.
8519 2004-08-06 Geoff Norton <gnorton@customerdna.com>
8521 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8523 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
8525 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8526 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8527 * domain-internals.h: icall declaration.
8528 * icall.c: icall registration.
8529 * object-internals.h: New fields in MonoAssembly for CAS.
8531 2004-08-05 Duncan Mak <duncan@ximian.com>
8533 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8536 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8538 * reflection.c: fix to deal with object[] arrays in custom ctors
8541 2004-08-05 Martin Baulig <martin@ximian.com>
8543 * class.c (mono_class_array_element_size): Added support for
8544 generic instances and correctly handle "recursive" types.
8546 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
8548 * assembly.c: Fix warnings.
8550 2004-08-04 Martin Baulig <martin@ximian.com>
8553 (mono_type_get_name_recurse): Added `gboolean include_arity'
8554 argument specifying whether or not we should include the generic
8555 arity in the type name.
8556 (_mono_type_get_name): New static function.
8557 (mono_class_setup_vtable): If we're a generic instance, don't
8558 include the generic arity in the names of explicit method
8561 2004-08-03 Martin Baulig <martin@ximian.com>
8563 * class.c (mono_type_get_name_recurse): Enclose the generic type
8564 arguments in `<', '>'.
8566 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8568 * gc.c: make GC warning messages use the trace API, they are just
8569 noise to most of the users.
8571 2004-08-03 Martin Baulig <martin@ximian.com>
8573 * debug-mono-symfile.c (read_string): Correctly read the string.
8575 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
8577 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8579 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8581 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8583 2004-07-30 Martin Baulig <martin@ximian.com>
8585 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8586 Reflect latest symbol writer changes.
8588 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8590 * object.c: always create an object if null is passed
8591 to Invoke() where a valuetype is expected.
8593 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
8595 * marshal.c (mono_marshal_init): make managed
8596 signatures match native ones better for 64bits.
8598 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8600 * appdomain.c: hack to build correctly the private bin path on windows.
8603 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
8605 * assembly.c: Load mscorlib from the correct framework directory
8606 (mono/<version>/mscorlib.dll).
8607 * appdomain.h: Added prototypes for new functions.
8608 * internals.h: Added some prototypes.
8609 * domain.c: When initializing the runtime, get from the executable and
8610 the configuration files the runtime version that the app supports.
8611 Added support methods for reading app.exe.config. Added list of versions
8612 supported by the JIT. Added two new methods: mono_init_from_assembly,
8613 which initializes the runtime and determines the required version from
8614 the provided exe file, and mono_init_version, which initializes
8615 the runtime using the provided version.
8616 * icall.c: Get machine.config from version-specific directory.
8617 * reflection.c: When generating an image, embed the version number
8618 of the current runtime.
8620 2004-07-28 Dick Porter <dick@ximian.com>
8623 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8624 returned sockaddr size before creating the remote address object.
8625 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8628 2004-07-28 Dick Porter <dick@ximian.com>
8630 * locales.c (string_invariant_compare_char): Fix invariant char
8631 compares between upper and lower cases. Fixes bug 61458.
8633 2004-07-27 Ben Maurer <bmaurer@ximain.com>
8635 * marshal.c: actually cache stelem.ref wrappers.
8637 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8639 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
8640 sections and remove the mono_cli_rva_map () function.
8642 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8644 * debug-mono-symfile.c: fix one more endianess issue, from a patch
8645 by Geoff Norton (<gnorton@customerdna.com>).
8647 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8649 * class.c: fix class loads for pointer types (typeof(int) !=
8652 2004-07-27 Martin Baulig <martin@ximian.com>
8654 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8655 reading the debugging information from an external ".mdb" file.
8657 2004-07-24 Martin Baulig <martin@ximian.com>
8659 * reflection.c (mono_image_get_type_info): Only write a class
8660 layout entry if we actually have a size or a packing size.
8662 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8664 * reflection.c (type_get_fully_qualified_name):
8665 insert cast to get type checking of ?: with non-gcc compilers
8667 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8669 * rand.c: use g_getenv for both lookups of
8672 2004-07-17 Martin Baulig <martin@ximian.com>
8674 * reflection.c (mono_reflection_bind_generic_method_parameters):
8675 Set `gmethod->reflection_info'.
8677 2004-07-17 Martin Baulig <martin@ximian.com>
8679 * class.c (mono_class_create_from_typedef): Insert the newly
8680 created class into the hash table before computing the interfaces
8681 since we could be called recursively.
8683 2004-07-16 Ben Maurer <bmaurer@ximain.com>
8685 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8686 function to implement stelem.ref in managed code
8687 * class-internals.h, debug-helpers.c: a new wrapper type
8690 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8692 * gc.c: allow GC handles to work even when no GC is compiled in.
8693 Fix part of bug #61134 (GetAddrOfPinnedObject).
8695 2004-07-13 Peter Williams <peter@newton.cx>
8697 * process.c (complete_path): Make sure we don't attempt to execute
8700 2004-07-12 Geoff Norton <gnorton@customerdna.com>
8702 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
8703 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
8704 and will add/subtract the hour if needed
8706 2004-07-12 Martin Baulig <martin@ximian.com>
8708 * reflection.c (mono_field_get_object): If we have
8709 `field->generic_info', take the attributes from
8710 `field->generic_info->generic_type'.
8712 2004-07-12 Martin Baulig <martin@ximian.com>
8714 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8715 This function must be called before initializing the runtime.
8716 (mono_debug_init_1): New function; call this after initializing
8717 the runtime, but before loading the assembly. It tells the
8718 debugger to load corlib and the builtin types.
8720 * mono-debug-debugger.c: Did some larger changes in the debugging
8721 code; support recursive class declarations, make sure we actually
8724 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8726 * debug-helpers.c: undo my previous patch and fixed the real issue in
8727 ../mini/exceptions-x86.c
8729 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8731 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8732 when no HOME env. variable was set and a NullRef was thrown in a .cctor
8733 called from other .cctors.
8735 2004-07-09 Miguel de Icaza <miguel@ximian.com>
8737 * loader.c: Removed the mono_loader_wine_init hack now that we are
8738 doing a managed version of Windows.Forms.
8740 2004-07-09 Ben Maurer <bmaurer@ximian.com>
8742 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8743 threadpool.c, threads.c: remove static data from rootset.
8745 2004-07-09 Dick Porter <dick@ximian.com>
8747 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8748 Don't do any more processing if the matched length was 0. It was
8749 increasing the size of the string before. Fixes bug 61167.
8751 2004-07-09 Dick Porter <dick@ximian.com>
8755 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8756 Add support for SO_PEERCRED if its available.
8758 2004-07-09 Peter Bartok <pbartok@novell.com>
8759 * loader.c: winelib.exe.so error message is now only displayed if
8760 MONO_DEBUG is set. To help us avoid questions when people are trying
8761 out the new Managed.Windows.Forms.
8763 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
8765 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
8766 for isinst and castclass wrappers.
8768 * class-internals.h icall.c: Move registration and lookup of JIT icalls
8769 to libmetadata from the JIT, so they could be used by the marshalling
8770 code and the interpreter.
8772 * marshal.c: Register marshalling related JIT icalls here instead of
8773 in mini.c. Use CEE_MONO_ICALL instead of the family of
8774 CEE_MONO_PROC<x> opcodes to call marshalling functions.
8776 * metadata.h: Remove unneeded marshalling conversions.
8778 * opcodes.c: Update for new opcodes.
8780 2004-07-08 Martin Baulig <martin@ximian.com>
8782 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8783 (mono_debug_get_domain_data): Make this function static.
8785 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8787 * gc.c, object.h: add nice GC handle API for embedders.
8789 2004-07-06 Ben Maurer <bmaurer@ximian.com>
8791 * reflection.c: more changes for the new api
8793 * object.c: When we reflect on a field w/ a constant value, it
8794 will not have a memory location, so we must access metadata. Also,
8795 allow easier reading of strings so that we can read them from
8798 * class.c (mono_class_layout_fields): no need for literal fields here.
8800 * class-internals.h: api changes for const fields
8802 * icall.c (ves_icall_get_enum_info): use new apis for const fields
8804 2004-07-06 Martin Baulig <martin@ximian.com>
8806 * mono-debug.h: Increment version number to 44.
8808 * mono-debug.c (mono_debug_add_wrapper): The second argument is
8809 now a gpointer, rewrote this whole method.
8811 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8812 function. Add information about the wrapper in a new "misc table".
8814 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8815 for the new misc table.
8817 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
8819 * metadata-internals.h image.c: Add a cache for helper signatures.
8821 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8823 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
8825 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8826 delegates from a delegate. Fixes #61033.
8828 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8829 marshalling of stringbuilder arrays. Fixes #59900.
8831 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
8833 * icall.c: Add EnumBuilder:setup_enum_type icall.
8835 2004-06-30 Ben Maurer <bmaurer@ximian.com>
8837 * icall.c: Added a new icall for the property version of
8840 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
8842 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8843 it has a constant size across platforms.
8845 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8848 2004-06-29 Martin Baulig <martin@ximian.com>
8850 * mono-debug.c (mono_debug_add_method): Protect the whole function
8851 in mono_debugger_lock(), not just parts of it.
8853 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8855 * reflection.c: make sure padding bytes in heaps are zeroed.
8857 2004-06-24 David Waite <mass@akuma.org>
8859 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8860 image.c, loader.c, locales.c, marshal.c, metadata.c,
8861 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8862 string-icalls.c, threads.c: change to C90-style comments from C99 /
8865 2004-06-24 Dick Porter <dick@ximian.com>
8868 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8869 return createdNew. Fixes bug 60412.
8872 * icall.c: Add createdNew parameter to CreateMutex icall
8874 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8876 * reflection.c, object-internals.h: save default value in params.
8878 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8880 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8881 no need to build a new path combining that with the application base.
8884 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8886 * reflection.c: fixed minor standard compliance issues.
8888 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8890 * reflection.c: fixed issue with encoding some custom attributes
8891 (arrays in properties and fields, bug #60411).
8893 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8895 * reflection.c: fix start address when copying the public key token.
8897 2004-06-23 Martin Baulig <martin@ximian.com>
8899 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8900 the `exc' object in a static object to put it into the GC's root set.
8902 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8904 * reflection.c: make mono_reflection_setup_internal_class ()
8905 callable a second time to setup a new parent class.
8907 2004-06-23 Dick Porter <dick@ximian.com>
8909 * threads.c: Check for WAIT_IO_COMPLETION return values.
8911 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
8913 * appdomain.c: Removed the g_free on the public key token. Now copy
8914 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8915 * assembly.c: Added public key token string value when loading
8916 assemblies. Fix bug #60439.
8917 * icall.c: Added missing informations (like public key) in
8918 GetReferencedAssemblies. Fix #60519.
8919 * image.h: Changed definition for public key token from const char*
8920 public_tok_value to guchar public_key_token [17];
8921 * reflection.c: Updated for changes to public key token.
8923 2004-06-22 Lluis Sanchez Gual
8925 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
8926 for the field in base classes.
8928 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8930 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8931 mark headers as not supported, they are installed only for use by the
8934 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8936 * *.c, *.h: avoid namespace pollution in public headers.
8938 2004-06-21 Martin Baulig <martin@ximian.com>
8940 * exception.c (mono_get_exception_security): It's in
8941 "System.Security", not in "System".
8943 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8944 the exception classes.
8946 2004-06-21 Martin Baulig <martin@ximian.com>
8948 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8949 Protect the exception object from being finalized.
8951 2004-06-21 Martin Baulig <martin@ximian.com>
8953 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8956 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
8958 * reflection.c: Load the assembly in mono_reflection_type_from_name,
8959 if it was not loaded before. Fix parts of #60439.
8961 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8963 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8964 code that was broken since Ben's change: wrappers are now
8965 dependent on the method signature only again.
8967 2004-06-21 Martin Baulig <martin@ximian.com>
8969 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8970 added interface support.
8972 2004-06-21 Martin Baulig <martin@ximian.com>
8974 * class.c (mono_vtable_get_static_field_data): New public method.
8976 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
8978 * filewatcher.c : Windows build fix to be compliant with API changes.
8980 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8982 * class.h, class.c: more accessors.
8983 * metadata.h, metadata.c: prepare for hiding MonoType and
8984 MonoMethodSignature: people should use the accessors from now on
8985 outside of the tree.
8987 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8989 * *.c, *.h: more API cleanups.
8991 2004-06-18 Jackson Harper <jackson@ximian.com>
8993 * assembly.c: Trace loading assemblies.
8994 * loader.c: Trace loading native libraries.
8995 * mono-config.c: Trace loading config files.
8997 2004-06-18 Dick Porter <dick@ximian.com>
8999 * locales.c: Tell ICU the lengths of strings, it can cope with
9000 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
9002 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9004 * image.c: swapped name/filename;
9006 2004-06-18 Martin Baulig <martin@ximian.com>
9008 * mono-debug-debugger.c (write_class): Write the parent class at
9009 the end of the header.
9011 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9013 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
9015 2004-06-17 Raja R Harinath <rharinath@novell.com>
9017 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
9018 (bundle_obj): New conditional define.
9019 (BUILT_SOURCES): Remove.
9020 ($(bundle_srcs)): Make parallel-make safe.
9021 (libmonoruntime_la_LIBADD): Make unconditional.
9022 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
9023 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
9025 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
9027 * culture-info-tables.h: It was inconsistent with the latest
9030 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
9032 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
9035 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
9038 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9040 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
9041 cleaned up public header threads.h.
9043 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9045 * Makefile.am, *.c, *.h: more API cleanups.
9047 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9049 * Makefile.am: removed monosn from compilation.
9050 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
9051 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
9052 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
9053 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
9054 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
9055 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
9057 2004-06-15 Jackson Harper <jackson@ximian.com>
9059 * assembly.c: Make locales lower case when searching the GAC for
9060 assemblies. gacutil will always make locales lowercase when
9061 installing so this effectively makes them case insensitive.
9063 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
9065 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
9066 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
9067 parameter which allows to choose whether the wait can be interrupted or
9068 not. Also added the method mono_monitor_enter(), which locks the monitor
9069 using an infinite wait and without allowing interruption.
9070 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
9072 * object.h: Added new fields in MonoThread. suspend_event holds the event
9073 used to susped/resume the thread. synch_lock is the lock object to use for
9074 modifying the thread state.
9075 * threads.c: Use the new synch_lock object for locking, instead of "this",
9076 which can generate deadlocks.
9077 Moved thread state change in Thread.Sleep and Thread.Join from managed
9078 to unmanaged code. This avoids a deadlock when the thread was suspended
9079 just after acquiring the thread lock.
9080 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
9081 Implemented Thread.Suspend using an event instead of ThreadSuspend,
9082 which is not fully implemented in the io-layer.
9083 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
9085 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
9087 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
9088 threads-types.h: more API cleanups.
9090 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9092 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
9093 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
9094 threadpool.c, threads.c: first pass at the exported API cleanup.
9096 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9098 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
9100 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9102 * icall.c: added internalGetHome.
9104 2004-06-14 Dick Porter <dick@ximian.com>
9106 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
9107 possible to return successfully when '.' or '..' were the only
9108 entries in a directory, but were skipped. The MonoIOStat was not
9109 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
9112 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9114 * reflection.c: make binaries run on .Net 1.1 by default.
9116 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9118 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
9120 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
9122 * marshal.c: keep track of struct size with explicit layout
9125 2004-06-12 Martin Baulig <martin@ximian.com>
9127 * mono-debug-debugger.c: Comment out a debugging g_message().
9129 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9131 * reflection.c, reflection.h: do not free custom attrs that are cached.
9132 * icall.c: use braces to make code clearer.
9134 2004-06-11 Martin Baulig <martin@ximian.com>
9136 * class.h (MonoInflatedField): New type.
9137 (MonoClassField): Replaced `MonoType *generic_type' with
9138 `MonoInflatedField *generic_info'.
9141 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9143 2004-06-11 Martin Baulig <martin@ximian.com>
9145 * reflection.c (mono_image_create_method_token): Correctly encode
9148 2004-06-11 Martin Baulig <martin@ximian.com>
9150 * metadata.c (mono_metadata_parse_method_signature): When parsing
9151 a MethodDef which has VarArgs, also set sentinelpos if we don't
9152 have any parameters.
9154 2004-06-11 Martin Baulig <martin@ximian.com>
9156 * verify.c (mono_method_verify): In CEE_CALL, use
9157 mono_method_get_signature() to get the method's signature, unless
9158 we're a PInvoke method.
9160 2004-06-10 Jackson Harper <jackson@ximian.com>
9162 * assembly.c: Use <path>/lib/mono/gac for the extra paths
9163 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9164 logical name as the supplied path is just a prefix to the gac not
9165 the direct path to it.
9167 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9169 * reflection.c: make the token for a created method match
9170 the token of the MethodBuilder it was created from
9171 (IKVM requires this behaviour now).
9173 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9175 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9176 reflection.c, socket-io.c: leak fixes.
9178 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9180 * icall.c: handle sentinel pos in vararg methods in position different
9183 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9185 * culture-info-tables.h: freshly generated.
9187 2004-06-09 Martin Baulig <martin@ximian.com>
9189 * loader.c (mono_get_method_constrained): Call `mono_class_init
9190 (constrained_class)'.
9192 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
9194 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9195 any methods. Fixes #59629.
9197 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9199 * culture-info-tables.h: reflecting locale-builder updates.
9201 2004-06-08 Dick Porter <dick@ximian.com>
9204 * locales.c: Fixed compile warnings, including a real bug in
9205 CompareInfo_internal_compare.
9207 2004-06-08 Dick Porter <dick@ximian.com>
9210 (ves_icall_System_Globalization_CompareInfo_internal_index):
9211 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9212 Double-check the resuls of usearches, because ICU currently
9213 ignores most of the collator settings here. Fixes bug 59720.
9215 2004-06-08 Dick Porter <dick@ximian.com>
9218 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9219 Fix memory leak and segfault-causing typo. No idea how this one
9220 lasted so long without being noticed.
9222 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
9224 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9225 any methods. Fixes #59629.
9227 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9230 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9231 own the critical section before). Removed dead code (that's done
9232 in the preload hook).
9234 (mono_assembly_load_with_partial_name): call the preload hook.
9236 2004-06-08 Martin Baulig <martin@ximian.com>
9238 * metadata.c (mono_metadata_signature_alloc): Default
9239 `sentinelpos' to -1.
9241 * reflection.c (mono_image_get_array_token): Likewise.
9243 2004-06-08 Martin Baulig <martin@ximian.com>
9245 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9247 * metadata.c (mono_metadata_parse_method_signature): When parsing
9248 a MethodDef which has VarArgs, set sentinelpos.
9250 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9251 `gint16' since we're using -1 for non-varargs methods.
9254 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9255 (method_encode_signature): Added varargs support.
9256 (method_builder_encode_signature): Likewise.
9257 (mono_image_get_varargs_method_token): New static method.
9258 (mono_image_create_method_token): New public method; this is
9259 called via an icall instead of mono_image_create_token() when
9260 calling a varargs method.
9262 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
9264 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9266 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9268 * culture-info-tables.h : Reflecting the latest locale-builder that
9269 fixed empty array representation ({} to {0}).
9271 2004-06-07 Jackson Harper <jackson@ximian.com>
9273 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9274 looking up extra gac paths. This allows MONO_GAC_PATH to act
9275 exactly like a prefix.
9277 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9279 * reflection.c (mono_reflection_type_from_name): Make a copy of the
9280 type name before modifying it. Fixes #59405.
9282 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9284 * culture-info.h: added fields for "all datetime patterns".
9285 * locales.c: ( ves_icall_System_Globalization_CultureInfo
9286 _construct_datetime_format ()): fill xxx_patterns fields.
9287 * object.h: added fields for "all datetime patterns" to
9288 MonoDateTimeFormatInfo.
9289 * culture-info-tables.h: reflecting locale-builder updates.
9291 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9293 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9294 the event has no add and remove methods. Fixes #59629.
9296 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
9298 * object.c: Fixed possible integer overflow when allocating large
9301 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9303 * culture-info-tables.h: reflecting locale-builder updates.
9305 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9307 * culture-info-tables.h: reflecting locale-builder updates.
9309 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
9311 * culture-info-tables.h: reflecting locale-builder updates.
9313 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
9315 * threads.c: Made Thread.Sleep abortable.
9317 2004-06-02 Martin Baulig <martin@ximian.com>
9319 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9321 * debug-mono-symfile.h: Bumped symbol file version number to 37.
9323 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
9325 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9327 2004-05-30 Jackson Harper <jackson@ximian.com>
9329 * reflection.c: Do not hardcode assembly versions or public key
9330 tokens anymore. All of this except the corlib section was dead
9333 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
9335 * object.c (mono_runtime_invoke_array): Automatically create boxed
9336 objects for byref valuetypes if needed. Fixes #59300.
9338 * object.c (mono_method_return_message_restore): Handle
9339 MONO_TYPE_OBJECT as well.
9341 2004-05-28 Jackson Harper <jackson@ximian.com>
9343 * reflection.c: The modified type encoding was causing build
9344 problems. Reverted for now.
9346 2004-05-28 Jackson Harper <jackson@ximian.com>
9348 * reflection.c/h: Take an assembly ref so that we dont create
9349 fully qualified names when encoding types in the same assembly as
9350 the custom attribute being emitted.
9351 * appdomain.c: Increment version number.
9353 2004-05-26 Duncan Mak <duncan@ximian.com>
9356 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9357 Set the full version number (major, minor, build, revision).
9359 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
9361 * marshal.c (emit_struct_conv): increment src/dst after blit
9362 (mono_marshal_get_managed_wrapper,
9363 mono_marshal_get_native_wrapper): make sure we have marshalling
9364 info before marshalling params (info computation affects
9367 * class.c (class_compute_field_layout): correctly deal with
9369 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9370 value types (as per what windows dows by default)
9371 (mono_class_setup_mono_type): System.ValueType is blittable
9372 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9375 * marshal.c (mono_marshal_load_type_info): flag types as
9376 non-blittable if the native layout doesn't match the managed
9379 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9381 * appdomain.c: don't add stuff in the private search path that is
9382 above the application base. If application base is not set, there's
9383 no private search path.
9385 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
9387 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9388 byref struct arguments in native->managed marshalling.
9390 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
9392 * marshal.c (mono_marshal_get_runtime_invoke): correctly
9393 cache methods using signature (special case for methods
9394 that are value type or string class)
9396 * image.c (mono_image_close): clean up allocated GSList's
9397 in runtime_invoke_cache.
9399 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9401 * mono-config.c: set the correct path for mono_cfg_dir on windows when
9402 there's no MONO_CFG_DIR environment variable defined.
9404 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9406 * threads.c: windows version must be >= 0x0500 to include OpenThread.
9408 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
9410 * threadpool.c: Really wait for 500ms after the async call, even if the wait
9412 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9413 before waiting for it, and call CloseHandle after the wait to unref it.
9414 This will make sure that handles are not disposed too early.
9416 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9421 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9424 * object.c: se the application_base only for the domain that runs
9425 Main. Fixes bug #59216,
9427 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9430 * object.c: only the domain in which Main is run have
9431 SetupInformation.ConfigurationFile set, so moved a few lines from
9432 appdomain.c to object.c.
9434 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9436 * appdomain.c: we tried to load [name].(dll|exe), but according
9437 to bug #57710, we must also try [culture]/[name].(dll|exe) and
9438 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9439 There's a test case attached to bug #58922.
9441 2004-05-27 Dick Porter <dick@ximian.com>
9444 * file-io.c: Implemented icalls for locking and unlocking regions
9446 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9447 FALSE on error (fixes both compiler warning and real bug.)
9449 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
9451 * culture-info-tables.h: reflecting locale-builder updates.
9453 (Added missing ChangeLog entry for 05/26)
9455 2004-05-27 Jackson Harper <jackson@ximian.com>
9457 * locales.c: Fix some cut and paste errors.
9459 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9461 * mono-config.c: set the correct path for config. directory on windows.
9463 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9465 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9468 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9470 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9471 from pinvoke functions.
9473 * marshal.c (mono_ftnptr_to_delegate): Implement this.
9475 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9477 * culture-info-tables.h: reflecting locale-builder updates.
9479 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9481 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9484 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
9486 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9487 * icall.c: Modified icalls for RNG.
9488 * rand.c|h: Changed RNG interface to allow thread-safe usage under
9489 Windows (CryptoAPI).
9491 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9493 * locales.c: Fix build.
9495 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
9497 * culture-info-tables.h: reflecting locale-builder updates.
9499 2004-05-25 Jackson Harper <jackson@ximian.com>
9501 * locales.c: When creating the current culture use the $LANGs
9502 specific culture. So DateTimeFormat and NumberFormat entries are created.
9504 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9506 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9507 a char array as parameter.
9509 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
9511 * image.c: In mono_image_open(), always use an absolute path name to
9512 look for already loaded images.
9514 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
9516 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9517 missing in the windows build (like older cygwin include files).
9519 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
9521 * icall.c: Fixed check for possible integer overflow in Buffer_
9522 BlockCopy icall. Replaced comments style // by /* */.
9524 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
9526 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9528 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9529 check after MONO_VTADDR. Fixes pinvoke2.exe.
9531 * marshal.h marshal.c metadata.h: Add beginnings of support for
9532 ftnptr -> delegate marshalling.
9534 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
9536 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9537 * threads.c: Fix warnings.
9539 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
9541 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9542 * icall.c: Registered icalls for Suspend and Resume.
9543 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9545 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9546 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9547 * process.c: Use WaitForSingleObjectEx.
9548 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
9550 * threads.c, threads.h: Make use of new Ex wait methods. Improved
9551 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9552 for Suspend and Resume. Added new mono_thread_stop, used for stoping
9553 background threads. Added basic support for Abort in Windows.
9554 Start new threads using a managed delegate invoke wrapper. This wrapper
9555 has an interruption checkpoint that is needed since an interruption
9556 can be requested before the thread leaves the unmanaged code that starts
9558 * marshal.c: Added interruption checkpoint after every native call, and
9559 also before managed calls for wrappers called from unmanaged code to
9560 go into managed code.
9561 * object.h: Added new field in MonoThread to keep track of interruption
9564 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
9566 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9569 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9576 * rand.c: getenv -> g_getenv (windows!)
9578 * process.c: complete_path is also used on non-windows platforms.
9580 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9582 * icall.c: new signature for Process_Start.
9584 * process.[ch]: new signature for Process_Start. If we're on windows
9585 and UseShellExecute is false, we have to search for the program by
9586 ourselves if we don't get a full path.
9588 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
9590 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
9591 marshalling and call CleanUpNativeData if needed. Fixes #58646.
9593 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9595 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9598 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9600 * process.c: use double quotes to quote program name and arguments on
9601 windows. Fixes bug #58575.
9603 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9605 * file-io.c: don't return "." and ".." when using windows Find*File.
9607 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
9609 * marshal.c: Don't pass wrappers to message init because method
9610 addressed used to lookup metadata. part of remoting[2|3] fix.
9612 2004-05-15 Jackson Harper <jackson@ximian.com>
9614 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9615 path is essentially the same as MONO_PATH except that it points to
9616 GACs instead of lib directories.
9617 * loader.h: The user gac is gone so we dont need function to
9619 * mono-config.c: user gac option is now gone.
9621 2004-05-15 Jackson Harper <jackson@ximian.com>
9623 * culture-info.h: Make defines more consistent, add calendar data
9624 to the culture info table.
9625 * culture-info-tables.h: Add basic calendar data. Basically
9626 everyone gets default gregorian until all the data is
9628 * locales.c: Use the new consistent defines. Set calendar data for
9629 culture info objects.
9630 * object.h: add a field for calendar data to CultureInfo
9632 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
9634 * image.c: image->runtime_invoke_cache is keyed on signatures now.
9635 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9637 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9638 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9639 an extra param that is the pointer of the method to invoke. The IL for
9640 the invoke method is no longer specific to the method, but to the
9641 signature of the method. Thus, we can share the same code for multiple
9642 methods. This reduces the number of methods that have to be compiled.
9644 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
9646 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9648 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9650 * icall.c: Optimize Buffer.BlockCopy.
9652 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9654 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9655 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9656 quote). Changed them to "MMMM yyyy".
9658 2004-05-12 Miguel de Icaza <miguel@ximian.com>
9661 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
9663 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
9665 * reflection.h: Updated after changes to managed structures.
9667 * appdomain.c: Bump corlib version.
9669 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9671 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9674 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9676 * Makefile.am: link to ../os/libmonoos.la on windows.
9679 -If MONO_DEBUG, warn about non-existing directories in
9681 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9682 compile time variable.
9683 -Removed init_default_path and call mono_set_rootdir from
9684 libmonoos.a instead (windows only).
9686 * assembly.h: declare mono_assembly_getrootdir().
9689 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9691 * loader.c: s/getenv/g_getenv/
9693 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
9695 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9697 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9699 * metadata.h: Add new marshalling conversions.
9701 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9704 * reflection.c (mono_reflection_get_type): Lookup the type in all
9705 modules of a multi-module assembly. Fixes #58291.
9707 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
9709 * threads.c: Before aborting a background, set the StopRequested
9710 state. This avoids throwing the Abort exception.
9711 In mono_thread_manage, don't continue with the shutdown until all
9712 aborted threads have actually stopped.
9714 2004-05-10 Jackson Harper <jackson@ximian.com>
9716 * locales.c: Remove the modifier from culture names.
9718 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9720 * Makefile.am: monosn is not installed any more. It has been deprecated
9723 2004-05-07 Jackson Harper <jackson@ximian.com>
9726 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9727 Fix array construction, add bailout if the length is 0.
9729 2004-05-07 Dick Porter <dick@ximian.com>
9731 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9732 machine doesn't have a DNS entry. Patch by Urs Muff
9733 (umuff@quark.com), fixes bug 57928.
9735 2004-05-06 Jackson Harper <jackson@ximian.com>
9737 * reflection.c: Handle null PublicTokens properly. alloc mem for
9738 assembly names culture so we dont crash when freeing it.
9740 2004-05-06 Jackson Harper <jackson@ximian.com>
9742 * assembly.c: Check the usergac when loading with partial names.
9744 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9746 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
9747 does nothing for now (not required for Linux/Windows) but the class
9748 library can call it (and a newer or modified runtime could need it).
9749 * icall.c: Registred icall.
9751 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9753 * loader.c: prints a message on module loading error we set MONO_DEBUG
9754 environment variable.
9756 2004-05-05 Jackson Harper <jackson@ximian.com>
9758 * appdomain.c: Handle PublicKeyToken=null properly.
9760 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9762 * environment.c|h: Added icall ves_icall_System_Environment_
9763 GetOSVersionString to get the current OS version as a string.
9764 * icall.c: Registred icall.
9766 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
9768 * object.c: in mono_object_get_virtual_method(), take into account that
9769 non-virtual methods don't have a slot in the vtable. Check needed when
9770 the object is a proxy.
9772 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
9774 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9775 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9777 * object.c (mono_class_compute_gc_descriptor): Fix warning.
9779 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9780 passed when a valuetype is expected.
9782 * object.c (mono_unhandled_exception): Only set the exit code if the
9783 exception happens in the main thread. Fixes thread5.exe.
9785 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9786 invalid names. Fixes #58047.
9788 2004-05-03 Jackson Harper <jackson@ximian.com>
9790 * assembly.c: This line was committed accidently and is unneeded.
9792 2004-05-03 Jackson Harper <jackson@ximian.com>
9794 * icall.c: Add new icall for Assembly::LoadWithPartialName
9795 * assembly.c/.h: new function that probes the GAC to load partial
9796 assembly names by Paolo Molaro.
9798 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9800 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9801 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9802 (type_get_fully_qualified_name): Added PublicKeyToken when building a
9805 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9807 * appdomain.c: fixed check for 'neutral' culture and removed warning.
9808 * reflection.c: fix bug when parsing a full type name and Version is not
9809 the last thing in the string.
9811 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
9813 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9814 crashes when it is freed.
9816 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9818 * assembly.c: print the compat warning to stderr.
9820 2004-05-01 Miguel de Icaza <miguel@ximian.com>
9822 * assembly.c (mono_assembly_load_references): Add a compatibility
9823 hack to run old applications that might be still referencing the
9824 3300-based assemblies, only do this for System.xxx.
9826 2004-05-01 Jackson Harper <jackson@ximian.com>
9828 * appdomain.c: If the culture is neutral we set it to "".
9830 2004-04-29 Jackson Harper <jackson@ximian.com>
9832 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9834 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9836 * string-icalls.c: added low overhead function for copying chars
9837 * icall.c: added needed icall for the above function
9839 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9841 * icall.c: fix return value of get_global_assembly_cache. Implemented
9842 Environment.GetLogicalDrives.
9844 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
9846 * rand.c: try and talk to egd or prngd
9847 for random bytes if opening devices fail.
9849 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
9851 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9852 alignment for the type using the native alignment of its members
9853 instead of using klass->min_align.
9855 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9857 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9860 * socket-io.c: added check for sys/aio.h.
9862 2004-04-28 Dick Porter <dick@ximian.com>
9864 * threads.c: Don't abort a thread thats already aborting, when
9865 terminating everything.
9867 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9869 * icall.c: added 2 new async calls for Socket.
9871 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9874 * threadpool.c: removed unused variable.
9876 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
9878 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9880 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9882 * locales.c: put back string_invariant_tolower () and
9883 string_invariant_toupper ().
9885 2004-04-26 David Waite <mass@akuma.org>
9890 * unicode.h: remove comma from end of enumeration declarations
9892 2004-04-26 David Waite <mass@akuma.org>
9894 * debug-mono-symfile.h:
9897 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9900 2004-04-26 Jackson Harper <jackson@ximian.com>
9902 * appdomain.c: Increment version number.
9904 2004-04-26 Jackson Harper <jackson@ximian.com>
9906 * appdomain.c: Set assembly references public token value when
9907 PublicKeyToken is specified, not the hash_value. Free public token
9908 values when free assembly name data. Previously the public key
9909 token was hex decoded, however we are using hex encoded public key
9910 tokens, so this is not neccasary.
9911 * assembly.c: Lookup assemblies in the gac if their public token
9912 value is set. Add function to allow enabling user gac
9913 lookups. Specify whether or not the assembly was loaded from the
9914 GAC. Compare full assembly names when checking the cache for
9915 assemblies (Temporarily disabled see comment in code). Remove
9916 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9917 specifies trace-loader they get extra info to stdout on the
9918 loading of assemblies.
9919 * image.h: Add a field for an assembly references public token
9920 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9921 whether an assembly has been loaded from the GAC.
9922 * image.c: Remove a corlib -> mscorlib name mapping.
9923 * loader.h: Add function to enable/disable the user gac.
9924 * mono-config.c: Check if the usergac is enabled in the config
9926 * icall.c: New icall to determine whether or not an assembly has
9927 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9928 * tabldefs.h: Add constant for assemblyref flag that specifies a
9929 full public key is used instead of a public token.
9930 * reflection.c: Remove mscorlib -> corlib mappings. Set
9931 PublicTokenValue instead of hash value. This value is a hex
9932 string so it does not need to be expanded.
9934 2004-04-26 Martin Baulig <martin@ximian.com>
9936 * mono-debug-debugger.c (mono_debugger_initialize): Set
9937 `mono_debugger_initialized' before calling mono_debug_lock().
9939 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
9941 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9942 InternalToUpper/InternalToLower.
9943 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9944 removed invariant culture shortcut. This is now done in managed code.
9945 * locales.c: (string_invariant_toupper/tolower) removed.
9947 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9949 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9950 Added Poll internal call.
9952 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9953 call for Poll. Select was too heavy for polling a single socket.
9955 * threadpool.[ch]: added mono_threadpool_cleanup.
9956 * threads.c: use it. Don't use Thread_Abort on windows.
9958 2004-04-23 Martin Baulig <martin@ximian.com>
9960 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9962 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
9964 * icall.c: Registred new icalls for key pair protection and added an
9965 icall for Environment.GetFolderPath on Windows.
9966 * security.c|h: Added new icalls for key pair protection.
9968 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9970 * socket-io.c: don't display the non-supported family warning for known
9971 families. Now this is not displayed on windows when checking support
9974 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9976 * class.c: don't display the layout warning for static fields.
9978 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
9980 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9981 * locales.c, locales.h: Added new icalls for culture-specific
9982 Char.ToLower and Char.ToUpper.
9984 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9986 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9989 2004-04-20 Martin Baulig <martin@ximian.com>
9991 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9992 of the type name before passing it to mono_reflection_type_from_name().
9994 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
9996 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9997 encodings here. Fixes #56965.
9999 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
10001 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10002 fix test on strstr result not that I can see anything that
10003 relies on the result.
10005 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
10007 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
10010 * marshal.c (mono_marshal_get_string_encoding): New helper function.
10012 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
10013 function to determine which marshalling to use for strings. Fixes
10016 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
10018 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
10020 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
10022 * icall.c: #include mono-config.h
10024 2004-04-15 Jackson Harper <jackson@ximian.com>
10026 * culture-info-tables.h: Fix date formats for en-US culture.
10028 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
10030 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
10031 ThreadPool.SetMinThreads.
10032 * threadpool.c: Implemented ThreadPool.GetMinThreads and
10033 ThreadPool.SetMinThreads.
10035 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10037 * mono-config.c: also load the .config file in the directory
10038 where the assembly was found.
10040 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10042 * assembly.c: load per-assembly config files.
10043 * icall.c: decrapified code to get the config dir and moved to
10045 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
10046 per-assembly config files. When doing a dll map lookup give precedence
10047 to the per-assembly data.
10049 2004-04-14 Martin Baulig <martin@ximian.com>
10051 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
10052 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
10053 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
10055 * mono-debugger-debugger.c: While the debugger is locked, remember
10056 whether the symbol tables have changes and send one single
10057 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
10059 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
10061 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
10063 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
10066 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
10067 account when marshalling string arrays. Fixes #56965.
10069 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
10071 * icall.c: Add new icalls mapping for security.
10072 * security.c|h: Add internal calls for WindowsIdentity,
10073 WindowsImpersonationContext and WindowsPrincipal.
10075 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
10077 * class.c: Added comment to ensure the System.MonoDummy class
10078 is removed when no longer necessary
10080 2004-04-13 Miguel de Icaza <miguel@ximian.com>
10082 * appdomain.c: Pass arguments to the bootstraping exceptions to
10083 minimize JITed methods at boot
10085 * metadata.c (mono_exception_from_name_two_strings): Allow for the
10086 second string to be null.
10088 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10089 Change the protocol to minimize the JIT methods at startup. Now
10090 it Returns the internal codepage, if the value of "int_code_page"
10091 is 1 at entry, and we can not compute a suitable code page
10092 number, returns the code page as a string.
10094 2004-04-13 Jackson Harper <jackson@ximian.com>
10096 * culture-info-tables.h: Fix number of decimal digits for all
10099 2004-04-13 Jackson Harper <jackson@ximian.com>
10101 * icall.c: Clairfy out of sync error message. It is not always
10102 your corlib that is out of sync.
10104 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
10106 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
10107 properties when only the set accessor is overriden. Fixes #55874.
10109 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
10111 * assembly.c (mono_assembly_load_references): Make this thread safe.
10114 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
10116 * monosn.c: Add missing initialization calls.
10118 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
10121 ves_icall_System_Globalization_CultureInfo_construct_number_format
10122 Fix g_assert so it compiles on fussier compilers re int/ptr
10125 2004-04-08 Dick Porter <dick@ximian.com>
10128 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
10129 53992. Also rearrange the code so that the internal calls return
10130 an error value and exceptions are thrown from managed code.
10132 * icall.c: Add type info to the socket icalls.
10134 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10136 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10139 2004-04-07 Martin Baulig <martin@ximian.com>
10141 * class.c (mono_class_from_generic_parameter): Don't default
10142 `klass->parent' to `mono_defaults.object_type'.
10144 2004-04-07 Martin Baulig <martin@ximian.com>
10146 * reflection.c (mono_reflection_initialize_generic_parameter): Set
10147 `param->pklass->reflection_info'.
10149 2004-04-07 Jackson Harper <jackson@ximian.com>
10151 * culture-info-tables.h: Fix date separator symbol.
10153 2004-04-07 Martin Baulig <martin@ximian.com>
10155 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10156 from System.Type to System.MonoType.
10158 2004-04-07 Martin Baulig <martin@ximian.com>
10161 (MonoReflectionGenericParam): Added `has_reference_type' and
10162 `has_value_type' fields.
10164 * reflection.c (mono_image_get_generic_param_info): Encode the
10165 correct flags if we have the `class' or `struct' constraint.
10167 2004-04-07 Martin Baulig <martin@ximian.com>
10170 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10172 2004-04-07 Jackson Harper <jackson@ximian.com>
10174 * appdomain.c: Revert extra patches, just wanted to bump the
10177 2004-04-07 Jackson Harper <jackson@ximian.com>
10179 * Makefile.am: Add culture-info private headers.
10180 * icall.c: Add new icalls for contructing locales.
10181 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10182 * locales.h: Declare new culture info construction methods.
10183 * object.h: Add new fields used to avoid the CultureMap to
10185 * culture-info.h: Definition of structs used in the culture info
10187 * culture-info-tables.h: Autogenerated tables that contain culture
10188 info data. This file was generated with the locale-builder tool.
10189 * appdomain.c: Incement corlib version number.
10191 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
10193 * appdomain.c: (mono_runtime_init) move mono_thread_init
10194 to before mono_object_new calls so critical sections
10195 are initialized before use.
10197 2004-04-07 Martin Baulig <martin@ximian.com>
10200 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10201 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10202 (ves_icall_MonoGenericParam_initialize): Removed.
10203 (monogenericparam_icalls): Removed.
10204 (generictypeparambuilder_icalls): Added new table for
10205 System.Reflection.Emit.GenericTypeParameterBuilder.
10208 (mono_reflection_define_generic_parameter): Removed.
10209 (mono_reflection_initialize_generic_parameter): This is now called
10210 from GenericTypeParameterBuilder's .ctor.
10212 2004-04-06 Martin Baulig <martin@ximian.com>
10214 * class.c (mono_class_init): Don't inflate nested classes in a
10216 (mono_type_get_name_recurse): Include the generic arguments for
10217 generic instances and generic type declarations.
10218 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10219 (_mono_class_get_instantiation_name): Removed.
10220 (mono_class_create_generic): Always use `gklass->name' as our name.
10222 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10224 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10225 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10226 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10227 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10228 closed generic methods here.
10231 (mono_reflection_generic_inst_get_nested_types): Removed.
10232 (inflate_mono_method): Copy the generic parameters from the
10233 MonoMethodHeader into out MonoGenericMethod.
10235 2004-04-06 Martin Baulig <martin@ximian.com>
10238 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10240 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10242 * reflection.c (build_compressed_metadata): If we have any entries
10243 in the GenericParam, MethodSpec or GenericParamConstraint tables,
10244 set the header version to 1.1.
10246 2004-04-06 Martin Baulig <martin@ximian.com>
10248 * class.c (mono_class_init): If we're a generic instance,
10249 initialize our nested classes, too.
10250 (_mono_class_get_instantiation_name): Deal with the new `!%d'
10253 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10255 * process.c: quote the argument passed to the shell on windows.
10257 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
10259 * threads.c (mono_alloc_special_static_data): Allow this to be
10260 called during startup.
10262 2004-04-02 Martin Baulig <martin@ximian.com>
10265 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10267 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
10269 * icall.c: Fix build.
10271 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
10273 * Makefile.am: Added security.c|h.
10274 * icall.c: Added icall for get_UserName;
10275 * security.c: New file for security related icalls. Added function
10276 get_UserName for System.Environment (fix #56144).
10277 * security.h: New. Header file for security.c
10279 2004-04-02 Dick Porter <dick@ximian.com>
10281 * icall.c: Deleted the icalls that were obsoleted some time ago
10282 by the ICU string code, and which were mixed into the icall
10283 rearranging. Fixes bug 55969.
10286 * string-icalls.c: Deleted the code that those icalls reference.
10288 2004-04-01 Martin Baulig <martin@ximian.com>
10290 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10292 * class.c (mono_class_from_generic_parameter): Don't set
10293 TYPE_ATTRIBUTE_INTERFACE.
10294 (my_mono_class_from_generic_parameter): Likewise.
10296 2004-04-01 Martin Baulig <martin@ximian.com>
10298 * loader.c (find_method): Added an optional `MonoClass *ic'
10299 argument to search in a specific interface.
10300 (mono_get_method_constrained): New public function.
10302 2004-04-01 Martin Baulig <martin@ximian.com>
10304 * reflection.c (mono_image_get_generic_field_token): Use the
10305 `handleref' cache here.
10307 2004-04-01 Martin Baulig <martin@ximian.com>
10309 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10311 * reflection.c (create_generic_typespec): Use the `typespec' hash
10312 here, not the `typeref' one.
10314 2004-04-01 Martin Baulig <martin@ximian.com>
10316 * class.c (mono_class_inflate_generic_type): Moved the
10317 functionality into a new static inflate_generic_type() which
10318 returns NULL if it didn't do anything. Only increment the
10319 `mono_stats.inflated_type_count' if we actually inflated
10321 (mono_class_get_full): Check the classes type to see whether we
10322 need to inflate it; also inflate MONO_TYPE_(M)VAR.
10324 2004-04-01 Jackson Harper <jackson@ximian.com>
10326 * reflection.c: Set culture for assembly references.
10328 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
10330 * reflection.[ch], icall.[ch], Fix support for pinning variables.
10332 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10335 (do_mono_assembly_open): the critical section also covers
10336 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10338 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10341 (mono_manage_threads): abort the background threads when finishing.
10344 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10346 * gc.c: only close the done_event handle if there was no timeout.
10349 2004-03-30 Martin Baulig <martin@ximian.com>
10351 * icall.c (icall_entries): It's called "System.Activator", not
10352 "System.Activation".
10354 2004-03-30 Martin Baulig <martin@ximian.com>
10356 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10357 (mono_class_create_from_typespec): Likewise.
10359 2004-03-30 Martin Baulig <martin@ximian.com>
10361 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10362 `has_ctor_constraint' and `initialized'.
10364 2004-03-30 Martin Baulig <martin@ximian.com>
10366 * reflection.c (encode_new_constraint): New static function to add
10367 the constructor constraint attribute to a type parameter.
10368 (encode_constraints): Call encode_new_constraint() if necessary.
10371 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10373 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10375 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
10377 * reflection.c, icall.c: add support for pinning variables.
10379 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
10381 * marshal.c (mono_marshal_get_managed_wrapper):
10382 init bool local with zero rather than null.
10384 2004-03-29 Martin Baulig <martin@ximian.com>
10386 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10387 the "official" behavior here.
10388 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10390 2004-03-29 Martin Baulig <martin@ximian.com>
10392 * icall.c: Reflect latest API changes.
10394 2004-03-29 Martin Baulig <martin@ximian.com>
10396 * loader.c (mono_get_method_from_token): Also call
10397 mono_metadata_load_generic_params () for abstract and interface
10398 methods; replace the type arguments in the method signature with
10399 the ones which are loaded from the metadata.
10401 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
10403 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10404 of the lock is not the current thread. MS.NET don't do it, in spite of
10405 what the documentation says. See bug #56157.
10407 2004-03-28 Martin Baulig <martin@ximian.com>
10409 * class.c (mono_class_init): Don't call init_properties() and
10410 init_events() for generic instances; set `prop->parent' when
10411 inflating properties.
10413 * reflection.c (mono_generic_inst_get_object): Call
10414 `mono_class_init (ginst->klass)'.
10415 (mono_type_get_object): Only create a MonoGenericInst if your
10416 generic type is a TypeBuilder.
10417 (do_mono_reflection_bind_generic_parameters): Only set
10418 `ginst->is_dynamic' if our generic type is a TypeBuilder.
10420 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
10422 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10425 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10427 * icall.c: added Kill_internal icall.
10428 * process.[ch]: added Kill_internal icall.
10430 2004-03-25 Martin Baulig <martin@ximian.com>
10432 * class.h (MonoStats): Added `generic_instance_count',
10433 `inflated_method_count', `inflated_type_count' and
10434 `generics_metadata_size'.
10436 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10438 * reflection.c: no warnings now.
10440 2004-03-25 Martin Baulig <martin@ximian.com>
10442 * class.c (mono_class_get_full): New public function; does a
10443 mono_class_get(), but also takes a `MonoGenericContext *'.
10445 * loader.c (mono_field_from_memberref): Renamed to
10446 `field_from_memberref', made static and added `MonoGenericContext *'
10448 (mono_field_from_token): Added `MonoGenericInst *' argument.
10449 (method_from_memberef): Likewise.
10450 (mono_get_method_from_token): Likewise.
10451 (mono_get_method_full): New public function; does a
10452 mono_get_method(), but also takes a `MonoGenericContext *'.
10454 * verify.c (mono_method_verify): Get the method's generic context
10455 and pass it to mono_field_from_token(), mono_get_method_full() and
10456 mono_class_get_full().
10458 2004-03-25 Martin Baulig <martin@ximian.com>
10460 * class.c (mono_class_inflate_generic_type): Take a
10461 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10462 `MonoGenericMethod *'.
10464 2004-03-25 Martin Baulig <martin@ximian.com>
10466 * loader.h (MonoMethodInflated): Store the MonoGenericContext
10467 instead of the MonoGenericMethod here.
10469 2004-03-25 Martin Baulig <martin@ximian.com>
10471 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10472 each time we create a new MonoGenericInst, we also create a new
10473 context which points back to us.
10475 * class.c (inflate_method): Use `ginst->context' instead of
10476 creating a new context.
10478 * loader.c (method_from_memberref): Use
10479 `klass->generic_inst->context' instead of creating a new context.
10481 2004-03-25 Martin Baulig <martin@ximian.com>
10483 * class.h (MonoGenericContext): New struct.
10484 (MonoGenericMethod): Removed `generic_inst'.
10486 * class.c (mono_class_inflate_generic_method): Take a
10487 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10489 2004-03-25 Martin Baulig <martin@ximian.com>
10491 * loader.h (MonoMethodInflated): New typedef.
10493 * metadata.h (MonoMethodSignature): Removed `gen_method', make
10494 `generic_param_count' consume just 30 bits, added `is_inflated'
10495 and `has_type_parameters' flags (one bit each).
10497 * class.c (mono_class_inflate_generic_method): Create a
10498 MonoMethodInflated instead of a MonoMethodNormal and set
10499 `is_inflated' in the method signature.
10501 * class.h (MonoGenericMethod): Removed `generic_method'.
10503 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
10505 * image.c: Make sure the name of a MonoImage is always an absolute path.
10506 This fixes bug #54415.
10508 2004-03-24 Martin Baulig <martin@ximian.com>
10510 * class.c (mono_class_setup_vtable): If we're a generic instance,
10511 use our generic type's vtable size.
10513 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
10515 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10516 MONO_NO_UNLOAD env var as a temporary workaround for unloading
10519 2004-03-23 Martin Baulig <martin@ximian.com>
10521 * class.h (MonoDynamicGenericInst): Added `int count_events' and
10522 `MonoEvent *events'.
10524 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10525 (typebuilder_icalls): Added "get_event_info"; calls
10526 mono_reflection_event_builder_get_event_info().
10528 * reflection.c (mono_reflection_generic_inst_initialize): Added
10529 `MonoArray *events'.
10530 (mono_reflection_event_builder_get_event_info): New function.
10532 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
10534 * object.h: add mono_type_initialization_init
10536 * object.c (mono_runtime_class_init):
10537 implement class constructor synchronization rules
10538 to cope with threading issues.
10539 add mono_type_initialization_init
10541 * appdomain.c (mono_runtime_init): call
10542 mono_type_initialization_init
10544 * class.h: removing initializing field from MonoVTable
10546 2004-03-23 Martin Baulig <martin@ximian.com>
10548 * class.c (my_mono_class_from_generic_parameter): Use
10549 `param->name' if it's not NULL.
10551 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
10553 * class.c: do not insert non-virtual methods in the vtable.
10554 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10555 that means the method is non-virtual. This never would have
10558 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
10560 * profiler.c: Added lock for accessing coverage_hash.
10562 2004-03-22 Martin Baulig <martin@ximian.com>
10564 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10565 `method->method->signature->generic_param_count != 0' to make it
10566 work for interface methods.
10568 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10570 * process.c: quote the string passed to the shell using g_shell_quote.
10572 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10575 (mono_threads_manage): don't remove the finalizer thread and self
10576 from the threads hash table so that mono_thread_manage can be called
10579 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10581 * process.c: quote the arguments when UseShellExecute is true. Fixes
10584 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10586 * threads.c: set mono_thread_detach as a cleanup routine for every
10587 thread. This way it's always executed upon thread termination, either
10588 aborted or finished normally. No more xsp hangs!
10590 2004-03-17 Martin Baulig <martin@ximian.com>
10592 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10593 `int count_nested' and a `MonoType **nested'.
10595 * reflection.c (mono_reflection_bind_generic_parameters): Moved
10596 most of the functionality into a new static
10597 do_mono_reflection_bind_generic_parameters() and don't take a
10598 `MonoType *nested_in' argument any more. Don't compute nested
10600 (mono_reflection_generic_inst_get_nested_types): New public method
10601 to get nested types.
10603 * class.c (mono_class_create_generic): Set `klass->nested_in' if
10604 we're a nested class.
10606 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10607 mono_reflection_generic_inst_get_nested_types() to compute the
10610 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10612 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10613 descriptive error message under windows.
10615 2004-03-17 Martin Baulig <martin@ximian.com>
10617 * class.c (dup_type): Added `const MonoType *original' argument;
10618 copy the attrs from the original type.
10620 2004-03-17 Martin Baulig <martin@ximian.com>
10622 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10623 `m->generic_inst_cache' here.
10625 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10627 * exception.h exception.c: Add stack_overflow_exception.
10629 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10632 (overlapped_callback): call SetEvent *after* invoking the callback.
10633 No need to call CloseHandle.
10635 2004-03-16 Martin Baulig <martin@ximian.com>
10637 * reflection.c (mono_image_get_fieldref_token): Take a
10638 `MonoReflectionField *' instead of a `MonoClassField *' and a
10639 `MonoClass *'; store the `MonoReflectionField *' in the hash.
10641 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10643 * appdomain.c: don't add the culture to the filename we're looking for
10644 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10646 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10648 * locales.c: don't ignore symbols when doing case insensitive compares.
10649 Thanks Dick! Fixes bug #54046.
10651 * threads.c: surround 'threads' usage with enter/leave in
10652 mono_thread_manage.
10654 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
10656 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
10657 implicitly marshalled as [Out]. Fixes #55450.
10659 (mono_marshal_get_runtime_invoke): Zero out the result if there is
10662 2004-03-16 Martin Baulig <martin@ximian.com>
10664 * class.c (mono_class_from_generic_parameter): Use the actual
10667 2004-03-16 Martin Baulig <martin@ximian.com>
10669 * reflection.c (type_get_signature_size): New static function.
10670 Compues the size of the type in a method signature.
10671 (method_get_signature_size): New static function; calls
10672 type_get_signature_size() to compute the actual size of the
10673 method's signature.
10674 (method_encode_signature): Use method_get_signature_size() to get
10675 the signature's size rather than using `nparams * 10'.
10677 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10679 * file-io.h: define here WapiOverlapped on windows. I don't want the
10680 regular OVERLAPPED one.
10683 * threadpool.c: somehow, BindIoCompletionCallback is not found.
10684 Disabling AIO on windows.
10686 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10688 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10691 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10693 * appdomain.c: upgraded corlib version.
10695 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10696 and BeginWrite. Allow opening files for asynchrnous operations.
10698 * file-io.h: new struct that maps FileStreamAsyncResult.
10699 * icall.c: added new icalls.
10700 * process.[ch]: support setting child process environment variables
10701 and use the SHELL or COMSPEC when UseShellExecute is true.
10703 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10704 callback for async. IO is here and also BindHandle.
10706 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10709 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
10711 * reflection.c (create_custom_attr): Allow len == 0.
10713 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10714 computation on big-endian machines.
10716 2004-03-13 Martin Baulig <martin@ximian.com>
10718 * class.h (MonoGenericInst): Added `int count_ifaces'.
10720 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10721 `ginst->count_ifaces' instead `klass->interface_count' since we
10722 may get called before the vtable is created.
10724 * loader.c (mono_method_get_param_names): If we're a generic
10725 instance, return and don't initialize the class.
10727 * reflection.c (mono_reflection_setup_generic_class): Don't call
10728 ensure_runtime_vtable().
10729 (mono_reflection_bind_generic_parameters): Set
10730 `ginst->count_ifaces'.
10732 2004-03-11 Jackson Harper <jackson@ximian.com>
10736 * unicode.h: Remove unused System.Char icalls.
10738 2004-03-11 Miguel de Icaza <miguel@ximian.com>
10740 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10741 code when we P/Invoke the first library in Windows.Forms, instead
10742 of when we first open the assembly.
10744 * assembly.c: Drop the lookup from here.
10746 2004-03-10 Martin Baulig <martin@ximian.com>
10748 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10749 class for properties, fields and events. Finally fixes #54945.
10751 2004-03-10 Martin Baulig <martin@ximian.com>
10753 * metadata.c (mono_metadata_class_equal): New static function;
10754 checks whether two generic instances or two generic parameters are
10756 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10759 2004-03-10 Martin Baulig <martin@ximian.com>
10761 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10763 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10764 argument and write it into the `reflection_info' field.
10767 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10768 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10770 2004-03-09 Jackson Harper <jackson@ximian.com>
10772 * char-conversions.h: use 8 bits for numeric data its all we need
10773 * icall.c: numeric data is only 8 bits now.
10775 2004-03-09 Martin Baulig <martin@ximian.com>
10777 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10779 * class.c (init_properties, init_events): Initialize the new
10782 * reflection.c (typebuilder_setup_properties): Likewise.
10783 (typebuilder_setup_events): Likewise.
10785 * reflection.h (MonoEventInfo): Replaced `parent with
10786 `declaring_type' and `reflected_type'.
10788 * icall.c (ves_icall_get_property_info): Distinguish between
10789 declaring and reflected type.
10790 (ves_icall_get_event_info): Likewise.
10792 2004-03-09 Martin Baulig <martin@ximian.com>
10794 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10795 (ves_icall_Type_GetField): Correctly set field->klass.
10797 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
10799 * loader.h: Fix warning.
10801 2004-03-08 Miguel de Icaza <miguel@ximian.com>
10803 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10804 library routine if present. Notice that it will still continue
10805 executing even if its missing, for those working on the Gtk#
10806 edition of Windows.Forms.
10808 * assembly.c (do_mono_assembly_open): If loading the
10809 System.Windows.Forms call mono_loader_wini_init.
10811 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
10813 * class.h: Added MonoRemoteClass struct.
10814 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10815 function for MonoStrings.
10816 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10817 Added internal call for getting the proxy type.
10818 * marshal.c: Get the type of transparent proxies from its remote_class.
10819 Added methods that generate the IL for type checks and casts:
10820 mono_marshal_get_isinst, mono_marshal_get_castclass,
10821 mono_marshal_get_proxy_cancast.
10822 * marshal.h: Declaration of the previous new methods.
10823 * object.c: Added new moethods for creating and updating MonoRemoteClass
10824 instances: mono_remote_class, mono_upgrade_remote_class,
10825 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10826 * verify.c: FIx transparent_proxy_fields layout.
10827 * appdomain.c: Bump corlib version.
10829 2004-03-04 Jackson Harper <jackson@ximian.com>
10831 * icall.c: Add icall to access char conversion tables.
10832 * char-conversions.h: Character conversion tables.
10833 * Makefile.am: Add char-conversions.h private header file.
10835 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
10837 * appdomain.c (unload_thread_main): Increase unloading timeout to
10838 10 sec as a temporary workaround for Nant problems.
10840 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
10842 * gc.c: Add checks for GC_enable and GC_disable.
10844 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10845 (jaak@zd.com.pl). Fix memory corruption in String.Replace
10848 2004-02-27 Martin Baulig <martin@ximian.com>
10850 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10851 `MonoReflectionType *' instead of a `MonoType *'.
10853 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
10855 * gc.c (run_finalize): Avoid finalizing the object representing the
10857 (finalizer_thread): Fix warning.
10859 2004-02-25 Martin Baulig <martin@ximian.com>
10861 * class.c (_mono_class_get_instantiation_name): Added `int offset'
10862 argument for nested types.
10863 (mono_class_create_generic): Added support for nested generictypes.
10865 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10868 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10870 * reflection.c (method_encode_signature): Increase the minimum
10871 value of `size' from 10 to 11.
10872 (mono_reflection_bind_generic_parameters): Take `int type_argc'
10873 and `MonoType **types' arguments instead of the `MonoArray
10874 *types'; added `MonoType *nested_in'. Recursively instantiate
10877 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
10879 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
10880 stack_overflow_ex members which are used by exception handling.
10882 * appdomain.c (mono_runtime_init): Initialize the new members.
10884 * gc.c (mono_gc_enable): New helper function.
10885 * gc.c (mono_gc_disable): New helper function.
10887 2004-02-23 Martin Baulig <martin@ximian.com>
10889 * icall.c: I must have been really stupid - make it actually work
10892 2004-02-23 Martin Baulig <martin@ximian.com>
10894 * loader.c (method_from_memberref): Only inflate the method if
10895 it's in another klass.
10897 2004-02-23 Martin Baulig <martin@ximian.com>
10899 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10900 (mono_class_init): If we're a generic instance and an interface,
10901 compute `class->interface_id'; also create `class->interfaces'
10902 here and inflate them.
10904 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10906 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10908 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10910 2004-02-15 Miguel de Icaza <miguel@ximian.com>
10912 * reflection.c (method_encode_code): Improved the error message
10913 generated by the exception.
10915 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10917 * icall.c: Martin did not do what he said in the ChangeLog for
10918 2004-02-18, but put back the changes for properties and events.
10919 Commenting those changes out again and adding comment to bug #54518.
10921 * process.c: removed warning.
10923 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
10925 * marshal.c (emit_struct_conv): Print an error message instead of
10926 asserting when a type does not have the StructLayout attribute.
10928 2004-02-20 Martin Baulig <martin@ximian.com>
10930 * reflection.c (mono_type_get_object): Also use the cache for
10932 (mono_reflection_bind_generic_parameters): Always compute
10935 2004-02-20 Martin Baulig <martin@ximian.com>
10937 * class.h (MonoGenericMethod): Removed `klass'.
10939 * class.c (mono_class_inflate_generic_method): Added `MonoClass
10942 2004-02-20 Martin Baulig <martin@ximian.com>
10944 * reflection.c (method_encode_methodspec): Actually use the
10945 uninflated signature for the memberref.
10947 2004-02-20 Martin Baulig <martin@ximian.com>
10949 * class.h (MonoGenericMethod): Removed `declaring'.
10951 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10952 is NULL, compute it here.
10954 2004-02-20 Martin Baulig <martin@ximian.com>
10956 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10958 * metadata.c (mono_metadata_generic_inst_hash): New method.
10959 (mono_metadata_generic_inst_equal): New method.
10961 * reflection.c (mono_reflection_bind_generic_parameters): Use the
10962 `klass->image->generic_inst_cache' cache to avoid creating
10963 duplicate MonoGenericInst's.
10965 * class.c (mono_class_inflate_generic_type): Use the cache.
10967 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10969 * object.c: fixed gc descriptor calculation for embedded valuetypes.
10971 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10973 * icall.c: added Socket.WSAIoctl icall.
10975 * socket-io.[ch]: implemented
10976 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10978 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
10980 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10982 2004-02-18 Urs C Muff <umuff@quark.com>
10984 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10985 this work on PPC and other big-endian architectures.
10987 * debug-mono-symfile.h: Prepended the names of all the `guint32'
10988 fields with an underscore to make sure they're only accessed by
10989 the read32() macro.
10991 2004-02-18 Martin Baulig <martin@ximian.com>
10993 * icall.c: Put the klass->refclass changes back for methods and
10994 fields, but not for properties and events. We're currently not
10995 distinguishing between DeclaringType and ReflectedType for
10996 properties and events, that's what caused the regressions.
10998 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11001 (mono_async_result_new): the handle can be NULL.
11003 * threadpool.c: Use an event instead of a semaphore, don't initialize
11004 it until needed. This saves quite a few semaphores from being created
11005 when using the threadpool.
11007 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
11009 * object.c (mono_string_is_interned_lookup): Fix interning of long
11010 strings. Fixes #54473.
11012 * domain.c (ldstr_equal): Optimize if the two strings are equal.
11014 * icall.c: Revert the klass->refclass changes since they introduce
11015 regressions (bug #54518).
11017 2004-02-18 Martin Baulig <martin@ximian.com>
11019 * class.c (mono_class_init): If we're a generic instance and don't
11020 come from a TypeBuilder, inflate our members here.
11021 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
11022 (mono_class_create_generic): New public method.
11023 (mono_class_initialize_generic): Removed.
11024 (get_instantiation_name): Renamed to
11025 _mono_class_get_instantiation_name() and made it public.
11027 2004-02-18 Martin Baulig <martin@ximian.com>
11029 * class.c (mono_class_inflate_generic_type): Clear the new
11030 instance's `nginst->klass' when inflating a generic instance.
11031 (mono_class_is_subclass_of): Added (basic) support for generic
11034 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
11036 * appdomain.h, domain.c: use a MonoCodeManager instead of a
11037 MonoMempool to hold compiled native code.
11039 2004-02-17 Martin Baulig <martin@ximian.com>
11041 * class.h (MonoDynamicGenericInst): Added `count_properties' and
11044 * reflection.c (mono_reflection_generic_inst_initialize): Added
11045 `MonoArray *properties' argument.
11047 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
11049 2004-02-17 Martin Baulig <martin@ximian.com>
11051 * icall.c (ves_icall_Type_GetFields): Renamed to
11052 ves_icall_Type_GetFields_internal() and added a
11053 `MonoReflectionType *rtype' argument; pass it to
11054 mono_field_get_object() to set the field's "reflected" type.
11055 (ves_icall_Type_GetConstructors): Likewise.
11056 (ves_icall_Type_GetEvents): Likewise.
11057 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
11058 argument; pass it to mono_method_get_object() to set the method's
11061 2004-02-17 Martin Baulig <martin@ximian.com>
11063 * class.h (MonoDynamicGenericInst): New type.
11064 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
11066 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
11067 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
11068 (ves_icall_MonoGenericInst_GetFields): New interncall.
11070 * class.c (mono_class_from_generic): Don't call
11071 mono_class_initialize_generic() if this is a dynamic instance;
11072 ie. it's being created from a TypeBuilder.
11073 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
11074 `class->byval_arg.type'.
11076 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
11077 to `inflate_method' and made static.
11078 (mono_reflection_inflate_field): Removed.
11079 (mono_reflection_generic_inst_initialize): New public method.
11081 * reflection.h (MonoReflectionGenericInst): Removed `methods',
11082 `ctors' and `fields'; added `initialized'.
11084 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
11086 * debug-helpers.c (mono_method_full_name): Fix output for empty
11089 2004-02-12 Martin Baulig <martin@ximian.com>
11091 * class.h (MonoClassField): Added `MonoType *generic_type'.
11093 * reflection.c (mono_image_get_fieldref_token): Added support for
11094 instantiated generic types.
11095 (field_encode_inflated_field): Removed.
11096 (mono_image_get_inflated_field_token): Removed.
11097 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
11099 * reflection.h (MonoReflectionInflatedField): Removed.
11101 2004-02-12 Martin Baulig <martin@ximian.com>
11103 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
11104 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
11106 * reflection.c (mono_image_get_methodspec_token): Take a
11107 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
11108 (mono_image_create_token): Check whether we have a
11109 `method->signature->gen_method' and call
11110 mono_image_get_methodspec_token() if appropriate.
11111 (inflated_method_get_object): Removed.
11112 (mono_reflection_bind_generic_method_parameters): Return a
11113 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
11114 (mono_reflection_inflate_method_or_ctor): Likewise.
11116 * reflection.h (MonoReflectionInflatedMethod): Removed.
11118 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
11120 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
11121 for custom valuetype marshalling.
11123 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
11125 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11127 * icall.c: fixed WSAGetLastError_internal name.
11129 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
11131 * threads.c (mono_thread_attach): Allow this to be called multiple
11132 times for a thread.
11134 * threads.c (build_wait_tids): Do not wait for ourselves.
11136 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
11137 appdomain list is empty.
11139 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11140 memory returned by mono_string_builder_to_utf16, since it points into
11141 managed memory. Thanks to Bernie Solomon for noticing this.
11143 * icall.c: Add AppDomainSetup icalls.
11145 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11147 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11150 * reflection.c (reflection_methodbuilder_to_mono_method): Save
11151 custom attributes to the method_aux struct. Also fix array indexes etc.
11153 * loader.c (mono_method_get_param_names): Make dynamic case work again.
11155 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11157 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11158 (both static and runtime) and reduce startup time.
11160 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
11162 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11163 AsAny marshalling conversion instead of crashing.
11165 * marshal.c: Fix warnings.
11167 2004-02-09 Martin Baulig <martin@ximian.com>
11169 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11171 * reflection.h (MonoReflectionInflatedMethod): Removed the
11172 `declaring' field, it's now in the unmanaged MonoGenericMethod.
11174 * reflection.c (method_encode_methodspec): Removed the `method'
11175 argument; we get it from `gmethod->declaring'.
11176 (inflated_method_get_object): Removed the `declaring' argument.
11178 2004-02-09 Martin Baulig <martin@ximian.com>
11180 * class.h (MonoGenericMethod): New type.
11181 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11184 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11185 a `MonoGenericMethod *gen_method' one.
11187 * class.c (mono_class_inflate_generic_type): Take an additional
11188 `MonoGenericMethod * argument. This is only non-NULL if we're
11189 inflating types for a generic method.
11190 (mono_class_inflate_generic_signature): Renamed to
11191 inflate_generic_signature() and made static; take a
11192 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11193 (inflate_generic_header): Take a `MonoGenericMethod *' argument
11194 instead of a `MonoGenericInst *' one.
11195 (mono_class_inflate_generic_method): Likewise.
11197 * reflection.c (encode_generic_method_sig): Take a
11198 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11199 (method_encode_methodspec): Likewise.
11200 (inflated_method_get_object): Likewise.
11202 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11203 field with a `MonoGenericMethod *gmethod' one.
11205 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
11207 * class.h (mono_class_has_parent): add parens to expansion
11210 2004-02-08 Martin Baulig <martin@ximian.com>
11212 * image.h (MonoImage): Removed `generics_cache'.
11214 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11215 instead of a `MonoType *' argument; removed the `inflate_methods'
11216 argument. Don't inflate methods here.
11218 * loader.c (find_method): If it's a generic instance, call
11219 mono_class_init() on the `sclass->generic_inst->generic_type'.
11221 * metadata.c (mono_type_size): Make this work on uninitialized
11222 generic instances; call it on the `ginst->generic_type's class.
11224 * reflection.c (mono_reflection_bind_generic_parameters): Call
11225 mono_class_from_generic() to create the `ginst->klass'.
11227 2004-02-08 Martin Baulig <martin@ximian.com>
11229 * class.h (MonoClass): Changed type of `generic_inst' from
11230 `MonoType *' to `MonoGenericInst *'.
11232 2004-02-08 Martin Baulig <martin@ximian.com>
11234 * icall.c (ves_icall_Type_BindGenericParameters): Just call
11235 mono_type_get_object(), this is now creating a `MonoGenericInst'
11236 for MONO_TYPE_GENERICINST.
11237 (ves_icall_MonoGenericInst_GetParentType): Likewise.
11238 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11240 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11241 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11242 (inflated_method_get_object): Added `MonoClass *refclass' argument.
11243 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11244 and reflected type.
11246 * reflection.h (MonoReflectionInflatedMethod): Removed
11247 `declaring_type' and `reflected_type'.
11249 2004-02-08 Martin Baulig <martin@ximian.com>
11251 * class.h (MonoGenericInst): Added `MonoType *parent' and
11252 `MonoType **ifaces'.
11254 * reflection.h (MonoReflectionGenericInst): Removed `klass',
11255 `parent' and `interfaces'.
11257 * reflection.c (mono_reflection_bind_generic_parameters): Take a
11258 `MonoType *' argument and return a `MonoType *'.
11261 (ves_icall_MonoGenericInst_GetParentType): New interncall.
11262 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11264 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11266 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11267 valuetype marshalling.
11269 2004-02-06 Martin Baulig <martin@ximian.com>
11272 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11273 (my_mono_class_from_generic_parameter): Likewise.
11275 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11277 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11278 contents of the symbol files lazily.
11280 * object.h (MonoThread): Add 'name' and 'name_len' fields.
11282 * threads.h threads.c icall.c: New icalls for getting and setting the
11285 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
11287 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
11288 Raise an exception when the domain is not found.
11290 2004-02-03 Martin Baulig <martin@ximian.com>
11292 * reflection.c (mono_image_get_methodspec_token): Use the
11293 uninflated signature; fixes gen-33.
11295 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
11297 * gc.c threads.c: Make the finalizer thread a normal managed thread so
11298 the finalizer code can use thread functionality.
11300 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
11301 the finalizer thread.
11303 * threads.c: Make some functions more robust.
11305 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11307 * metadata.h: Add new marshalling conventions.
11309 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11310 stringbuilder marshalling. Fixes #53700.
11312 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11314 * reflection.c (mono_image_get_type_info): Save declarative security
11317 * reflection.c (mono_image_get_field_info): Handle uninitialized
11318 unmanaged fields as well.
11320 * appdomain.c: Bump corlib version.
11322 2004-02-01 Martin Baulig <martin@ximian.com>
11324 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11325 method type arguments.
11327 2004-01-30 Duncan Mak <duncan@ximian.com>
11329 * marshal.h: Add prototype for
11330 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11332 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11335 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
11337 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11338 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11340 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11342 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11343 custom marshalling of valuetypes.
11345 * marshal.c: Fix some warnings.
11347 2004-01-29 Martin Baulig <martin@ximian.com>
11349 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11350 for generic method parameters.
11352 * reflection.c (method_encode_methodspec): Write the uninflated
11353 signature into the methodspec table.
11354 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11355 is always the uninflated method.
11356 (reflection_methodbuilder_to_mono_method): Copy the generic
11357 parameters from the MethodBuilder into `header->gen_params'.
11359 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11361 * class.c (mono_class_from_generic_parameter): Fix warning.
11363 2004-01-27 Martin Baulig <martin@ximian.com>
11365 * class.c (mono_class_from_generic_parameter): Don't create
11366 `klass->methods' here.
11368 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
11370 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11371 extension since it does not work with libraries named lib<FOO>.dll.so.
11373 2004-01-25 Martin Baulig <martin@ximian.com>
11375 * class.c (mono_class_inflate_generic_type): Added support for
11376 MONO_TYPE_GENERICINST.
11378 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11379 inflate methods on open constructed types.
11381 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11383 * object.c: fire ProcessExit event in the root AppDomain after running
11384 Main. Fixes bug #53299.
11386 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11388 * socket-io.c: include the new socket-wrappers.h header.
11389 Use the wrappers instead of the unix socket functions to make the code
11392 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
11394 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11396 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11399 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
11401 * reflection.c (mono_image_create_pefile): Handle the case when the
11402 entry point is not a MethodBuilder.
11404 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11405 field to ReflectionMethod since it is not allways a builder.
11407 * reflection.c (type_get_fully_qualified_name): New helper function to
11408 return the fully qualified name of a type.
11410 * reflection.c (encode_marshal_blob): Always emit the fully qualified
11411 type name for custom marshallers.
11413 * reflection.c (mono_marshal_spec_from_builder): Ditto.
11415 * class.c (mono_class_setup_vtable): If a parent class already
11416 implements an interface, use the implementing methods from that class.
11419 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11421 * threadpool.c: just return instead of ExitThread to allow for thread
11424 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
11426 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11427 when closing resource modules.
11429 * reflection.c (mono_image_create_pefile): Handle the case when the
11430 entry point is not a MethodBuilder.
11432 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11433 field to ReflectionMethod since it is not allways a builder.
11435 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
11437 * marshal.c (mono_marshal_get_managed_wrapper):
11438 mono_marshal_alloc takes native int so CONV_I
11439 the arg for 64bits.
11441 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
11443 * reflection.c (fixup_cattrs): New function to fixup the methoddef
11444 tokens in the cattr table. Fixes #53108.
11446 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11448 * loader.c: don't trim ".dll" before looking up in the config file.
11449 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11451 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
11453 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11454 Return the module which contains the resource as well.
11455 (ves_icall_System_Reflection_Module_Close): New icall.
11457 * appdomain.c: Bump corlib version number.
11459 * image.c (mono_image_addref): New public function.
11461 * assembly.c: Call mono_image_addref.
11463 * reflection.c (mono_module_get_object): Increase reference count of
11466 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11469 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11470 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
11471 proper exceptions on DllImport problems.
11473 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11475 * class.c, metadata.c: eliminate CSIZE macro.
11477 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
11479 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11480 * object.h: Added async_callback field in MonoAsyncResult.
11481 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11482 * verify.c: Added async_callback in MonoAsyncResult layout.
11484 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
11486 * reflection.c (mono_reflection_get_custom_attrs): Add support
11489 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11491 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
11493 (mono_marshal_method_from_wrapper): Add null pointer check.
11495 2004-01-16 Martin Baulig <martin@ximian.com>
11497 * debug-mono-symfile.h: Set version number to 36 and reflect
11498 latest symbol writer changes.
11500 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11502 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11503 multi-dimensional arrays.
11504 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11505 (mono_class_from_mono_type): Use bounded_array_class_get.
11507 * class.c (mono_bounded_array_class_get): New function which takes
11508 a 'bounded' bool argument to distinguish vectors from one dimensional
11511 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
11512 bounded_array_class_get if the array has bounds.
11514 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11515 Search modules loaded using AssemblyBuilder:AddModule as well.
11517 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11519 * appdomain.c: increased corlib version.
11520 * filewatcher.c: removed g_print.
11522 (get_property_info): only allocate what is actually requested.
11523 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11525 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11527 * Makefile.am: added filewatcher.[ch]
11528 * filewatcher.[ch]: FileSystemWatcher runtime support.
11529 * icall.c: added new FSW icalls.
11531 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11533 * string-icalls.c: fix stringbuilder regression as suggested by
11534 Iain McCoy <iain@mccoy.id.au>.
11536 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
11538 * process.c (process_read_stringtable_block): Recognize '007f' as
11539 a language neutral stringtable block.
11541 2004-01-12 Patrik Torstensson
11543 * object.h (MonoStringBuilder) : Changed layout to support our
11544 new stringbuilder class.
11545 * marshal.c: Change marshalling to support the new layout of
11547 * appdomain.c: increased version number because new layout of
11550 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
11552 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11553 assembly name as an string instead of an AssemblyName, since it is
11554 easier to extract info from it.
11556 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11557 the culture subdirectories too. Fixes #52231.
11559 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11561 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11562 It takes 2 new parameters with an optional name for the method to look
11563 for and case ignoring info.
11565 * threadpool.c: removed unused variable.
11567 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11569 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11570 It takes 2 new parameters with an optional name for the property to look
11571 for and case ignoring info.
11574 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
11576 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11579 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11582 * assembly.c: escape the uri before passing it to g_filename_from_uri.
11585 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
11587 * reflection.c: Add support for more than one unmanaged resource.
11589 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11590 in field->def_value, as done in all other cases.
11592 * reflection.c (mono_reflection_get_custom_attrs): Add support for
11595 * reflection.c (mono_reflection_create_runtime_class): Remove
11596 errorneous assignment to klass->element_class, since it is already
11597 done in mono_reflection_setup_internal_class.
11599 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11601 * gc.c: added missing LeaveCriticalSection.
11602 * icall.c: indented a couple of lines.
11603 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11604 if we call EndInvoke inside a callback. Fixes bug #52601.
11606 2004-01-07 Martin Baulig <martin@ximian.com>
11608 * mono-debug-debugger.h
11609 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11611 2004-01-06 Miguel de Icaza <miguel@ximian.com>
11613 * appdomain.c: Use messages in NotImplementedException.
11615 * exception.c (mono_get_exception_not_implemented): Now this takes
11616 a message argument.
11618 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11619 exception instead of g_asserting an aborting when something is not
11622 Add some inline docs.
11624 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
11626 * reflection.h: Update after changes to object layout.
11628 * reflection.c: Implement saving of unmanaged aka win32 resources.
11630 * appdomain.c: Bump version number.
11632 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
11633 Handle missing domains gracefully.
11635 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
11637 * file-io.c : On Windows, there are much more invalid_path_chars.
11639 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11641 * class.h, object.c: prepare for GetType () speedup.
11643 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
11645 * profiler.c: workaround for --profile null reference exception on
11646 cygwin. Patch by Patrik Torstensson.
11648 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
11650 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11651 make work for unaligned access.
11653 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11655 * class.c: small cleanup (class->fields [i] -> field).
11656 * image.c: check address of metadata is valid.
11658 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
11660 * assembly.h assembly.c (mono_assembly_loaded): New public function to
11661 search the list of loaded assemblies.
11663 * reflection.c (mono_reflection_type_from_name): Use
11664 mono_assembly_loaded instead of mono_image_loaded.
11666 * reflection.c: Fix warnings.
11668 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
11670 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
11671 is dynamic. This is needed since an assembly can contain both dynamic and
11672 non-dynamic images.
11674 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
11677 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11679 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11680 to store modules loaded using AddModule.
11682 * reflection.c (mono_image_fill_file_table): Generalize this so it works
11685 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11687 * reflection.c (mono_image_fill_export_table_from_module): New function to
11688 fill out the EXPORTEDTYPES table from a module.
11690 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11691 into a separate function. Also handle loaded non-dynamic modules.
11693 * reflection.c (mono_image_basic_init): Fix memory allocation.
11695 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11697 * assembly.c (mono_assembly_load_references): Make this public.
11699 2003-12-19 Martin Baulig <martin@ximian.com>
11701 * class.c (mono_class_initialize_generic): Made this static, take
11702 a `MonoGenericInst *' instead of a `MonoClass *'.
11703 (mono_class_from_generic): Call mono_class_initialize_generic()
11704 unless we're already initialized or being called from
11705 do_mono_metadata_parse_generic_inst().
11707 * class.h (MonoGenericInst): Added `initialized' and
11708 `init_pending' flags.
11710 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11711 `mono_class_init (gklass)' or mono_class_initialize_generic()
11712 here; set `generic_inst->init_pending' while parsing the
11715 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
11717 * locales.c: include string.h for memxxx prototypes
11719 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
11721 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11722 constructor when accessing literal fields.
11724 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
11726 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11728 * reflection.c (assembly_add_resource_manifest): New function to fill
11729 the MANIFESTRESOURCE table.
11731 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11733 * reflection.h: Update to changes in class layout.
11735 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
11736 Reenable call to mono_runtime_is_shutting_down ().
11738 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11739 determine if the runtime is shutting down.
11741 2003-12-16 Jackson Harper <jackson@ximian.com>
11743 * icall.c: comment out call to mono_runtime_is_shutting_down to
11746 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
11748 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11749 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11751 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
11753 * reflection.c: move definition of swap_with_size
11754 to before its first call
11756 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
11758 * appdomain.c (mono_runtime_is_shutting_down): New public function.
11760 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11763 * object.c: Fix warnings.
11765 * icall.c (ves_icall_Type_Get...): Only consider inherited static
11766 members if FlattenHierarchy is set.
11768 * reflection.c (mono_image_add_decl_security): New function to emit
11769 declarative security.
11771 * reflection.h reflection.c: Add support for declarative security.
11773 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11775 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
11777 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11779 * appdomain.c verify.c: Moved corlib version checking into its own
11780 function in appdomain.c since it needs to create vtables etc.
11782 2003-12-13 Patrik Torstensson <p@rxc.se>
11784 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
11785 instead of unwrapped server.
11787 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
11789 * verify.c (check_corlib): Fix field index.
11791 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
11793 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11796 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
11798 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11799 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11800 cope with sizeof(size_t) != sizeof(guint32).
11802 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11804 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11805 in case of failure.
11807 2003-12-10 Mark Crichton <crichton@gimp.org>
11809 * icall.c: removed the GetNonZeroBytes. We now handle this case
11812 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
11814 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11816 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11819 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
11821 * verify.c (check_corlib): Handle the case when the version field is
11822 initialized by a static constructor.
11824 2003-12-08 Patrik Torstensson <p@rxc.se>
11826 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11828 2003-12-08 Martin Baulig <martin@ximian.com>
11830 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11831 a MonoReflectionGenericParameter, also take the parameter index
11832 and name as arguments.
11833 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11834 (ves_icall_MonoGenericParam_initialize): New interncall.
11835 (ves_icall_Type_make_byref_type): New interncall.
11837 * reflection.h (MonoReflectionGenericParam): Derive from
11838 MonoReflectionType, not just from MonoObject. Added `refobj' and
11841 * reflection.c (mono_reflection_define_generic_parameter): Create
11842 and return a new MonoReflectionGenericParam; don't initialize the
11844 (mono_reflection_initialize_generic_parameter): New public method;
11845 initializes the constraints and creates the `param->pklass'.
11847 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
11849 * reflection.h reflection.c: Use the new fields 'num_types',
11850 'num_fields' and 'num_methods' to track the number of types etc.
11852 * verify.c (check_corlib): Check corlib version number.
11854 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
11856 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11857 function works on all methods.
11859 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
11861 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11862 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11863 the custom_type_info flag of the transparent proxy.
11864 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11865 objects that supports IRemotingTypeInfo.
11866 * object.h: Added custom_type_info field in transparent proxy.
11868 2003-12-06 Martin Baulig <martin@ximian.com>
11870 * class.c (mono_class_create_from_generic): Removed.
11871 (mono_class_from_generic): Check `ginst->klass' before doing
11872 anything else. This is important to fully support "recursive"
11875 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11876 empty `generic_inst->klass' before doing anything else.
11878 2003-12-06 Dick Porter <dick@ximian.com>
11883 * locales.c: Use C structs to access class fields. Don't do a
11884 conversion between MonoString and UChar because both are
11885 platform-endian UTF-16. Compare now takes startindex and count
11886 parameters. Add a char overload for IndexOf. Speed up the
11887 invariant string IndexOf.
11889 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
11891 * Makefile.am (monosn_LDADD): Fix parallel build.
11893 2003-12-04 Martin Baulig <martin@ximian.com>
11896 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11897 (ves_icall_Type_make_array_type): New interncall.
11899 2003-12-04 Martin Baulig <martin@ximian.com>
11901 * locales.c: also change it in the !HAVE_ICU case.
11903 2003-12-04 Dick Porter <dick@ximian.com>
11906 * locales.c: construct_compareinfo is now in CompareInfo, not
11909 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
11911 * image.c (mono_image_load_file_for_image): Cache loaded images in the
11912 image->files array.
11914 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11917 * assembly.c (mono_assembly_load_references): Only load references
11920 * class.c (mono_class_from_name): Avoid linear search of the
11921 EXPORTEDTYPE table.
11923 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11925 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
11927 * image.h (MonoImage): Add 'field_cache' field.
11929 * loader.c (mono_field_from_token): Cache field lookups.
11931 * reflection.c (mono_module_get_object): Fix name property.
11933 * icall.c (ves_icall_get_enum_info): Update after changes to
11934 mono_metadata_get_constant_index ().
11936 * icall.c: Get rid of get_type_info icall, use a separate icall for
11937 each type property to avoid needless memory allocations. Fixes #51514.
11939 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11940 to avoid needless binary searches.
11942 * class.c (class_compute_field_layout): Move the initialization of
11943 field->def_value to mono_class_vtable ().
11945 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11948 * object.c (mono_object_allocate): Make it inline.
11950 * object.c (mono_object_allocate_spec): Make it inline.
11952 2003-12-02 Dick Porter <dick@ximian.com>
11954 * locales.c (create_NumberFormat): NumberFormatInfo construction.
11955 Patch by Mohammad DAMT (mdamt@cdl2000.com).
11957 2003-12-01 Dick Porter <dick@ximian.com>
11959 * threads.c: Fix signature and call in CreateMutex and
11962 2003-12-01 Dick Porter <dick@ximian.com>
11965 * locales.c: Implement string compares and searching
11967 * object.h: Add extra Thread field
11969 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
11971 * reflection.c (fixup_method): Add support for MonoCMethod.
11973 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
11975 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11977 * reflection.c (assembly_name_to_aname): Allow extra characters in
11978 assembly names. Fixes #51468.
11980 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
11982 * exception.c (mono_exception_from_name_domain): New helper function.
11984 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11985 exception object in the correct domain.
11987 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
11988 formatting + make a copy a the input data.
11990 * loader.c (mono_get_method_from_token): Methods which contain
11991 native code do not have entries in the ImplMap.
11993 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11994 Thanks to Gonzalo for spotting this.
11996 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11997 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11999 * assembly.h (mono_assembly_load_from): Split the second part of
12000 assembly loading into a new public function.
12002 * exception.h (mono_get_exception_bad_image_format): New function.
12004 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
12006 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12007 Enumerate all modules inside a dynamic assembly. Fixes #51293.
12009 * icall.c: Add new icall for creating dynamic methods.
12011 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
12013 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
12015 * reflection.c (mono_reflection_create_dynamic_method): New icall to
12016 create a dynamic method.
12018 * reflection.c (resolve_object): New helper function.
12020 * reflection.c: Generalize ReflectionMethodBuilder and the functions
12021 which manipulate it so they can also work on dynamic methods.
12023 * reflection.c (reflection_method_builder_to_mono_method): Avoid
12024 creating the MonoReflectionMethodAux structure if it is not needed.
12026 * reflection.h verify.c: Update after changes to object layout.
12028 * reflection.c (method_builder_encode_signature): Fix compilation on
12031 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
12033 * appdomain.h: Added support for context static fields. Added static_data
12034 field to MonoAppContext and renamed thread_static_fields to a more
12035 generic special_static_fields in MonoAppDomain, since it can now contain
12036 context static fields.
12037 * domain.c: Updated hashtable name.
12038 * object.c: Replaced field_is_thread_static() for a more generic
12039 field_is_special_static() which also checks for context static attribute.
12040 In mono_class_vtable(), added support for static context fields.
12041 * threads.c: Changed methods that manage thread static fields to more
12042 generic methods so they can be reused both for thread and context static
12044 * threads.h: Declared some new methods.
12046 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
12048 * reflection.h: Update after changes to the managed types.
12050 * reflection.c (encode_custom_modifiers): New helper function.
12052 * reflection.c (method_encode_signature): Emit custom modifiers.
12054 * reflection.c (field_encode_signature): Emit custom modifiers.
12056 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
12058 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
12060 * icall.c (ves_icall_System_ValueType_Equals): New optimized
12063 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
12066 * object.c (mono_field_get_value_object): New function.
12068 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
12071 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
12073 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
12074 return a preallocated out-of-memory exception instance.
12076 * object.c (out_of_memory): Use the new function.
12078 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
12079 flag is before the custom modifiers. Fixes #49802.
12081 2003-11-16 Martin Baulig <martin@ximian.com>
12083 * class.c (mono_class_is_open_constructed_type): Implemented the
12084 MONO_TYPE_GENERICINST case.
12086 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
12088 * assembly.c (mono_assembly_fill_assembly_name): New function to
12089 fill out the MonoAssemblyName structure.
12090 (mono_assembly_open): Use the new function.
12092 * icall.c (fill_reflection_assembly_name): New helper function.
12094 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
12097 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
12099 2003-11-15 Martin Baulig <martin@ximian.com>
12101 * class.c (mono_class_is_open_constructed_type): New public
12102 function; checks whether a type is an open constructed type,
12103 ie. whether it still contains type parameters.
12104 (mono_class_inflate_generic_type): If we're a type parameter and
12105 the inflated type is also a MONO_TYPE_(M)VAR, return the original
12108 * class.h (MonoGenericInst): Added `guint32 is_open'.
12110 * loader.c (method_from_methodspec): Check whether we're an open
12111 or closed constructed type and set `ginst->is_open'.
12113 * reflection.c (mono_reflection_bind_generic_parameters): Check
12114 whether we're an open or closed constructed type and set
12116 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
12117 from open constructed types.
12119 2003-11-15 Martin Baulig <martin@ximian.com>
12121 * reflection.c (mono_reflection_bind_generic_parameters): If we're
12122 a generic instance (instead of a generic type declaration) with
12123 unbound generic parameters, bind them to our actual types.
12125 2003-11-14 Martin Baulig <martin@ximian.com>
12127 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
12129 * reflection.c (mono_reflection_bind_generic_parameters): If we're
12130 an interface type, populate `res->interfaces' with instantiated
12131 versions of all the interfaces we inherit.
12133 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
12135 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12136 when MONO_PATH is set but doesn't contain the install dir.
12138 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12141 (ves_icall_Type_GetInterfaces): don't return an interface twice when
12142 it's also implemented in base classes. Fixes bug #50927.
12144 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
12146 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12147 if this method is called from a finalizer. Fixes #50913.
12149 2003-11-12 Miguel de Icaza <miguel@ximian.com>
12151 * threads.c: Implement VolatileRead/VolatileWrite
12153 * icall.c: Add new icalls for VolatileRead/VolatileWrite
12155 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12157 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
12158 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12161 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
12162 from Peter Ross (pro@missioncriticalit.com).
12164 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
12166 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12168 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12170 * assembly.c (mono_assembly_load_references): Disable check because it
12171 triggers on older corlibs which lots of people have.
12173 2003-11-12 Jackson Harper <jackson@ximian.com>
12175 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12176 load corlib.dll if mscorlib.dll is not found.
12177 * assembly.h: Remove corlib name define.
12180 * image.c: Change corlib name to mscorlib.
12182 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12184 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12186 2003-11-11 Miguel de Icaza <miguel@ximian.com>
12188 * appdomain.h: Added loader_optimization here to sync with the C#
12189 code, and add disallow_binding_redirects field.
12191 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12193 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12195 * reflection.c (mono_image_build_metadata): Fix crash on modules
12198 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12200 * icall.c (ves_icall_get_method_info): Return callingConvention as
12203 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
12204 namespaces from the EXPORTEDTYPE table as well.
12206 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12207 from all modules inside the assembly.
12209 2003-11-11 Martin Baulig <martin@ximian.com>
12211 * reflection.c (mono_reflection_bind_generic_parameters): Make
12212 this work for interfaces.
12214 2003-11-11 Martin Baulig <martin@ximian.com>
12216 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12218 2003-11-11 Martin Baulig <martin@ximian.com>
12220 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12221 "MonoInflatedMethod" and "MonoInflatedCtor".
12223 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12225 * reflection.c (resolution_scope_from_image): Use the assembly table
12226 from the manifest module, since other modules don't have it.
12228 * debug-helpers.c (mono_type_full_name): New helper function.
12230 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12232 * image.c (mono_image_load_file_for_image): New public function which
12233 is a replacement for the load_file_for_image in class.c.
12235 * assembly.c (mono_assembly_load_module): A wrapper for the function
12236 above which does assembly association and reference loading too.
12238 * class.c (mono_class_from_name): Call mono_assembly_load_module.
12240 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12242 * appdomain.c: not all of the attributes for the full assembly name
12243 are required and the order doesn't matter. Fixes bug #50787.
12245 2003-11-10 Dick Porter <dick@ximian.com>
12247 * locales.c: Use platform-endian UTF16
12249 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12251 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12253 2003-11-10 Martin Baulig <martin@ximian.com>
12256 (mono_metadata_load_generic_params): Make this actually work.
12258 * reflection.c (mono_reflection_bind_generic_parameters): If our
12259 parent is a generic instance, pass all the `types' to it, no
12260 matter whether it has the same number of type parameters or not.
12262 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12264 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12266 * assembly.c (mono_assembly_load_references): Move the image<->assembly
12267 assignment code to this function so it gets called recursively for all
12270 * image.c (load_modules): Remove the assembly assignment since it is
12271 now done by mono_assembly_load_references.
12273 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12274 Add 'module' argument.
12275 (mono_module_get_types): New helper function.
12276 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12278 2003-11-08 Martin Baulig <martin@ximian.com>
12280 * class.c (mono_class_inflate_generic_method): Interface method
12281 don't have a header.
12283 * reflection.c (mono_image_get_methodspec_token): Take an
12284 additional `MonoGenericInst *' argument instead of reading it from
12285 the header; this is necessary to support interfaces.
12286 (mono_image_create_token): Pass the `MonoGenericInst *' from the
12287 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12288 (inflated_method_get_object): Take an additional `MonoGenericInst *'
12291 * reflection.h (MonoReflectionInflatedMethod): Added
12292 `MonoGenericInst *ginst'.
12294 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
12296 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12298 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
12300 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12302 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
12305 (reflection_methodbuilder_from_method_builder):
12306 (reflection_methodbuilder_from_ctor_builder): New helper functions to
12307 initialize a ReflectionMethodBuilder structure.
12308 (mono_image_get_methodbuilder_token):
12309 (mono_image_get_ctorbuilder_token): New functions to emit memberref
12310 tokens which point to types in another module inside the same assembly.
12312 * reflection.c: Use the new helper functions.
12314 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12316 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
12317 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12319 * reflection.c (resolution_scope_from_image): Emit a moduleref if
12322 * reflection.c (mono_image_build_metadata): Emit metadata only for the
12323 current module. Emit the manifest only for the main module.
12325 * reflection.c (mono_image_create_token): Add assertion when a
12326 memberref needs to be created.
12328 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12330 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
12331 larger buffer for the custom attribute blob. Fixes #50637.
12333 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12335 * threadpool.c: notify listener on async processing handles after
12336 invoking the async callback. Thanks to Zoltan.
12338 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12340 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
12341 avoid code duplication.
12343 * reflection.h (MonoDynamicImage): New type which is currently unused,
12344 but will be used through the ref.emit code in place of
12345 MonoDynamicAssembly.
12347 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12350 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12351 a MonoDynamicImage instead of just a MonoImage.
12353 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12354 icalls to ModuleBuilder but keep their semantics, so they will work
12355 with moduleb->assemblyb. This will change later.
12357 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12359 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12362 * reflection.c (mono_image_build_metadata): Avoid creation of a default
12363 main module, since it is now done by the managed code.
12365 2003-11-03 Martin Baulig <martin@ximian.com>
12367 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12368 `ginst->klass' here.
12369 (method_encode_methodspec): Don't use the `ginst->generic_method's
12370 klass if it's a generic instance, use `ginst->klass' in this case.
12372 2003-11-03 Martin Baulig <martin@ximian.com>
12374 * reflection.c (mono_image_get_generic_method_param_info):
12375 Removed, use mono_image_get_generic_param_info() instead.
12376 (mono_image_get_type_info): Write the GenericParam table before
12377 the Method table. This is neccessary because in the GenericParam
12378 table, type parameters of the class (ie. '!0' etc.) must come
12379 before the ones from its generic methods (ie. '!!0' etc).
12381 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12383 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12385 2003-11-02 Martin Baulig <martin@ximian.com>
12387 * reflection.c (create_generic_typespec): Take a
12388 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12389 the generic parameters from it.
12391 2003-11-02 Martin Baulig <martin@ximian.com>
12393 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12394 instead of a `MonoClassField *' since we just need the type.
12395 (create_generic_typespec): New static function. Creates a
12396 TypeSpec token for a generic type declaration.
12397 (mono_image_get_generic_field_token): New static function.
12398 (mono_image_create_token): If we're a FieldBuilder in a generic
12399 type declaration, call mono_image_get_generic_field_token() to get
12402 2003-11-02 Martin Baulig <martin@ximian.com>
12405 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12406 `MonoReflectionGenericInst *declaring_type' and
12407 `MonoReflectionGenericInst *reflected_type' fields.
12409 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12410 `MonoReflectionGenericInst *declaring_type' and a
12411 `MonoReflectionGenericInst *reflected_type' argument instead of a
12412 single `MonoReflectionGenericInst *type' one. Set
12413 `res->declaring_type' and `res->reflected_type' from them.
12414 (mono_reflection_inflate_field): Likewise.
12416 2003-11-02 Martin Baulig <martin@ximian.com>
12418 * class.c (mono_class_setup_vtable): Don't store generic methods
12421 2003-11-02 Martin Baulig <martin@ximian.com>
12423 * reflection.h (MonoReflectionGenericInst): Added
12424 `MonoReflectionType *declaring_type'.
12426 * reflection.c (mono_reflection_bind_generic_parameters): Use
12427 `if (tb->parent)' instead of `klass->parent'.
12429 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
12431 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12432 with an empty ASSEMBLY table.
12434 * reflection.c (mono_image_build_metadata): Avoid using the same loop
12435 variable in the inner and outer loops.
12437 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
12439 * metadata.h (mono_metadata_make_token): Put parentheses around macro
12442 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12444 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
12445 icalls. Instead, do everything in managed code. This is needed since
12446 it is hard to restore the original domain etc. in unmanaged code in the
12447 presence of undeniable exceptions.
12449 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
12450 New icalls to push and pop appdomain refs.
12452 2003-10-31 Martin Baulig <martin@ximian.com>
12454 * class.c (inflate_generic_type): Renamed to
12455 mono_class_inflate_generic_type() and made it public.
12457 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12460 * loader.c (mono_field_from_memberref): Also set the retklass for
12463 * fielder.c (mono_image_get_inflated_field_token): New static
12464 method; creates a metadata token for an inflated field.
12465 (mono_image_create_token, fixup_method): Added support for
12466 "MonoInflatedField".
12467 (fieldbuilder_to_mono_class_field): New static function.
12468 (mono_reflection_inflate_field): New public function.
12471 (MonoReflectionGenericInst): Added `MonoArray *fields'.
12472 (MonoReflectionInflatedField): New typedef.
12474 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
12476 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12477 for Solaris and other platforms without s6_addr16
12479 2003-10-30 Martin Baulig <martin@ximian.com>
12481 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12482 argument instead of two.
12483 (mono_class_inflate_generic_signature): Likewise.
12484 (inflate_generic_header): Likewise.
12485 (mono_class_inflate_generic_method): Likewise. In addition, if
12486 `ginst->klass' is set, it becomes the new `method->klass'.
12488 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12491 * reflection.c (encode_generic_method_sig): Write a 0xa as the
12492 first byte. [FIXME]
12493 (method_encode_methodspec): If we have generic parameters, create
12494 a MethodSpec instead of a MethodRef.
12495 (fixup_method): Added support for "MonoInflatedMethod" and
12496 "MonoInflatedCtor".
12497 (mono_image_create_token): Added support for "MonoInflatedMethod"
12498 and "MonoInflatedCtor".
12499 (inflated_method_get_object): New static function; returns a
12500 managed "System.Reflection.MonoInflatedMethod" object.
12501 (mono_reflection_bind_generic_method_parameters): Return a
12502 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12503 (mono_reflection_inflate_method_or_ctor): Likewise.
12504 (mono_image_get_generic_method_param_info): Initialize unused
12506 (mono_image_get_generic_param_info): Likewise.
12508 * reflection.h (MonoReflectionInflatedMethod): New public
12509 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
12510 "S.R.MonoInflatedCtor" classes.
12512 * loader.c (method_from_memberref): If we're a TypeSpec and it
12513 resolves to a generic instance, inflate the method.
12515 2003-10-28 Dick Porter <dick@ximian.com>
12517 * object.c (mono_runtime_run_main): Convert command-line arguments
12518 into utf8, falling back to the user's locale encoding to do so.
12520 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
12522 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12525 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12527 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12528 up icalls at method definition time. Partially fixes #33569.
12530 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
12532 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12533 marshalling of arrays. Fixes #50116.
12535 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12537 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12538 points to a vtable in the dying appdomain.
12540 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12541 listeners into unmanaged code inside the lock.
12543 * object.c (mono_class_vtable): Turn off typed allocation in non-root
12544 domains and add some comments.
12546 2003-10-25 Martin Baulig <martin@ximian.com>
12548 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12550 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12552 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12553 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12554 currently parsing. Create the generic class and store it in
12555 `generic_inst->klass' before parsing the type arguments. This is
12556 required to support "recursive" definitions; see mcs/tests/gen-23.cs
12558 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12559 to support recursive typespec entries.
12561 * class.c (mono_class_setup_parent): If our parent is a generic
12562 instance, we may get called before it has its name set.
12563 (mono_class_from_generic): Splitted into
12564 mono_class_create_from_generic() and mono_class_initialize_generic().
12566 2003-10-25 Martin Baulig <martin@ximian.com>
12568 * icall.c (ves_icall_Type_BindGenericParameters): Return a
12569 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12570 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12571 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12573 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12574 (create_typespec): Likewise.
12575 (mono_reflection_bind_generic_parameters): Return a
12576 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12577 (mono_reflection_inflate_method_or_ctor): New public function.
12579 * reflection.h (MonoReflectionGenericInst): New typedef.
12581 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
12583 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12584 inside the domain lock. Fixes #49993.
12586 * object.c (mono_class_vtable): When typed allocation is used,
12587 allocate vtables in the GC heap instead of in the mempool, since the
12588 vtables contain GC descriptors which are used by the collector even
12589 after the domain owning the mempool is unloaded.
12591 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12593 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12594 reflect what it does. Also invalidate mempools instead of freeing
12595 them if a define is set.
12597 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12600 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12601 hold the finalizable objects in this domain.
12603 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12606 * appdomain.c (mono_domain_set): New function to set the current
12607 appdomain, but only if it is not being unloaded.
12609 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12610 appdomain which is being unloaded.
12612 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12613 unloading of the root appdomain.
12615 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12616 icall to execute a method in another appdomain. Intended as a
12617 replacement for InternalSetDomain, which can confuse the code
12618 generation in the JIT.
12620 * appdomain.c (mono_domain_is_unloading): New function to determine
12621 whenever an appdomain is unloading.
12623 * appdomain.c (mono_domain_unload): New function to correctly unload
12626 * assembly.c (mono_assembly_load_references): Check that an assembly
12627 does not references itself.
12629 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12630 domain manually, it asks the finalizer thread to do it, then waits for
12631 the result. Also added a timeout.
12633 * icall.c: Register the new icalls.
12635 * threads.h threads.c: Export the mono_gc_stop_world and
12636 mono_gc_start_world functions.
12638 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
12639 function to fill out the mempool with 0x2a.
12641 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
12643 * reflection.h (MonoReflectionMethodAux): New structure to store
12644 information which is rarely used, thus is not in the MonoMethod
12647 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12648 store the aux info.
12650 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12651 and marshalling info into the aux structure.
12653 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12654 from the aux structure.
12656 * loader.c (mono_method_get_param_names): Retrieve the param names from
12659 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
12661 * exception.h exception.c: Add AppDomainUnloadedException && fix
12664 2003-10-21 Dick Porter <dick@ximian.com>
12667 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12668 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12670 2003-10-21 Martin Baulig <martin@ximian.com>
12672 * reflection.c (mono_reflection_bind_generic_parameters):
12673 `klass->parent' is NULL for interfaces.
12675 2003-10-21 Martin Baulig <martin@ximian.com>
12677 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12679 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
12681 * exception.c (mono_exception_from_name_msg): New helper function for
12682 creating exceptions and initializing their message field.
12684 * exception.c: Simplify functions using the new helper.
12686 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12689 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12690 mono_raise_exception, since otherwise gcc doesn't generate the function
12691 epilog for raise_exception, confusing the stack unwinding in the JIT.
12694 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12695 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12698 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12700 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12703 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
12705 * icall.c: Removed GetUninitializedObject method because
12706 AllocateUninitializedClassInstance does the same.
12708 2003-10-18 Martin Baulig <martin@ximian.com>
12710 * class.c (inflate_generic_signature): Renamed to
12711 mono_class_inflate_generic_signature() and made it public.
12712 (my_mono_class_from_generic_parameter): New static function; if we
12713 don't already have the generic parameter's MonoClass, create a
12714 very simple one which is just used internally in the runtime and
12715 not passed back to managed code.
12717 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12719 * metadata.h (MonoMethodSignature): Moved the
12720 `MonoGenericParam *gen_params' to the MonoMethodHeader.
12721 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12723 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12724 ves_icall_MonoMethod_GetGenericArguments(); this is now an
12725 interncall on the MonoMethod class, not on MethodInfo.
12726 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12727 calling mono_reflection_bind_generic_method_parameters() directly.
12729 * loader.c (mono_method_get_signature): If this is a MethodSpec;
12730 return the already computed `method->signature'.
12731 (method_from_methodspec): New static function to load a method
12732 from a MethodSpec entry.
12733 (mono_get_method_from_token): Call the new method_from_methodspec()
12734 for MethodSpec tokens.
12735 (mono_get_method_from_token): If we're a generic method, load the
12738 * reflection.c (mono_image_get_memberref_token): Allow
12739 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12741 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12742 (mono_image_create_token): First check whether it's a generic
12743 method (so we'd need to create a MethodSpec), then do the other
12745 (mono_reflection_bind_generic_method_parameters): Return a
12746 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12747 called directly from the interncall.
12749 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
12751 * reflection.c (load_public_key): Move loading of the public key
12754 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12756 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12759 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12760 culture, hash_alg and public_key. Fixes #49555.
12762 2003-10-17 Martin Baulig <martin@ximian.com>
12764 * class.h (MonoGenericInst): Moved this declaration here and added
12765 `MonoMethod *generic_method'.
12768 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12769 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12771 * metadata.c (mono_metadata_type_equal): Two types of
12772 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12773 index; ie. don't compare the address of the `MonoGenericParam'
12775 (mono_metadata_load_generic_params): Removed the `MonoMethod
12778 * metadata.h (MonoGenericInst): Moved declaration to class.h.
12779 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12781 * reflection.c (method_encode_signature): Encode the number of
12782 generic parameters.
12783 (encode_generic_method_sig): New static function.
12784 (method_encode_methodspec): New static function; creates an entry
12785 in the MethodSpec table for a generic method.
12786 (mono_image_get_methodspec_token): New static function.
12787 (mono_image_create_token): Call mono_image_get_methodspec_token()
12788 for generic methods.
12789 (mono_reflection_bind_generic_method_parameters): New public
12790 function. Instantiates a generic method.
12792 2003-10-16 Martin Baulig <martin@ximian.com>
12794 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12795 *gen_params' here from MonoMethodHeader.
12797 * metadata.c (mono_metadata_parse_method_signature): If we have
12798 generic parameters, initialize `method->gen_params' and then set
12799 the correct `type->data.generic_param' in all the parameters.
12801 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
12803 * threads.c (mono_threads_get_default_stacksize): New function to
12804 return the default stacksize.
12806 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12807 termination of the finalizer thread, since the previous method had
12808 race conditions. Fixes #49628.
12810 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12811 as for the other managed threads.
12813 2003-10-16 Martin Baulig <martin@ximian.com>
12815 * class.c (inflate_generic_signature): Copy `generic_param_count'
12818 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12821 * metadata.c (mono_metadata_parse_method_signature): Actually set
12822 the `method->generic_param_count' here.
12823 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12825 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
12827 * object.h: Add a new field to TypedRef to simplify the implementation
12828 of the REFANY opcodes in the JIT.
12830 * icall.c: Make use of the new field.
12832 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12835 2003-10-15 Martin Baulig <martin@ximian.com>
12837 * class.c (mono_class_from_gen_param): Renamed to
12838 mono_class_from_generic_parameter() and moved most of the
12839 functionality from mono_reflection_define_generic_parameter()
12840 here; ie. we create a "real" class here.
12841 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12842 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12843 previously been called.
12845 * class.h (MonoGenericParam): Moved the declaration of this struct
12846 here from metadata.h and added `MonoMethod *method'.
12848 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12851 * loader.c (mono_get_method_from_token): If we have any generic
12852 parameters, call mono_metadata_load_generic_params() to read them
12853 from the MONO_TABLE_GENERICPAR.
12855 * metadata.c (mono_metadata_load_generic_params): Added
12856 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12858 * metadata.h (MonoMethodSignature): Replaced
12859 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12860 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12862 * reflection.c (mono_reflection_define_generic_parameter): Moved
12863 most of the functionality into the new
12864 mono_class_from_generic_parameter(); set the `method' field if
12865 we're a method parameter.
12867 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
12869 * marshal.c (emit_struct_conv): if native size is 0
12872 2003-10-14 Martin Baulig <martin@ximian.com>
12874 * icall.c: The generics API has changed in the spec since it was
12875 added to System.Type; these modifications make it match the spec
12877 (ves_icall_Type_GetGenericParameters): Renamed to
12878 `ves_icall_Type_GetGenericArguments'.
12879 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12880 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12881 `ves_icall_MonoType_get_HasGenericArguments'.
12882 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12883 `ves_icall_MonoType_get_IsGenericParameter'.
12884 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12885 this is no interncall anymore.
12886 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12887 `ves_icall_TypeBuilder_get_IsGenericParameter'.
12889 2003-10-14 Martin Baulig <martin@ximian.com>
12891 * reflection.c (mono_reflection_bind_generic_parameters): Also
12892 inflate generic methods if we're reading the class from IL.
12894 2003-10-13 Martin Baulig <martin@ximian.com>
12896 * reflection.c (mono_reflection_define_generic_parameter): This
12897 method isn't called directly from the icall anymore; take a
12898 `MonoReflectionAssemblyBuilder *' so we can use this for type and
12899 method generic parameters.
12900 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12901 (method_builder_encode_signature): Encode generic parameters.
12902 (mono_image_get_method_info): Write generic params to the
12903 MONO_TABLE_GENERICPARAM table.
12905 * reflection.h (MonoReflectionMethodBuilder): Added
12906 `MonoArray *generic_params'.
12908 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12910 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12911 wrapper for mono_reflection_define_generic_parameter().
12912 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12914 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
12916 * marshal.h: Add missing function to fix build.
12918 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12919 the SetLastError pinvoke attribute.
12921 * marshal.c (mono_marshal_set_last_error): New helper function called
12922 by the generated code.
12924 * marshal.c (mono_mb_emit_branch): New helper function.
12926 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12928 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12929 classes as parameters and return values of delegates. Fixes #29256.
12931 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
12933 * locales.c: use gint32 in non HAVE_ICU case
12935 2003-10-11 Martin Baulig <martin@ximian.com>
12937 * mono-debug.c (mono_debug_add_method): Added a workaround for
12940 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
12942 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12943 delegates passed to native code must use the STDCALL calling
12944 convention. Fixes #35987.
12946 2003-10-10 Martin Baulig <martin@ximian.com>
12948 * class.c (inflate_generic_type): If we're inflating for a generic
12949 type instance (and not for a generic method), return
12950 MONO_TYPE_MVAR unchanged.
12952 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12954 * string-icalls.c: Join ignores null strings in the source array.
12955 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12956 * threads.c: GetAvailableTheads is slightly more accurate.
12958 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
12960 * threads.h threads.c : add mono_threads_set_default_stacksize
12961 and pass default to CreateThread calls.
12963 2003-10-09 Dick Porter <dick@ximian.com>
12967 * locales.c: Internal calls for constructing CultureInfo and
12968 related objects from libicu (if its available.)
12970 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
12972 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12974 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12976 * threadpool.c: added an argument to async_invoke_thread that is the
12977 item to process, pass the MonoAsyncResult to the thread start function
12978 when creating a new thread. This way we don't need to acquire any lock
12979 when we're creating a new thread. Readded a semaphore for faster
12980 response times (instead of that Sleep i added).
12982 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
12984 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12985 get daylight change dates better on Windows, fix handling
12986 of platforms without tm_gmtoff.
12988 2003-10-06 Martin Baulig <martin@ximian.com>
12990 * class.c (inflate_generic_method): Renamed to
12991 mono_class_inflate_generic_method() and made public.
12992 (mono_class_init): Don't inflate the generic methods here.
12993 (mono_class_from_generic): Added `gboolean inflate_methods'
12994 argument. Inflate the methods here.
12996 * loader.c (mono_method_get_param_names): Ignore instances of
12997 generic types for the moment.
12999 * reflection.c (fixup_method): Added support for inflated methods.
13000 (mono_image_create_token): Use mono_image_get_methodref_token()
13001 for inflated methods.
13002 (mono_custom_attrs_from_param): Ignore instances of generic types
13004 (mono_reflection_bind_generic_parameters): New public function.
13005 Moved all the functionality from
13006 ves_icall_Type_BindGenericParameters() here and added support for
13008 (mono_reflection_define_generic_parameter): Initialize
13009 `klass->methods' here.
13011 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
13012 functionality into mono_reflection_define_generic_parameter().
13013 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
13014 TypeBuilder, return that TypeBuilder.
13016 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13018 * appdomain.c: removed mono_delegate_semaphore.
13021 (mono_thread_pool_add): moved hash table creation inside and the thread
13022 creation outside of the critical region.
13023 (mono_thread_pool_finish): removed obsolete code.
13024 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
13025 continue or exit the thread depending on the queue.
13027 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
13029 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
13030 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
13031 handle more bool marshalling options
13033 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
13035 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
13036 arrays of structs. Also add a more descriptive error message when
13037 a structure member is marshalled as LPArray.
13039 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
13041 * marshal.c (mono_marshal_get_native_wrapper): Add support for
13042 marshalling arrays of complex types. Fixes #29098. Also remove an
13043 usused and incomplete function.
13045 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13047 * gc.c: report heap_size - free_bytes as total memory allocated
13050 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
13052 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
13053 fix timezone handling problems on Windows.
13055 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
13056 asserts when the year is outside the range handled by ms the functions.
13058 * class.c (setup_interface_offsets): If the class is an interface,
13059 fill out its interface_offsets slot.
13061 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13063 * threadpool.c: mark threadpool threads as background.
13065 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
13067 * decimal.c - define DECINLINE to nothing if not using GCC
13069 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
13071 * assembly.c: More refcount fixes.
13073 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13075 * string-icalls.c: if we're not trimming, return the same string.
13076 When not splitting, don't create a new string.
13078 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13081 (mono_image_open): increment the ref_count inside the critical section.
13083 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
13085 * image.c (mono_image_open): Fix reference counting bug.
13087 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
13089 * marshal.c (mono_marshal_type_size) struct alignment changed for
13090 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
13091 64bits. Avoid leak in mono_marshal_get_native_wrapper when
13092 mono_lookup_pinvoke_call throws.
13094 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
13096 * reflection.c (mono_reflection_parse_type): Fix #49114.
13098 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
13099 temporary workaround for cygwin header problem.
13101 * object.c (mono_object_isinst): Synchronize this with the code
13102 generated by the JIT for casts.
13104 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
13106 * reflection.c (encode_type): Fix #38332.
13108 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
13110 * marshal.c (mono_marshal_method_from_wrapper): New function to return
13111 the original method from the wrapper method.
13113 2003-09-25 Martin Baulig <martin@ximian.com>
13115 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
13116 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
13117 (ves_icall_Type_get_IsGenericInstance): New interncall.
13119 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
13121 * object.c: fix cast warning in big endian code.
13123 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
13125 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
13127 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13129 * assembly.c: don't call check_env from mono_assembly_load. It's
13130 already done once in mono_assemblies_init and may cause headaches when
13131 multiple threads are loading assemblies.
13133 2003-09-19 Martin Baulig <martin@ximian.com>
13135 * reflection.c (mono_reflection_define_generic_parameter): Don't
13136 allocate `klass->methods', set `klass->flags' to
13137 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13139 2003-09-18 Martin Baulig <martin@ximian.com>
13141 * class.c (mono_class_init): Don't create `class->methods' if it's
13142 already initialized.
13144 * metadata.c (mono_metadata_load_generic_params): Make this
13147 * reflection.c (mono_reflection_define_generic_parameter): Set
13148 parent class and interfaces from the constraints.
13150 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13151 to keep this struct in sync with the declaration in TypeBuilder.cs.
13153 2003-09-17 Martin Baulig <martin@ximian.com>
13155 * metadata.h (MonoType): Replaced the data's `int type_param'
13156 field with `MonoGenericParam *generic_param'.
13157 (MonoGenericParam): Added `MonoClass *klass'.
13159 * class.c (mono_class_from_gen_param): Removed the
13160 `MonoImage *image' and `int type_num' arguments.
13162 * metadata.c (mono_metadata_parse_generic_param): New static
13163 method; creates a MonoGenericParam which just contains the index.
13164 (do_mono_metadata_parse_type): Call
13165 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13168 * reflection.c (mono_image_typedef_or_ref): Generic type
13169 parameters may be in the same assembly, but never use a typedef
13171 (mono_reflection_define_generic_parameter): We're now creating a
13172 "real" class for the type parameter; it's now safe to call
13173 mono_class_from_mono_type() on the class'es type, it'll do the
13176 2003-09-16 Martin Baulig <martin@ximian.com>
13178 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13179 `symfile->range_entry_size' and `symfile->class_entry_size' here;
13180 the `symfile' data structure must be fully initialized before it
13181 gets added to the table.
13183 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
13185 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13187 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13188 class init trampolines.
13190 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
13192 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13193 to the built-in profiler to turn off time and allocation profiling
13196 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
13198 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13201 * debug-helpers.c (mono_method_full_name): Print the wrapper type
13202 in human readable form.
13204 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
13206 * reflection.c icall.c: Fixed warnings.
13208 * image.c (load_class_names): Use a temporary hash table to hold the
13209 namespaces in order to avoid doing many string comparisons.
13211 * image.h: Fix typo.
13213 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13214 Pass NULL instead of g_direct_equal to the GHashTable constructor
13215 since the NULL case is short-circuited inside g_hash_table_lookup,
13216 leading to better performance.
13218 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13219 obtain the first custom attribute for a given index. Depends on the
13220 CustomAttribute table being sorted by the parent field.
13222 * reflection.c (mono_custom_attrs_from_index): Use the new function
13223 for better performance.
13225 2003-09-07 Martin Baulig <martin@ximian.com>
13227 * class.c (mono_class_init): If we're a generic instance, inflate
13228 all our methods instead of loading them from the image.
13229 (mono_class_from_generic): Set `class->methods = gklass->methods'.
13231 2003-09-07 Martin Baulig <martin@ximian.com>
13233 * mono-debug-debugger.c: Added support for constructors.
13235 2003-09-06 Martin Baulig <martin@ximian.com>
13237 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13240 * reflection.c (mono_reflection_setup_generic_class): Call
13241 ensure_runtime_vtable() to create the vtable.
13243 2003-09-05 Martin Baulig <martin@ximian.com>
13245 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13248 2003-09-04 Martin Baulig <martin@ximian.com>
13250 * reflection.c (mono_reflection_define_generic_parameter): Generic
13251 parameters start with zero.
13253 2003-09-04 Martin Baulig <martin@ximian.com>
13255 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13257 * reflection.h (MonoReflectionGenericParam): New typedef.
13258 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13259 the generic parameters from the managed TypeBuilder.
13261 * reflection.c (mono_reflection_define_generic_parameter): New function.
13262 (mono_reflection_create_runtime_class): Encode generic parameters.
13263 (mono_reflection_setup_generic_class): New function; this is
13264 called after adding adding all generic params to the TypeBuilder.
13265 (encode_type): Added MONO_TYPE_VAR.
13267 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
13269 * class.h class.c (mono_class_needs_cctor_run): Moved this method
13272 * assembly.h assembly.c: Moved the AOT loading code into an assembly
13275 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
13277 * reflection.h reflection.c class.h class.c: Delete duplicate
13278 definition of mono_type_get_name () from reflection.c and export the
13281 * class.c: Class loading fixes from Bernie Solomon
13282 (bernard@ugsolutions.com).
13284 * reflection.c: Endianness fixes from Bernie Solomon
13285 (bernard@ugsolutions.com).
13287 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
13289 * assembly.h assembly.c: Define a file format version for AOT
13292 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13294 * appdomain.h (MonoJitInfo): New field to determine whenever the
13295 code is domain neutral.
13297 2003-08-31 Miguel de Icaza <miguel@ximian.com>
13299 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13301 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
13303 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
13304 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13305 Avoid caching the result since strings must be domain specific. Fixes
13308 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
13310 * marshal.c (mono_marshal_init): Make this callable multiple times
13311 since it is hard to find a correct place to call it.
13313 * object.c (mono_runtime_class_init): Execute static constructors in
13314 the correct appdomain.
13316 * image.c (build_guid_table): Handle the case when multiple images have
13319 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13321 * icall.c: added a couple of icalls for System.Web.
13323 2003-08-28 Martin Baulig <martin@ximian.com>
13325 * icall.c (ves_icall_Type_BindGenericParameters): Use
13326 `klass->generic_inst' instead of `&klass->byval_arg' in the
13327 mono_type_get_object() call. The returned type must be
13328 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13330 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
13334 * object.c (mono_class_proxy_vtable): Make it thread safe.
13336 * pedump.c: Fix warning.
13338 * object.c appdomain.h: Get rid of metadata_section.
13339 It is no longer needed and it was causing deadlocks with domain->lock.
13341 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13343 2003-08-26 Martin Baulig <martin@ximian.com>
13345 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13347 2003-08-26 Martin Baulig <martin@ximian.com>
13349 * pedump.c (main): Call mono_metadata_init(),
13350 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13351 and mono_loader_init().
13353 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
13355 * loader.h: Add missing include to fix build.
13357 * image.h: mono_image_load_references is no more.
13359 * assembly.c: Reworked assembly loading to make it really thread safe.
13360 After these changes, the assembly returned by mono_assembly_open is
13361 fully initialized, i.e. all its references assemblies are loaded.
13363 * assembly.c (mono_image_load_references): Renamed to
13364 mono_assembly_load_references, and made private, since clients no
13365 longer need to call it.
13367 * class.c: Removed calls to mono_assembly_load_references, since it was
13368 a source of deadlocks.
13370 * loader.h loader.c class.h class.c: Protect data structures using a
13371 new lock, the loader lock.
13373 * class.c (mono_class_setup_vtable): Create temporary hash tables and
13374 GPtrArrays only when needed.
13376 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
13377 into empty structures by mcs. Fixes pinvoke7.cs.
13379 * domain.c (mono_init): Call a new initialization function.
13381 * appdomain.c (mono_runtime_init): Call the new initializer function
13382 of the marshal module.
13384 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13385 inserted into empty structures by mcs. Fixes pinvoke7.cs.
13387 * marshal.h marshal.c: Added locks around the wrapper caches to make
13388 this module thread safe.
13390 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13391 this argument. Fixes pinvoke1.exe.
13393 2003-08-25 Lluis Sanchez <lluis@ximian.com>
13395 * object.h: Added call_type field to MonoMethodMessage and the corresponding
13396 enumeration of values. Removed fields to store remote call output values in
13397 MonoAsyncResult. Not needed any more.
13398 * object.c: Initialize call_type and async_result fields in mono_message_init.
13399 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13400 dispatching the message.
13401 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13402 async call to finish. To do it use a message with EndInvoke call type.
13404 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
13406 * loader.h loader.c (mono_method_hash_marhal_info): New function which
13407 determines whenever a method has marshalling info.
13409 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13411 * assembly.c: fix the build on windows.
13413 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13415 * object.cs: Fixed bug #47785.
13417 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13419 * string-icalls.c (StringReplace): If their are no occurances of
13420 the old string found return a reference to the supplied
13421 string. This saves some memory and matches MS behavoir.
13423 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13425 * socket-io.c: fixed compilation for systems that define AF_INET6
13426 and don't define SOL_IP/SOL_IPV6.
13428 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
13430 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13431 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13433 * rawbuffer.c rawbuffer.h: Make this module thread safe.
13435 * domain.c: Make this module thread safe.
13437 * domain.c (mono_init): Call new initialization function.
13439 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13440 reference types too. Fixes #38812.
13442 * image.c (mono_image_init): Fixed warnings.
13444 * class.c (mono_class_from_typeref): Handle assembly load failure
13447 * appdomain.c (add_assemblies_to_domain): Handle the case when
13448 the references of an assembly are not yet loaded.
13450 * metadata.c image.c assembly.c: Moved initialization of global
13451 variables to a separate function called at startup since lazy
13452 initialization of these variables is not thread safe.
13454 * image.c assembly.c: Made this module thread safe by adding locks in
13455 the appropriate places.
13457 * domain.c (mono_init): Call the new initialization functions of the
13460 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
13462 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13463 make a direct call. It is proxy's work to make the call asynchronous.
13464 mono_delegate_end_invoke(): If the targe is a proxy, just collect
13466 * object.cs: mono_method_call_message_new(): read AsyncResult and
13467 state object from parameters list, if this info is requested.
13468 * object.h: Added fields to store remote call output values in
13469 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13471 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13473 * object.h: add needed fields to MonoThread.
13474 * threads.c, threads.h: allow registering a function to cleanup data
13475 allocated per thread by the JIT.
13477 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13479 * loader.h: portability fix by Bernie Solomon
13480 * <bernard@ugsolutions.com>.
13482 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
13484 * reflection.h reflection.c (mono_param_get_objects): Changed this to
13485 return a MonoArray. This simplifies the code and also ensures that
13486 the cache allways contains an object reference as a value.
13488 * icall.c (ves_icall_get_parameter_info): Simplified using the new
13491 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13493 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13494 fixes a problem with byte ordering when getting the address family for
13497 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
13499 * .cvsignore: Added monosn.
13501 * reflection.h reflection.c loader.c: Added support for parameter
13502 marshalling to dynamically created types. Fixes #47295.
13504 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13506 * rand.c: remove useless warnings.
13508 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13510 * class.c: implemented ldtoken for methods and fieldrefs.
13512 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13514 * threadpool.c: when mono_async_invoke was called, no one took care of
13515 monitoring the queue. So if the method invoked took some time and we
13516 got new async invoke requests after 500 ms (the thread created waited
13517 that long in WaitForSingleObject), the new async invoke was not called
13518 until the previous one finished.
13520 This is fixed now. Thanks to Totte for helping with it.
13522 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13524 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13526 2003-08-11 Martin Baulig <martin@ximian.com>
13528 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13530 2003-08-06 Martin Baulig <martin@ximian.com>
13532 * mono-debug-debugger.c: Added support for static fields,
13533 properties and methods.
13535 2003-08-06 Martin Baulig <martin@ximian.com>
13537 * mono-debug-debugger.c: Don't store the MonoString's vtable to
13538 make this work for applications with multiple application domains.
13540 2003-08-04 Martin Baulig <martin@ximian.com>
13542 * mono-debug-debugger.c: Completely reworked the type support; the
13543 most important thing is that we're now just using one single
13544 `MonoType' instance per type.
13546 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13548 * mono-endian.h, mono-endian.c, icall.c: Added icall
13549 ves_icall_System_Double_AssertEndianity to assert double word endianity
13550 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13552 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13554 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13555 support, icalls and fixes.
13557 2003-07-31 Miguel de Icaza <miguel@ximian.com>
13559 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13560 classes that are a punctuation character in .NET is not the same a
13563 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13565 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13567 2003-07-29 Miguel de Icaza <miguel@ximian.com>
13569 * icall.c: Add new MemCopy internalcall.
13570 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13571 Simplified code; It is not necessary to handle all the cases here,
13572 as the C# code takes care of it. Only handle the case of the name
13573 resource embedded into the assembly.
13575 Changed signature to return the data pointer and the size of the
13578 2003-07-26 Miguel de Icaza <miguel@ximian.com>
13580 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13581 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13583 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13585 * socket-io.c: ignore EINTR error in select.
13587 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13589 * class.h, class.c: removed unused subclasses field in MonoClass.
13591 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13593 * icall.c: improve fix of get_base_definition(). If the parent class
13594 doesn't have the mehod, look at the parent of the parent.
13595 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13596 to check if a parameter is an in or out parameter
13597 (PARAM_ATTRIBUTE_IN is not set by default).
13598 mono_method_return_message_restore(): Use mono_class_value_size to
13599 get the size of a value type. mono_type_stack_size (parameterType)
13600 does not return the correct value if parameterType is byRef.
13601 mono_load_remote_field(), mono_load_remote_field_new(),
13602 mono_store_remote_field(), mono_store_remote_field_new():
13603 raise exception if the remote call returns an exception.
13605 2003-07-28 Martin Baulig <martin@ximian.com>
13607 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13608 method. This is a wrapper around mono_runtime_invoke() which
13609 boxes the instance object if neccessary.
13611 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13613 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13614 metadata.h, row-indexes.h, verify.c: first cut of generics support.
13616 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13618 * icall.c: disable mcs bug workaround.
13620 2003-07-21 Miguel de Icaza <miguel@ximian.com>
13622 * object.c (mono_runtime_class_init): Take the metadata_section
13623 mutex before obtaining the domain mutex.
13625 * appdomain.h: Added definition of metadata_section mutex here.
13627 * object.c: define metadata_mutex here.
13629 2003-07-24 Ravi Pratap <ravi@ximian.com>
13631 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13634 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
13636 * reflection.c: Fix bug #46669
13638 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13643 * object.h: fill in the type name for TypeLoadException.
13645 2003-07-23 Ravi Pratap <ravi@ximian.com>
13647 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13648 relationship between TypeBuilders while compiling corlib) and bug
13649 45993 (Array types returned from the runtime while compiling
13650 corlib were from the loaded corlib).
13652 2003-07-22 Martin Baulig <martin@ximian.com>
13654 * mono-debug-debugger.c: Reworked the type support a bit more;
13655 distinguish between types and classes.
13657 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13659 * icall.c: add IsArrayImpl icall.
13661 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
13663 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13664 initializing real_size only once. Also fix bug #46602.
13666 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
13668 * object.c: Renamed mono_metadata_section to metadata_section.
13670 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
13672 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13673 empty array if the type is an array. Fixed.
13674 ves_icall_MonoMethod_get_base_definition: if the base method
13675 is abstract, get the MethodInfo from the list of methods of
13677 * reflection.c: ParameterInfo.PositionImpl should be zero-based
13678 and it was 1-based. Fixed in mono_param_get_objects.
13680 2003-07-20 Martin Baulig <martin@ximian.com>
13682 * mono-debug.h: Set version number to 31.
13683 (mono_debug_init): Added `MonoDomain *' argument.
13685 * mono-debug-debugger.c: Reworked the type support; explicitly
13686 tell the debugger about builtin types; pass the `klass' address to
13689 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13691 * image.c: Allow new metadata tables to be loaded without a
13692 warning. Also update the warning message to give the new constant value.
13694 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13696 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13697 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
13698 array type representation changes.
13700 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13702 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13703 on Environment.Exit () call.
13705 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13707 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13708 requires a matching corlib.
13710 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13712 * Changelog: My editor decided to add a CR to each line. Sorry about that.
13713 Committed again without the CRs.
13715 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13717 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13718 getting it from the "this" socket instance. Did not work
13719 if the socket is a subclass of Socket.
13720 Also fixed bug #35371.
13722 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13724 * metadata.c: fixed size for TypedByRef.
13725 * loader.c: when searching for a method, consider the vararg amrker.
13726 * unicode.c, decimal.c: constify some arrays.
13728 2003-07-15 Dick Porter <dick@ximian.com>
13730 * socket-io.c: Fixed compilation for gcc < 3.2.
13732 Fixed compilation for machines that don't have AF_INET6 (thanks to
13733 Bernie Solomon <bernard@ugsolutions.com> for that part.)
13735 Fixed compile warnings.
13737 Fixed formatting and line endings.
13739 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
13742 * socket-io.c: Added IPv6 support.
13744 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
13746 * class.c (mono_class_is_assignable_from): New function to implement
13747 the is_assignable_from logic. Used by mono_object_isinst,
13748 Type::IsAssignableFrom () and the interpreter.
13750 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13751 Object, even interfaces.
13753 * object.c (mono_object_isinst): Implement in terms of
13754 is_assignable_from.
13756 * icall.c (ves_icall_type_is_assignable_from): New icall.
13758 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
13760 * domain.c (foreach_domain): fix compiler warning.
13762 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
13764 * image.c (load_metadata_ptrs): use g_strndup because strndup is
13765 not available on all plattforms
13767 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
13769 * image.h image.c: Store the metadata version string in MonoImage.
13770 * icall.c: New icall to retrieve the image version.
13771 * reflection.c (create_dynamic_image): Fill in the image version field
13772 * reflection.c (build_compressed_metadata): Use the image version
13773 from the image structure.
13775 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13777 * appdomain.c: modified comment.
13778 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13779 That will be its last iteration when mono_gc_cleanup is called from
13780 mono_runtime_cleanup and before the domain is unloaded.
13784 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
13786 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13789 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13791 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13792 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13793 Bernie Solomon <bernard@ugsolutions.com>.
13795 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13797 * object.c, object.h: provide mono_object_new_fast() for faster
13798 allocation in some special cases.
13800 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13802 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13803 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13805 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13807 * threadpool.c: fix leaks.
13809 2003-07-01 Dick Porter <dick@ximian.com>
13811 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13812 using MonoGHashTables. Fixes threadpool bug posted to list.
13814 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13816 * image.h, image.c: added support to load an assembly from a byte array.
13817 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
13818 assembly bundle support.
13820 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
13822 * threadpool.c (mono_thread_pool_add): keep a reference to the
13823 AsyncResult to prevent GC
13825 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13827 * class.c: leak fix.
13829 2003-06-25 Dick Porter <dick@ximian.com>
13831 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13832 for the async object, the WaitHandle object will close the handle.
13835 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13837 * class.c: in mono_array_class_get (), lookup from the hash with the
13838 same type we insert: this works around a bug in
13839 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13840 lluis. The real fix will have to wait for after the release.
13842 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13844 * icall.c: fix memory leak when getting type members.
13846 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13848 * reflection.c: added more pubtoken special cases.
13850 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13852 * class.c: handle field offset correctly when class size
13853 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13855 2003-06-20 Martin Baulig <martin@ximian.com>
13857 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13860 2003-06-20 Martin Baulig <martin@ximian.com>
13862 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13864 2003-06-20 Martin Baulig <martin@ximian.com>
13866 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
13867 just distinguish between variables in registers and variables at
13868 an offset relative to a register.
13870 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13872 * icall.c: #ifdef out latest changes until mcs is fixed.
13874 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13876 * icall.c: return members in metadata order.
13878 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13880 * icall.c: avoid infinite loop in GetTimeZoneData.
13882 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13884 * icall.c: added Marshal.Prelink/All icalls.
13886 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13888 * object.c, object.h: fix warnings and do some overflow checking
13889 when creating arrays.
13891 2003-06-17 Dick Porter <dick@ximian.com>
13894 * file-io.c: File attributes need to be tweaked slightly when
13895 passed from the managed to the w32 world.
13897 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13898 * profiler.h profiler-private.h profiler.c: Rework last patch
13899 based on suggestion by Paolo.
13901 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13903 * profiler.h profiler-private.h profiler.c: Added infrastructure for
13904 instruction level coverage data collection.
13905 * profiler.h profiler.c (: Added new callback function which can be
13906 used by the profiler to limit which functions should have coverage
13908 * profiler.c (mono_profiler_load): Call g_module_build_path to
13909 generate the file name of the profiler library.
13911 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13913 * profiler.c, profiler.h, profiler-private.h: added basic block
13914 coverage profiling API.
13916 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
13918 * reflection.c (mono_reflection_create_runtime_class): Add support
13919 for events in dynamically generated code.
13921 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13924 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13926 * icall.c: when getting timezone info, return reasonable values if we
13927 can't get the actual data.
13929 2003-06-14 Dick Porter <dick@ximian.com>
13931 * threads.c (start_wrapper): Remove the reference to the thread
13932 object in the TLS data, so the thread object can be finalized.
13933 This won't be reached if the thread threw an uncaught exception,
13934 so those thread handles will stay referenced :-( (This is due to
13935 missing support for scanning thread-specific data in the Boehm GC
13936 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13938 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13940 * reflection.c: ensure streams and tables are first allocated with
13941 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13943 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13945 * icall.c: fixed GetElementType for byrefs (bug# 44792).
13947 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
13949 * reflection.c (mono_reflection_create_runtime_class): Add support for
13950 properties to dynamically created classes.
13951 * reflection.c: Fix a few places where non-MonoObjects were inserted
13952 into the tokens hashtable.
13954 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13956 * object.c: some support to handle out of memory exceptions.
13958 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
13960 * marshal.c (mono_marshal_get_native_wrapper): support reference
13963 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13965 * object.h, object.c: more portability stuff from Bernie Solomon.
13966 Unexport mono_object_allocate(). Added mono_object_unbox ().
13967 Set exitcode when an unhandled exception is thrown.
13969 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
13971 * marshal.c (mono_marshal_get_native_wrapper): use custom
13972 marshaler for return types.
13974 2003-06-10 Dick Porter <dick@ximian.com>
13976 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13977 ip_mreq is available
13979 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13981 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13982 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13983 by Bernie Solomon <bernard@ugsolutions.com>.
13985 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
13987 * gc.c (mono_gc_init): Avoid error message on shutdown when
13988 GC_DONT_GC=1 is used.
13990 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
13991 New icall to return the GUID of a module.
13993 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13995 * class.c: ensure instance size always includes the parent's size
13996 even whem class size is set explicitly (fixes bug#44294).
13998 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14000 * profiler.h, profiler.c: made the simple profiler thread-safe,
14001 get more accurate timing info. Allow the loading of an
14002 externally-developed profiler module.
14004 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
14006 * marshal.c (mono_marshal_get_native_wrapper): improved
14007 class/byref arguments.
14008 (mono_marshal_get_native_wrapper): better string marshaling support.
14010 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14012 * class.c: ensure .pack and .size are handled correctly and
14013 simplified layout of static fields.
14015 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
14018 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
14020 * loader.c (mono_lookup_pinvoke_call): look for modules in the
14021 current directory (fix bug 44008)
14023 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
14025 * marshal.c (mono_marshal_get_native_wrapper): started support for
14027 (mono_delegate_to_ftnptr): consider marshalling specifications
14029 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14031 * reflection.c, reflection.h: emit custom marshal info.
14033 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14035 * object.c: free the GError.
14036 * icall.c: added CloseEvent_internal.
14038 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
14041 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
14043 * loader.c (mono_method_get_signature): Add support for dynamic
14046 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14048 * reflection.c: fixed bug #43905.
14050 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14052 * class.c, domain.c, icall.c, metadata.h, object.h: support for
14053 handling TypedReference and ArgIterator.
14054 * loader.c, loader.h: added function to get signature at call site.
14056 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14058 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
14059 data readonly. Buglets and warning fixes. Some MethodSpec support.
14061 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14063 * class.h, class.c, object.c: remove relative numbering support.
14065 2003-05-26 Miguel de Icaza <miguel@ximian.com>
14067 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
14068 free the string, until we get a chance to fix Gtk#
14070 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14072 * marshal.c: revert last patch.
14074 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14076 * icall.c: updates for new mono_class_vtable() not calling
14077 the type constructor anymore.
14079 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14081 * object.h, object.c: separate vtable creation from type
14082 initialization. Make running the .cctor thread safe.
14084 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
14086 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
14088 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
14090 * loader.c (mono_get_method): consider calling convention
14092 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
14094 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
14095 to return the invisible global type for a module.
14097 * reflection.c (mono_image_build_metadata): Emit global fields too.
14099 2003-05-20 Peter Williams <peterw@ximian.com>
14101 * loader.c (mono_lookup_internal_call): Add a few newlines.
14103 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
14105 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
14108 * appdomain.c (set_domain_search_path): Recalculate search path when
14109 AppDomainSetup.PrivateBinPath changes.
14111 * object.c (mono_class_compute_gc_descriptor): It turns out some
14112 parts of the class libs (like System.Thread) holds pointers to
14113 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
14114 to treat native int a pointer type here.
14116 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
14118 * appdomain.h, domain.c: add hashtable for jump target resolution.
14120 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
14122 * reflection.h reflection.c icall.c: Added new icalls
14123 GetManifestResourceInfoInternal, GetModulesInternal and support
14126 2003-05-16 Dick Porter <dick@ximian.com>
14130 * file-io.c: Implement System.IO.MonoIO::GetTempPath
14132 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
14134 * object.c: mono_store_remote_field: little fix to previous patch.
14136 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14138 * class.c: add constructors to array classes.
14139 * icall.c: special case array construction for InternalInvoke (),
14141 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
14143 * class.h class.c reflection.c object.c: Added support for field
14144 defaults in dynamically generated classes.
14146 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14148 * reflection.c: properly encode charset for ddlimport.
14150 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14152 * threads.c: allow compiling without GC.
14154 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14156 * appdomain.h, object.c, object.h, threads.c, threads.h: added
14157 handling of thread static data.
14159 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14161 * reflection.h, reflection.c: added mono_custom_attrs_free ().
14163 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
14165 * class.c (mono_array_class_get): always set the serializable flags
14166 (mono_array_class_get): always set the SEALED attribute for array types
14168 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
14170 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14171 attributes (fix for bug 42021).
14173 2003-05-12 Dick Porter <dick@ximian.com>
14175 * gc.c: Don't run finalizers when the finalizer thread is
14176 finishing up, because the default domain has already been
14179 2003-05-11 Miguel de Icaza <miguel@ximian.com>
14181 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14182 value is null, we should throw an exception. This is slightly
14183 different than the other conventions used for the constructor.
14185 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14187 * socket-io.c: fixed windows build.
14189 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14191 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14193 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
14195 * object.c (mono_string_new_wrapper): Compatibility fix for MS
14198 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
14200 * class.c (mono_class_layout_fields): Add experimental GC aware
14201 auto layout facility. Requires class library changes to work correctly.
14203 (mono_class_setup_vtable): Avoid overriding explicit interface
14204 method implementations. Fixes iface3.exe test.
14206 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14208 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14209 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14211 * metadata.h: Add new type classification macro which determines
14212 whenever the type holds an object reference.
14214 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
14216 * marshal.c (mono_marshal_get_native_wrapper): cleanups
14218 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
14220 * gc.c (finalizer_thread): Work around a GC bug.
14222 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
14224 * marshal.c (emit_struct_conv): allow unions
14226 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14228 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
14230 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14232 2003-05-06 Martin Baulig <martin@ximian.com>
14234 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14236 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14239 (Select_internal): allow NULLs, don't create arrays if not needed.
14240 Coupled with Socket.cs changes.
14243 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14244 register a finalizer for it that will close the semaphore handle. This
14245 fixes the leak and make Lupus' test run with > 4080 loops.
14247 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
14249 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14250 Jerome Laban (bug #42287)
14252 2003-05-02 Martin Baulig <martin@ximian.com>
14254 * debug-mono-symfile.h
14255 (MonoSymbolFile): Moved declaration into mono-debug.h.
14256 (MonoDebugMethodJitInfo): Likewise.
14257 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14259 (_mono_debug_address_from_il_offset): Take a
14260 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14263 (MonoDebugDomainData): New struct.
14264 (mono_debug_get_domain_data): New function.
14265 (mono_debug_add_method): Take an additional `MonoDomain *'
14267 (mono_debug_source_location_from_address): Likewise.
14268 (mono_debug_il_offset_from_address): Likewise.
14269 (mono_debug_address_from_il_offset): Likewise.
14271 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14273 * reflection.c: one more check for null type in custom attrs.
14275 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14277 * reflection.c: avoid warning (comparison is always false due to limited
14278 range of data type).
14280 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14282 * icall.c: throw an exception in Type.GetField if the argument 'name'
14285 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14287 * reflection.c: fixed handling of enums in named arguments to custom
14288 attributes (bug #42123).
14290 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14292 * reflection.c: use the right array element type and handle
14293 a null for a Type argument, too.
14295 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14297 * reflection.c: handle arrays as arguments to custom attributes.
14299 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14301 * reflection.c: handle a string value in a custom attr
14302 ctor that takes an object.
14304 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
14306 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14309 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
14311 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14313 2003-04-27 Martin Baulig <martin@ximian.com>
14315 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14316 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14317 MONO_DEBUGGER_EVENT_BREAKPOINT.
14318 (mono_breakpoint_trampoline_code): Removed.
14319 (mono_debugger_event_handler): The last argument is now a
14321 (mono_debugger_insert_breakpoint_full): Removed the
14322 `use_trampoline' argument.
14323 (mono_debugger_method_has_breakpoint): Likewise.
14324 (mono_debugger_trampoline_breakpoint_callback): Renamed to
14325 mono_debugger_breakpoint_callback(); take the method and
14326 breakpoint number as arguments.
14328 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14330 * metadata.c: fix off by one when loading parameters attributes.
14332 2003-04-24 Martin Baulig <martin@ximian.com>
14334 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14336 2003-04-24 Martin Baulig <martin@ximian.com>
14338 * mono-debug-debugger.c: Moved all code which interacts with the
14339 Mono Debugger here.
14341 * debug-mono-symfile.c: This code now just deals with the symbol
14342 file itself, the debugger code is now in mono-debug-debugger.c.
14344 2003-04-23 Martin Baulig <martin@ximian.com>
14346 * mono-debug.c (mono_debug_source_location_from_il_offset):
14347 New method; like mono_debug_source_location_from_address(), but
14348 takes an IL offset instead of a machine address.
14350 2003-04-23 Martin Baulig <martin@ximian.com>
14352 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14353 `line' field; this is now computed by the debugger.
14355 2003-04-23 Martin Baulig <martin@ximian.com>
14357 * mono-debug.[ch]: New files. This is the new debugging interface.
14359 * mono-debug-debugger.[ch]: New files. Moved all code which
14360 interacts with the Mono Debugger here.
14362 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
14364 * domain.c (mono_init): initialize mono_defaults.monitor_class
14366 2003-04-21 Miguel de Icaza <miguel@ximian.com>
14368 * reflection.c (method_encode_code): Add a spicy exception to help
14369 future compiler authors.
14371 2003-04-21 Martin Baulig <martin@ximian.com>
14374 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14375 Make this work with relative pathnames; g_filename_to_uri() needs
14376 an absolute filename.
14378 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
14380 * icall.c: Track name changes in Object and ValueType.
14382 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
14384 * metadata.c (mono_type_stack_size): size should be a multiple of
14387 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14390 (internal_domain_finalize): moved into mono_domain_finalize. No need
14391 to create another thread because the finalizers will be run in the
14394 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14395 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14396 to be run (MS does this too).
14398 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
14400 * object.c (mono_class_compute_gc_descriptor): Update comment.
14402 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14404 * image.h: Add synchronized wrapper cache.
14406 * image.c (do_mono_image_open): Initialize cache.
14408 * reflection.c (create_dynamic_mono_image): Initialize cache.
14410 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14412 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14413 ves_icall_System_Buffer_ByteLengthInternal.
14415 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14417 * reflection.c: setup klass->nested_in earlier. Allow
14418 a dash in the assembly name.
14420 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
14422 * metadata.c (mono_type_to_unmanaged): dont access
14423 type->data.klass for MONO_TYPE_OBJECT
14424 (mono_type_to_unmanaged): consider System.Delegate class
14426 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14428 * class.c: just setup supertypes in the proper place instead of
14429 initializing the full element class for arrays.
14431 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14433 * class.c: ensure the element class of arrays is initialized.
14434 Setup the supertype info for array classes, too.
14436 2003-04-14 Miguel de Icaza <miguel@ximian.com>
14438 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14440 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14442 * Makefile.am: re-added -m option when running cygpath. This way,
14443 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14445 * mono-config.c: same codepath for locating mono config file for WIN32
14447 * assembly.c: if mono_assembly_setrootdir is called, don't override
14450 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14452 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14453 MONO_ASSEMBLIES variable.
14455 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14457 * icall.c: added Assembly::GetNamespaces() icall.
14459 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14461 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14463 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
14465 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14466 * object.c: fixed bug in the construction of vtable for proxies
14468 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
14470 * object.c (mono_array_new): Mark mono_array_new as an icall.
14472 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14474 * class.c: fixed test for public method when overriding interfaces.
14477 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14479 * appdomain.h, domain.c: added mono_domain_foreach() to
14480 be able to access the currently loaded appdomains.
14481 * object.c: make string interning work across sppdomains.
14482 Mark some functions for use as icalls.
14484 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
14486 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14488 * reflection.h reflection.c: Allocate long living data using
14489 GC_MALLOC_ATOMIC so the collector does not need to scan it.
14491 * reflection.c: Double the allocation size in streams instead of
14492 increasing it, to prevent unneccesary copying on large assemblies.
14494 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14495 creation if the assembly does not have the Run flag set.
14497 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14499 * class.h: avoid the C++ keywords in header files (Jerome Laban
14500 spotted and fixed this).
14502 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14505 (mono_unhandled_exception): fill in the arguments for the
14506 UnhandledException event. Only trigger that event for the default
14507 domain (as MS does).
14509 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
14511 * object.c: Improve typed allocation stuff based on suggestions from
14512 Paolo. Also turn it on if the GC library supports it.
14514 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14516 * object.c object.h class.h: Added experimental typed allocation
14517 facility using the interfaces in gc_gcj.h.
14519 * os/gc_wrapper.h: Added new include files.
14521 2003-04-03 Martin Baulig <martin@ximian.com>
14523 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14524 which is not yet enabled by default.
14526 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14528 (mono_gc_lock, mono_gc_unlock): New static functions.
14530 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14531 functions; stop/start the world for the garbage collector. This
14532 is using the windows API; we need to complete the SuspendThread()/
14533 ResumeThread() implementation in the io-layer to make this work on Unix.
14534 (mono_gc_push_all_stacks): New public function; tells the garbage
14535 collector about the stack pointers from all managed threads.
14537 2003-04-03 Martin Baulig <martin@ximian.com>
14539 * object.h (MonoThread): Added `gpointer stack_ptr'.
14541 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14543 2003-04-03 Martin Baulig <martin@ximian.com>
14545 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14547 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14549 * reflection.c (typebuilder_setup_fields): Initialize field.first and
14552 2003-04-02 Miguel de Icaza <miguel@ximian.com>
14554 * loader.c (mono_lookup_internal_call): Report the corlib that is
14557 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
14559 * icall.c (ves_icall_type_GetTypeCode): fixed check for
14560 System.DBNull (it's class not valuetype).
14562 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14564 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
14565 if the array method was already assigned a token (fixes bug#40646).
14567 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
14569 * reflection.c (mono_reflection_get_type): Attempt type resolve even
14570 if no assembly is given.
14572 2003-04-01 Miguel de Icaza <miguel@ximian.com>
14574 * metadata.h: Added the new tables.
14576 * row-indexes.h: Added definitions for new tables.
14578 * metadata.c: Add schemas for new tables, and add support for
14579 computing the sizes of them.
14581 * class.c: Update for handling the new type cases.
14583 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
14585 * metadata.h (MONO_TYPE_IS_VOID): new macro
14587 2003-03-31 Martin Baulig <martin@ximian.com>
14589 * threads.h (MonoThreadCallbacks): Added `thread_created'.
14591 * threads.c (mono_thread_new_init): Call `thread_created' in the
14592 mono_thread_callbacks.
14594 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
14596 * loader.h: added marshalbyrefobject_class to mono_defaults
14597 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
14598 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14599 generation of output parameters.
14600 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14601 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14602 contextbound and the target object belongs to the context of the caller.
14603 * object.h: added context and unwrapped_server variables in MonoRealProxy.
14604 * object.c: Implemented support for interfaces and abstract classes
14605 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14606 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14608 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
14610 * class.h class.c (mono_class_is_subclass_of): New function.
14612 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14613 routines for most common case (calls from ArrayList::ToArray).
14615 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
14616 routine so programs which call Environment::Exit() can be profiled.
14618 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14619 Added MONO_ARCH_SAVE_REGS.
14621 * icall.c (ves_icall_type_is_subtype_of): Use new function.
14623 2003-03-29 Miguel de Icaza <miguel@ximian.com>
14625 * blob.h: Add a couple of new MonoType types definitions.
14627 * tabledefs.h: Add a couple of new call convs.
14629 2003-03-27 Zoltan Varga <vargaz@freemail.h>
14631 * reflection.h (MonoReflectionDynamicAssembly): track changes in
14632 the layout of the class.
14634 * reflection.c (alloc_table): double the size on overflow to avoid
14635 unnecessary copying.
14637 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14638 avoid filling out metadata tables and blobs. Also set mb->ilgen to
14639 null so it can be garbage collected.
14641 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
14643 * reflection.c (mono_reflection_get_type): Return the resolved type
14644 only if it is in the assembly we searched.
14646 * reflection.c (ensure_runtime_vtable): Initialize method slots.
14648 * class.c (mono_class_setup_vtable): Set the slot of the overriding
14651 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14654 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14655 the right one is 'file:///blah', but MS allows it.
14657 (mono_assembly_open): allow 'file://blah'
14659 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14661 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
14663 * socket-io.c: fixes bug #40310.
14665 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
14667 * reflection.c (mono_reflection_parse_type): handle deeply nested
14670 * reflection.c (mono_image_create_token): Use unique token values
14671 since they will be put into a hash table.
14673 * class.c (mono_class_setup_vtable): If a method occurs in more than
14674 one place in the vtable, and it gets overriden, then change the
14675 other occurances too.
14677 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14678 object as return type.
14680 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14682 * icall.c: Deleted "ToString" implementation for double and float
14683 because they are full implemented in managed code.
14685 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14687 * reflection.c, reflection.h: implemented and exported functions
14688 to retrieve info about custom attributes.
14690 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14692 * appdomain.c: moved Uri handling to assembly.c
14693 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14694 work when using a file Uri in *nix and windows.
14696 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14697 GetReferencedAssemblies.
14699 2003-03-18 Dick Porter <dick@ximian.com>
14701 * icall.c: Rename a couple of internal calls
14703 * threads.c: Set the thread state to Stopped when a thread exits.
14706 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14708 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14711 * object.c (mono_class_vtable): fix warning.
14713 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14715 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14717 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14719 (method_encode_clauses): Create exception info structures in the right
14721 (mono_reflection_setup_internal_class): Initialize supertypes field.
14723 * class.c object.c: Handle interfaces which implement other interfaces
14726 * class.h class.c: Move the supertypes array initialization code into
14727 a separate function so it can be used for dynamic types too. Also call
14728 it earlier, in mono_class_init(), since it can be used before the
14729 type is initialized.
14731 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14735 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14740 * object.c: remove warnings.
14742 2003-03-13 Martin Baulig <martin@ximian.com>
14744 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14745 (MonoDebugLexicalBlockEntry): New types.
14747 * debug-mono-symfile.c
14748 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14750 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14752 * process.c: ret can be any non-zero value accroding to MS doc.
14754 2003-03-07 Miguel de Icaza <miguel@ximian.com>
14756 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
14757 fixing a warning for a miss-used prototype, would have cause
14758 random memory corruption.
14760 2003-03-07 Martin Baulig <martin@ximian.com>
14762 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14763 getting really annoying ....
14765 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
14767 * reflection.c (fixup_method): added support for array methods.
14769 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14771 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
14772 (pointed out by Michael Adams).
14774 2003-03-04 Dick Porter <dick@ximian.com>
14776 * icall.c: Temporarily reverted the Double and Single ToString()
14777 change, because it broke nunit.
14779 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14781 * object.h, threads.h: make include files compatible with C++
14782 (patch by Jerome Laban <jlaban@wanadoo.fr>).
14784 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14786 * icall.c: Erased ToString helper functions for Double and Single.
14787 Now, that implementations ar all in managed code (Double and Single
14790 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
14792 * appdomain.c: Added method for initializing the default context of
14793 a domain. Added internal call for getting the default context.
14794 * appdomain.h: Added context variable in MonoDomain struct.
14795 * domain.c: mono_domain_set also sets the default context of the domain
14796 * icall.c: Mapped internal method InternalGetDefaultContext.
14797 * object.c: mono_object_get_virtual_method returns always a remoting
14798 wrapper if the object is a transparent proxy.
14799 mono_runtime_invoke_array: when creating an object by calling the
14800 constructor, if the created object is a proxy, then the constructor should
14801 be called using the a remoting wrapper.
14803 2003-03-03 Dick Porter <dick@ximian.com>
14805 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14806 variable so it compiles on solaris. Problem spotted by
14807 Christopher Taylor <ct@cs.clemson.edu>
14809 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14812 (get_info_from_assembly_name): don't leak value.
14815 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14818 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14820 * assembly.c: export mono_image_load_references ().
14821 * class.c: handle function pointers. mono_class_from_name() now
14822 supports nested type names directly.
14824 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
14826 * reflection.h reflection.c: Encode already created dynamic methods
14827 and fields correctly as a DEF instead of a REF.
14829 * reflection.c: Get rid of the force_ref argument to
14830 mono_image_typedef_or_ref since it was wrong in the first place.
14832 * string-icalls.c: add error checking to string constructors according
14835 * reflection.c: Emit types in the order their TypeBuilders were
14836 created. Previously, a new table index was assigned to each type before
14837 the tables were emitted. This was wrong because the signature blob
14838 might already refer to a type by its original table index.
14840 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14842 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14845 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14847 * Makefile.am: make assemblies dir have \ instead of / on windows.
14849 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14851 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14852 iterate over the NESTEDCLASS table using a linear search since the
14853 table is not guaranteed to be sorted by the secondary key.
14855 * class.c (mono_class_create_from_typedef): fixed up call to
14856 mono_metadata_nesting_typedef.
14858 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
14860 * marshal.c (mono_string_to_byvalstr): clear the memory as
14861 suggested by Jerome Laban <jlaban@wanadoo.fr>
14863 2003-02-26 Dick Porter <dick@ximian.com>
14865 * process.c: Cope with padding in .rsrc blocks
14867 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14869 * metadata.h: reverted the filter_len change, it breaks reflection
14871 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14873 * metadata.h: added a new field to store the filter_len
14876 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14878 * reflection.c: handle custom attributes for types and members
14879 created with Reflection.Emit (bug#38422).
14881 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
14883 * reflection.c: define RTSpecialName automatically for constructors for
14884 compatibility with MS.NET.
14886 * reflection.c (mono_reflection_create_runtime_class): initialize
14887 nested_in field of dynamically created classes.
14889 2003-02-22 Martin Baulig <martin@ximian.com>
14891 * debug-mono-symfile.h: Incremented version number.
14893 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14895 * object.h icall.c process.c: fix warnings.
14897 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14899 * appdomain.h appdomain.c:
14900 (mono_domain_try_type_resolve): split the
14901 name_or_tb argument into a name and a tb argument.
14902 (mono_domain_has_type_resolve): new function to check whenever the
14903 application has registered a TypeResolve event handler.
14905 * icall.c reflection.h reflection.c: move the type resolve logic into
14906 mono_reflection_get_type () so it will be invoked when
14907 Assembly::GetType () is called.
14910 (mono_reflection_get_type): renamed to get_type_internal.
14911 (mono_reflection_get_type): fixed type name generation so it works
14912 for nested types too.
14913 (mono_reflection_get_type): call has_type_resolve () to avoid the
14914 costly type name generation if there is no resolve event handler.
14916 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14918 * class.c, image.c: load exported types from file references.
14920 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
14922 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14923 used to cache the managed methods used to create proxies and make
14924 remote invocation of methods.
14925 * class.h: Added in MonoVTable a flag to indicate that a class needs
14926 to be remotely created.
14927 * object.c: Modified the method mono_class_vtable(). It now initializes
14928 the remote flag of the vtable. Modified mono_object_new_specific(),
14929 so now it checks the remote flag.
14930 * icall.c: Added a couple of internal methods, one for enabling instance
14931 creation interception for a type, and one for creating objects bypassing
14934 2003-02-18 Martin Baulig <martin@ximian.com>
14936 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14937 New interncall to get a method's metadata token.
14939 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14940 New interncall for the debugger.
14942 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
14944 * class.c (mono_class_setup_vtable): allocate supertype array
14946 2003-02-18 Martin Baulig <martin@ximian.com>
14948 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14950 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14953 (assembly_name_to_aname): jump over unknown properties (i've found
14954 something like: 'type, assembly, version=xxx, custom=null, public...',
14955 so now will ignore custom=null and still get the rest of the values).
14957 2003-02-17 Dick Porter <dick@ximian.com>
14959 * threads.c: Have Thread.Start() wait for a semaphore to signal
14960 that the thread has set up all its local data. This fixes bug
14961 34323, where Abort() raced the new thread's TLS data.
14963 Also removes the handle_store() call from start_wrapper, because
14964 threads are now always created suspended and there is no longer a
14965 race between the parent and child threads to store the info.
14967 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14969 * image.c: explain the #- heap issue in a message, hopefully
14970 avoiding FAQs on mono-list.
14972 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14975 (GetEntryAssembly): if the domain has not invoked
14976 AppDomain.ExecuteAssembly yet, return the assembly of the default
14979 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
14981 * class.c (mono_ldtoken): make it work in dynamic assemblies.
14983 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14985 * metadata.c, reflection.c: simple speedup to type hash
14988 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14990 * image.c, image.h, class.c, assembly.c: move module loading
14991 to MonoImage. When loading metadata, consider alignemnet from
14992 the start of metadata, not from the metadata address in memory.
14994 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
14996 * reflection.c (mono_reflection_get_custom_attrs): Added support for
14997 AssemblyBuilder objects. Factored out custom attribute creation into
14998 a separate function.
14999 (create_custom_attr): new function to create custom attributes.
15001 2003-02-12 Miguel de Icaza <miguel@ximian.com>
15003 * Makefile.am: Got tired of typing the full pathname to pedump.
15004 Until there is another option, am installing this.
15006 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
15008 * class.c (class_compute_field_layout): always set field->parent
15009 (mono_ldtoken): use mono_defaults.fieldhandle_class;
15011 2003-02-11 Dick Porter <dick@ximian.com>
15014 * monitor.c: Rewrote Monitor, making lock much faster and
15015 Pulse/Wait work as specified. Also uses much fewer handles, and only
15016 creates them as needed.
15018 * exception.c: Added SynchronizationLockException
15020 * threads.c: Deleted old Monitor implementation. The new one is
15023 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15025 * class.c: handled TypedReference type code. Set the correct size for
15026 class data. Setup interface_offsets for interface classes, too.
15028 2003-02-09 Martin Baulig <martin@ximian.com>
15030 * debug-mono-symfile.h: Reflect latest symbol writer changes.
15032 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
15034 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
15035 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
15036 * object.c: fixed mono_object_get_virtual_method () for interfaces.
15037 * verify.c: check for code that runs after the end of the method.
15039 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
15041 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
15042 "System.Math::Round2".
15043 * sysmath.h: Added Floor, Round and Round2 definitions.
15044 * sysmath.c: Modified certain functions that were not 100% compliant
15045 with MS.NET (math precision) and added the implementation of Floor,
15048 2003-02-07 Martin Baulig <martin@ximian.com>
15050 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
15052 2003-02-07 Martin Baulig <martin@ximian.com>
15054 * debug-mono-symfile.c: Reflected latest symwriter changes.
15055 (mono_debug_create_mono_symbol_file): Removed.
15056 (mono_debug_open_mono_symbol_file): Take an argument which
15057 specifies whether to create a dynamic symbol file.
15059 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
15061 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
15063 2003-02-05 Martin Baulig <martin@ximian.com>
15065 * reflection.c (mono_image_build_metadata): Make this public,
15066 protect it against being called multiple times, don't create
15067 resources and don't build the compressed metadata here.
15068 (mono_image_create_pefile): Do this here.
15071 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
15073 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15075 * socket-io.c: fixed bug #36322.
15077 2003-02-06 Piers Haken <piersh@friskit.com>
15081 * debug-mono-symfile.c:
15087 * socket-io.c: warning cleanups
15089 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
15091 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
15092 function. works like remoting invoke, but does a check for the Proxy first.
15094 2003-02-05 Miguel de Icaza <miguel@ximian.com>
15096 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
15098 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
15100 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
15102 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
15103 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
15105 * object.c (mono_store_remote_field_new): used by the new jit
15106 instead of mono_store_remote_field
15107 (mono_load_remote_field_new): used by the new jit
15108 instead of mono_load_remote_field
15110 2003-02-05 Patrik Torstensson
15112 * appdomain.c: changed unload to take the domain id instead
15115 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
15118 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15120 * appdomain.c: don't look for assemblies in ApplicationBase if
15121 PrivateBinPathProbe is set.
15123 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15125 * object.c: make the first argument in main_args contain the absolute
15126 path to the assembly. Fixes bug #37511.
15128 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15130 * icall.c: get correct UTC offset for countries not using daylight
15131 time saving. Fixes bug #30030.
15133 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15135 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15136 and 1 are the family).
15138 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
15140 * icall.c (ves_icall_InternalExecute): removed wrong assertion
15142 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15144 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
15146 * reflection.c: added support for SignatureHelper tokens, which is
15147 needed by the Calli opcode.
15149 * reflection.h: track changes to SignatureHelper class.
15151 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15153 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15155 * appdomain.c: fixed loading assemblies from PrivateBinPath.
15157 2003-02-03 Patrik Torstensson
15158 * appdomain.[c|h], domain.c :
15159 - Added support for getting a domain via domain id
15160 - Support for setting and getting domain from System.AppDomain
15161 (used in cross appdomain channel)
15162 - Added support for get/set for a MonoAppContext on a thread
15163 (Context class in System.Runtime.Remoting.Contexts),
15164 - Removed hack in Get/SetData and ExecuteAssembly.
15166 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15167 the managed world to get control when a proxy is created.
15169 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15171 2003-02-03 Miguel de Icaza <miguel@ximian.com>
15174 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15175 Populate the codebase field as well.
15177 2003-02-02 Martin Baulig <martin@ximian.com>
15179 * debug-mono-symfile.c
15180 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15181 (mono_debug_symfile_add_method): Allow interncalls.
15183 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15185 * icall.c: throw parse exception if strtod fails or the string is empty.
15187 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15189 * marshal.c: handle object type separately from defined
15192 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15194 * marshal.c: handle NATIVE_LPSTR for strings when it's
15195 explicitly specified.
15197 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15199 * reflection.c, reflection.h, icall.c: setup the reflection
15200 handle cache for ModuleBuilders and AssemblyBuilders.
15202 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
15204 * reflection.c (reflection_methodbuilder_to_mono_method): set
15207 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15209 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15211 2003-01-29 Dick Porter <dick@ximian.com>
15213 * threads.c: No need for the fake_thread kludge now that Thread
15214 doesn't run a class constructor
15216 2003-01-29 Dick Porter <dick@ximian.com>
15218 * threads.c: Use g_direct_hash instead of the rather bogus
15221 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
15223 * marshal.c (mono_marshal_get_native_wrapper): add check for null
15224 (fix pinvoke12.exe)
15225 (mono_marshal_get_struct_to_ptr): generate valid IL code
15226 (mono_marshal_get_ptr_to_struct): generate valid IL code
15227 (*): correctly set sig->pinvoke, we need to memdup the signature
15230 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15232 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15233 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15235 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15237 * profiler.c: provide more callers information.
15239 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
15241 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15243 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15245 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15247 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15249 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15250 exception instead of going into an infinite loop on dates which it
15253 * string-icalls.c (ves_icall_System_String_get_Chars): raise
15254 out-of-range exception if needed.
15256 * class.c (mono_class_setup_vtable): allow a virtual method to provide
15257 an implementation for an interface method and to override an inherited
15258 method at the same time.
15259 Imagine a scenario when a virtual method is used to override a
15260 virtual abstract method in a parent class, and this same method
15261 provides an implementation for an method inherited from an interface.
15262 In this case, the interface resolution code will set im->slot, which
15263 means that the virtual method override pass will skip this method
15264 which means a pointer to the abstract method inherited from the parent
15265 will remain in the vtable of this non-abstract class.
15267 * class.c: (mono_class_setup_vtable): continue search for a real
15268 method if only an abstract method is found.
15270 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15272 * reflection.c: add size to encoding for ByValStr and ByValArray
15273 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15275 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15277 * class.c (mono_class_setup_vtable): pass the override info as an
15280 * class.c (mono_class_setup_vtable): set the slot of overriding methods
15283 * reflection.c (ensure_runtime_vtable); add support for method
15286 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15288 * reflection.c (resolution_scope_from_image): Hack to work to work with
15289 dynamic assemblies.
15291 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
15292 added a 'force_ref' argument to force this function to allways return
15293 a TypeRef. This is needed by mono_image_get_memberref_token ().
15295 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15297 * reflection.c (mono_image_get_type_info): interfaces really don't have
15300 * reflection.c (mono_image_basic_init): fill out missing fields of
15303 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
15304 dynamic assemblies. This is required so dynamic assemblies show up in
15305 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15306 Type::GetType() etc. This is consistent with MS behaviour.
15308 * image.c image.h reflection.c: add newly created classes to the name
15309 cache so mono_class_get () will find them.
15311 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15313 First part of changes to get IKVM.NET running under mono.
15315 * appdomain.h, appdomain.c: added new function
15316 mono_domain_try_type_resolve() which will emit TypeResolve events.
15317 This function will call AppDomain::DoTypeResolve to do the actual work.
15319 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
15320 moved existing code dealing with dynamic tokens to a new function
15321 called mono_reflection_lookup_dynamic_token (). This function will
15322 raise TypeResolve events when appropriate. Since reflection.c is not
15323 part of libmetadata, a new hook function called
15324 mono_lookup_dynamic_token() is added to class.c which will call this.
15326 * assembly.h assembly.c: make the invoke_load_hook function public,
15327 so it can be called for dynamic assemblies.
15329 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15331 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
15334 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
15335 MonoGHashTable, since it contains pointers to objects which the GC
15338 * assembly.c (search_loaded): remove unused variable.
15340 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15342 * object.c: fixed issue exposed by gcc-generated IL programs
15343 that use RVA data for pointers.
15345 2003-01-25 Martin Baulig <martin@ximian.com>
15347 * threads.c (start_wrapper): Moved the initialization of
15348 `start_func' above the mono_new_thread_init() call to which we
15349 pass it as argument.
15351 2003-01-24 Martin Baulig <martin@ximian.com>
15353 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15354 the MonoThread pointer.
15356 2003-01-21 Miguel de Icaza <miguel@ximian.com>
15358 * icall.c: Rename `PowImpl' to Pow.
15360 2003-01-23 Dick Porter <dick@ximian.com>
15362 * threads.c (start_wrapper): Create a Thread object if needed, so
15363 the Main() thread can do the class initialisation in a subthread
15364 that has been set up to allow managed code execution.
15366 Pass the thread ID instead of the MonoThread pointer to the thread
15367 start and attach callbacks. This change is required, because the
15368 jit thread start callback must be called _before_ the Thread
15369 object can be created.
15371 (mono_thread_init): Removed much object creation code that is no
15372 longer needed. No managed code is called from here now.
15374 * object.c (mono_runtime_exec_managed_code): Create a subthread
15375 for Main, and call back to the runtime to use it.
15376 Set the exit code when Main exits.
15378 * gc.c: Make sure domain finalisation happens in a subthread.
15379 Re-enable threaded GC, fixing bug 31333 (again).
15381 * environment.c: System.Environment internall calls (so far just
15382 ExitCode is here, the others are still in icall.c)
15384 * appdomain.c (mono_runtime_cleanup): All threads running managed
15385 code should have finished before mono_runtime_cleanup() is
15386 reached, so no need to clean up threads.
15388 2003-01-22 Martin Baulig <martin@ximian.com>
15390 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15391 `gpointer func' arguments.
15392 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15393 but added `MonoThread *thread' argument.
15394 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15396 * threads.c (mono_new_thread_init): Added `gpointer func' argument
15397 and pass it to the mono_thread_start_cb callback.
15398 (mono_install_thread_callbacks): New public function to install a
15399 set of callbacks which are set by the debugger.
15400 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15402 2003-01-22 Martin Baulig <martin@ximian.com>
15404 * Makefile.am: Install debug-mono-symfile.h.
15406 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
15408 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15410 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
15412 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15413 * class.c (mono_ptr_class_get): correctly set access levels of pointers
15414 (mono_array_class_get): correctly set access levels of arrays
15416 2003-01-20 Patrik Torstensson
15417 * image.h (MonoAssemblyName): changed major, minor, build, revision
15418 from signed to unsigned.
15420 2003-01-20 sean kasun <skasun@azstarnet.com>
15422 * reflection.c (load_cattr_value): Now this handles
15423 MONO_TYPE_SZARRAY. Fixes bug #35629
15425 2003-01-20 Miguel de Icaza <miguel@ximian.com>
15427 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15430 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15432 * decimal.c: fixed bug #26056.
15434 2003-01-17 Martin Baulig <martin@ximian.com>
15436 * gc.c: Raise an ExecutionEngineException instead of using g_error().
15438 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15441 (mono_get_exception_type_initialization): new function.
15443 * object.c: throw a TypeInitializationException when an exception is
15444 thrown invoking the class constructor.
15446 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15448 * reflection.c: fixed attribute reading.
15450 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15453 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15454 provided, look for the type in the calling assembly and then in
15455 mscorlib; if the assembly name is provided, only try that one.
15457 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15459 * object.c: register the vtable before there is a chance it's
15460 queried again recursively.
15462 2003-01-13 Duncan Mak <duncan@ximian.com>
15464 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15467 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
15469 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15471 2003-01-11 Martin Baulig <martin@ximian.com>
15473 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15474 this to 20 for the release.
15476 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
15478 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15480 * loader.c (mono_method_get_marshal_info): bug fix
15482 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15483 structures with explicit layout
15485 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15487 * profiler.c: made the output more readable (and sorted).
15488 Added caller information for the allocation profiler.
15490 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
15492 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15494 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15496 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15497 to get value types.
15499 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15501 * object.c, profiler.h, profiler.c, profiler-private.h:
15502 Added object allocation profiler.
15504 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15506 * reflection.h, reflection.c: handle global methods.
15507 Compress blob entries.
15509 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15511 * marshal.c: fix compilation.
15513 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
15515 * loader.c (mono_method_get_marshal_info): impl.
15517 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15519 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15521 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15522 for reference types.
15524 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15526 * loader.c: fixed off by one error in loaded parameter names.
15528 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
15530 * marshal.c (mono_marshal_get_icall_wrapper): like
15531 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15532 instead of a MonoMethod.
15534 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15536 * decimal.c: fixed bug #36537.
15538 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15540 * marshal.c: throw a missing method exception if a
15541 P/Invoke method is not found.
15543 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15545 * icall.c: allow a null this for constructors.
15547 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15549 * icall.c: raise the proper exceptions if the arguments to the
15550 internal Invoke are incorrect.
15552 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
15554 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15556 2003-01-03 Martin Baulig <martin@ximian.com>
15558 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15560 2002-12-31 Martin Baulig <martin@ximian.com>
15562 * debug-mono-symfile.c: Completely rewrote the type section.
15563 Instead of using individual malloc()ed fields, we use one big
15564 continuous memory area and offsets into this area.
15565 See the comments in the source code for details.
15567 2002-12-30 Martin Baulig <martin@ximian.com>
15569 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15571 2002-12-30 Martin Baulig <martin@ximian.com>
15573 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15574 line number table in this data blob instead of using an external
15577 2002-12-28 Martin Baulig <martin@ximian.com>
15579 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15581 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
15583 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15584 as a boxed return type.
15586 2002-12-21 Miguel de Icaza <miguel@ximian.com>
15589 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15590 g_build_filename to properly get separators on the filename created.
15592 * object.h: Small change, introduce MonoMarshalByRefObject to
15593 track the layout of that structure in the C# universe as we make
15596 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15598 * object.c: removed assert to allow static fields on interfaces.
15599 * loader.c: a TypeSpec may be used for any type, not just arrays.
15601 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15603 * class.c, class.h: added mono_class_array_element_size ().
15604 Ignore static methods in interfaces.
15606 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15608 * threads.c: fixed the build under cygwin.
15610 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15612 * reflection.c: handle nullref constants. Allocate keys for
15613 reflection handles with the GC.
15615 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15617 * threads.c, threads.h: added mono_thread_get_abort_signal()
15618 to get a suitable signal for thread abort.
15620 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15622 * metadata.c: fix handling of ExportedType table.
15624 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15626 * icall.c: added WriteWindowsDebugString internal call.
15628 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15630 * reflection.h: added fields to match C# implementation.
15632 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15634 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15636 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
15638 * gc.h, gc-internal.h: Rename header for GC internal calls to
15639 gc-internal.h from gc.h as to not clash with Boehm GC having its
15640 header installed as <gc.h> in outside include paths.
15641 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15642 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15644 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15646 * icall.c: assign minor, build and revision in FillName.
15648 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
15650 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15651 Added support for running code generated by Reflection.Emit.
15653 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15655 * appdomain.c: check for NULL argument in LoadFrom.
15657 2002-12-10 Dick Porter <dick@ximian.com>
15659 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15661 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15663 * appdomain.c: fix buglet when building exe file name. Handle full
15664 assembly name (needed after latest changes to AssemblyName).
15666 (mono_image_close): free some hashtables.
15668 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
15670 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
15671 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
15672 on some systems (redhat 7.3)
15674 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15676 * threads.c: delete the critical section of a sync block,
15677 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15679 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15681 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15683 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15685 * appdomain.[ch]: handle the assembly preload event to try loading the
15686 assemblies using the paths we have in the current domain.
15688 * assembly.[ch]: created an assembly preload hook that is called to try
15689 loading the assembly by other means that the ones provided here.
15691 * domain.c: initialize the domain search path.
15693 From now on, assemblies (TODO: except corlib and System) are loaded
15694 according to these rules when using mono_assembly_load ():
15696 1. It tries to load the assembly from the ApplicationBase
15697 of the current domain appending .dll and .exe (TODO: have to
15698 try loading from name/name.dll and name/name.exe).
15700 2. It tries the search path specified in PrivateBinPath for the
15701 current domain (if any).
15703 3. Previous behavior.
15705 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15707 * icall.c: implemented GetInterfaceMap() related icall.
15708 * domain.c, loader.h: load MethodInfo in mono_defaults.
15710 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15712 * gc.c: disable the finalizer thread for now, untill all the issues
15713 with it are resolved.
15715 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15717 * string-icalls.c: handle embedded nulls in string ctor when the
15718 length is specified.
15720 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15722 * class.c: look for explicit interface implementation in parent
15725 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
15727 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
15729 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15731 * gc.c: protect handles with a critical section.
15733 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15736 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15737 parameters. If no assembly specified, try getting the type from all
15738 the assemblies in the current domain, else, load the assembly and get
15741 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15743 * marshal.c: applied patch from Aleksey Demakov that fixes
15744 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15746 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15748 * icall.c: fixed get_location.
15750 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
15752 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15753 declarations to make it work with older gcc.
15755 * loader.c (mono_get_method): set signature->pinvoke for native calls
15757 2002-11-20 Dick Porter <dick@ximian.com>
15759 * threads.c (mono_thread_init): Set the main thread's handle
15761 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15763 * gc.c: allow compilation without GC support. Changed to match the
15766 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15768 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15770 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15772 * reflection.c: set a public key token on the core assemblies.
15774 2002-11-18 Dick Porter <dick@ximian.com>
15776 * threads.c: Split out some thread initialisation so that other
15777 files can set the start callback function.
15779 * gc.c: Run finalisers in a separate thread, to avoid stack
15780 overflow. Fixes bug 31333.
15782 * appdomain.c: Set up GC finalisation thread.
15786 * domain.c: Use gc.h macros for GC_malloc
15788 2002-11-15 Dick Porter <dick@ximian.com>
15792 * appdomain.c: Removed mono_runtime_init_with_attach(),
15793 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15794 merging the extra parameter with the existing function. Removed
15795 unneeded code in mono_thread_attach().
15797 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
15799 * image.c (mono_image_loaded_by_guid): a method to get loaded
15801 (load_metadata_ptrs): we store the guid as string.
15803 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
15805 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15807 * metadata.c (mono_guid_to_string): imported method form Zoltan
15808 Varga (slightly modified)
15810 * assembly.c (mono_assembly_open): load precompiled code
15812 * loader.h (MonoMethod): we store the method token for use in the
15815 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15817 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15818 the hook function called when an assembly is loaded.
15820 * domain.c: Modified file.
15821 (mono_domain_assembly_load): removed hash table insertion of assemblies.
15825 2002-11-07 Miguel de Icaza <miguel@ximian.com>
15827 * reflection.c: Map PEFileKind to the value expected by the WinNT
15830 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15832 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15833 Read until the buffer is filled completely.
15835 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15837 * icall.c: implemented MonoType.InternalGetEvent ().
15839 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15841 * appdomain.c: implemented InitAppDomainSetup. Delayed
15842 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15843 the entry_assembly.
15845 * assembly.c: base_dir is now an absolute path ending with
15848 * icall.c: modified get_location according to the above changes.
15850 * object.c: init AppDomain.SetupInformation for the default domain after
15851 we have the entry assembly.
15853 * domain.c: when unloading a domain, setup = NULL.
15855 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
15857 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15859 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15861 * object.h, object.c: introduced mono_object_get_virtual_method ()
15862 to lookup the method invoked on an object when a callvirt is done on
15864 * icall.c: make MethodInfo::Invoke() always do a virtual call.
15866 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15868 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15869 current domain when loaded an assembly and failed to load it.
15871 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15873 2002-10-31 Dick Porter <dick@ximian.com>
15877 * file-io.c: Return the error status in a parameter, as the
15878 GetLastError() value has long since been blown away if we try and
15879 look it up in a subsequent internal call invocation. Delete the
15880 GetLastError() internal call, because it's useless.
15882 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
15884 * class.[ch]: added cast_class to fix bug 29517
15886 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15888 * marshal.c: create valid IL code in the filter clause:
15889 the new JIT is less forgiving:-)
15891 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15893 * icall.c: removed get_property internal call.
15895 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
15897 * appdomain.h domain.c: Added an ID to appdomains.
15899 * threads.c threads.h icall.c: Implement icall
15900 Thread:GetDomainID(), and remove unused icall
15901 CurrentThreadDomain_internal.
15903 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15905 * icall.c: Don't recurse through the base types in GetConstructor.
15908 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15910 * mempool.h, mempool.c: added mono_mempool_empty() and
15911 mono_mempool_stats().
15913 2002-10-23 Dick Porter <dick@ximian.com>
15917 * icall.c: Added MonoIO.GetFileType internal call
15919 2002-10-17 Dick Porter <dick@ximian.com>
15921 * appdomain.c (mono_runtime_cleanup): Don't signal the async
15922 delegate semaphore before waiting for all threads to finish,
15923 because new threads can also call async delegates. Fixes bug
15926 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15927 of 3 seconds, in case another async job is queued. (This part is
15928 needed because the bug fix reintroduced the 3s exit lag.) This
15929 makes the mono_runtime_shutdown flag superfluous.
15931 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15933 * reflection.c: include ehader size in method section headers.
15934 Really check for suplicated modules entries.
15936 2002-10-17 Martin Baulig <martin@gnome.org>
15938 * debug-mono-symfile.c: Added back support for locals.
15940 2002-10-14 Martin Baulig <martin@gnome.org>
15942 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15945 2002-10-14 Martin Baulig <martin@gnome.org>
15947 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15948 mono_class_get() instead of looking in the class cache.
15950 2002-10-13 Martin Baulig <martin@gnome.org>
15952 * debug-mono-symfile.c: Set version number to 28, include the
15953 signature in method names.
15955 2002-10-13 Martin Baulig <martin@gnome.org>
15957 * debug-mono-symfile.h: Set version number to 27.
15959 2002-10-11 Martin Baulig <martin@gnome.org>
15961 * gc.c: Don't register/unregister NULL pointers as disappearing links.
15963 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15965 * metadata.c, metadata.h: added helper function to allocate signatures.
15967 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15969 * icall.c: added internal call to get the location of machine.config.
15971 2002-10-08 Martin Baulig <martin@gnome.org>
15973 * debug-mono-symfile.c: Ignore classes with a pending init for the
15976 2002-10-03 Dick Porter <dick@ximian.com>
15978 * threads.c: Freebsd pthread_t is a pointer
15980 2002-10-03 Dick Porter <dick@ximian.com>
15982 * socket-io.c: Implemented GetHostName_internal
15984 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15987 (mono_config_parse_file): don't leak the text.
15989 2002-10-02 Martin Baulig <martin@gnome.org>
15991 * debug-mono-symfile.c: Added support for methods.
15993 2002-10-01 Martin Baulig <martin@gnome.org>
15995 * debug-mono-symfile.c: Don't emit methods and line numbers for
15996 the dynamic symbol file, just write the type table. We can easily
15997 have an external helper program which creates a symbol file for an
16000 2002-10-01 Dick Porter <dick@ximian.com>
16002 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
16003 Only add the handle to the cleanup array when we're about to
16004 launch the thread. Bug 31425 deadlocked when the test was run on
16007 2002-10-01 Martin Baulig <martin@gnome.org>
16009 * debug-mono-symfile.c: Added support for properties.
16011 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16013 * reflection.c: unaligned store fix from Mark Crichton
16014 <crichton@gimp.org>.
16016 2002-09-27 Martin Baulig <martin@gnome.org>
16018 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
16021 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16023 * assembly.h, assembly.c: use a sane API to hook into the assembly
16024 loading process instead of a useless special-purpouse hack
16025 (ngen needs a hook, too, for example).
16027 2002-09-27 Dick Porter <dick@ximian.com>
16029 * threads.c (mono_thread_init): Call GetCurrentProcess() so
16030 io-layer can set up some process handle info. Not needed on w32,
16031 but doesn't hurt either.
16033 * process.c: Pass the program name in the second parameter to
16034 CreateProcess, so the path is searched. Include the working
16035 directory. Implemented process name, process enumeration, and some
16036 process detail internal calls.
16038 * icall.c: Added internal calls for process lookup, and some
16041 2002-09-26 Martin Baulig <martin@gnome.org>
16043 * assembly.c (mono_install_open_assembly_hook): New global
16044 function to install a function to be invoked each time a new
16045 assembly is loaded.
16046 (mono_assembly_open): Run this callback function if set.
16048 * debug-mono-symfile.c: Put back line numbers for the dynamic
16049 symbol file and also record the .il file as source file. This
16050 allows us to install the temporary symbol file as `file.dbg' just
16051 like a compiler-generated one.
16053 2002-09-26 Nick Zigarovich <nick@chemlab.org>
16055 * Corrected typo in gc.c (BOHEM vs BOEHM).
16057 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16059 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
16060 GetProperties. Also avoid calling g_slist_length in GetProperties and
16063 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16065 * reflection.c: avoid unaligned stores (bug spotted by
16066 Mark Crichton <crichton@gimp.org>).
16068 2002-09-25 Martin Baulig <martin@gnome.org>
16070 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
16071 instead of guint64 for addresses and added prologue/epilogue info.
16073 2002-09-25 Martin Baulig <martin@gnome.org>
16075 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
16076 store line number info. For the dynamic symbol file, we only need
16077 to provide the JIT generated dynamic line number info for the dynamic
16080 2002-09-25 Martin Baulig <martin@gnome.org>
16082 * debug-mono-symfile.h: Incremented version number.
16084 2002-09-24 Martin Baulig <martin@gnome.org>
16086 * class.c (mono_debugger_class_init_func): New global function
16088 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
16091 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
16092 function. This is called via the mono_debugger_class_init_func
16093 hook to add all types to the dynamic type table.
16094 (ves_icall_MonoDebugger_GetType): New interncall to get a class
16095 from its metadata token.
16097 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
16098 New interncall for the debugger.
16100 2002-09-24 Nick Drochak <ndrochak@gol.com>
16102 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
16103 before using it in case it is null.
16105 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16107 * metadata.c: allow custom modifiers in local var signatures
16108 (bug spotted by Zoltan Varga).
16110 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16112 * class.c: deal with the <Module> class that may have a NULL vtable.
16113 Eliminate warnings.
16115 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16117 * image.c, image.h: more strong name helpers.
16118 * monosn.c: more work: convert pem keys to cryptoapi format.
16120 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16122 * string-icalls.c: speedup IndexOf.
16124 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16126 * icall.c: updates from Zoltan.2.Varga@nokia.com.
16128 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16130 * icall.c: cleanup: use mono_object_domain ().
16132 2002-09-23 Martin Baulig <martin@gnome.org>
16134 * debug-mono-symfile.c: Improved type support.
16136 2002-09-22 Martin Baulig <martin@gnome.org>
16138 * debug-mono-symfile.c: Added support for reference types and strings.
16140 2002-09-22 Martin Baulig <martin@gnome.org>
16142 * debug-mono-symfile.c: Started to work on the type table.
16144 2002-09-21 Martin Baulig <martin@gnome.org>
16146 * debug-mono-symfile.c: Largely reworked the symbol table format.
16147 The symbol table is now incrementally updated each time a new
16148 method is added. We're now also using our own magic and version
16149 so that you don't need to recompile all your classes if the
16150 dynamic table changes.
16151 (mono_debug_update_mono_symbol_file): Removed.
16152 (mono_debug_symfile_add_method): New function to add a method.
16154 2002-09-21 Martin Baulig <martin@gnome.org>
16157 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16160 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16161 New interncall to get a method from its metadata token.
16163 2002-09-21 Martin Baulig <martin@gnome.org>
16165 * debug-mono-symfile.c: Create type table.
16167 2002-09-20 Martin Baulig <martin@gnome.org>
16169 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16171 2002-09-20 Martin Baulig <martin@gnome.org>
16173 * debug-mono-symfile.c: Provide information about params and locals.
16175 2002-09-20 Martin Baulig <martin@gnome.org>
16177 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16180 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16181 interncall to get a method from its metadata token.
16183 2002-09-20 Martin Baulig <martin@gnome.org>
16185 * debug-mono-symfile.c: Added a few checks for method->header
16186 being non-NULL. This should never happen, but for the moment
16187 let's use a g_warning() rather than a g_assert().
16189 2002-09-19 Mark Crichton <crichton@gimp.org>
16191 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16192 even if support for it isn't present. Added an #ifdef to fix this.
16194 * socket-io.c: Added checks back for Solaris support.
16196 2002-09-19 Martin Baulig <martin@gnome.org>
16198 * debug-mono-symfile.c (read_string, write_string): Reflect latest
16199 changes in the symbol file format.
16201 2002-09-18 Martin Baulig <martin@gnome.org>
16203 * debug-mono-symfile.c: Set version number to 21.
16205 2002-09-18 Dick Porter <dick@ximian.com>
16207 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16208 on netbsd. Fixes bug 30051.
16210 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16213 (set_version_from_string): little fix.
16215 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16217 * monosn.c, Makefile.am: added strong name utility.
16218 * reflection.h, reflection.c: implemented delayed signing,
16219 locale, version and hash id assembly attributes.
16221 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16223 * loader.c, metadata.c: load param attributes in signatures.
16225 2002-09-16 Martin Baulig <martin@gnome.org>
16227 * debug-mono-symfile.c: Added string table with all method names.
16229 2002-09-14 Martin Baulig <martin@gnome.org>
16231 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16232 fast method lookup.
16234 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16236 * reflection.c: record the public key token of referenced assemblies.
16238 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16240 * image.c, image.h: added functions to get the strong name and the
16241 public key of an assembly.
16242 * pedump.c: use them.
16244 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
16246 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16248 2002-09-12 Miguel de Icaza <miguel@ximian.com>
16250 * marshal.c (mono_marshal_get_managed_wrapper): Added
16253 2002-09-11 Martin Baulig <martin@gnome.org>
16255 * gc.c: Call GC_unregister_disappearing_link() on all links when
16256 finalizing them, this is necessary to aviod a crash in boehm's
16259 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16261 * gc.c: handle GetTarget for finalized objects spotted and fixed by
16264 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16266 * icall.c: implemented MonoType::Module.
16267 * reflection.c, reflection.h: mono_module_get_object () from
16268 Tomi Pakarinen <tomi.pakarinen@welho.com>.
16270 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16272 * icall.c: ignore overridden methods in GetMethods ().
16273 Fix for FieldInfo::SetValue().
16274 * object.c: handle float/double in runtime invoke.
16276 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16278 * object.c: allow a constructor to be called again on an object.
16280 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16282 * class.h, class.c: move field layout code to it's own function and
16283 export it. Get an interface id earlier. Move fields in MonoClass
16284 so they are more cache friendly and align the bitfields.
16285 * loader.c: temporary handle get_param_names() for a runtime method.
16286 * reflection.c, reflection.h: more code to handle runtime creation of
16289 2002-09-09 Martin Baulig <martin@gnome.org>
16291 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16292 signature with the pinvoke field being set for the actual call.
16294 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16296 * icall.c: removed some unused icalls. Start of map of glib charsets
16297 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16299 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16301 * debug-helpers.c: break infinite loop (found and fixed by
16302 Holger Arnold <harnold@gmx.de>).
16304 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16306 * icall.c: target may be null in create_delegate.
16308 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16310 * marshal.c: handle a boolean return type.
16312 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16314 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16316 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16318 * gc.c: fix weakreferences.
16320 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16322 * icall.c: added icall to get default codepage.
16324 2002-09-03 Dick Porter <dick@ximian.com>
16327 * threads.c: Use MonoThread instead of MonoObject where
16330 Store running thread objects in a hash table, so that we have all
16331 the info to hand when waiting for them to finish
16332 (means we don't need OpenThread() any more, so mingw builds should
16333 be fully functional again.)
16336 * object.h: Added thread ID to MonoThread
16338 2002-09-03 Martin Baulig <martin@gnome.org>
16340 * icall.c (System.Reflection.Assembly::get_location): New interncall.
16342 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16344 * icall.c: fixed leak in get_temp_path. Thanks lupus.
16346 2002-09-03 Martin Baulig <martin@gnome.org>
16348 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16349 argument to store the end address of the disassembled instruction.
16351 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16352 here from debug-symfile.h.
16353 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16354 JIT into this struct.
16355 (MonoSymbolFile): Added `char *image_file' field.
16356 (MonoDebugGetMethodFunc): Removed.
16357 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16358 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16359 (mono_debug_find_method): New method.
16361 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16362 create a full symbol file.
16363 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16364 and static symbol files.
16365 (mono_debug_find_method): The symbol file keeps an internal method hash,
16366 call this to get a MonoDebugMethodInfo from a MonoMethod.
16368 * debug-symfile.[ch]: Removed.
16370 2002-08-29 Miguel de Icaza <miguel@ximian.com>
16372 * image.c (do_mono_image_open): Remove linker version check.
16374 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
16376 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16377 wrappers for instance methods.
16379 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16381 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16383 2002-08-28 Dick Porter <dick@ximian.com>
16385 * Makefile.am: Export HOST_CC for w32 builds
16387 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16389 * file-io.c process.c: MonoString are null terminated, no
16390 need for mono_string_to_utf16() anymore.
16392 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16394 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16396 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16398 * icall.c, reflection.h: speedup System.MonoType.
16400 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16402 * reflection.c: allow null as the value of a string argument in
16403 custom attributes constructors.
16405 2002-08-27 Martin Baulig <martin@gnome.org>
16407 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16408 `trampoline_address' field.
16410 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
16412 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16413 check (fixes bug #29486)
16415 2002-08-27 Martin Baulig <martin@gnome.org>
16417 * debug-mono-symfile.c: Changed the file format in a way that allows us
16418 open it read-only and to use a specially malloced area for all the
16419 dynamic data. We can now also generate a symbol file on-the-fly if we're
16420 debugging IL code and there is no MCS generated symbol file for it.
16422 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16424 * object.c: added a define for a good string and array
16425 creation speedup (not enabled by default because we need to deal with
16428 2002-08-26 Martin Baulig <martin@gnome.org>
16430 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16431 function to create a dynamic symbol file. This is used by the
16432 debugger to create a symbol file for IL code on-the-fly.
16434 2002-08-26 Martin Baulig <martin@gnome.org>
16436 * loader.c (mono_lookup_pinvoke_call): Include the error message
16437 from g_module_error() in the error message.
16439 2002-08-24 Martin Baulig <martin@gnome.org>
16441 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16442 function to update the symbol file. The symbol file is mmap()ed
16443 writable, but private. This allows us to install the symbol file
16444 together with the assembly.
16446 2002-08-24 Martin Baulig <martin@gnome.org>
16448 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
16449 but they can read the new symbol file format which mcs is now creating.
16451 * debug-symfile.c (mono_debug_find_source_location): Moved to
16452 debug-mono-symfile.c; this is now operating on the new symbol file.
16454 2002-08-23 Martin Baulig <martin@gnome.org>
16456 * debug-helpers.c (mono_method_desc_from_method): New function to get
16457 a MonoMethodDesc from a MonoMethod.
16459 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16461 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16462 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16464 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16466 * string-icalls.[ch]: make helper methods static.
16468 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16470 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16471 types to it and to SetValueInternal.
16473 * object.c: Moved handle_enum label to its proper place. This was the
16476 This time i compiled mcs and gtk-sharp and they both work.
16478 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16480 * icall.c: reverted partially my previous patch until
16481 object.c:set_value handles enums correcly.
16483 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16486 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16487 (ves_icall_System_Environment_get_MachineName): removed warning when
16488 compiling under cygwin.
16490 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16492 * object.c: fixed field_get_value() for reference types.
16494 2002-08-22 Dick Porter <dick@ximian.com>
16496 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16497 Don't free a buffer while it's still needed. Patch from Jonathan
16498 Liger <Jonathan.liger@wanadoo.fr>
16500 2002-08-21 Miguel de Icaza <miguel@ximian.com>
16502 * icall.c (ves_icall_System_Environment_get_Platform): Add new
16505 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
16507 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16508 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16510 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16511 we call unmanaged code which throws exceptions.
16513 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16515 * appdomain.h: added per-domain entry_assembly.
16516 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16518 * icall.c: Assembly::GetEntryAssembly icall.
16519 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16520 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16522 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16524 * appdomain.h, gc.c: added mono_domain_finalize ().
16526 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16529 (mono_print_unhandled_exception): changed g_warning by g_printerr
16530 because g_log has a 1024 characters limit (yeah, i got a big stack
16531 trace). Don't print exception name, that should be in ToString
16534 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16536 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16537 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16539 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16542 (mono_print_unhandled_exception): after previous commit, i realized
16543 that MS calls ToString on the exception. I changed this function to
16544 do that. This way we get stack_trace for free.
16546 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16549 (mono_print_unhandled_exception): invoke Message property instead of
16550 getting 'message' field from Exception. Don't allocate memory for
16551 'trace' and 'message' if not needed.
16553 2002-08-18 Dick Porter <dick@ximian.com>
16555 * unicode.c: Fix asserts to match Encoder.cs checks
16557 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16559 * marshal.c: fix unaligned store issue and a few wrong
16560 opcode argument types.
16562 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16564 * icall.c: added GetUninitializedObjectInternal internal call.
16566 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
16568 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16569 to the right domain.
16571 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
16573 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16575 * class.c (class_compute_field_layout): set blittable to false for Strings
16577 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16579 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16581 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16582 first chunk of code to create types at runtime. Code to
16583 handle ReflectedType/DeclaringType. Make reflection handles
16586 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16588 * class.c: set correct name in arrays.
16590 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
16592 * appdomain.c (mono_domain_transfer_object): make it work with
16593 valuetypes. bug fixes.
16595 2002-08-12 Dick Porter <dick@ximian.com>
16597 * object.h: Rename some parameters to avoid c++ keywords (Patch
16598 from Joseph Wenninger <kde@jowenn.at>)
16600 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16602 * icall.c: added icall to implement Assembly.GetFile*.
16604 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16606 * reflection.h, reflection.c: code to embed managed resources.
16608 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16610 * class.c: move all the type size stuff into
16611 class_compute_field_layout().
16613 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16615 * class.c: ensure enums have always the correct instance size.
16616 * unicode.c: remove wrong assert.
16618 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16620 * assembly.c: fix mem corruption issue.
16621 * image.h, image.c: added mono_image_get_resource () to access
16623 * icall.c: implemented Assembly.EntryPoint property and some
16624 Managed Resources related internalcalls.
16627 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16629 * image.c, image.h: impemented mono_image_get_entry_point ().
16630 * appdomain.c: use mono_image_get_entry_point.
16632 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16634 * reflection.c: support the object type argument when loading
16637 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
16639 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16640 String as return type.
16642 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16644 * reflection.c: fix encoding of named args for custom attrs to match
16645 the ms implementation. Read them back when instantiating custom
16648 2002-08-02 Radek Doulik <rodo@ximian.com>
16650 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16651 by Dietmar as quick fix
16652 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16653 16 as stack size, used on more places as quick fix before Dietmar
16654 will fix it properly
16656 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16658 * object.h, object.c: added accessors for fields and properties.
16660 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16662 * class.c, class.h: made mono_class_get_field_from_name ()
16663 loop on parent types.
16664 Added mono_class_get_property_from_name ().
16666 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16668 * class.c, class.h: move the code to setup the type vtable in its own
16669 function so that it can be reused also for types created at runtime.
16670 Eliminate the "class" identifier from the header file.
16671 * reflection.c: setup the vtable for enums so that we can create
16672 objects for use in SetConstant ().
16674 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
16676 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16677 instead of the delegate itself as this pointer (bug #28383)
16679 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
16681 * marshal.c (mono_marshal_get_managed_wrapper): added return type
16684 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16686 * loader.c: don't set the pinvoke bit on icalls.
16688 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
16690 * debug-helpers.c (mono_method_full_name): only print a number to
16691 indicate wrapper type (so that the output is more readable in traces).
16693 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
16695 * class.c (mono_class_init): include method override patch from Paolo
16697 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16699 * icall.c: fixed GetTypeCode().
16701 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
16703 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16704 use real delegate invoke function to make it work with multicast
16705 delegates (fix bug# 28291).
16707 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16709 * object.c: load constant strings.
16711 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16713 * reflection.c: no magic numbers.
16714 * tabledefs.h: security action enum.
16716 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16718 * assembly.c: fix possible memory corruption.
16720 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16722 * reflection.h, reflection.c: added support for linking resources.
16723 * verify.c: check we have an updated corlib.
16725 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
16727 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16729 (mono_marshal_string_array): null terminate unmanaged string arrays.
16730 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16732 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16734 * icall.c: Type.GetType () can now return also types from the
16737 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16739 * loader.h, loader.c: stack walking support.
16740 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16741 GetCallingAssembly.
16743 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
16745 * marshal.c: added optimisations for blittable types
16747 * class.c (mono_array_class_get): do not set blittable attribute on arrays
16748 (mono_class_setup_mono_type): set blittable attribute for single
16751 * marshal.c (mono_string_utf8_to_builder): impl.
16752 (mono_string_builder_to_utf8): impl.
16753 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16755 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
16757 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16758 (mono_marshal_get_managed_wrapper): impl. byref types
16760 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16763 (search_method): don't display debug message.
16765 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16767 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16769 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16771 * appdomain.c: set the missing filename when throwing exception.
16773 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16775 * metadata.c (mono_type_size): code cleanup
16776 (mono_type_stack_size): removed some test code
16778 2002-07-21 Miguel de Icaza <miguel@ximian.com>
16780 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16781 mono_get_exception_file_not_found now.
16783 * exception.c (mono_exception_from_name_two_strings): New version
16784 that will call a constructor with two string arguments.
16785 (mono_get_exception_file_not_found): New helper routine, used to
16786 report file-not-found errors.
16788 2002-07-20 Dick Porter <dick@ximian.com>
16791 * process.c: Pass file handles to CreateProcess
16795 * file-io.c: Implemented CreatePipe
16797 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16799 * metadata.c (mono_get_param_info): set alignment for value types
16801 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16803 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16804 Constify mono_domain_assembly_open().
16805 * loader.c: handle null namespace in icalls.
16807 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16809 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16810 (emit_str_to_ptr_conv): marshal object as structs
16812 * metadata.c (mono_type_to_unmanaged): marshal object as structs
16814 * marshal.c (mono_marshal_get_runtime_invoke): support value types
16816 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
16818 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16819 (mono_marshal_get_native_wrapper): we an now return value types
16821 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16823 * verify.c: more checks implemented.
16825 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
16827 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16829 (mono_marshal_get_native_wrapper): allow byref arguments
16830 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16831 impl. PtrToStringXXX methods
16832 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16833 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16834 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16835 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16836 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16838 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16840 * reflection.c: fix buglet in parsing an assembly name.
16842 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16844 * marshal.c (emit_ptr_to_str_conv): first impl.
16846 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16848 * object.c, class.h: cache the vtable in the class as suggested by
16849 vargaz@freemail.hu (Zoltan Varga).
16851 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16853 * class.h, loader.c: added mono_field_from_token().
16854 * verify.c: first cut of type checking code.
16856 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16858 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16860 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
16862 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16864 (mono_marshal_get_remoting_invoke): impl.
16865 (mono_delegate_begin_invoke): impl.
16866 (mono_mb_emit_save_args): impl.
16867 (mono_delegate_end_invoke): impl.
16868 (mono_marshal_get_delegate_begin_invoke):
16869 (mono_marshal_get_delegate_end_invoke):
16870 (mono_marshal_get_delegate_invoke): generate a special name for
16871 those methods (including the signature) and associate them whith
16872 the delegate class.
16874 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16877 (mono_reflection_type_from_name): now it has a MonoImage parameter
16878 which is used as the default image to search the type in. If the image
16879 is NULL or getting the type from it fails, it defaults to corlib.
16881 * icall.c: changed 1 call to mono_reflection_type_from_name to match
16884 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16886 * reflection.c: update the parameter table index.
16888 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16890 * domain.c: don't include the mark byte in the string hash.
16892 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16894 * icall.cs: icall for Type.GetTypeCode ().
16895 * verify: a couple of fixes and disabled local initialization checks.
16897 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
16899 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16901 * debug-helpers.c (mono_method_full_name): print the type of the
16904 * metadata.c (mono_signature_hash): a hash function for signatures
16905 (mono_signature_hash): better hash algorithm
16907 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16909 * debug-helpers.c (mono_method_full_name): this can now generate
16910 method names with signatures
16912 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16913 method dont have this pointers.
16915 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16917 * reflection.c: fixup typebuilder tokens.
16918 * image.c: fix buglet.
16919 * marshal.h: remove whitespace.
16920 * metadata.h, metadata.c: reinstate code that was removed.
16921 * verify.c: handle catch directives and fix another couple of bugs.
16923 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
16925 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16926 (mono_marshal_get_native_wrapper): make it comp. with the old code
16927 (mono_marshal_get_native_wrapper): support boolean
16928 (mono_marshal_get_managed_wrapper): support more types
16930 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
16932 * class.c (class_compute_field_layout): compute class->blittable attribute.
16934 2002-07-09 Dick Porter <dick@ximian.com>
16936 * threads.c: Make the thread cleaning up cope with threads that
16939 2002-07-08 Radek Doulik <rodo@ximian.com>
16941 * reflection.c (method_encode_code): use non-translated values to
16942 compute finally_start, this fixes exception handling on ppc, yay!
16944 * decimal.h (struct signscale): fix endianess
16946 2002-07-07 Radek Doulik <rodo@ximian.com>
16948 * reflection.c: swap box_val and not val
16950 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16952 * reflection.c, reflection.h: handle full assembly info in type name.
16953 Handle Type arguments when loading custom attributes.
16954 * icall.c: updated to use new mono_reflection_type_from_name () method.
16956 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16959 (method_from_memberref): also print assembly name when method not found.
16961 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16964 (ves_icall_TypeGetProperties): fixed bug #27473.
16966 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16968 * reflection.c: display image name and token when cannot find the
16969 .ctor for an attribute.
16971 2002-07-05 Martin Baulig <martin@gnome.org>
16973 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16975 2002-07-04 Dick Porter <dick@ximian.com>
16977 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16978 compile on mingw. This will cause mingw builds to not wait for
16979 subthreads to terminate after the main thread does. I've lodged a
16980 bug with the mingw developers for them to wrap OpenThread().
16982 2002-07-03 Dick Porter <dick@ximian.com>
16984 * threads.c: Store thread IDs instead of handles, because
16985 GetCurrentThread() returns a pseudohandle and therefore stores
16986 useless values. mono_thread_cleanup() continues checking the
16987 array of threads until it is empty, to cope with subthreads
16988 spawning new threads after the main thread has finished.
16992 * profiler-private.h: Pass the thread ID to thread profiler
16993 functions, instead of a handle
16995 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16997 * verify.c: fixes to make it more usable.
16998 * pedump.c: added --verify code to verify IL code in an assembly.
17000 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17002 * reflection.c: turn errors into warnings to allow compiling corlib.
17004 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17006 * reflection.c: add special cases to compile corlib.
17008 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17010 * reflection.c: handle properties with only a set method.
17012 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17014 * opcodes.h: add enum with opcodes in opval order.
17016 2002-07-01 Dick Porter <dick@ximian.com>
17019 * object.c (mono_runtime_run_main): Removed unneeded argument
17021 2002-06-28 Martin Baulig <martin@gnome.org>
17023 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17025 2002-06-27 Dick Porter <dick@ximian.com>
17027 * threads.c: Store the handle in both the parent thread and in the
17028 subthread, to minimise the time between starting a new thread and
17031 2002-06-26 Dick Porter <dick@ximian.com>
17033 * appdomain.c (mono_runtime_cleanup): Close the socket library
17034 after all the threads have finished, not before
17036 2002-06-26 Martin Baulig <martin@gnome.org>
17038 * debug-symfile.c (mono_debug_find_source_location): Added
17039 `guint32 *line_number' argument. If it's not NULL, store the line number
17040 there and return the file name without the line number.
17042 2002-06-25 Dick Porter <dick@ximian.com>
17046 * process.c: Process forking and other support functions
17048 2002-06-25 Dick Porter <dick@ximian.com>
17050 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
17051 things dont happen when the image is closed.
17052 (mono_image_lookup_resource): Walk the resource section looking
17053 for a particular entry
17055 * cil-coff.h: PE resource section decoding
17057 2002-06-25 Dick Porter <dick@ximian.com>
17061 (mono_assembly_foreach): Accessor functions to walk the list of
17063 (mono_assembly_set_main):
17064 (mono_assembly_get_main): Process methods need to know which
17065 assembly is the "main" one
17067 * object.c (mono_runtime_run_main): Record the main assembly
17069 * debug-helpers.c: Fix typo
17071 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
17073 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
17074 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
17076 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17078 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
17080 2002-06-21 Miguel de Icaza <miguel@ximian.com>
17082 * image.c (do_mono_image_open): Initialize reference count,
17083 otherwise we leak the MonoImage.
17085 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17087 * reflection.c: small tweak to handle self-hosting.
17089 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17091 * reflection.c: fix type name parse code.
17093 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17095 * reflection.c: break out of the loop.
17096 * image.c: special case corlib.
17098 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17100 * reflection.c: add all the custom attrs at the end to ensure the
17101 ctors have been properly initialized when the attributes are defined
17102 in the current assembly.
17104 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17106 * reflection.c: handle correctly multiple-nested types.
17108 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17110 * row-indexes.h: fix typos.
17111 * reflection.c: adjust for typos and fix method_def_or_ref
17112 encoding in MethodImpl table.
17114 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17116 * reflection.c: fix entry point patching (thanks Serge!).
17118 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
17120 * verify.c: add check for System.Exception
17122 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17124 * image.c, class.c: minifix for code just c&p'ed.
17125 * reflection.c: warning fix.
17126 * object.h, loader.h, domain.c: load also StringBuilder.
17128 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17130 * marshal.h, marshal.c: some support code to handle complex marshaling.
17132 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17134 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
17135 Better signatures with vtable error dump.
17137 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17139 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17141 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
17143 * icall.c (ves_icall_Type_GetField): impl.
17145 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17147 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17148 to retrieve a marshal description blob for a field or param.
17150 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17152 * reflection.h, reflection.c: change order of nested type emission
17153 to avoid table corruption. The NestedTypes table is sorted.
17154 * icall.c: change order of GetConstructor results to workaround mcs bug.
17156 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17158 * reflection.h, reflection.c: handle field and param marshal
17161 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17163 * icall.c, marshal.c marshal.h: more Marshal class implementation.
17165 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17167 * reflection.c: fix call convention.
17169 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17171 * reflection.h, reflection.c: mono_image_get_memberref_token()
17172 takes a type instead of a class, now. Added
17173 mono_image_get_array_token() to create tokens for the special
17174 multi-dim array methods.
17176 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17178 * assembly.c: handle modules (no assembly table). Split
17179 loading references in its own function.
17180 * class.c: handle moduleref resolution scope.
17181 * image.c, image.h: cache module name in image.
17183 2002-06-07 Martin Baulig <martin@gnome.org>
17185 * reflection.c (mono_image_get_type_info): Only add a class layout entry
17186 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17188 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17190 * icall.c: more signature fixes that used uint instead of int.
17192 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17194 * reflection.c: fixed signature of field refs.
17196 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17198 * class.c, reflection.c: handle typerefs of nested types
17199 (both on read and when writing files).
17201 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17203 * icall.c: fix method signatures that tried to workaround the previous
17206 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17208 * debug-helpers.c: fix typo.
17210 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17212 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17213 rewrote the PE/COFF writing code (our programs are understood by the
17216 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17218 * gc.c, gc.h, icall.c: weakreference support.
17220 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17222 * Makefile.am, mono-config.c: use $(sysconfdir).
17224 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17226 * icall.c: changed default precision of Double.ToString() to 15.
17227 Fixed memory leak. Unified with Single.ToString.
17229 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17231 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17233 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17235 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17236 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17237 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17240 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17242 * debug-symfile.c, sysmath.c: yet more compilation fixes.
17244 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17246 * reflection.c, socket-io.c: more compilation fixes.
17248 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17250 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17251 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17252 unicode.c: warning and compiler compatibility fixes.
17254 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17256 * class.h, metadata.c: fixed warnings/compilation errors.
17258 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17260 * Makefile.am, mono-config.c, mono-config.h: configuration file
17262 * loader.c, loader.h: make Dll mapping configurable at runtime in the
17263 config file. Export methods to insert and lookup mappings.
17265 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17267 * reflection.c: handle types and boxed objects in custom attr
17270 2002-05-30 Martin Baulig <martin@gnome.org>
17273 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17275 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17277 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17278 to lookup the implmap row for a P/Invoke method.
17279 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17280 P/Invoke method from the runtime on an as needed basis.
17282 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
17284 * metadata.c (mono_metadata_parse_signature): impl.
17286 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17288 * class.c: handle .pack directive.
17290 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17292 * object.c: initialize static fields with RVA data.
17294 2002-05-25 Martin Baulig <martin@gnome.org>
17297 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17299 2002-05-24 Martin Baulig <martin@gnome.org>
17302 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17303 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17304 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17306 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17308 * object.c: special case string ctros in invoke.
17309 * gc.c: silly whitespace changes.
17311 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
17313 * threadpool.[ch]: impl. a threadpool that can
17314 be used by mint and mono.
17316 2002-05-22 Martin Baulig <martin@gnome.org>
17318 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17319 The first argument is now a `MonoReflectionModuleBuilder *', the return
17320 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
17321 `methods' field to get the method builder. The `token' argument is the
17324 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17325 invalid characters instead of g_assert_not_reached()ing. This seems
17326 to be the behaviour of mscorlib.
17328 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
17330 * object.c (mono_runtime_invoke_array): applied patch from Rachel
17331 Hestilow to fix bug #25104
17333 2002-05-21 Martin Baulig <martin@gnome.org>
17335 * debug-symfile.c (mono_debug_find_source_location): New function.
17336 Looks up an IL offset in the line number table and returns the source
17337 location as a string.
17339 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17342 (mono_double_ToStringImpl): changed %f by %g until we have something
17345 2002-05-21 Nick Drochak <ndrochak@gol.com>
17347 * icall.c : Use different name for Math.Pow's icall. Needed to check
17348 parameters first in C#.
17350 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17352 * icall.c, reflection.h: added icall to get info about an event.
17354 2002-05-20 Radek Doulik <rodo@ximian.com>
17356 * object.c (mono_value_box): don't use memcpy for boxing on BIG
17358 (mono_value_box): don't use memcpy for small sizes on
17359 architectures with unaligned access
17361 2002-05-20 Martin Baulig <martin@gnome.org>
17363 * reflection.c (mono_reflection_setup_internal_class): Don't crash
17364 if `tb->parent == NULL'.
17365 (mono_reflection_create_internal_class): New function. This is
17366 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17369 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17372 2002-05-19 Martin Baulig <martin@gnome.org>
17374 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17375 argument to get the length, don't default to the array length.
17377 2002-05-18 Miguel de Icaza <miguel@ximian.com>
17379 * assembly.c (mono_assembly_setrootdir): New function used to
17380 override the MONO_ASSEMBLIES directory.
17382 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17384 * icall.c: ValueType_GetHashCode() initialize local var.
17386 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17388 * reflection.c: sort custom attributes table.
17390 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17392 * reflection.c: support named args in custom attributes (write support).
17394 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17396 * reflection.c: fix finally position calculation.
17398 2002-05-15 Radek Doulik <rodo@ximian.com>
17400 * reflection.c: fixed endianess at many places
17402 * icall.c (ves_icall_InitializeArray): comment out debug msg
17404 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
17406 * object.c (mono_unhandled_exception): new function to handle
17407 unhandled exceptions.
17408 (mono_unhandled_exception): call the UnhandledException event.
17409 (mono_runtime_delegate_invoke): impl.
17411 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17413 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17414 returns the RVA, not the direct pointer to the data. Handle the case
17415 when the class size is fixed.
17417 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17419 * reflection.c: fix some endianess issues.
17421 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
17423 * object.c (mono_runtime_invoke): is now able to catch exceptions.
17425 * threads.c (mono_thread_init): added a callback which is invoked
17428 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17430 * icall.c: make GetHashCode return non-negative values.
17432 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17434 * object.c, icall.c, gc.c: revert to address-based hashcode.
17436 2002-05-13 Miguel de Icaza <miguel@ximian.com>
17438 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17440 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17442 * icall.c, class.c: special case <Module>.
17444 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
17446 * icall.c: fix bug in GetNow().
17448 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
17450 * object.c (mono_runtime_class_init): make sure that we call all
17451 static class constructors.
17453 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17455 * reflection.c: sort methodsemantics table.
17457 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17459 * reflection.h, reflection.c: honour init locals setting.
17461 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17463 * icall.c: copied Double ToStringImpl for Single ToStringImpl
17465 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17467 * reflection.c: support ContructorBuilders in attribute blob creation.
17469 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17471 * reflection.c: some changes to build a binary that can be run
17472 directly in windows.
17474 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17476 * loader.c: print a big message when an icall can't be found.
17478 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17480 * string-icalls.c: fix bug 24248.
17482 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17484 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17485 icall.c, reflection.h: separate assembly loading by pathname and by
17486 assembly name. Use the MONO_PATH env var to search for assemblies.
17488 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17490 * assembly.c, image.h: add some support for assemblies
17491 with multiple modules.
17492 * class.c, class.h: export mono_class_from_typeref().
17493 * loader.c: remove duplicated code and use mono_class_from_typeref(),
17496 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17498 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17499 documentation says (the ECMA one is correct).
17501 2002-05-02 Dick Porter <dick@ximian.com>
17503 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17504 Don't name the synchronisation mutex.
17506 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
17509 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17510 Make the prototypes match.
17511 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17515 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17516 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17517 all systems have tm.tm_zone, so use strftime() with %Z to print
17518 the timezone abreviation into a temp string.
17520 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17521 rather than mono_array_addr() on a MonoString on Big Endian
17524 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
17526 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17529 2002-04-30 Dick Porter <dick@ximian.com>
17531 * socket-io.c: Cope with SOCKET being an integer rather than a
17534 * threads.c: Added Thread_free_internal, to deal with thread
17535 handle cleanup. Moved calls to handle_store() and handle_remove()
17536 to start_wrapper(), so each can only be called once. Allocate
17537 synchronisation blocks with GC_malloc(), and use GC finalisation
17538 to close the handles.
17540 * icall.c: added System.Threading.Thread::Thread_free_internal
17542 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17544 * icall.c: support Environment.Exit, CommandLineArgs().
17546 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17548 * object.c, object.h: added mono_runtime_run_main () and
17549 mono_runtime_get_main_args () for use in System.Environment.
17551 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17553 * gc.c: fix thinko, enable actual finalization since the jit is now
17556 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17558 * gc.c, object.c: take into account that an object may be offset wrt the address
17559 returned by GC_malloc().
17561 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17563 * image.c: handle files without entries in the assembly table (modules).
17565 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17567 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
17568 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17569 allowed to be null when it's System.Object class setup.
17571 2002-04-27 Martin Baulig <martin@gnome.org>
17573 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17574 if `tb->parent == NULL' rather than crashing.
17576 2002-04-28 Nick Drochak <ndrochak@gol.com>
17578 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
17579 calling acos() where asin() should have been called.
17581 2002-04-26 Martin Baulig <martin@gnome.org>
17583 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17584 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17585 there's a subdirectory called `System', but we don't want to read that
17586 subdirectory as an assembly.
17588 2002-04-25 Martin Baulig <martin@gnome.org>
17590 * debug-symfile.c: Reflect latest MonoString changes.
17592 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17594 * rand.c, rand.h: instance method icalls need to have an explicit
17595 this pointer as first argument in the C implementation.
17597 2002-04-25 Nick Drochak <ndrochak@gol.com>
17599 * icall.c: Fix typo in map for GetNonZeroBytes
17601 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17603 * string-icalls.c : String does now passes unit tests without any
17604 errors, the following changes has been made:
17606 Implemented replace methods.
17607 Renaming of methods to (try) follow the standard.
17608 Fixed compare ordinal
17609 Made all memory allocated directly to function instead of via icall function.
17610 Small performance fix in is_in_array function
17612 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17614 c (mono_string_Internal_ctor_charp_int_int):
17615 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
17616 sindex < 0, throw ArgumentOutOfRangeException instead of
17617 ArgumentNullException.
17619 Added new check for length == 0, however
17620 I need to make it return String.Empty from the C code.
17622 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17623 that calculate the length for us here.
17625 (mono_string_Internal_ctor_sbytep_int_int): Replaced
17626 mono_string_new_utf16 with mono_string_new, since value is utf8.
17628 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17630 * object.c: register the object for finalization if needed.
17631 Allocate one more char in the string for the terminating 0 char.
17633 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17635 * class.c, class.h, image.c: check if a type implemenst a destructor.
17636 Use the proper key for array class lookups.
17637 * icall.c: register the icalls in the System.GC class.
17638 * gc.c, gc.h: GC-related functions and icalls.
17640 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17644 * unicode.c: free some strings gotten from mono_string_to_utf8 and
17645 changed a couple of free () by g_free ().
17647 * decimal.c: one-liner in the comments for decimal2string ().
17649 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17651 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17653 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17655 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17656 * object.c (mono_runtime_invoke_array) : handle null in params
17658 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17660 * string-icalls.c: fixed bug in split (one off bug)
17662 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17664 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17665 * icalls.c: added String::Equals as internal method
17667 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17669 * threads.c: fixed bug in the double interlocked functions
17671 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
17673 * threads.c: implemented all of the new interlocked icalls.
17674 * string-icalls.c: fix a bug in insert.
17675 * icalls.c: added the icalls for interlocked, removed old string functions.
17677 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17679 * loader.c: fix off-by-one error when reading argument names.
17681 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17683 * profiler.c: win32 counter implementation (untested).
17684 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17685 (the latter needs testing and more complete impl. from win32 folks).
17687 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
17689 * object.c: mono_array_new_full workaround mono_array_class_get
17692 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17694 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17695 * object.h (mono_string_chars): Changed casting type.
17697 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17699 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17700 method signatures to use gunichar2 instead of gint16.
17702 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
17704 * object.h, object.c: domain-specific versions of mono_object_new and
17707 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
17709 * object.c: changed String layout
17711 * string-icalls.c (mono_string_Internal_ctor_chara): added
17712 internal string constructors.
17714 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17716 * threads.c: pass 'this' to the thread start routine.
17718 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17720 * string-icalls.c: fix IndexOf and LastIndexOf. Now
17721 InternalCompareStr don't call twice mono_string_cmp_char for the last
17722 character. Improved performance in mono_string_cmp_char.
17724 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17726 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17727 code into its own library: libmonoruntime.
17729 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
17731 * object.h, object.c: changed array format so that szarrays do not
17732 require a bounds structure.
17733 * icall.c, appdomain.c: support for new szarray format.
17735 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17737 * metadata.c: compare also the retuns type when comparing signatures:
17738 we didn't do this as an optimization since really overloaded methods
17739 must differ also in the arguments, but this doesn't work with
17740 low-level IL code (or when using explicit conversion operators: see
17741 bug#23498 for an example).
17743 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17745 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17747 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17749 * icall.c: make MonoType::GetElementType its own icall.
17751 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17753 * icall.c: remove MonoMethod_get_Name().
17754 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17757 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17759 * string-icalls.c: optimized a few methods.
17761 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17763 * icall.c: added all new string internal calls
17764 * string-icalls.c: added, new string internal call implementation.
17765 * object.c: added mono_string_new_size for allocating a string a size
17767 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
17769 * object.c (mono_object_isinst): use the same code as in the
17770 optimized x86 version.
17772 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17774 * profiler.c: TSC-based timer code (faster and more accurate).
17775 Not hooked up in configure, yet (set USE_X86TSC to 1).
17777 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17779 * profiler.c, profiler.h: track time spent compiling methods.
17780 * threads.c: track thread creation/destruction.
17782 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17784 * profiler.c, profiler.h, profiler-private.h: profiling interface
17785 and sample implementation. Moved here so that it can be used also by
17788 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17790 * reflection.c, reflection.h: keep types and other handles separate in
17791 the hash tables for referred tokens. Add guid for modules.
17793 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17795 * assembly.c: fix bugs found with valgrind.
17796 * metadata.h, metadata.c: added mono_metadata_guid_heap().
17798 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
17800 * threads: added icall support for getting current domain for
17803 2002-04-13 Martin Baulig <martin@gnome.org>
17805 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17806 (MonoDebugVarInfo): Added `index' field for register based addresses.
17807 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17808 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17809 `MonoDebugVarInfo *params' and `guint32 this_offset' with
17810 `MonoDebugVarInfo *this_var'.
17812 * debug-symfile.c (relocate_variable): New static function to write
17813 a location description for a local variable or method parameter.
17815 2002-04-12 Martin Baulig <martin@gnome.org>
17817 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17818 stack offset and begin/end scope address of a local variable.
17819 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17820 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17821 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17823 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17824 Added new relocation types for start/end scope of a local variable.
17826 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17828 * object.h: add mono_object_domain() macro.
17829 * reflection.c: handle typespecs.
17830 * icall.c: MonoMethod::get_Name() implementation.
17832 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17834 * icall.c: String::GetHashCode() icall implementation.
17836 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17838 * icall.c: String::IndexOfAny icall.
17839 * object.c, object.h: make array->max_length more useful.
17840 Intrduced mono_object_class() and mono_string_length() macros.
17842 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17844 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17845 instead of g_unichar_isdigit.
17847 2002-04-11 Nick Drochak <ndrochak@gol.com>
17849 * icall.c: Implement a simple Double.ToString().
17851 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17853 * appdomain.h: only io-layer.h is supposed to be included.
17854 * icall.c: explicitly import environ. Fix warning.
17856 2002-04-10 Nick Drochak <ndrochak@gol.com>
17858 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17859 return true even if it's not Daylight Savings time.
17860 Only return false for the case where the function isn't
17861 implemented for a plaform (read Windows).
17863 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17865 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17868 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
17870 * mempool.c (mono_mempool_alloc): only use g_malloc when
17871 absolutely necessary.
17873 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17875 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17877 * class.c (mono_class_vtable): use domain mempool to allocate vtable
17878 (mono_class_proxy_vtable): use domain mempool
17880 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17882 * appdomain.h, appdomain.c: split initialization that requires the
17883 execution engine support into mono_runtime_init().
17885 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17887 * class.c (mono_class_init): don't include vtable inside MonoClass
17888 to save some memory, gather some statistics.
17889 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17891 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17893 * icall.c: internalcall implementation for ValueType.Equals().
17895 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
17897 * object.c (mono_message_init): moved
17898 (mono_runtime_exec_main): new arch. independent impl.
17899 (mono_runtime_invoke_array): new method - like
17900 mono_runtime_invoke, but you can pass an array of objects.
17901 (mono_remoting_invoke): new arch. independent impl.
17902 (mono_message_invoke): new arch. independent impl.
17903 (mono_runtime_class_init): new arch. independent impl.
17904 (mono_runtime_object_init): new arch. independent impl.
17906 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17908 * metadata.c, object.c, reflection.c: documented the exported
17911 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17913 * icall.c: simpler code to pass the assembly builder data to corlib.
17914 Implement GetNestedTypes() internalcall.
17916 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17918 * class.c: warn if a type can't be loaded.
17920 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
17922 * image.h: typedef MonoImageOpenStatus
17923 * types.h: removed unused file
17925 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
17927 * icall.c: Enum_ToObject accepts enum value arguments.
17929 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17931 * class.c: move initialization of properties, events and nested
17932 classes, so that they happen for interfaces, too.
17934 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17936 * icall.c: cleanup some ugly casts in Array_SetValue*.
17938 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17940 * icall.c: the values array fro enums is of the correct type, now.
17941 Implement (correctly) getFullName instead of assQualifiedName for
17943 * reflection.h, reflection.c: added mono_type_get_name ().
17945 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17947 * assembly.c, image.h: for each MonoImage, record from wich assembly
17949 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17950 Make Type.Assembly work.
17952 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
17954 * debug-symfile.h: use char* instead of gpointer to avoid
17957 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17959 * icall.c (ves_icall_InternalExecute): impl. FielSetter
17960 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17962 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
17964 * icall.c (mono_message_init): impl. (code cleanup)
17965 (ves_icall_InternalExecute): impl. FieldGetter
17967 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17968 defined we call all (non-static)methods through the vtable.
17970 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17972 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17973 finalizer even though the memory is still referenced (and the chunk of
17974 memory is not freed).
17976 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17978 * assembly.c: fix brokeness.
17980 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17982 * class.c: kill some warnings. Check explicit interface method
17983 implementation also without considering the namespace.
17984 Load also literal strings in static class data.
17986 2002-03-29 Miguel de Icaza <miguel@ximian.com>
17988 * assembly.c (default_assembly_name_resolver): Kill memory leak.
17989 (default_assembly_name_resolver): Make the resolver take the
17990 "base" directory where the assembly was originally defined, so we
17991 can load DLLs that are in the same directory as the assembly that
17992 is being referenced.
17994 2002-03-28 Dick Porter <dick@ximian.com>
18000 * unicode.c: Warning cleanups
18002 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
18004 * object.h, reflection.h: use the correct type instead of MonoObject.
18006 2002-03-28 Martin Baulig <martin@gnome.org>
18008 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
18009 (mono_debug_update_symbol_file): Initialize classes if necessary.
18011 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18013 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
18014 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
18016 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
18018 * assembly.h: fix function prototype.
18019 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
18020 * mono-endian.h: use const cast.
18022 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
18024 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
18026 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18028 * loader.c: don't assert when a typeref can't be loaded, give
18029 a chance to the runtime to trow an exception instead.
18030 * loader.h: fix warning.
18032 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
18034 * class.c (mono_class_proxy_vtable): added proxy support
18036 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
18038 * icall.c: removed last of PAL calls, added System.Environment
18039 * file-io.h, file-io.c: MonoIO implementation
18040 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
18042 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18044 * appdomain.c: do not use the byte marker in ldstr table lookup.
18045 * debug-helpers.c: allow two ':' to separate class and method name.
18046 * object.c: allocate arrays bounds with the GC, too.
18047 * verify: add a few more checks.
18049 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
18051 * reflection.c: output also literal strings. Allocate parameter data
18052 with GC_malloc() (thanks, Martin, for catching this!).
18054 2002-03-26 Martin Baulig <martin@gnome.org>
18056 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
18057 include the `this' offset in the `param_offsets'.
18059 2002-03-25 Martin Baulig <martin@gnome.org>
18061 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
18062 mono_debug_get_class() function to get the classes. Added new
18063 relocation types for arrays and strings.
18064 (mono_debug_get_class): New static function to search in all
18065 referenced assemblies for a metadata token.
18067 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
18069 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18071 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
18072 hold gc-allocated objects. Make the string heap a stream like the
18073 others. Removed duplicated code when writing stream info.
18074 Added asserts to catch possible buffer overflows. Set the sorted map
18075 for tables that need sorting. Added some documentation.
18077 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
18079 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
18080 for interned strings and vtables.
18082 2002-03-24 Martin Baulig <martin@gnome.org>
18084 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
18085 it in the array since it was created with g_slist_prepend().
18087 2002-03-24 Martin Baulig <martin@gnome.org>
18089 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
18090 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
18091 (mono_debug_method_from_token): Renamed to
18092 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
18093 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
18095 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
18098 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
18100 2002-03-24 Martin Baulig <martin@gnome.org>
18102 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
18103 (mono_debug_method_from_token): New func.
18105 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
18106 New interncall, calls mono_debug_local_type_from_signature().
18107 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
18108 calls mono_debug_method_from_token().
18110 2002-03-23 Martin Baulig <martin@gnome.org>
18112 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
18113 specifies the number of bytes to be converted, not the array size.
18114 Return the number of chars, not the number of bytes.
18115 (ves_icall_iconv_get_chars): The `byteCount' argument
18116 specifies the number of bytes to be converted, not the array size.
18118 2002-03-23 Martin Baulig <martin@gnome.org>
18120 * reflection.h (MonoReflectionSigHelper): New type.
18122 * reflection.c (mono_reflection_sighelper_get_signature_local),
18123 (mono_reflection_sighelper_get_signature_local): New functions.
18125 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
18126 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
18129 2002-03-23 Martin Baulig <martin@gnome.org>
18131 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
18132 is_writeable is set.
18133 (mono_raw_buffer_update): New function to write the modified map
18136 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18138 * debug-symfile.c (mono_debug_update_symbol_file): Call
18139 mono_raw_buffer_update() when done writing.
18141 2002-03-23 Martin Baulig <martin@gnome.org>
18143 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18145 * debug-symfile.c: Added support for arguments and local variables.
18147 2002-03-23 Dick Porter <dick@ximian.com>
18149 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18150 protected by ifdefs, hence breaking the w32 build.
18152 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18154 * object.c: implement is_interned() the right way.
18156 2002-03-21 Martin Baulig <martin@gnome.org>
18158 * debug-symfile.[ch]: New files to handle debugging information
18159 files. There's also support to dynamically update these symbol
18160 files to include machine dependent information.
18162 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
18164 * threads.c (mono_thread_create): new function to create thread
18167 2002-03-20 Martin Baulig <martin@gnome.org>
18169 * icall.c (ves_icall_InternalInvoke): Create a new object if the
18170 method is a constructor.
18171 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18172 points to ves_icall_InternalInvoke().
18174 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
18176 * file-io.c: Flush shouldn't throw exceptions.
18178 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
18180 * file-io.c: FileStream flush support; FileSetLength now
18181 restores file pointer.
18183 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18185 * class.c: set image for pointer classes.
18187 2002/03/19 Nick Drochak <ndrochak@gol.com>
18189 * sysmath.c: Forgot one.
18191 2002-03-18 Miguel de Icaza <miguel@ximian.com>
18193 * sysmath.c: Avoid redefining existing names.
18195 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
18197 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18198 handled by runtime as icall rather than dllimport from libm.so
18199 * file-io.c, file-io.h: fixed handle argument type.
18201 2002-03-18 Dick Porter <dick@ximian.com>
18203 * reflection.c (mono_image_get_type_info): rename interface to
18204 iface, because of "#define interface struct" on windows.
18206 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18208 * class.c, class.h: rename and export mono_ptr_class_get().
18209 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18210 * reflection.c, reflection.h, icall.c: better/saner type name
18211 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18214 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
18216 * class.c (mono_class_init): removed hardcoded GHC_SLOT
18218 * icall.c (ves_icall_InternalInvoke): impl.
18220 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18222 * reflection.c: output the interface map table, too.
18224 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18226 * class.c (class_compute_field_layout): separate computation of
18227 static field layout
18229 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
18231 * icall.c: added System.Buffer support.
18232 * file-io.c: moved file icalls from PAL to FileStream.
18234 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18236 * icall.c (ves_icall_System_Object_GetHashCode): impl.
18238 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
18240 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18242 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18244 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18246 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18248 * debug-helpers.{c,h}: moved here from monograph some useful functions
18249 to locate a method by name/signature in a class or image. Included
18250 also a small and flexible IL disassembler.
18252 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18254 * reflection.c: fixup tokens in methods with small header size, too.
18256 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
18258 * object.c (mono_string_to_utf8): remove assert(!error), instead
18261 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18263 * icall.c: update to the new mono_Array_class_get interface.
18265 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18267 * appdomain.c, object.c: Boehm-GC enable.
18268 * icall.c: make get_data_chunk() support split data requests.
18269 Ensure a class is initialized in more cases. Return only the first
18270 property found in GetProperties() or the compiler gets confused.
18271 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18272 * reflection.h, reflection.c: add fixup mechanism for field and method
18273 tokens. Initialize assembly->typeref in a single place. Output
18274 properties after events. Support custom attributes for events, too.
18275 Typo fix for paramter custom attrs.
18277 2002-03-07 Martin Baulig <martin@gnome.org>
18279 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18281 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
18283 * class.c (mono_array_class_get): fix. for multi. dim. arrays
18285 2002-03-06 Martin Baulig <martin@gnome.org>
18287 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18288 non-zero lower bounds. See testcases #F10-#F13.
18290 2002-03-05 Martin Baulig <martin@gnome.org>
18292 * exception.c (mono_get_exception_argument_out_of_range): New exception.
18294 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18295 ves_icall_System_Array_GetValue(), only calculate the absolute array position
18297 (ves_icall_System_Array_SetValue): Likewise.
18298 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18299 as argument and does the actual work. This function is used when copying a
18300 multi-dimensional array.
18301 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18302 now do all the widening conversions of value types.
18303 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18305 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18307 * class.c: remove some magic numbers and use the smbolic names,
18308 instead. Added init_events() to load event info at class init time.
18309 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18310 and mono_metadata_methods_from_event().
18311 * reflection.h, reflection.c: added support for writing out the evnets
18312 related information.
18314 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18316 * reflection.h, icall.c: use a different method (GetInterfaces)
18317 to gather interface info and add isbyref, isprimitive and
18318 ispointer to the ves_icall_get_type_info() return value.
18320 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18322 * class.h: stared adding support for events.
18323 * icall.c: split find_members implementation. Added debug icall to get
18324 the address of an object.
18325 * reflection.c: handle TypeBuilders in mono_type_get_object().
18327 2002-03-01 Martin Baulig <martin@gnome.org>
18329 * icall.c (ves_icall_System_Array_GetLength): This must throw an
18330 ArgumentOutOfRangeException(), not an ArgumentException().
18331 (ves_icall_System_Array_GetLowerBound): Likewise.
18332 (ves_icall_System_Array_GetValue): Improved argument checking.
18333 (ves_icall_System_Array_SetValue): Improved argument checking.
18335 2002-03-01 Martin Baulig <martin@gnome.org>
18337 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18338 called with invalid arguments rather than just dying with g_assert().
18339 (ves_icall_System_Array_SetValue): Likewise.
18340 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18341 raise a NotImplementedException instead.
18342 (ves_icall_System_Array_GetLength): Added argument checking.
18343 (ves_icall_System_Array_GetLowerBound): Added argument checking.
18345 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
18347 * object.h (mono_assert): new macros mono_assert and
18348 mono_assert_not_reached
18350 2002-02-28 Martin Baulig <martin@gnome.org>
18352 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18353 and "System::String::IsInterned" to "System::String::_IsInterned".
18355 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18357 * icall.c: remove hacks for typebuilder. Added icall to create a
18358 modified type from a tybebuilder.
18359 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18360 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18361 to create a backing MonoClass for a TypeBuilder.
18363 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18365 * class.c, class.h: more refactoring of class init.
18366 Export mono_class_setup_mono_type() and mono_class_setup_parent().
18368 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18370 * marshal.c, marshal.h: start of marshaling interface.
18372 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18374 * icall.c: fix order in assembly qualified name icall.
18376 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18378 * class.c: do not free str, since we store it in the hash table.
18379 * reflection.h: add label field to MonoILExceptionInfo.
18380 * reflection.c: handle references to more than one assembly. Handle
18381 case when there isn't a module created in the assembly.
18383 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18385 * class.c: Fix typo. Start refactoring of class init code.
18387 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18389 * appdomain.c: exit with 1 on error.
18390 * class.c: we already have the name in MonoClassField.
18391 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18392 MonoStreamHeader instead of an offset of image->raw_metadata.
18394 2002-02-26 Miguel de Icaza <miguel@ximian.com>
18396 * appdomain.c (mono_init): Be even more descriptive about the error.
18398 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18400 * appdomain.c: give the user an informative message when corlib can't
18403 2002-02-26 Martin Baulig <martin@gnome.org>
18405 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18406 New icall to get the time zone data.
18408 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18410 * reflection.c: set virtual and raw size of section correctly.
18411 * threads.c: transfer domain information to newly created threads.
18413 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18415 * class.c: when instancing a class in a domain, load the default
18416 vaules for static fields from the constant table. Fix System.Enum to
18418 * icall.c: implement Object::GetType() internalcall. Implemented
18419 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18420 Fixed checking of binding flags in find_members().
18421 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18422 * reflection.c: handle enumerations when writing to the constant
18423 table. Use a different object cache for types.
18426 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
18428 * object.c (mono_object_isinst): fix for arrays
18430 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18432 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18434 * object.c: don't use mprotect () and fix intern pool hash table
18435 lookup for big endian systems.
18437 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18439 * icall.c: change type_is_subtype_of () signature.
18441 2002-02-21 Mark Crichton <crichton@gimp.org>
18443 * rand.c, rand.h: Added random number generator for
18444 System.Security.Cryptography classes.
18446 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18448 * icall.c: Added System.Security.Cryptography calls.
18450 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18452 * class.c, icall.c, metadata.c: better support for pointer types.
18453 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18454 * reflection.c: Add support for getting custom attrs for properties
18455 and simplify some code.
18457 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18459 * icall.c: change getToken () and add custom attribute GetBlob()helper
18461 * reflection.h: add custom attrs array to the reflection builder structures.
18462 * reflection.c: encode and emit custom attributes for all the relevant
18463 reflection objects. Cache fieldref and methodref tokens. Change
18464 mono_image_create_token() interface to take a MonoDynamicAssembly.
18465 More complete custom attributes decoder. Load custom attributes for
18466 Assembly, Field, Method and Constructor objects, too. Make the
18467 returned array an Attribute[] one, not object[]. Added
18468 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18469 custom attribute constructor.
18471 2002-02-20 Dick Porter <dick@ximian.com>
18475 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18476 problem code out for now).
18478 2002-02-19 Radek Doulik <rodo@ximian.com>
18480 * object.c (mono_ldstr): use hash table to avoid multiple swapping
18482 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18484 * icall.c: register the GetCustomAttributes method.
18485 * object.c, object.h: add mono_string_new_len ().
18486 * reflection.h, reflection.c: added mono_runtime_invoke(),
18487 mono_install_runtime_invoke(). Added
18488 mono_reflection_get_custom_attrs () to load custom attributes and
18489 create the attribute objects.
18491 2002-02-19 Dick Porter <dick@ximian.com>
18492 * threads-dummy-types.c:
18493 * threads-dummy-types.h:
18496 * threads-pthread-types.c:
18497 * threads-pthread-types.h:
18498 * threads-pthread.c:
18499 * threads-pthread.h: Deleted obsolete files
18501 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
18503 * class.c (mono_class_vtable): runtime init the class when we
18504 allocate static class data.
18506 * icall.c (ves_icall_System_Array_SetValue): check for null values.
18508 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18509 and String - but we will need generic marshalling support in the
18511 (mono_init): set the domain name in a ms compatible way
18513 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18516 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
18518 * object.c (mono_array_clone): use alloca() instead of g_malloc
18521 * appdomain.c (mono_domain_unload): impl.
18523 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18525 * appdomain.c, object.c: fix intern pool implementation.
18526 * class.c: fix alignment code.
18528 2002-02-16 Radek Doulik <rodo@ximian.com>
18530 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18531 and s2 > s1, just copy lower bytes to be compatible with little
18532 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18533 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18535 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18536 force big_endian to be 1 for big endian machines
18537 (ves_icall_iconv_new_decoder): ditto
18539 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
18541 * socket-io.c (convert_sockopt_level_and_name): If the system
18542 doesn't define SOL_IP or SOL_TCP, get them by hand using
18543 getprotobyname() and caching the values (because this could be a
18545 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18546 Use the appropriate struct when the system does support it. Ie,
18547 not all systems have struct ip_mreqn so use struct ip_mreq when
18550 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18552 * reflection.c: handle finally clauses.
18554 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18556 * socket-io.c: use g_snprintf() instead of snprintf.
18558 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18560 * reflection.c (mono_param_get_objects): Cast second argument to
18561 mono_method_get_param_names to a const char** to silence the
18564 * appdomain.c (mono_domain_assembly_open): Put parens around the
18565 truth statement in the for-loop.
18567 * unicode.c (iconv_convert): Got rid of a compiler warning about
18568 int i being unused when the system has a new iconv.
18569 (iconv_get_length): Same.
18571 * image.c (load_class_names): Cast the second argument to
18572 g_hash_table_insert() to char* to hush compiler warnings about the
18574 (mono_image_open): Same here.
18576 * socket-io.c: Don't conditionally include sys/filio.h or
18577 sys/sockio.h here anymore since we now get them from
18578 io-layer/io-layer.h
18579 (inet_pton): If the system doesn't support inet_aton, implement
18580 using inet_addr and also #define INADDR_NONE if it isn't defined
18583 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18585 * metadata.c, metadata.h: added function to get packing and size info
18587 * reflection.h, reflection.c: handle field RVA data. Save info about
18588 the table layout if needed. Assign typedef indexes to all the types
18589 before dumping the info about them to avoid forward reference problems.
18591 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
18593 * socket-io.c (convert_sockopt_level_and_name): ifdef
18594 SO_ACCEPTCONN because it is not defined on my system (old debian)
18596 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18598 * opcode.c: use stddef.h to get NULL.
18600 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18602 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18603 for FIONBIO, FIONREAD and SIOCATMARK.
18604 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18605 define INADDR_NONE and besides, inet_addr() is deprecated and
18606 should not be used. Use inet_pton() instead - it also has the
18607 added bonus that it can easily handle IPv6 addresses as well.
18608 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18610 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18612 * decimal.c: remove _MSC_VER conditional.
18614 2002-02-13 Dick Porter <dick@ximian.com>
18617 * icall.c: Internal calls for Blocking, Select, Shutdown,
18618 GetSocketOption and SetSocketOption
18620 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18622 * assembly.cs: better resolver: use it instead of some kludgy
18625 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18627 * reflection.c: the best way to speed-up the compiler is to avoid
18630 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
18632 * class.c (mono_class_vtable): changed the object layout
18633 (obj->vtable->class).
18634 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18636 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18638 * assembly.c: look for assemblies in the assembly dir, too.
18640 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18642 * class.c: fix thinko in mono_class_from_type().
18644 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18646 * exception.h, exception.c: added TypeLoadException.
18647 * object.h, object.c: added mono_array_clone ().
18648 * icall.c: handle throwOnError in AssemblyGetType().
18649 Added Array.Clone().
18650 * opcode.h, opcode.c: use a single value for the opcode val.
18651 Compile fix for non-gcc compilers.
18653 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18655 * opcodes.c, opcodes.h: export interesting info about opcodes.
18657 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
18659 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18662 * class.c (class_compute_field_layout): set element_class for enums
18663 (mono_class_create_from_typedef): set element_class for normal classes
18665 * icall.c (ves_icall_System_Enum_get_value): impl.
18667 * class.c (mono_class_create_from_typedef): do not set valuetype
18668 flag for System.ValueType and System.Enum
18670 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
18672 * unicode.c (iconv_convert): fix big endian problem.
18674 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18676 * class.c: add asserts if we are ever going to scribble over memory.
18677 * socket-io.c: not all systems have AF_IRDA defined.
18679 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
18681 * class.c (class_compute_field_layout): do not consider static
18682 fields to compute alignment
18684 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
18686 * appdomain.c (mono_appdomain_get): impl.
18687 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18689 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18691 * icall.c: ignore "file://" prefix when loading an assembly.
18693 2002-01-23 Dick Porter <dick@ximian.com>
18697 * Makefile.am: Added socket support
18699 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18701 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18702 code back. This should return the assemblies that are loaded by
18703 the runtime on behalf of an application domain.
18705 The current implementation is still broken, it just returns every
18706 assembly loaded, but until we get real applications domain this
18709 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
18711 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18714 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18716 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18717 the mono_class_from_name lookup.
18718 (ves_icall_get_parameter_info): ditto.
18719 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18721 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18723 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18725 * class.c: load also nested classes on class init.
18726 System.ValueType instance methods gets passed boxed
18727 values, unless methods in derived classed that get a pointer to the
18729 * icall.c: use better name parsing code in GetType().
18730 * image.c, image.h: add mono_image_loaded ().
18731 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18732 * reflection.c, reflection.h: added mono_reflection_parse_type().
18734 2002-01-22 Veronica De Santis <veron78@interfree.it>
18736 * icall.c : Added mapping of internal calls for Manual and Auto reset events
18737 * threads.c : Added the implementation of internal calls for events
18738 * threads.h : Added prototypes of internal calls for events
18740 2002-01-21 Radek Doulik <rodo@ximian.com>
18742 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18744 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
18746 * class.c (mono_class_init): set min_align to 1 (instead of 0)
18747 (mono_class_value_size): use min_align
18749 2002-01-20 Dick Porter <dick@ximian.com>
18752 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18753 so it compiles on w32.
18755 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
18757 * metadata.c (mono_type_stack_size): impl.
18759 * class.c (mono_class_get_field): impl. memberref token
18761 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18763 * icall.h : Added the internal calls mapping for CreateMutex_internal
18764 and ReleaseMutex_internal.
18765 * threads.h : Added the prototype of mutexes internal calls.
18766 * threads.c : Added the implementations of mutexes internal calls.
18768 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18770 * metaparse.h: removed unused file.
18771 * reflection.c, reflection.h: added stream_data_align () function
18772 to align data in streams and keep stream aligned. Add support for
18773 exception support in method headers.
18775 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18777 * unicode.c: make iconv_convert () return the number of bytess written
18778 in the output buffer.
18780 2002-01-15 Dick Porter <dick@ximian.com>
18781 * threads.c: Make the runtime's idea of infinite timeouts coincide
18782 with the class library's
18784 Fix a particularly egregious bug in mono_thread_cleanup(). That
18785 code was so utterly bogus it must have been written on a Monday.
18787 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18789 * reflection.h: add subtypes field to TypeBuilder.
18790 * reflection.c: encode constants for literal fields.
18791 Handle subtypes. Fix user string token (and add a zero byte)
18794 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
18796 * class.c (mono_class_init): bug fix: assign slot numbers for
18799 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18801 * reflection.c: don't try to output a code RVA for abstract methods.
18802 Small fixes for method header format. Output parameter info to the
18803 ParamDef table. Save method overriding info to MethodImpl table.
18804 Fix property support. Allow typedef.extends to be a type in the
18806 * verify.c: fix off-by-one error.
18808 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18810 * class.c: fix mono_class_from_mono_type () for szarray types.
18811 Remove unused cache check in mono_class_from_type_spec().
18812 * icall.c: *type_from_name () functions handle simple arrays and byref.
18813 * reflection.c: handle byref and szarray types. Handle methods without
18814 body (gets P/Invoke compilation working). Handle types and fields in
18816 * reflection.h: add rank to MonoTypeInfo.
18818 2002-01-10 Dick Porter <dick@ximian.com>
18820 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18823 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18825 * icall.c: initialize class in type_from_handle ().
18826 Loop also in parent classes for get_method ().
18827 * reflection.c: properly encode class and valuetype types.
18828 Start on encoding TypeBuilder types. Handle fieldrefs.
18829 Use correct length when registering a user string.
18830 Handle ConstructorBuilder and MonoMethod in get_token ().
18831 Make mono_type_get_object () aware of cached types.
18832 * object.c: back out change to mono_string_new ().
18834 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18835 * object.c: mono_string_new should return a NULL when the string
18836 passed in is NULL -- not try to deference it.
18838 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18840 * icall.c: hack to make IsSubType work for TypeBuilders.
18841 * reflection.c: emit constructors before methods.
18842 Retrieve param names in mono_param_get_objects().
18844 2002/01/05 Nick Drochak <ndrochak@gol.com>
18846 * Makefile.am: fix list of headers and sources so automake 1.5
18847 doesn't complain. Removed \# at end of list.
18849 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18851 * reflection.c: get token for a method ref. Set return type of
18852 constructor to void.
18853 * loader.c: debug message.
18854 * class.c: typo fix.
18856 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18858 * icall.c: fix array init with rank > 1. FindMembers
18859 loops in parent class as well.
18860 * image.c: do not insert nested types in name cache.
18861 * reflection.c: warning fix.
18862 * reflection.h: add override method (for interface impl).
18864 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18866 * metadata.c: fix customattr decoding.
18868 2001-12-21 Miguel de Icaza <miguel@ximian.com>
18870 * rawbuffer.cs: Added native Win32 implementation, avoids using
18871 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18873 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18875 * class.c: make the low-level routines handle the cache.
18877 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18879 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18881 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18883 * class.c: fix mono_array_element_size() for objects.
18884 * class.h, class.c: add properties to MonoClass and load them
18886 * icall.c: check with isinst() when assigning a value to an array
18887 instead of requiring the classes to match exactly.
18888 Implemented icall for System.Type::GetType().
18889 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18890 enums. Handle bindingflags when looking for methods and fields.
18891 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18892 and mono_metadata_methods_from_property().
18893 * reflection.h, reflection.c: added structures for propreties,
18894 parameters and enums. Implemented mono_property_get_object() and
18895 mono_param_get_objects().
18897 2001-12-18 Dick Porter <dick@ximian.com>
18899 * file-io.c: Use mono_string_to_utf16() instead of
18900 mono_string_chars()
18902 * object.c: Added mono_string_to_utf16(), which copies the non
18903 NULL-terminated MonoString into a new double-null-terminated
18906 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
18908 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18910 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
18912 * file-io.c: raise exceptions if handle is invalid.
18914 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18916 * assembly.c: yet another check for mscorlib.
18917 * class.c, class.h: load nesting info for classes.
18918 * icall.c: many new functions to support the Reflection classes.
18919 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18920 * reflection.h, reflection.c: mono_image_create_token(),
18921 mono_assembly_get_object(), mono_type_get_object(),
18922 mono_method_get_object(), mono_field_get_object(): methods to return
18923 objects that parallel the C representation of assemblies, types,
18926 2001-12-11 Dick Porter <dick@ximian.com>
18929 * file-io.c: Internal calls for file IO.
18931 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18933 * tabledefs.h: missing FileAttributes.
18934 * verify.h, verify.c: use is_valid_string () to simplify and check for
18935 valid strings more correctly. Fix warnings and speeling.
18936 Check more tables: Filed, File, ModuleRef, StandAloneSig.
18937 Check code: branches, maxstack, method calls.
18939 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
18941 * object.c (mono_object_allocate): removed static, so that the jit
18942 can allocate value types.
18944 * icall.c (ves_icall_System_DateTime_GetNow): impl.
18946 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18948 * class.c: init enum types right away and register the
18949 token->MonoClass map in mono_class_create_from_typedef ().
18950 * verify.h, verify.c: first cut of the verifier.
18951 * pedump.c: add --verify switch to verify metadata tables.
18952 * tabledefs.h: add some missing enums.
18954 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
18956 * class.c (mono_install_runtime_class_init): impl.
18957 (mono_class_init): renamed mono_class_metadata_init to
18958 mono_class_init, also removed the metadata_inited flag
18960 * object.c (mono_object_isinst): use faster algorithm
18962 2001-11-30 Radek Doulik <rodo@ximian.com>
18964 * mono-endian.h: reverted last change
18965 added function prototypes
18967 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18968 add mono-endian.c back
18970 * mono-endian.c: returned back, as Paolo pointed out, it's needed
18971 for unaligned access, I've mistaked it with endianess. I am
18973 (mono_read16): fix reverted endianess
18974 (mono_read64): ditto
18975 (mono_read32): ditto
18977 2001-11-30 Dick Porter <dick@ximian.com>
18979 * exception.c: Implement mono_exception_from_name()
18981 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18983 * metadata.h, metadata.c: remove params_size and locals_size and their
18984 calculation from the metadata code: they are only usefult to the
18987 2001-11-29 Radek Doulik <rodo@ximian.com>
18989 * object.c (mono_ldstr): swap bytes here, it's probably not the
18990 best place, but works for me now, I'll redo it once I know mono
18991 better, also note that I add PROT_WRITE and don't reset back, also
18992 note that it's only affects big endians, so x86 should be OK
18994 * mono-endian.h (read16): use just glib macros for both endians
18996 * mono-endian.c: removed as glib macros are used in in
18997 mono-endian.h so we don't need to care about endianess for read
18998 macros as glib does that for us already
19000 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
19002 * class.h, class.h: take minimum alignment into consideration so
19003 that the fields of a class remain aligned also when in an array.
19005 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19007 * loader.h, loader.c: add mono_method_get_param_names().
19008 * class.c: 0-init class fields.
19010 2001-11-26 Dick Porter <dick@ximian.com>
19014 * threads.c: New file that handles System.Threading on all platforms
19017 * object.h: Remove the synchronisation struct from MonoObject,
19018 replace it with a pointer that gets initialised on demand
19020 * Makefile.am: Replace all the system-specific threading code with
19021 a single file that uses the new wrapper library
19023 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
19025 * class.c, class.h: add mono_install_trampoline() so that the runtime
19026 can register a function to create a trampoline: removes the ugly
19027 requirement that a runtime needed to export arch_create_jit_trampoline.
19028 * object.h, object.c: added mono_install_handler() so that the runtime
19029 can install an handler for exceptions generated in C code (with
19030 mono_raise_exception()). Added C struct for System.Delegate.
19031 * pedump.c: removed arch_create_jit_trampoline.
19032 * reflection.c: some cleanups to allow registering user strings and
19033 later getting a token for methodrefs and fieldrefs before the assembly
19035 * row-indexes.h: updates and fixes from the new ECMA specs.
19037 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
19039 * class.h, class.c: add enum_basetype field to MonoClass.
19040 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
19041 to get index in the constant table reated to a field, param or
19043 * reflection.h, reflection.c: handle constructors. Set public-key and
19044 version number of the built assembly to 0.
19045 * row-indexes.h: update from new ECMA spec.
19047 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19049 * class.h, class.c: add a max_interface_id to MonoClass.
19050 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
19051 since it's used to do that. Added mono_type_type_from_obj().
19052 Make GetType() return NULL instead of segfaulting if the type was not
19053 found. Handle simple arrays in assQualifiedName.
19054 * object.h: add a struct to represent an Exception.
19055 * reflection.c: output call convention in method signature.
19056 Add code to support P/Invoke methods and fixed offsets for fields.
19058 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
19060 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
19062 * icall.c: use mono_array_addr instead of array->vector: fixes the
19063 reflection image writing.
19064 * reflection.c: init call convention byte to 0 in method signature.
19065 Encode the property signature. Don't output property-related methods
19066 twice. Really process the properties for a type (don't cast a field to
19067 a property, my mom always told me that).
19068 Fix 64 bit issues in pointer alignment in a different and more
19071 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
19073 * loader.h: Removed type class from MonoDefaults, added monotype
19075 * loader.c: Loaded MonoType, removed loading of Type
19077 * icall.c (my_mono_new_object): Now returns a System.MonoType,
19078 and fills in System.Type._impl with a RuntimeTypeHandle rather
19079 than the actual MonoClass *
19081 (ves_icall_type_from_handle): change from type_class to
19084 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
19087 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
19090 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
19092 (ves_icall_System_Reflection_Assembly_GetType): implemented
19094 (ves_icall_System_MonoType_assQualifiedName): implemented
19096 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
19098 2001-11-09 Miguel de Icaza <miguel@ximian.com>
19100 * assembly.c (mono_assembly_open): Implement a cache for the
19103 (mono_assembly_close): only destroy the assembly when the last
19106 2001-11-09 Dick Porter <dick@ximian.com>
19108 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
19110 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
19112 * class.c (mono_class_metadata_init): bug fix: compute the right slot
19114 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19116 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
19117 from Martin Weindel.
19118 * object.h: add mono_string_chars ().
19120 2001-11-07 Miguel de Icaza <miguel@ximian.com>
19122 * reflection.c (build_compressed_metadata): Eliminates warnings
19123 and uses 64-bit clean code.
19125 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
19126 (mono_type_equal): Change signature to eliminate warnings.
19128 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19130 * icall.c, loader.c: remove the internalcall array constructors.
19131 Changes to match the new MonoArray structure.
19132 * object.h, object.c: an array object doesn't allocate an extra
19133 vector. Add mono_array_new_full () to create jagged arrays easily.
19135 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19137 * metadata.h, metadata.c: add mono_metadata_field_info () to
19138 retreive all the info about a field from vairous tables.
19139 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19140 * class.h, class.c: augment MonoClassField with more info.
19141 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19142 policy and load a field's RVA if needed.
19144 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
19146 * class.c (mono_class_metadata_init): create a trampoline for all
19147 virtual functions instead of actually compiling them.
19149 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19151 * class.h, class.c: include name in MonoClassField.
19152 * class.c: fix fundamental type of System.Object and System.String.
19153 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19155 * icall.c: remove internalcalls for the Reflection stuff that is now
19157 * loader.c: mono_field_from_memberref () implementation.
19158 * mono-endian.c: thinko (s/struct/union/g).
19159 * object.c, object.h: make the mono_string_* prototypes actually use
19160 MonoString instead of MonoObject.
19161 * reflection.c, reflection.h: updates for changes in the reflection
19162 code in corlib: we use C structures that map to the actual C# classes.
19163 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19164 fat method header if needed and use the info from the ILGenerator for
19165 methods. Handle fields in types. Misc fixes.
19167 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
19169 * class.c (mono_class_metadata_init): bug fix: always allocate
19170 space for static class data
19172 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
19174 * class.c (mono_compute_relative_numbering): use relative
19175 numbering to support fast runtime type checks.
19177 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
19179 * class.c (mono_class_create_from_typeref): added debugging output
19180 to print class name when MonoDummy is returned instead of real class
19182 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
19184 * class.c (mono_class_metadata_init): interface offset table now
19185 contains pointers into the vtable - this is more efficient for the jit
19187 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
19189 * class.c (mono_class_metadata_init): use a temporary vtable (the
19190 old algorithm only worked for the interpreter, but not for the jit)
19192 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
19194 * loader.c (method_from_memberref): use mono_class_get to get the
19195 class of an array instead of using System.Array directly.
19196 (mono_get_method): also add MEMBERREF methods to the method cache
19197 which usefull for arrays.
19199 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
19201 * pedump.c (arch_compile_method): added to compute vtable entry
19203 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19204 number of interfaces.
19206 * class.h: merged MonoArrayClass into MonoClass
19208 * class.c (mono_class_create_from_typedef): compute the vtable size and
19209 allocate space to include the vtable inside MonoClass
19210 (mono_class_metadata_init): initialize the vtable
19212 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19214 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19215 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19216 * image.c: endian fixes by Laurent Rioux.
19217 * object.h, object.c: rename MonoStringObject to MonoString and
19218 MonoArrayObject to MonoArray. Change some function names to conform to
19219 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19220 guint16* as first argument, so don't use char*.
19221 Provide macros to do the interesting things on arrays in a portable way.
19222 * threads-pthread.c: updates for the API changes and #include <sched.h>
19223 (required for sched_yield()).
19224 * icall.c: updates for the API changes above.
19225 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19226 platforms that need them.
19228 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19230 * class.c: set the correct type for all the fundamental
19231 type when loading the class.
19233 2001-10-05 Dick Porter <dick@ximian.com>
19235 * threads-pthread.c (pthread_mutex_timedlock): Simple
19236 compatibility version for C libraries that lack this call.
19238 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19240 * class.c: MonoTypes stored in MonoClass are stored as
19241 fundamental MonoTypes when the class represents a
19242 fundamental type (System.Int32, ...).
19243 The TypeHandle return by ldtoken is a MonoType*.
19244 * icall.c: ves_icall_get_data_chunk () write out all the
19245 PE/COFF stuff. Implement ves_icall_define_method (),
19246 ves_icall_set_method_body (), ves_icall_type_from_handle ().
19247 * image.c: properly skip unknown streams.
19248 * loader.h, loader.c: add type_class to mono_defaults.
19249 * metadata.c, metadata.h: export compute_size () as
19250 mono_metadata_compute_size () with a better interface.
19251 Typo and C&P fixes.
19252 * pedump.c: don't try to print the entry point RVA if there is no entry point.
19253 * reflection.c, reflection.h: many cleanups, fixes, output method
19254 signatures and headers, typedef and typeref info, compress the metadata
19255 tables, output all the heap streams, cli header etc.
19256 * row-indexes.h: typo fixes.
19258 2001-10-04 Dick Porter <dick@ximian.com>
19260 * object.h: Add a synchronisation mutex struct to MonoObject
19262 * object.c (mono_new_object): Initialise the object
19263 synchronisation mutexes
19265 * icall.c: System.Threading.Monitor internal calls
19267 * threads-pthread.h:
19268 * threads-pthread.c: System.Threading.Monitor internal calls
19270 * threads-types.h: New file, includes the system-specific thread
19273 * threads-pthread-types.h:
19274 * threads-pthread-types.c: New files, handle pthread-specific
19275 synchronisation types
19277 * threads-dummy-types.h:
19278 * threads-dummy-types.c: New files of dummy support for
19279 thread-specific types
19283 * pedump.c: include mono-endian.h not endian.h
19285 * Makefile.am: More threads files.
19286 Name mono-endian.h not endian.h
19288 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19290 * Makefile.am, reflection.h, reflection.c: move here the reflection related
19291 stuff and implement a few more bits.
19292 * icall.c: a field needs to be dereferenced twice. Do not use the same
19293 name for two variables in the same scope.
19294 * image.c, image.h: cleanups.
19296 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
19298 * class.c (mono_class_metadata_init): bug fix: compute the right size
19300 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19302 * icall.c: implemented some of the Reflection internalcalls.
19303 * image.c, image.h: start writing out the PE/COFF image.
19304 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19305 that does the reverse than decode_blob_size ().
19306 * object.c: use mono_metadata_encode_value (). Move here
19307 temporary implementation of mono_string_to_utf8 ().
19308 * rawbuffer.c: make malloc_map static.
19310 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19312 * metadata.c: fix type comparison for arrays.
19313 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19314 Added a couple of new classes to monodefaults.
19315 * icall.c: added a couple of Reflection-related internalcalls.
19316 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19317 Added a byval_arg MonoType to MonoClass.
19319 2001-09-28 Dick Porter <dick@ximian.com>
19322 * threads-pthread.h:
19323 * threads-pthread.c: Implemented internal calls for
19324 LocalDataStoreSlot operations. Applied mutexes around all shared
19325 data. Reworked the thread creation and Start() operations to
19326 avoid a race condition.
19329 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19331 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19333 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19335 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19337 * class.c, loader.c: warn and return NULL instead of erroring out.
19338 * icall.c: added System.AppDomain::getCurDomain().
19339 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19341 2001-09-25 Dick Porter <dick@ximian.com>
19343 * threads-pthread.h:
19344 * threads-pthread.c: Implemented timed thread joining and added
19345 System.Threading.Thread::Join_internal internal call
19347 * icall.c: Added System.Threading.Thread::Join_internal internal call
19350 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19352 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19354 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19355 mono_string_intern () to implement the semantics of the ldstr opcode
19356 and the interning of System.Strings.
19357 * icall.c: provide hooks to make String::IsIntern and String::Intern
19360 2001-09-23 Dick Porter <dick@ximian.com>
19363 * threads-dummy.h: New files of dummy threading routines
19365 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19366 support code based on system specifics
19368 Rename PTHREAD_LIBS to THREAD_LIBS
19370 2001-09-23 Dick Porter <dick@ximian.com>
19372 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19373 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19375 (mono_thread_init): Set up a Thread object instance to return when
19376 the main thread calls Thread.CurrentThread
19377 (mono_thread_cleanup): Wait for all subthreads to exit
19379 * icall.c: New internal calls for System.Threading.Thread::Sleep
19380 (including Schedule) and CurrentThread
19382 * threads.h: New file, to insulate thread-specific stuff from the
19385 2001-09-21 Dick Porter <dick@ximian.com>
19387 * threads-pthread.h:
19388 * threads-pthread.c: New file, for handling pthreads-style
19389 threading support. Start() now starts a new thread and executes
19390 the ThreadStart delegate instance.
19392 * icall.c: Added the internalcall for
19393 System.Threading.Thread::Start_internal
19395 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19397 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19399 * loader.c: work around the different signatures for delegates
19400 constructors csc generates in compiled code vs the ones compiled in mscorlib.
19402 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19404 * class.h, class.c: add mono_class_get_field_from_name ().
19405 * *: Fix C comments and other ANSI C issues.
19407 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19409 * endian.h, assembly.c: fix some endianness issues.
19411 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19413 * loader.h, load.c: add delegate_class to mono_defaults.
19414 Handle runtime provided methods in mono_get_method ().
19416 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
19418 * loader.c (mono_get_method): use pinvoke for internal call
19420 * icall.c: use pinvoke for internal call
19422 * loader.c (method_from_memberref): set the method name
19424 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19426 * metadata.c: help the compiler generate better code for
19427 mono_class_from_mono_type ().
19429 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
19431 * class.c (mono_class_metadata_init): delayed computing of the
19432 class size to mono_class_metadata_init ()
19434 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19436 * class.c, class.h: add an interfaces member to MonoClass.
19437 * image.c, image.h: add assembly_name field to MonoImage
19438 from the assembly table.
19439 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19441 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19443 * class.c: Handle Array in mono_class_from_mono_type ().
19444 * metadata.c, pedump.c: some endian fixes.
19446 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19448 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19449 * metadata.c: fix small problem introduced with the latest commit.
19451 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19453 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19454 We don't need a MonoMetadata pointer anymore to compare signatures in
19455 mono_metadata_signature_equal (), update callers.
19456 Reduced memory usage an number of allocations for MonoMethodHeader and
19457 MonoMethodSignature.
19459 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19461 * metadata.c: added compare for szarray.
19463 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19465 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19466 and add a couple more types to it and mono_defaults. Give an hint on
19467 classes that need implementing in our corlib and are referenced
19470 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19472 * class.h, class.c: keep track if a class is also an Enum.
19473 * loader.c: Implement a couple more types for use in libffi
19474 marshalling. Gives better diagnostics when failing to dlopen
19475 a library. Set method->klass for P/Invoke methods, too.
19477 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19479 * class.c, class.h: add a MonoType this_arg to MonoClass that
19480 represents a pointer to an object of the class' type that
19481 can be used by the interpreter and later the type cache.
19482 Add best guess alignment info for valuetype objects.
19484 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19486 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19487 into MonoType: one less level of indirection and allocation and
19488 simplifies quite a bit of code. Added cache for MonoTypes that are
19489 used frequently, so that we don't need to allocate them all the time.
19491 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
19493 * class.c (mono_class_create_from_typedef): System.Enum is also a
19494 value type, although it does not derive from System.ValueType
19495 (maybe a bug in the ms compiler?)
19497 * metadata.c (mono_type_size): return the right size for value types
19499 * loader.c (mono_get_method): only initialize method header if not abstract
19501 * class.c (mono_class_from_mono_type): use mono_default values.
19503 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
19505 * *: use MonoClass pointers instead of <type_tokens>
19507 * class.h: new flag: metadata_inited.
19509 * class.c (mono_class_metadata_init): impl.
19510 (mono_class_instance_size): impl.
19511 (mono_class_data_size): impl.
19513 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19515 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19516 MonoClass now has the name and name_space fields.
19517 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19518 mono_get_method () takes and optional MonoClass as argument.
19519 Removed mono_typedef_from_name() and added mono_class_token_from_name()
19520 instead that takes advantage of a map from class names to typedef
19521 tokens in MonoImage.
19523 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19525 * metadata.c: zero is not a valid alignment boundary.
19526 Merge MONO_TYPE_VOID in default decoding code.
19528 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
19530 * image.h: merged MonoMetadata into MonoImage
19532 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19533 identify the type of elements.
19535 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19537 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19538 * cil-coff.h: split MonoMSDOSHeader and add size info.
19539 * image.c: add some consistency checks.
19540 * metadata.c: fix row size computation: one programmer
19541 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19542 add explanation for the locator routine.
19543 Fix decoding of size in method header.
19545 2001-08-20 Miguel de Icaza <miguel@ximian.com>
19547 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
19548 (g_concat_dir_and_file): Bring g_concat_dir_and_file
19549 function from gnome-libs. This uses the right path separator
19550 based on the OS, and also works around a bug in some systems where
19551 a double slash is not allowed.
19552 (default_assembly_name_resolver): Use g_concat_dir_and_file
19553 (mono_assembly_open): ditto.
19555 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
19557 * metadata.c (mono_metadata_signature_equal): impl.
19559 * *: void is now a realy MonoType (instead of using NULL)
19561 * metadata.c (do_mono_metadata_parse_type): use
19562 mono_metadata_parse_type to parse void value.
19564 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19566 * metadata.c, metadata.h: in the signature and method header store
19567 only the space required for holding the loca vars and incoming arguments.
19569 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
19571 * metadata.c (do_mono_metadata_parse_type): treat void like any
19572 other type (instead of assigning NULL);
19574 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
19576 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19578 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
19580 * image.c (do_mono_image_open): added a cache for arrays.
19582 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19584 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19585 decode a single column from a row in a metadata table and changes
19586 to take advantage of it in the typedef locator (gives a nice speed up).
19587 Store offset info for function params.
19589 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
19591 * image.h (MONO_IMAGE_IS_CORLIB): removed
19593 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19595 * assembly.c: how could mono_assembly_close () had ever worked?
19596 * metadata.c, metadata.h: provide offset info for local vars.
19597 Implement mono_type_size () to take care of alignment as well
19598 as size (it was mono_field_type_size in cli/class.c before).
19600 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
19602 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19604 * assembly.h (CORLIB_NAME): set to corlib.dll
19606 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19608 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19610 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19611 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19612 tokentype.h: massive namespace cleanup.
19614 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19616 * metadata.h, metadata.c: decode exception clauses when parsing method header.
19618 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
19620 * metadata.c (mono_metadata_free_type): added check for type !=
19621 NULL (void) before calling mono_metadata_free_type()
19623 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19625 * metadata.h, row_indexes.h: added header with enumerations to use
19626 to index in the columns from tables in metadata and to decode coded
19627 tokens: we should start using this instead of embedding magic numbers
19630 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19632 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19633 Move metadata_t info from cli_image_info_t to MonoImage, where
19634 it's easily accessible. Changed all the uses accordingly.
19635 Added the method and class caches to MonoImage.
19636 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19637 and mono_metadata_decode_value () signature to be more consistent
19638 with the other parse functions (and simplify code). Taken advantage
19639 of zero-length array allocation with GCC. Removed reduntant (and
19640 wrong) MonoFieldType struct and use MonoParam instead. Changed
19641 mono_metadata_parse_field_type () to use common code for parsing.
19642 Added mono_metadata_typedef_from_field () and
19643 mono_metadata_typedef_from_method () to lookup a typedef index from a
19644 field or method token.
19645 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19647 2001-07-23 Miguel de Icaza <miguel@ximian.com>
19649 * metadata.c (mono_metadata_parse_field_type): Implement.
19650 (do_mono_metadata_parse_type): Split engine from
19651 mono_metadata_parse_type, so that we can create smaller structures
19652 for things that just have one pointer to the MonoType (look at
19655 2001-07-20 Miguel de Icaza <miguel@ximian.com>
19657 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19658 as Jan Gray found out, it is incorrect.
19660 2001-07-18 Miguel de Icaza <miguel@ximian.com>
19662 * assembly.c: Implement asssembly loading. This loads an image
19663 and loads all the referenced assemblies. Come to think of it, we
19664 could always do lazy loading of the assemblies.
19666 * image.c (mono_image_open): Keep loaded images in a hashtable.
19668 * image.h (MonoImage): Add reference count.
19670 2001-07-17 Miguel de Icaza <miguel@ximian.com>
19672 * assembly.c (mono_assembly_open): Keep track of the file name in
19673 case the assembly has no ASSEMBLY table.
19675 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
19678 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19680 * metadata.c, metadata.h: decode local vars in method header
19681 parse function. Change callers accordingly.
19683 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19685 * metadata.h, cil-coff.h: protect against multiple inclusion.
19686 Added some new structures to hold information decoded from metadata:
19687 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19688 and relevant decoding/free functions.
19689 * metadata.c: implement decoding functions. Add warning for out of bounds
19690 index in mono_metadata_locate(). Implement mono_get_method () to retreive
19691 all the info about a method signature and invocation. Remove check on
19692 uninitialized local var in parse_mh() and fix memory leak.
19694 2001-07-12 Miguel de Icaza <miguel@ximian.com>
19696 * metadata.h: More macros.
19698 * tokentype.h: New file.
19700 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19702 * assembly.c: added a consistency check and initialize
19703 some structures with g_new0().
19704 * metadata.c: fixed a couple more bugs in table size computation
19705 and add other checks for out-of bound access to metadata.
19707 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19709 * metatada.c: fix bugs computing table sizes. Spew a
19710 warning when index in string heap is out of bounds.
19712 2001-07-04 Miguel de Icaza <miguel@ximian.com>
19714 * metadata.h: Add a couple of macros to manipulate tokens.
19716 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19718 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19719 cli_section_tables).
19721 2001-07-01 Miguel de Icaza <miguel@ximian.com>
19723 * metadata.c (mono_metadata_user_string): New function, provides
19724 access to the UserString heap.
19726 2001-06-27 Miguel de Icaza <miguel@ximian.com>
19728 * metadata.c: Add inline documentation.
19730 2001-06-26 Miguel de Icaza <miguel@ximian.com>
19732 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19735 2001-06-22 Miguel de Icaza <miguel@ximian.com>
19737 * typeattr.h: New file, TypeAttribute flags.
19739 2001-06-21 Miguel de Icaza <miguel@ximian.com>
19741 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19742 mono_assembly_ensure_section): Section loading code.
19743 (load_section_tables): Load the sections.
19745 * mono/metadata/metadata.c (mono_metadata_locate_token,
19746 mono_metadata_locate): Functions to locate the information
19747 definition given a token or a table and an index.
19748 (mono_metadata_compute_table_bases): New.
19749 (compute_size): New function to compute the sizes of the various
19752 * mono/metadata/metadata.h: Finish listing the different index
19755 * mono/metadata/pedump.c: Improve to dump new information.
19757 2001-06-19 Miguel de Icaza <miguel@ximian.com>
19759 * mono/metadata/metadata.c: Entered all the tables matching
19762 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2