1 2006-11-27 Jonathan Chambers <joncham@gmail.com>
4 (mono_marshal_emit_managed_wrapper): Level of indirection for
5 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
6 can be generated without a delegate class.
7 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
9 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
11 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
16 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
18 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
19 icall-def.h: added icalls needed by System.GC.
21 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
23 * loader.c: ensure the class in catch clauses is handled
24 correctly for generics methods (fixes bug#79980).
26 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
28 * monitor.h, monitor.c: added mono_locks_dump () function
29 to help debug deadlocks involving managed locks.
31 2006-11-13 Dick Porter <dick@ximian.com>
33 * file-io.c (get_file_attributes): If the file is a symlink try
34 and get the stat data for the target, but also add the
35 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
36 the specs for the windows symlink support, but will probably have
37 to be reworked when I have test data from a vista machine. Fixes
40 2006-11-13 Dick Porter <dick@ximian.com>
42 * gc.c (mono_domain_finalize):
43 * marshal.c (mono_delegate_begin_invoke):
44 * threadpool.c (socket_io_init, mono_thread_pool_init)
45 (mono_thread_pool_finish):
46 * monitor.c (mono_monitor_try_enter_internal):
47 * threads.c (mono_thread_resume, mono_thread_init)
48 (mono_thread_suspend_all_other_threads)
49 (mono_thread_execute_interruption):
50 * appdomain.c (mono_domain_unload): Check for NULL error returns
51 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
54 2006-11-11 Miguel de Icaza <miguel@novell.com>
57 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
58 Only close the handle if the value of the handle is not
59 INVALID_HANDLE_VALUE. This just makes the process a bit more
62 Improvement for #75733, so that we do not run into this problem.
65 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
66 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
67 internal variables. Fixes #79462
70 2006-11-09 Dick Porter <dick@ximian.com>
72 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
73 Use poll() not select(). Fixes bug 79397.
75 2006-11-09 Raja R Harinath <rharinath@novell.com>
78 * assembly.c (mono_assembly_load_from_full): Check that the given
79 image has an assembly manifest.
81 2006-11-09 Ankit Jain <jankit@novell.com>
83 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
84 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
85 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
87 2006-11-07 Dick Porter <dick@ximian.com>
89 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
90 Put the old resolver behaviour back for pre-2.0 profiles.
92 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
94 * threadpool.c: precise GC and locking fixes.
96 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
98 * class.c: don't load types that have an explicit unaligned
99 managed reference. Provide better info in the TypeLoad exception.
100 Part of the fix for bug #79744.
101 * object.c: use the correct check for class type load issues.
103 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
105 * class.c: enforce alignment of fields with managed references
106 even when Pack=1 is forced by the user (bug #77788).
108 2006-11-03 Dick Porter <dick@ximian.com>
110 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
111 If the address reverse lookup fails, return it as the hostname
112 anyway. Fixes bug 79721.
114 2006-11-03 Dick Porter <dick@ximian.com>
116 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
117 Fix build on Windows.
119 2006-11-02 Dick Porter <dick@ximian.com>
122 * object-internals.h:
123 * exception.c (mono_get_exception_thread_interrupted):
124 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
127 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
128 Check for pending Thread.Interrupt.
130 2006-10-27 Massimiliano Mantione <massi@ximian.com>
131 * loader.c: Fixed bug 79684.
133 2006-10-27 Dick Porter <dick@ximian.com>
135 * file-io.c (get_file_attributes): Force symlinks to directories
136 to be returned as a regular file. Fixes bug 79733.
137 2006-10-26 Dick Porter <dick@ximian.com>
139 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
140 CreateFile to open a directory then we need to set the
141 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
143 2006-10-23 Zoltan Varga <vargaz@gmail.com>
145 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
148 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
150 * sgengc.c: small cleanup of timer code.
152 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
154 * sgen-gc.c: fix some warnings and start adding support for
155 complete object removal on domain unload.
157 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
159 * assembly.c: build_assembly_name should not consider a version
160 number without build or revision number invalid. Fixes bug #79715.
162 2006-10-18 Jonathan Chambers <joncham@gmail.com>
164 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
165 call kernel32 function OutputDebugString directly.
167 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
169 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
171 * reflection.c: small cleanup, using a function to insert a MonoString
174 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
176 * reflection.c: moving GC fixes.
178 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
180 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
181 all the objects with finalizers belonging to an unloading appdomain.
183 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
185 * sgen-gc.c: added ability to allocate even when the nursery is fully
186 pinned and fixed a couple of bugs.
188 2006-10-15 Zoltan Varga <vargaz@gmail.com>
190 * threads.h: Revert the last change for now.
192 * threads.h (mono_thread_get_pending_exception): Rename this to
193 mono_thread_get_undeniable_exception ().
195 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
197 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
198 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
199 when fname does not refer to valid assembly. This result in a more
200 meaningful error message.
201 * exception.c: added mono_get_exception_bad_image_format2 which
202 constructs a BadImageFormatException using the ctor taking a custom
203 message and the file name. Passing in a NULL msg results in a default
205 * exception.h: define mono_get_exception_bad_image_format2 function.
206 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
207 when file name pointed to an invalid IL image. Use
208 mono_get_exception_file_not_found2 to construct FileNotFoundException,
209 as this results in a more meaningful error message.
211 2006-10-15 Zoltan Varga <vargaz@gmail.com>
213 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
216 2006-10-12 Zoltan Varga <vargaz@gmail.com>
218 * metadata.c (mono_type_size): Change the align parameter to guint32 for
219 consistency with the other _size functions.
220 (mono_type_stack_size): Ditto.
222 * class.c object.c icall.c: Fix warnings caused by the above change.
224 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
226 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
228 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
230 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
232 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
233 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
234 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
235 threadpool.h, threads-types.h: mark more internal functions.
237 2006-10-11 Dick Porter <dick@ximian.com>
239 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
240 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
241 reproduce the bug even before applying the fix.)
243 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
245 * reflection.c: allow retrieving attributes for arguments in generic
246 methods (bug #79241).
248 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
250 * debug-mono-symfile.c: properly check fopen () result (found by
253 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
255 * reflection.c: make error message clearer and fixed two
256 issuelets found by Coverity.
258 2006-10-10 Zoltan Varga <vargaz@gmail.com>
260 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
262 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
264 * object-internals.h, gc-internal.h, profiler-private.h:
265 mark internal functions.
267 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
269 * reflection.c: put data in the text section.
270 * icall.c: recognize more types in type_from_typename ().
271 * process.c, marshal.c: added some GC FIXMEs.
273 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
275 * loader.c: check for NULL before initializing.
277 2006-10-09 Zoltan Varga <vargaz@gmail.com>
279 * gc.c (finalizer_thread): Use a non-alertable wait here.
281 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
282 until the correct solution is found.
284 2006-10-06 Zoltan Varga <vargaz@gmail.com>
286 * reflection.c (mono_module_get_object): Avoid an assert when operating on
287 modules with no metadata. Fixes #79596.
289 * image.c (load_metadata_ptrs): Put back the error message when
290 the #- heap is encountered since the support is not complete yet.
292 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
294 * gc.c: do not allow the user to SuppressFinalize () a
295 delegate because it would leak the trampoline if present.
297 2006-10-06 Zoltan Varga <vargaz@gmail.com>
299 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
302 2006-10-05 Zoltan Varga <vargaz@gmail.com>
304 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
306 * metadata.c (mono_metadata_get_param_attrs): Ditto.
308 * row-indexes.h: Add definitions for *Ptr tables.
310 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
312 * metadata.c (mono_metadata_translate_token_index): New helper function to
313 translate table indexes used in uncompressed metadata.
314 (mono_metadata_decode_table_row): Ditto.
315 (mono_metadata_decode_table_row_col): Ditto.
317 * metadata.c: Add table schema for *Ptr tables.
319 * class.c loader.c: Use the new helper function to access the affected metadata
322 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
325 2006-10-04 Zoltan Varga <vargaz@gmail.com>
327 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
328 sequences which can be unbounded in size. Fixes #79583.
330 2006-10-02 Zoltan Varga <vargaz@gmail.com>
332 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
333 static initialization.
335 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
337 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
339 * domain.c (mono_domain_free): Free up type_init_exception_hash.
341 * object.c (mono_runtime_class_init): Implement correct semantics when a static
342 ctor fails, i.e. throw the same exception on subsequent accesses.
344 2006-09-0 Jonathan Chambers <joncham@gmail.com>
346 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
347 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
348 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
349 Handle marshalling of interfaces and VARIANTs contained in structs.
351 Code is contributed under MIT/X11 license.
353 2006-09-30 Zoltan Varga <vargaz@gmail.com>
355 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
357 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
360 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
362 * console-io.c: ignore previous SIGINT handler.
364 2006-09-27 Zoltan Varga <vargaz@gmail.com>
366 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
367 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
368 #79460, #79461, #79485.
370 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
372 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
375 2006-09-26 Zoltan Varga <vargaz@gmail.com>
377 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
378 could be generated from it.
380 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
382 * rand.c: fix read loop to correctly handle EINTR.
384 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
386 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
387 internal calls are defined to keep methods closer to the declaring
388 type and allow a significant reduction in runtime relocations and
391 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
393 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
394 exception message to have FileNotFoundException use the default
395 assembly load error message. Fixes bug #79426.
396 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
398 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
400 * threadpool.c: (start_thread_or_queue) use the root domain when
401 creating the thread instead of the async object one.
403 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
405 * class.c, object.c, class-internals.h, reflection.c:
406 for arrays, store element_size inside MonoClass (speedup
407 for array object creation).
409 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
411 * icall.c: fixed CodeBase to use the file name and not the module
414 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
416 * mono-debug.c, mono-debug.h: export find_method as
417 mono_debug_find_method ().
419 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
421 * debug-helpers.c, class-internals.h: added a few functions useful
422 when debugging under gdb.
424 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
426 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
427 characters that need special handling.
429 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
431 * mono-config.c: make the os/cpu specification more flexible,
432 allowing lists and negation.
434 2006-09-18 Jonathan Chambers <joncham@gmail.com>
436 * marshal.c: COM Interop fixes. Handle case where method->klass.
437 is interface. Handle BSTR/MonoString when null. Use CDECL as
438 calling convention on non-windows platforms. This is for
439 compatibility with XPCOM and MainWin COM.
441 Code is contributed under MIT/X11 license.
444 2006-09-18 Zoltan Varga <vargaz@gmail.com>
446 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
447 correctly. Fixes #79217.
449 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
451 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
453 * mono-config.c: allow both an os and cpu attribute for dllmap
454 and dllentry elemnets to enable a single config file to be used
455 for multiple architectures.
457 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
459 * loader.c: MonoLoaderError was cleared too soon on load failure.
462 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
464 * icall.c: use the defining class vtable when accessing a
465 static field, not a pobblibly derived class.
467 2006-09-17 Zoltan Varga <vargaz@gmail.com>
469 * icall.c string-icalls.c: Remove references to unicode.h.
471 * unicode.h unicode.c Makefile.am: Remove these unused source files.
473 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
475 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
476 indicating the image where custom marshaller types should be looked up.
477 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
478 custom marshallers, instead of corlib. Fixes #79425.
480 2006-09-14 Zoltan Varga <vargaz@gmail.com>
482 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
484 2006-09-14 Jonathan Chambers <joncham@gmail.com>
486 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
487 Implement Environment.ProcessorCount.
489 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
490 Implement Environment.ProcessorCount.
493 Add Environment.ProcessorCount icall.
495 Patch by Jason McFall.
497 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
499 * assembly.c: don't append .exe/.dll when the filename already contains
500 one of those extensions.
502 2006-09-12 Martin Baulig <martin@ximian.com>
504 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
507 2006-09-11 Martin Baulig <martin@ximian.com>
509 * reflection.c (mono_image_build_metadata): Create the
510 MethodImpl's after emitting all types and methods, so we don't
511 need another fixup pass for them.
513 2006-09-11 Zoltan Varga <vargaz@gmail.com>
515 * class.c (mono_class_from_name_case): Fix regression introduced by the last
518 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
520 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
523 2006-09-10 Zoltan Varga <vargaz@gmail.com>
525 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
526 args is not set. Fixes #78926.
528 2006-09-08 Zoltan Varga <vargaz@gmail.com>
530 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
532 * image.c (load_class_names): Move this to class.c, and rename it to
533 'mono_image_init_name_cache'.
534 (load_modules): Fix a warning.
536 * class.c icall.c image.c: Initialize image->name_cache lazily.
538 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
539 on its name using information in the AOT file.
541 * class.c (mono_class_from_name): Use the new hook function.
543 2006-09-06 Zoltan Varga <vargaz@gmail.com>
545 * reflection.c (mono_param_get_objects): Handle enum default parameter values
548 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
551 2006-09-06 Martin Baulig <martin@ximian.com>
553 * icall.c (mono_lookup_internal_call): Small fix.
555 2006-09-05 Raja R Harinath <rharinath@novell.com>
557 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
560 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
562 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
563 when --debug is specified.
565 2006-09-04 Zoltan Varga <vargaz@gmail.com>
567 * class.c (setup_generic_array_ifaces): Fix a warning.
569 2006-09-04 Miguel de Icaza <miguel@novell.com>
571 * Temporarily remove the patch to assemly.c that checks the
572 assembly versions as it breaks our gacutil.
574 2006-09-03 Zoltan Varga <vargaz@gmail.com>
576 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
578 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
581 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
582 created using the default ctor. Fixes #79152.
583 (mono_string_builder_to_utf16): Ditto.
585 2006-09-01 Martin Baulig <martin@ximian.com>
587 Fix handling of the generic array interfaces.
590 (MonoDefaults): Removed `generic_array_class' and added
591 `generic_ilist' class.
594 (mono_bounded_array_class_get): Add the new generic array interfaces.
595 (setup_generic_array_ifaces): New static method; create vtable
596 entries for each method in the generic array interfaces.
599 (select_container): Allow "parent-less" generic methods.
602 (mono_marshal_get_generic_array_helper): New public method.
605 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
606 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
607 moved the interncall into System.Array.
609 2006-09-01 Raja R Harinath <rharinath@novell.com>
611 A few more cases of avoiding work on types with ->byref set.
612 Has the real fix for #79238
613 * icall.c (is_generic_parameter): New helper.
614 (ves_icall_Type_GetGenericParameterPosition): Use it.
615 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
616 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
617 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
618 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
620 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
622 (ves_icall_Type_get_IsGenericInstance): Likewise.
623 (ves_icall_Type_get_IsGenericType): Likewise.
625 2006-09-01 Zoltan Varga <vargaz@gmail.com>
627 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
630 * mempool.h (mono_mempool_get_allocated): New helper function.
632 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
635 * mempool.c: Fix warnings and the calculation of stats.
637 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
639 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
641 * loader.c (mono_get_method_from_token): Update method_count stat.
643 * class-internals.h (MonoStats): Add some stats.
645 2006-08-31 Robert Jordan <robertj@gmx.net>
647 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
648 with managed variants.
649 All code is contributed under the MIT/X11 license.
651 2006-08-31 Zoltan Varga <vargaz@gmail.com>
653 * reflection.c (reflection_methodbuilder_to_mono_method): Set
654 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
656 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
658 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
659 with cycles in classes.
661 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
663 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
664 missing a [MarshalAs] directive. Fixes #79203.
666 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
667 klass->marshal_info. Fixes #79217.
669 2006-08-30 Martin Baulig <martin@ximian.com>
671 Committing a patch from Joachim Ante <joe@otee.dk>:
672 Add support for binary data symbol stores.
674 * debug-mono-symfile.c
675 (mono_debug_open_mono_symbol_file): Renamed into
676 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
680 (mono_debug_open_image): Added `raw_contents' and `size' args.
681 (mono_debug_init_2_memory): New public function.
683 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
685 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
687 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
689 * appdomain.c: implement support for ShadowCopyFiles.
691 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
693 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
694 when value is NULL (and should remove CID #51).
696 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
698 * image.c: moved 2 functions to ../utils.
700 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
702 * gc.c: cope with the target object of a GC handle being NULL
705 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
707 * class.c: recursively check parent's explicit implementations
708 of interface methods (fixes bug #79125).
710 2006-08-19 Miguel de Icaza <miguel@novell.com>
712 * filewatcher.c: Avoid warnings when building, do not redefine
713 constants that are defined.
717 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
719 * image.c: don't fail when the link points to an absolute path.
721 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
723 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
726 2006-08-17 Miguel de Icaza <miguel@novell.com>
728 * image.c (full_path): A new method used to obtain the actual path
729 of an assembly even in the presence of symbolic links.
731 This is necessary for the case where we are running a binary that
732 has been GACed, but we are using the "published" path name
733 ($prefix/mono/1.0/blah.exe) which happens to point to the real
736 This was the source of the failure for the `xsp' command with the
737 recent AppDomain changes, as far as the runtime was concerned,
738 there were two different assemblies: $prefix/mono/1.0/blah.exe and
739 $prefix/mono/gac/blah/version/blah.exe.
741 (do_mono_image_open): use full path
743 2006-08-17 Zoltan Varga <vargaz@gmail.com>
745 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
747 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
749 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
750 domain_id is supplied. Fix CID #241 and corlib's unit tests.
752 2006-08-17 Zoltan Varga <vargaz@gmail.com>
754 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
755 small structures. Fixes #78990.
757 2006-08-17 Zoltan Varga <vargaz@gmail.com>
759 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
761 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
763 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
766 * marshal.c: don't load all the assemblies from a domain into newly
767 created ones. The new domains might have different rules and load
768 assemblies from different locations. Fixes bug #76757.
770 Patch by Lluis. Conflicts resolved by Brian Crowell.
772 2006-08-16 Alp Toker <alp@atoker.com>
774 * socket-io.c: First half of the fix for #79084.
775 Set sa_size to the length of the content, not that of the struct.
776 Don't add NULL suffix to the content, this should be done in
777 managed code if needed.
779 2006-08-14 Raja R Harinath <rharinath@novell.com>
782 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
783 mono_metadata_parse_type returns NULL.
785 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
787 * normalization-tables.h : new file for string normalization data.
788 * locales.c, locales.h, icall.c :
789 added load_normalization_resource() for string normalization,
791 * Makefile.am : added normalization-tables.h to the sources.
793 2006-08-13 Zoltan Varga <vargaz@gmail.com>
795 * marshal.c: Add more helper functions to reduce code duplication and use them
798 2006-08-12 Zoltan Varga <vargaz@gmail.com>
800 * marshal.c: Fix non-x86 stdcall warnings.
802 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
805 2006-08-11 Jonathan Chambers <joncham@gmail.com>
807 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
808 type check on multi-dimensional arrays. Fixes #79000.
810 2006-08-10 Jonathan Chambers <joncham@gmail.com>
812 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
813 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
814 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
815 * class-internals.h: add is_com_object to class structure.
816 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
817 null checks to COM object marshalling. Fix .ctor call on RCW.
818 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
820 All code is contributed under the MIT/X11 license.
822 2006-08-09 Dick Porter <dick@ximian.com>
824 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
825 racing mono_monitor_allocator_lock() somewhere, so don't delete
826 the critical section for now. Found by running and exiting
829 2006-08-10 Zoltan Varga <vargaz@gmail.com>
831 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
832 (ves_icall_System_ComObject_FindInterface): Ditto.
833 (ves_icall_System_ComObject_CacheInterface): Ditto.
835 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
836 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
838 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
840 * threadpool.c: treat pipes from process asynchronous reads as sockets
841 when reading from them, so we get select/poll or epoll to wait for
844 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
846 * loader.c: Fix a typo (CID #233) in the null check.
848 2006-08-07 Zoltan Varga <vargaz@gmail.com>
850 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
851 Hopefully fixes #78949.
853 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
854 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
857 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
859 * filewatcher.c: we need to set errno here.
861 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
863 * filewatcher.c: let Win32Exception get the error value.
865 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
867 * filewatcher.c: translate errno into win32 errors for Win32Exception
868 to know what happened.
870 2006-08-01 Zoltan Varga <vargaz@gmail.com>
872 * threadpool.c: Fix more warnings.
874 * assembly.c (search_loaded): Fix warnings.
876 * threadpool.c (mono_thread_pool_finish): Fix warnings.
877 (mono_async_invoke): Ditto.
879 2006-07-28 Jonathan Chambers <joncham@gmail.com>
881 * object.c (mono_remote_class_vtable): Need to create proxy vtable
882 entries for __ComObject type in addition to ComImport types.
883 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
886 All code is contributed under the MIT/X11 license.
888 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
890 * image.c: avoid tentative loading of modulerefs that contain
891 no metadata (P/Invoke library names).
893 2006-07-28 Dick Porter <dick@ximian.com>
895 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
896 mono_loader_lock() somewhere, so don't delete the critical section
897 for now. Found by running and exiting monodevelop.
899 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
901 * filewatcher.c: define the inotify syscalls when we're building on
902 linux and have sys/syscall.h. The build system might not have support
903 for inotify but the target system might have it.
905 2006-07-26 Miguel de Icaza <miguel@novell.com>
907 * domain.c: Documentation updates.
909 * loader.c (mono_free_method): Do not release the method
910 information if we are being profiled, as profilers will use this
911 information at shut down to present some data to the user.
913 This is needed so that the profiler does not crash, as the
914 profiler tends to keep MonoMethods around, and they might become
915 invalid if we free these.
917 (mono_get_method_constrained): Return the original CIL stream
918 method as well, so verification can be performed against it.
920 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
922 * filewatcher.[ch]: support for inotify file system watcher.
923 * icall.c: add new internal calls for the inotify file system watcher.
925 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
927 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
930 2006-07-20 Dick Porter <dick@ximian.com>
932 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
935 2006-07-20 Dick Porter <dick@ximian.com>
937 * threads.c (start_wrapper): Do the thread cleanup while we still
938 hold a reference to its object. Fixes bug 78123.
940 2006-07-18 Kornél Pál <kornelpal@gmail.com>
942 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
943 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
944 "managed-to-managed".
945 * icall.c: Redirect string constructors that take sbyte* to
946 ves_icall_System_String_ctor_RedirectToCreateString.
947 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
948 to CreateString () methods with matching signature.
949 * reflection.c: Use original security informations for
950 MONO_WRAPPER_MANAGED_TO_MANAGED.
951 * security-manager.c: Use original security informations for
952 MONO_WRAPPER_MANAGED_TO_MANAGED.
953 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
954 that is a placeholder and only its address should be used.
955 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
956 that is a placeholder and only its address should be used.
958 2006-07-15 Jonathan Chambers <joncham@gmail.com>
960 Begin implementing COM Interop.
961 * appdomain.c: Increment corlib version.
962 * class.c: Set ComImport classes' parent to __ComObject.
963 * loader.c: Mark cominterop methods as such.
964 * domain.c: Add __ComObject class to MonoDefaults structure.
965 * image.c: Add 2 hashtables to the image for COM Interop related methods
966 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
967 using the mempool allocator
969 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
970 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
971 declaration for mono_metadata_type_dup_mp.
973 * debug-helpers.c: Added strings for two additional wrapper types
974 * object.c: Create proxy objects for ComImport classes
975 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
976 and added __ComObject class to MonoDefaults structure.
978 * object-internals.h: Finish MonoRealProxy definition, and add definition of
979 MonoComInteropProxy and MonoComObject.
981 * marshal.c: Added support for COM Interop
982 (signature_cominterop): Converts managed signature to corresponding
983 unmanaged COM signature.
984 (cominterop_get_function_pointer): gets unmanaged function pointer via
986 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
987 (cominterop_get_method_interface): returns interface type that method is defined on
988 (mono_mb_emit_cominterop_call): emits native call to function pointer
990 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
991 that matches signature of unmanaged function.
992 (cominterop_get_native_wrapper): wrapper around adjusted method call.
993 (cominterop_get_invoke): forwards call from proxy to __ComObject
994 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
995 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
996 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
998 * marshal.h: Added Marshal icall declarations.
999 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
1000 so we can access them in finalizer
1002 2006-07-14 Dick Porter <dick@ximian.com>
1004 * object.c (mono_type_initialization_cleanup): Fix a race
1005 condition by temporarily commenting out the critical section
1008 2006-07-14 Zoltan Varga <vargaz@gmail.com>
1010 * reflection.c (create_custom_attr): Fix some warnings.
1011 (create_custom_attr_data): Ditto.
1012 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
1013 types. Fixes #78855.
1015 2006-07-11 Zoltan Varga <vargaz@gmail.com>
1017 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
1019 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
1021 2006-07-08 Zoltan Varga <vargaz@gmail.com>
1023 * reflection.c (resolve_object): Add support for DynamicMethod.
1025 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
1026 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
1028 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
1030 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
1031 don't leak GPtrArray's pdata has we have no use (nor free) for it.
1033 2006-07-01 Zoltan Varga <vargaz@gmail.com>
1035 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
1038 2006-06-30 Raja R Harinath <rharinath@novell.com>
1040 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
1041 slightly: remove a shadow local variable.
1043 2006-06-29 Raja R Harinath <rharinath@novell.com>
1045 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
1046 definition that introduces the virtual function slot.
1047 Also fix Coverity #105.
1049 2006-06-29 Zoltan Varga <vargaz@gmail.com>
1051 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
1052 for dynamic assemblies. Fixes #78724.
1054 2006-06-28 Zoltan Varga <vargaz@gmail.com>
1056 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
1059 2006-06-21 Martin Baulig <martin@ximian.com>
1062 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
1065 2006-06-21 Zoltan Varga <vargaz@gmail.com>
1067 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
1069 2006-06-20 Raja R Harinath <rharinath@novell.com>
1071 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
1073 * class.c (mono_class_create_from_typespec): Add 'context' argument.
1074 Inflate result if necessary.
1075 (mono_class_get_full): Remove old version. Rename from
1076 'mono_class_get' and add 'context' argument. Pass it to
1077 ..._create_from_typespec.
1078 (mono_class_get): New. Simple wrapper to mono_class_get_full.
1079 (mono_ldtoken): Revert change below.
1081 2006-06-20 Martin Baulig <martin@ximian.com>
1083 * class.c (mono_ldtoken): Don't pass the generic context to
1084 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
1086 2006-06-15 Zoltan Varga <vargaz@gmail.com>
1088 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
1089 and later freeing it. Fixes #78638.
1091 2006-06-15 Miguel de Icaza <miguel@novell.com>
1093 * icall.c (mono_class_get_throw): Revert over-zealous error
1094 throwing, the caller for mono_class_get_throw will cope with
1095 errors when classes are not properly initialized already.
1097 The code still copes with loader exceptions though.
1099 Fixes the regression in reftype1 and reftype3 from the CAS tests.
1101 2006-06-14 Miguel de Icaza <miguel@novell.com>
1103 Fixes the `make run1' version of RuntimeAbort (to be commited,
1104 source is in Bugzilla).
1106 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
1107 FALSE on class loading failure instead of returning true.
1109 * class.c (mono_class_create_from_typedef): It is possible for
1110 mono_metadata_interfaces_from_typedef_full to fail if a class is
1111 not found, cope with this.
1114 2006-06-14 Dick Porter <dick@ximian.com>
1117 * process.c: Fix a bunch of signed/unsigned warnings from gcc
1120 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
1122 * culture-info-table.h : oops, forgot to make it nsync with r61548.
1124 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
1126 * icall.c: Another fix for building mono in Visual Studio.
1128 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
1130 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
1132 2006-06-09 Martin Baulig <martin@ximian.com>
1134 * debug-mono-symfile.c: Put this back and really fix it this
1135 time. Sorry for all the trouble.
1137 2006-06-08 Zoltan Varga <vargaz@gmail.com>
1139 * icall.c (mono_class_get_throw): Fix a warning.
1140 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
1141 ReflectionTypeLoadException if needed. Fixes #78606.
1143 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
1144 (mono_class_init): Ditto.
1146 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
1147 ref_only exceptions.
1148 (mono_loader_clear_error): Make this work even if there is no error.
1150 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
1152 * object-internals.h marshal.c marshal.h icall.c: Implement method
1153 Marshal.GetComSlotForMethodInfo using internal call.
1155 2006-06-07 Zoltan Varga <vargaz@gmail.com>
1157 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
1158 a function for signalling it.
1160 * class.c (mono_class_from_typeref): Use the new kind of loader error when
1161 a referenced assembly is not found.
1163 * loader.c (mono_loader_error_prepare_exception): Add support for
1164 LOADER_ERROR_ASSEMBLY. Fix formatting.
1166 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
1168 * domain.c appdomain.c class-internals.h marshal.c: Add support
1169 for VARIANT marshalling on windows and increment corlib version
1170 since Variant struct was added.
1172 2006-06-03 Miguel de Icaza <miguel@novell.com>
1174 * debug-mono-symfile.c: Revert Martin's previous patch which broke
1175 stack trace line information:
1177 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
1178 (Martin) when looking up B which is between A and C, return A not C.
1182 Thanks to Alexander Olk for tracking this down.
1184 2006-06-02 Zoltan Varga <vargaz@gmail.com>
1186 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
1188 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
1189 avoid clobbering its value.
1190 (mono_string_to_lpstr): Fix a warning on windows.
1192 2006-05-31 Zoltan Varga <vargaz@gmail.com>
1194 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
1196 * reflection.c loader.c: Removed references to 'dummy' flag.
1198 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
1200 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
1201 it gets GC tracking.
1203 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
1206 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
1208 * marshal.c threadpool.c: Update callers of mono_async_result_new.
1210 * appdomain.c: Bump corlib version.
1212 2006-05-30 Zoltan Varga <vargaz@gmail.com>
1214 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1215 CEE_STIND_REF when working with object references.
1217 2006-05-31 Zoltan Varga <vargaz@gmail.com>
1219 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
1222 2006-05-30 Miguel de Icaza <miguel@novell.com>
1224 * loader.c (method_from_memberref): Fix argument value for
1225 mono_loader_set_error_method_load (I was passing the MonoClass
1226 instead of the class name char *).
1228 2006-05-30 Zoltan Varga <vargaz@gmail.com>
1230 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1231 CEE_STIND_REF when working with object references.
1233 2006-05-30 Martin Baulig <martin@ximian.com>
1235 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
1236 mono_method_full_name() change and replace the ':' with a '.'
1239 2006-05-30 Martin Baulig <martin@ximian.com>
1241 * debug-mono-symfile.c
1242 (mono_debug_symfile_lookup_location): Fix the algorithm:
1243 when looking up B which is between A and C, return A not C.
1245 2006-05-29 Martin Baulig <martin@ximian.com>
1248 (MonoDebugMethodInfo): Make the typedef public.
1249 (MonoDebugSourceLocation): New public struct.
1252 (mono_debug_source_location_from_address): Removed.
1253 (mono_debug_source_location_from_il_offset): Removed.
1254 (mono_debug_il_offset_from_address): Removed.
1255 (mono_debug_address_from_il_offset): Removed.
1256 (mono_debug_lookup_method): New public function.
1257 (mono_debug_lookup_source_location): New public function; replaces
1258 the old mono_debug_source_location_from_*() functions; see the
1259 inline documentation.
1260 (mono_debug_free_source_location): New public function.
1261 (mono_debug_print_stack_frame): New public function; see the
1262 inline documentation.
1264 * debug-mono-symfile.c
1265 (mono_debug_find_source_location): Renamed into
1266 mono_debug_symfile_lookup_location(); only take a
1267 `MonoDebugMethodInfo *' and an `offset' argument; added inline
1269 (mono_debug_find_method): Renamed into
1270 mono_debug_symfile_lookup_method().
1272 2006-05-27 Zoltan Varga <vargaz@gmail.com>
1274 * assembly.c (mono_assembly_open_full): Dont overwrite the status
1275 returned by mono_image_open_full ().
1277 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
1278 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
1281 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
1284 2006-05-27 Miguel de Icaza <miguel@novell.com>
1286 * class.c (mono_class_from_typeref): handle missing images
1287 earlier, deals with bug #78418. Refactor code;
1289 Fix a warning introduced in my previous commit (some stale code
1290 from before I revisited my patch).
1292 * class.c (mono_class_create_from_typedef): On failure, remove the
1293 class from the MonoImage->class_cache as the class is not
1294 initialized; Fixes the leak pointed out by Paolo.
1296 2006-05-25 Dick Porter <dick@ximian.com>
1298 * threads.c (mono_thread_cleanup): Build fix. Comment out the
1299 DeleteCriticalSections until I figure out which one may still be
1300 sometimes locked when mono_thread_cleanup is called.
1302 2006-05-24 Dick Porter <dick@ximian.com>
1304 * threads.c (mono_thread_cleanup): Move the threading cleanup out
1305 of mono_thread_manage and back into its own function, so it can be
1306 called after the finalizer thread has finished.
1308 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
1310 2006-05-24 Zoltan Varga <vargaz@gmail.com>
1312 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
1315 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
1316 with non-blittable elements.
1317 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
1319 2006-05-24 Martin Baulig <martin@ximian.com>
1321 * mono-debug-debugger.h (MonoDebuggerEvent): Added
1322 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
1324 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
1325 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
1326 `mono_debugger_event_handler' to NULL.
1328 2006-05-24 Martin Baulig <martin@ximian.com>
1330 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
1332 2006-05-24 Martin Baulig <martin@ximian.com>
1334 * mono-debug-debugger.h
1335 (mono_debugger_create_notification_function): Added
1336 `MonoCodeManager *' argument.
1338 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
1340 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
1342 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
1344 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
1345 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
1348 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
1350 * icall.c: precise GC support: objects can't be stored in unmanaged
1351 memory anymore, even if they are kept alive by other references: since
1352 they can move the GC needs to be able to always find them.
1354 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1356 * object.c: precise GC support for static fields. Support
1357 for moving GCs: write barriers and pinned allocation for interned
1360 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1362 * domain.c, domain-internals.h: precise GC support for the MonoDomain
1365 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1367 * class.c, gc.c: sgen and precise GC updates.
1369 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
1371 * marshal.h, marshal.c: added write barrier wrapper and precise type
1374 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
1376 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
1379 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
1381 * reflection.c: precise and sgen GC updates.
1383 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
1385 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
1387 2006-05-22 Zoltan Varga <vargaz@gmail.com>
1389 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
1391 2006-05-20 Zoltan Varga <vargaz@gmail.com>
1393 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
1394 MONO_TYPE_OBJECT. Fixes #78462.
1396 2006-05-18 Zoltan Varga <vargaz@gmail.com>
1398 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
1399 and blittable types.
1401 2006-05-17 Miguel de Icaza <miguel@novell.com>
1403 * class.c (mono_class_get_exception_for_failure): Implement parts
1404 of a TODO: if the loader error is set (instead of the class
1405 error), we return a Loader exception that can be properly thrown
1408 This was exposed by some Winforms 2.0 code that I tried to run
1409 (Atsushi pointed me to it).
1411 2006-05-17 Zoltan Varga <vargaz@gmail.com>
1413 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
1414 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
1416 * marshal.c (emit_marshal_vtype): Add limited support for
1417 UnmanagedType.LPStruct. Fixes #78427.
1419 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
1420 Applied a patch from kangaroo to fix #77523.
1422 2006-05-17 Martin Baulig <martin@ximian.com>
1425 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
1426 (debugger_thread_created): Removed.
1427 (debugger_thread_exited): Removed.
1429 2006-05-15 Zoltan Varga <vargaz@gmail.com>
1431 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1433 * object-internals.h (MonoReflectionResource): Sync with managed version.
1435 2006-05-12 Wade Berrier <wberrier@novell.com>
1437 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
1439 2006-05-12 Zoltan Varga <vargaz@gmail.com>
1441 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
1442 functions try to allocate from the image mempool.
1444 2006-05-12 Dick Porter <dick@ximian.com>
1446 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
1448 2006-05-12 Lluis Sanchez <lluis@ximian.com>
1450 * object.c: The FieldGetter and FieldSetter methods require the full
1451 name of the class, not only the name. Fixes bug #78277.
1453 2006-05-11 Miguel de Icaza <miguel@novell.com>
1455 * loader.c (method_from_memberref): Do not pass the NULL klass to
1456 mono_loader_set_error_() methods. Pass the non-NULL value
1459 2006-05-11 Zoltan Varga <vargaz@gmail.com>
1461 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1462 (mono_assembly_close): Null out assembly->image->references after freeing it.
1464 * image.c (mono_image_close): Free image->references.
1466 * reflection.c (mono_image_basic_init): Fix a small memory leak.
1468 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1470 * marshal.c: In function mono_mb_add_local don't use the mb pointer
1471 before checking if it's NULL (g_assert).
1473 2006-05-10 Martin Baulig <martin@ximian.com>
1475 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1476 I thought I already killed that two months ago, but now it somehow reappeared.
1478 2006-05-10 Martin Baulig <martin@ximian.com>
1480 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1482 2006-05-10 Zoltan Varga <vargaz@gmail.com>
1484 * reflection.c: Allocate memory for dynamically created methods in the image
1487 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1489 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
1490 don't use the ad pointer before checking if it's NULL (g_assert).
1492 2006-05-09 Zoltan Varga <vargaz@gmail.com>
1494 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1495 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1497 * marshal.c: Allocate all signatures from mempools.
1499 * marshal.c: Allocate some more signatures from mempools.
1501 2006-05-09 Miguel de Icaza <miguel@novell.com>
1503 * object.c (mono_load_remote_field): The code used to provide a
1504 temporary variable for returning results if the user did not
1505 provide a result pointer. But our temporary variable was allocted
1508 Fix calling code to always pass a result area. Coverity ID 103.
1510 2006-05-06 Zoltan Varga <vargaz@gmail.com>
1512 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1513 value, not the old. Fixes #78312.
1514 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1516 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1517 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
1520 * assembly.c (mono_assembly_close): Free image->references.
1522 * assembly.c (mono_assembly_names_equal): Fix a warning.
1523 (mono_assemblies_cleanup): Cleanup more global data.
1525 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1527 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1528 ptr_cache and image->modules.
1530 * image.c (mono_image_init): Allocate array_cache lazily.
1532 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1534 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1535 behavior was changed recently and has bad side effects.
1537 2006-05-05 Zoltan Varga <vargaz@gmail.com>
1539 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1541 * assembly.c (mono_assembly_close): Remove a debug printf.
1543 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1545 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1546 to also allow for temporary references between mono_image_open ()/close ().
1548 * domain.c (get_runtimes_from_exe): Add a FIXME.
1550 2006-05-04 Zoltan Varga <vargaz@gmail.com>
1552 * marshal.c: Fix support for dynamic methods.
1554 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1556 * marshal.c (mono_marshal_cleanup): New cleanup function.
1558 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
1561 * class.c (mono_class_init): Fix leaking class->nested_classes.
1563 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1565 * image.c (mono_image_init): Initialize the new cashes.
1567 * image.c (mono_image_close): Destroy the new cashes.
1569 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1571 * mempool.c (mono_mempool_strdup): New helper function.
1573 * class-internals.h: Add prototype for mono_loader_unlock ().
1575 * domain.c (mono_jit_info_table_find): Fix a warning.
1576 (mono_debugger_check_runtime_version): Ditto.
1578 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
1579 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1580 functions to these modules.
1582 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1585 * marshal.c (mono_free_bstr): Fix a warning.
1587 * assembly.c (mono_assembly_open_full): Fix another small leak.
1589 * object.c: Fix some unload leaks in the remoting code.
1591 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1594 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1596 * reflection.c: Fix some unload leaks in dynamic assemblies.
1598 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
1600 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1601 * marshal.h: Add BSTR support on Win32
1602 * icall.c: Add BSTR icalls
1603 * metadata.h: Add BSTR enums
1605 2006-04-28 Miguel de Icaza <miguel@novell.com>
1607 Work to catch the crash from #76795 and turn it into an
1608 exception. As I stubbed out pieces of the VisualBasic support,
1609 I found a number of places where the code was failing and I added
1610 checks to those places.
1612 * metadata.c (do_mono_metadata_parse_generic_class): Make this
1613 function return a status code. If we fail to parse the signature
1614 from mono_metadata_parse_generic_inst, return FALSE.
1616 * loader.c (mono_get_method_from_token): If we fail to load the
1617 method (mono_class_get) return NULL.
1619 * (method_from_memberref): Return NULL if we are unable to parse
1620 the method signature
1622 (mono_loader_error_prepare_exception): Since we now use the
1623 loader_error flag internally to stop processing, and obtaining
1624 exceptions that might be thrown will walk this code path the
1625 proper way of going from a MonoLoaderError into a
1626 MonoException was convoluted. This new routine encapsulates the
1627 process of turning the error into an exception and *clearing* the
1630 2006-04-27 Miguel de Icaza <miguel@novell.com>
1632 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1633 with missing assemblies), and to cope with:
1635 * Missing fieldref from a non-existing assembly.
1636 * Missing methodref from a non-existing assembly.
1638 The first batch of work to address *some* of the issues from 76661.
1640 * object.c (mono_class_create_runtime_vtable): If we fail to
1641 initialize the class raise the exception here.
1643 * metadata.c (mono_class_get_overrides_full): If any methods fail
1644 to load return the failure to the caller.
1646 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1647 flagging assemblies that failed to load.
1649 Do not crash if we are unable to load the assembly.
1651 (mono_assembly_close): Do nothing with REFERENCE_MISSING
1654 * loader.c (mono_loader_set_error_type_load): Change the
1655 convention to always pass unallocated strings, so we make our own
1656 copies (I know our own code had duplicated strings before, but
1657 this keeps the normal conventions).
1658 (method_from_memberref): Call mono_loader_set_error_method_load
1659 for all possible failures of loading the class.
1660 Remove assert, turn into a loader error.
1662 (mono_loader_error_to_exception): Move this routine from mini
1663 (mini_loader_error_to_exception) there was no need to have that in
1666 * class.c (mono_class_from_typeref): If we were not able to load
1667 the assembly with mono_assembly_load_reference, call the
1668 mono_loader_set_error_type_load to register the problem.
1670 (mono_class_setup_fields): If we fail to load the type from
1671 mono_metadata_parse_type_full, call mono_class_set_failure and
1672 break from the loop.
1674 If class->exception_type is set, we do not layout the fields as
1675 that might crash the runtime, and instead return (from breaking
1676 from the previous loop).
1678 (mono_class_setup_vtable): This now returns a boolean indicating
1679 whether the table was properly setup. The decision is driven by
1680 mono_class_get_overrides_full which might run into non-existing
1683 (mono_class_init): Returns TRUE on success or FALSE if there was a
1684 problem in loading the type (incorrect assemblies, missing
1685 assemblies, methods, etc).
1687 When we call mono_class_setup_fields we also check for a potential
1688 error inside this call (either a class exception or a general
1691 (mono_class_create_from_typedef): If the parent fails to load
1692 (calling mono_class_get_full) return NULL.
1696 calls to mono_metadata_parse_type_full should be checked
1697 everywhere and set the mono_class_set_failure
1698 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1700 The current patch checks the places where my manually constructed
1701 tests show the errors are showing up, but we should do it
1706 mono_class_init return values should be tested everywhere, like
1707 the previous case this is something that we should audit
1708 everywhere and not only on the cases exposed by the tests I
1711 2006-04-26 Miguel de Icaza <miguel@novell.com>
1713 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1714 boolean parameter and instead pass the information on `options'
1715 parameter (FileOptions).
1717 * icall.c: Register the new signature for MonoIO.Open.
1719 * debug-helpers.c (dis_one): Trying to understand how coverity
1720 works. Fix Run 5, item 78.
1722 2006-04-26 Dick Porter <dick@ximian.com>
1724 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1727 2006-04-25 Martin Baulig <martin@ximian.com>
1729 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1731 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1732 debugger_thread_created().
1733 (debugger_gc_push_all_stacks): Don't handle the main thread in any
1735 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1736 (mono_debugger_finalize_threads): New function; undo the effects
1737 of mono_debugger_init_threads().
1738 (mono_debugger_create_all_threads): Removed.
1740 2006-04-24 Zoltan Varga <vargaz@gmail.com>
1742 * image.c (mono_image_close): Tidy up trace messages.
1744 * assembly.c (mono_assembly_close): Ditto.
1746 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1747 no longer references an already freed assembly. Fixes #78168.
1749 2006-04-21 Dick Porter <dick@ximian.com>
1751 * threads.c (mono_thread_detach): Fix reference counting when
1754 2006-04-21 Zoltan Varga <vargaz@gmail.com>
1756 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1759 2006-04-19 Zoltan Varga <vargaz@gmail.com>
1761 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1762 (mono_type_to_stind): Ditto.
1764 * marshal.c: Use the new helper functions to simplify code.
1766 * image.c (mono_image_close): Add some code for help debug assembly unloading
1769 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1772 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1773 assembly was already loaded in another appdomain. Fixes #78083.
1775 2006-04-13 Zoltan Varga <vargaz@gmail.com>
1777 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1778 referenced assemblies.
1779 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1781 * domain.c (mono_domain_free): Add a trace message.
1783 * appdomain.c (add_assemblies_to_domain): Ditto.
1785 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1788 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1790 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1792 2006-04-12 Martin Baulig <martin@ximian.com>
1794 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1795 `USE_INCLUDED_LIBGC'.
1797 2006-04-12 Zoltan Varga <vargaz@gmail.com>
1799 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1800 the patch contains ../ and a small directory name later. Hopefully fixes
1803 2006-04-10 Martin Baulig <martin@ximian.com>
1805 Clean up the debugger's thread-handling code.
1807 The debugger's thread-handling code has been moved from
1808 ../mini/debug-debugger.c to threads.c. We now iterate directly
1809 over the `threads' hash, keep track of exiting threads and also
1812 We can now debug XSP and XSP based applications with the debugger.
1814 * object-internals.h (MonoThread): Added `gpointer end_stack'.
1817 (MonoThreadCallbacks): Removed; this was only used by the debugger.
1818 (mono_install_thread_callbacks): Likewise.
1820 * threads.c (mono_thread_callbacks): Removed.
1821 (debugger_thread_created, debugger_thread_exited): New static functions.
1822 (start_wrapper): Call debugger_thread_created().
1823 (thread_cleanup): Call debugger_thread_exited().
1824 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1825 (mono_debugger_init_threads): New public function.
1826 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1827 iterate directly over the `threads' hash and also use proper locking.
1829 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1831 * mono-debug-debugger.h
1832 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1834 2006-04-10 Zoltan Varga <vargaz@gmail.com>
1836 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
1837 argument type=array. Fixes #78057.
1839 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
1841 * culture-info-table.h : regenerated. Fixed bug #69652.
1843 2006-04-07 Zoltan Varga <vargaz@gmail.com>
1845 * loader.c metadata.c: Reapply a variant r59116.
1847 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1849 * class.c (mono_class_setup_interface_offsets): New internal function.
1851 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1852 interfaces too. Fixes #77398.
1854 * reflection.c (encode_cattr_value): Add support for
1855 parameter type=object, argument type=array.
1856 (load_cattr_value): Ditto. Fixes #77916.
1858 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1859 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1861 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1862 a byval char array and CharSet is Ansi.
1864 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1866 2006-04-06 Zoltan Varga <vargaz@gmail.com>
1868 * metadata.c: Add some locking comments.
1870 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1872 (mono_metadata_free_method_signature): Don't free the signature itself.
1874 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
1876 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1877 reference the same MonoImage.
1878 (mono_assembly_load_from_full): Add an assert.
1880 2006-04-05 Zoltan Varga <vargaz@gmail.com>
1882 * image.c (mono_image_close): Don't put the image we are about to free into the
1883 loaded_images_guid_hash.
1885 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1886 to reduce code duplication.
1888 * marshal.c: Register the native functions called by this module as icalls, to
1889 somewhat centralize the creation of MonoMethodSignature's.
1891 * loader.c (mono_method_signature): Add a cache for method signatures.
1893 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1894 the parameter attributes of a method.
1895 (mono_metadata_parse_method_signature_full): Refactored the computation of
1896 parameter attributes into a separate function. Also avoid one allocation in
1899 * assembly.c (mono_assembly_close): Ditto.
1901 * image.c (mono_image_close): Log trace messages with INFO level.
1903 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1905 * image.c reflection.c: Correct reference counting of image modules.
1907 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1908 of this function from the image mempool.
1910 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1911 to allow more cached types to be used.
1913 * mono-debug.c (mono_debug_add_method): Appled patch from
1914 David S. Miller <davem@sunset.davemloft.net>: Access
1915 minfo->lexical_blocks[] entry elements using read32().
1917 2006-04-04 Zoltan Varga <vargaz@gmail.com>
1919 * loader.c (mono_free_method): No longer free the method header for non-dynamic
1920 methods as it is allocated from the mempool.
1922 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1925 * metadata-internals.h: Add comments describing the reference counting scheme
1926 used for MonoImage and MonoAssembly.
1928 * image.c assembly.c reflection.c: Rework reference counting of images and
1929 assemblies so they are freed when the runtime is shut down. Free some
1930 additional memory structures when an image is unloaded.
1932 2006-04-03 Zoltan Varga <vargaz@gmail.com>
1934 * class.c loader.c reflection.c: Allocate more data structures in
1937 2006-03-31 Miguel de Icaza <miguel@novell.com>
1940 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1941 build on pre glib 2.4 systems.
1943 2006-03-31 Zoltan Varga <vargaz@gmail.com>
1945 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1947 * icall.c: Fix some warnings.
1949 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
1951 * culture-info-table.h : regenerated.
1953 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1955 * threads.c, object-internals.h, verify.c: changed the culture caching
1956 code to use a normal MonoArray for storage so the GC can keep track of
1957 them easily. Fixed bits of the cache logic, too and simplified the
1960 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1962 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1963 thread for non-Boehm GCs.
1965 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1967 * domain.c, object.c, domain-internals.h: reduce the amount of memory
1968 needed to keep track of the data for static fields.
1970 2006-03-29 Raja R Harinath <rharinath@novell.com>
1973 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1974 for interface classes. Use 'num_methods' instead.
1975 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
1976 before using '->vtable_size' field.
1978 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1980 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1981 doesn't contain managed pointers, so use a normal hashtable.
1983 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1985 * reflection.c, class-internals.h, domain.c: fixed handling of types
1986 used as values for objects in custom attributes (bug #77915):
1988 2006-03-24 Martin Baulig <martin@ximian.com>
1990 * class.c (mono_class_setup_fields): Added support for generic
1991 instances; fixes #77580.
1993 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1995 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1997 2006-03-24 Dick Porter <dick@ximian.com>
1999 * file-io.c (get_file_attributes): More stat macro breakage.
2002 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
2004 * profiler.c: added the file=filename option in the default profiler
2005 to output the profile data to filename.
2007 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2009 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
2012 2006-03-22 Martin Baulig <martin@ximian.com>
2014 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
2015 allocated `MonoClassField *' in `fb->handle'.
2017 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2019 * class.c, image.c, metadata-internals.h: implemented new mechanism to
2020 allocate interface ID to save memory and allow better ID reuse on
2021 appdomain unload. setup_generic_vtable () removal from Martin.
2023 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2025 * object.h, appdomain.c, domain.c, exception.c, icall.c,
2026 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
2027 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
2028 write barriers for reference stores with managed objects accessed with
2029 C structures in the runtime and in embedding programs.
2031 2006-03-20 Raja R Harinath <rharinath@novell.com>
2033 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
2034 'interface_id' and 'max_interface_id' fields of MonoClasses
2035 representing open generic types.
2037 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
2039 * object.h, object.c, icall.c: added functions to deal with
2040 storing valuetypes that contain references in managed objects.
2041 * reflection.c, string-icalls.c, threads.c, marshal.c: small
2042 fixes and comments around uses of mono_array_addr ().
2044 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
2046 * object.h, icall.c, monitor.c: object.GetHashCode ()
2047 implementation that supports the moving garbage collector.
2049 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
2051 * icall.c, threads-types.h, threads.c: implemented finalizer for
2054 2006-03-15 Zoltan Varga <vargaz@gmail.com>
2056 * metadata.c (mono_type_size): Add a fixme.
2057 (mono_type_stack_size): Ditto.
2059 * object-internals.h (MonoReflectionAssemblyBuilder): Added
2060 'type_forwarders' field.
2062 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
2063 attribute from net 2.0.
2065 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
2068 * class.c (mono_class_setup_fields): Fix a warning.
2070 * class.c (mono_class_from_name): Add support for assemblyref entries
2071 in the EXPORTEDTYPE table.
2073 * reflection.c: Add support for handling type forwarders under net 2.0.
2075 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2077 2006-03-14 Zoltan Varga <vargaz@gmail.com>
2079 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
2080 overwriting entries in ModuleBuild->types, also clean up the code
2081 a little. Fixes #77774.
2083 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
2085 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
2086 load friend assembly info when present.
2088 2006-03-14 Raja R Harinath <rharinath@novell.com>
2090 Fix crasher on gtest-158.cs.
2091 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
2092 the return value if the MonoClass we want is yet in an
2094 * class.c (mono_class_create_from_typedef): Add an comment
2095 explaining an order dependency between mono_class_setup_parent and
2096 mono_class_setup_mono_type.
2098 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
2100 * class.c: documentation updates and events bug fix.
2102 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
2104 * class.c: some cleanup, locking fixes.
2106 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2108 * class.c: fix the generics code to setup nested
2109 type info to the instantiated type (bug #77770).
2111 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
2113 * marshal.c: fixed a few type correctness issues.
2115 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2117 * loader.c: the Set/Get/Addrtess array methods should be public.
2119 2006-03-11 Zoltan Varga <vargaz@gmail.com>
2121 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
2123 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
2126 2006-03-10 Zoltan Varga <vargaz@gmail.com>
2128 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
2130 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
2132 * mempool.c (mono_mempool_alloc): Speed this up a bit.
2133 (mono_mempool_alloc0): Ditto.
2135 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2138 (create_object_from_sockaddr): it was allocating 4 extra bytes
2139 for the AF_UNIX data. Fixes bug #77747.
2141 2006-03-09 Zoltan Varga <vargaz@gmail.com>
2143 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
2145 2006-03-09 Dick Porter <dick@ximian.com>
2147 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
2148 Fixes bug 76966 again.
2150 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
2152 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
2154 * appdomain.c: Bumped corlib version to 48 (due to r57532)
2156 2006-03-07 Martin Baulig <martin@ximian.com>
2159 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
2161 2006-03-07 Martin Baulig <martin@ximian.com>
2164 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
2165 regression introduced in r56970; see gtest-252.cs.
2167 * loader.c (mono_get_method_constrained): Correctly handle generic
2168 methods; see gtest-253.cs.
2170 2006-03-04 Zoltan Varga <vargaz@gmail.com>
2172 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
2174 2006-03-04 Martin Baulig <martin@ximian.com>
2176 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
2177 compute the parent type at runtime, just like we're already doing
2181 (mono_reflection_bind_generic_parameters): Don't compute the
2182 parent type anymore.
2184 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
2186 2006-03-04 Martin Baulig <martin@ximian.com>
2188 * mono-debug-debugger.h
2189 (mono_debugger_create_notification_function): Allocate memory at
2190 runtime and return a pointer to it.
2192 2006-03-03 Zoltan Varga <vargaz@gmail.com>
2194 * assembly.c: Fix windows build.
2196 * assembly.c: Fix build.
2198 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
2200 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
2202 2006-03-03 Dick Porter <dick@ximian.com>
2205 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2206 Check parameters before dereferencing them. Fixes Aaron's part of
2209 2006-03-03 Raja R Harinath <rharinath@novell.com>
2211 Fix performance regression.
2212 * loader.c (find_method_in_class): Add 'from_class' argument.
2213 Rename 'klass' argument to 'in_class'. The signature is compared
2214 against the method in 'in_class', and the corresponding method is
2215 returned from 'from_class'.
2216 (find_method): Walk both 'in_class' and 'from_class' in parallel.
2217 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
2218 type definition and generic instantiation in parallel.
2219 (mono_get_method_constrained): Update to changes.
2221 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
2223 * threads.c: make sure the domain is correct, too when doing
2224 mono_thread_attach ().
2226 2006-03-01 Zoltan Varga <vargaz@gmail.com>
2228 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
2229 windows. Fixes #77683.
2231 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
2233 * object.h, *: introduced specific way to set elements of an array
2234 of references to be used as write barrier. Still need to audit the
2235 uses of mono_array_addr.
2237 2006-03-01 Miguel de Icaza <miguel@novell.com>
2239 * object-internals.h: New field to cache the assmebly name, patch
2240 from Tambet Ingo (tambet@ximian.com)
2242 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2244 * decimal.h, class-internals.h, metadata-internals.h,
2245 file-io.h: mark a few function declarations as internal, to
2246 reduce the number of PLT entries.
2248 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2250 * file-io.c: fix typo in warning message.
2252 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
2254 * loader.c: on unix, lookup the "*A" version of a function
2255 if charset is auto as a second option before failing.
2257 2006-02-28 Raja R Harinath <rharinath@novell.com>
2259 * class.h (mono_class_inflate_generic_method): Revert to two
2261 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
2262 (mono_class_inflate_generic_method_full): Add.
2263 * class.c (mono_class_inflate_generic_method_full): Rename from
2264 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
2265 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
2266 * loader.c, reflection.c: Update to changes.
2268 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
2270 * icall.c: const fixes and small improvements.
2272 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2274 * threadpool.c: for asynchronous connect(), enable the same workaround
2275 for BSD 6 as for the Mac. Fixes bug #77637.
2277 2006-02-24 Zoltan Varga <vargaz@gmail.com>
2279 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
2280 formatted classes. Fixes #77524.
2282 2006-02-24 Raja R Harinath <rharinath@novell.com>
2284 * class.c (inflate_generic_type): Add a couple more
2285 micro-optimizations.
2286 (inflate_generic_context): Don't use the 'gmethod' from
2288 (mono_class_inflate_generic_method): If the method has generic
2289 parameters, but the passed-in context doesn't have a 'gmethod',
2290 create one. Use the possibly simplified generic instantiation
2291 from the declaring class instead of the one passed in.
2293 2006-02-24 Raja R Harinath <harinath@gmail.com>
2295 Make generic method signature and method header handling lazy.
2296 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
2297 (inflate_generic_header): Likewise.
2298 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
2299 parameter to avoid inflating types.
2300 (mono_get_inflated_method): Empty out.
2301 * class.h (mono_class_inflate_generic_method): Update to changes.
2302 * loader.c (mono_get_method_from_token): Don't parse signature for
2303 generic methods, nor methods of generic classes.
2304 (mono_method_signature): Rename from 'mono_method_signature'.
2305 Inflate signature on demand.
2306 (mono_method_get_header): Inflate method header on demand.
2307 * reflection.c: Update to changes.
2309 2006-02-23 Raja R Harinath <rharinath@novell.com>
2311 * metadata.c (mono_metadata_inflate_generic_inst): If the
2312 instantiation is closed, don't bother expanding it in the new
2314 * class.c (inflate_generic_class): If the generic instantiation
2315 doesn't change after inflation, return the argument itself.
2316 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
2318 (inflate_generic_context): If neither the generic class nor the
2319 generic method instantiations change, return the original context.
2320 * reflection.c (mono_method_get_object): Do
2321 'mono_get_inflated_method' before accessing the ->klass field.
2322 (inflate_mono_method): Don't create a MonoGenericMethod unless
2324 (inflate_method): Don't pass a constructed type as the declaring
2325 type of a methodbuilder.
2327 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
2329 * object.c: fix memory overwrite.
2331 2006-02-22 Dick Porter <dick@ximian.com>
2333 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
2334 it doesn't work any more.
2335 (mono_threads_request_thread_dump): Fix unused variable warnings.
2337 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2339 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
2340 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
2341 the public header file.
2343 2006-02-21 Zoltan Varga <vargaz@gmail.com>
2345 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
2347 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2349 * class-internals.h, object.c: reduce the size of MonoVTable
2350 and store the interface_offsets array at negative offsets.
2352 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
2354 * metadata.c: tweak table descriptors data structures to reduce
2355 size and runtime relocations.
2357 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2359 * marshal.c: fix some types and opcodes to be type-safe
2360 in marshaling wrappers.
2362 2006-02-21 Ankit Jain <jankit@novell.com>
2364 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
2366 2006-02-21 Raja R Harinath <rharinath@novell.com>
2368 * metadata.c (get_constraints): Relax debugging checks for monodis.
2370 2006-02-21 Ankit Jain <jankit@novell.com>
2372 * metadata.c (mono_metadata_load_generic_params): Move the code
2373 checking for ambiguous generic params from here to mono/dis/get.c
2374 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
2376 2006-02-21 Raja R Harinath <harinath@gmail.com>
2378 Fix assertion triggered when compiling nemerle.
2379 * class.c (mono_get_shared_generic_inst): Rename from
2380 get_shared_inst and make non-static.
2381 * loader.c (mono_get_shared_generic_method): New. Used to create
2382 the MonoGenericContext-equivalent of a MonoGenericContainer.
2383 (mono_get_method_from_token): Initialize the 'context' field of
2384 the created MonoGenericContainer.
2385 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
2386 * metadata.c (get_constraints): Add sanity check.
2387 * class-internals.h: Add new internal methods.
2389 * reflection.c (verify_safe_for_managed_space): New sanity check.
2390 Currently checks that owner-less generic parameters aren't allowed
2392 (mono_type_get_object): Use it.
2393 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
2394 that are now in mono_type_get_object.
2395 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
2397 2006-02-19 Raja R Harinath <harinath@gmail.com>
2399 * metadata.c (mono_type_create_from_typespec): Rename from
2400 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
2401 argument and caching of types in the generic container.
2402 (unwrap_arrays, find_generic_param): Remove.
2403 * metadata-internals.h: Update.
2404 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
2406 2006-02-18 Zoltan Varga <vargaz@gmail.com>
2408 * class.c (mono_class_get_exception_for_failure): Fix a warning.
2410 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
2411 return values. Fixes #77581.
2413 * class.c (mono_fnptr_class_get): Switch name and name_space.
2415 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
2416 classes and add support for [In, Out] attributes.
2417 (mono_marshal_free_asany): Ditto. Fixes #77524.
2419 2006-02-18 Raja R Harinath <harinath@gmail.com>
2421 * class.c (mono_class_from_generic_parameter): Make more robust to
2422 incomplete MonoGenericContainers from monodis.
2424 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2426 * class-internals.h: added some more exception types.
2427 * class.c, metadata.c: added a few checks to handle missing
2430 2006-02-17 Raja R Harinath <rharinath@novell.com>
2432 Use owner-less generic-params some more.
2433 * class.c (my_mono_class_from_generic_parameter): Remove.
2434 (mono_class_from_generic_parameter): Handle null image,
2435 param->name and param->owner.
2436 (mono_class_from_mono_type): Update.
2437 (mono_class_create_from_typespec): Remove 'container' parameter.
2438 If that parameter is non-null, the result is always inflated by
2439 'mono_class_get_full' anyway.
2440 (mono_class_get): Rename from _mono_class_get. Remove 'container'
2442 (mono_class_get_full): Update.
2444 * class.c (inflate_generic_type) [GENERICINST]: If the generic
2445 instance is not open, don't bother inflating.
2446 (mono_class_setup_fields): Hoist some loop-invariants. Don't
2447 parse metadata for inflated classes.
2448 (_mono_class_get): Change GenericContext* parameter to
2450 (mono_class_create_from_typespec): Likewise. Simplify, and
2451 implement trivially. All the cases are handled in
2452 mono_class_from_mono_type. Don't inflate returned class.
2453 (mono_class_get_full): Delegate GENERICINST optimization to
2454 inflate_generic_type.
2455 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
2457 2006-02-16 Dick Porter <dick@ximian.com>
2459 * socket-io.c (create_object_from_sockaddr): Fix typo.
2460 (create_sockaddr_from_object): Check array lengths before
2461 potentially accessing items off the end.
2462 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2463 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2464 (ves_icall_System_Net_Sockets_Socket_Send_internal)
2465 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2466 length checks to avoid wraparound overflows.
2467 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2468 contents of the array of sockets
2469 (hostent_to_IPHostEntry2)
2470 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2471 Check return value of inet_ntop ().
2472 (addrinfo_to_IPHostEntry): Fix typo
2474 2006-02-16 Raja R Harinath <rharinath@novell.com>
2476 Type metadata parsing doesn't use generic-instantiation information.
2477 * metadata.c (mono_metadata_parse_array_full): Change
2478 MonoGenericContext* parameter to MonoGenericContainer*.
2479 (mono_metadata_parse_type_full): Likewise.
2480 (mono_type_create_from_typespec_full): Likewise.
2481 (mono_metadata_parse_mh_full): Likewise.
2482 (mono_metadata_parse_generic_inst): Likewise.
2483 (do_mono_metadata_parse_generic_class): Likewise.
2484 (do_mono_metadata_parse_type): Likewise.
2485 * metadata-internals.h: Update to changes.
2486 * class.c (mono_class_find_enum_basetype): Likewise.
2487 (mono_class_setup_fields): Likewise.
2488 (mono_class_create_from_typespec): Likewise.
2489 * loader.c (method_from_methodspec): Likewise.
2490 (mono_get_method_from_token): Likewise.
2491 (mono_method_get_header): Likewise.
2493 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2495 * marshal.c: handle additional GENERICINST case (patch from
2496 Thong Nguyen <tum@veridicus.com>).
2497 Fix a few cases where LDIND_I/STIND_I was used for references.
2499 2006-02-16 Raja R Harinath <rharinath@novell.com>
2501 * reflection.c (mono_reflection_get_token): Remove unused variable.
2503 2006-02-16 Martin Baulig <martin@ximian.com>
2505 * reflection.c (mono_reflection_get_token): Add support for fields
2506 in instantiated generic types.
2509 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2511 2006-02-15 Martin Baulig <martin@ximian.com>
2514 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2515 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2516 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2517 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2519 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2521 * class.c, metadata.c, metadata.h, object.c, icall.c,
2522 marshal.c: changed mono_type_get_underlying_type () to do
2523 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2524 Fixed handling of instantiated generic valuetypes (bug #75479).
2526 2006-02-15 Raja R Harinath <rharinath@novell.com>
2528 * metadata.c (mono_metadata_decode_signed_value): Simplify.
2529 Delegate to mono_metadata_decode_value, and work on the returned value.
2531 * icall.c (ves_icall_MonoType_GetGenericArguments):
2532 Add consistency check here too.
2534 2006-02-15 Ankit Jain <jankit@novell.com>
2536 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2539 2006-02-15 Ankit Jain <jankit@novell.com>
2541 * metadata.c (mono_metadata_decode_signed_value): New function to decode
2542 signed values, used only for representing lower bounds of arrays.
2543 (mono_metadata_parse_array_full): Use new
2544 mono_metadata_decode_signed_value to decode lower bounds.
2546 2006-02-14 Martin Baulig <martin@ximian.com>
2549 (mono_reflection_get_token): Support "MonoGenericMethod" and
2550 "MonoGenericCMethod" and allow generic instances / methods.
2552 2006-02-11 Zoltan Varga <vargaz@gmail.com>
2554 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2555 to obtain the terminal size using an ioctl.
2557 * object.c (mono_nullable_init): Revert this as nullable reference
2558 types are not valid.
2559 (mono_nullable_box): Ditto.
2561 2006-02-09 Dick Porter <dick@ximian.com>
2563 * threads.c (mono_thread_detach): Drop a reference to the thread
2566 2006-02-09 Zoltan Varga <vargaz@gmail.com>
2568 * object.c (mono_nullable_init): Handle nullable reference types.
2569 (mono_nullable_box): Ditto. Fixes #77446.
2571 2006-02-07 Martin Baulig <martin@ximian.com>
2573 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2575 2006-02-07 Ankit Jain <jankit@novell.com>
2577 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2578 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2579 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2580 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2581 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2582 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2584 2006-02-02 Zoltan Varga <vargaz@gmail.com>
2586 * class.c (mono_class_create_generic): Set type_token as well.
2588 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2591 2006-02-02 Martin Baulig <martin@ximian.com>
2593 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2594 has never been used so far.
2596 2006-02-02 Martin Baulig <martin@ximian.com>
2598 * mono-debug-debugger.h: Changed comment at the top of this file;
2599 the header is not installed, but it's safe to #include it from
2602 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2603 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2605 2006-02-02 Martin Baulig <martin@ximian.com>
2608 (MonoSymbolTable): Removed the `metadata_info' field.
2611 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2613 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2614 (mono_debugger_add_builtin_types): Removed.
2615 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2616 (mono_debugger_create_notification_function): We now operate on a
2617 pre-allocated area; take a `gpointer' and return `void'.
2619 * mono-debug-debugger.c
2620 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2621 (mono_debugger_add_builtin_types): Removed.
2623 2006-02-02 Martin Baulig <martin@ximian.com>
2625 * threads.c (mono_debugger_create_all_threads): New public method.
2627 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2629 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2630 breaks on several platforms.
2632 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
2634 * assembly.c: the VS.NET build doesn't supply default values for
2635 MONO_ASSEMBLIES and MONO_CFG_DIR.
2637 2006-02-01 Zoltan Varga <vargaz@gmail.com>
2639 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2642 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2644 * loader.c (method_from_memberref): Fix a warning.
2646 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2648 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2649 with explicit layout. Fixes #77433.
2651 2006-01-31 Zoltan Varga <vargaz@gmail.com>
2653 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
2654 max_interface_id is initialized before using it. Fixes #77398.
2655 (ves_icall_Type_GetInterfaces): Ditto.
2657 2006-01-30 Raja R Harinath <rharinath@novell.com>
2659 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2660 allocate memory for parameter attributes when parsing memberref
2662 * loader.c (mono_loader_set_error_method_load): Don't warn.
2663 (method_from_memberref): Ensure MissingMethodException gets thrown
2664 if method is not found. Make warning more informative.
2666 2006-01-29 Raja R Harinath <harinath@gmail.com>
2669 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2670 return true if is byref.
2671 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2672 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2673 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2675 2006-01-27 Raja R Harinath <rharinath@novell.com>
2677 Fix tests/find-method.2.il
2678 * loader.c (find_method, find_method_in_class): Remove is_inflated
2679 argument. Revert 2006-01-18 change.
2680 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2681 is generic, search for method in its generic definition.
2682 * class.c (mono_class_setup_vtable_general): Print generic
2683 arguments of generic types in debugging printf.
2685 2006-01-26 Zoltan Varga <vargaz@gmail.com>
2687 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2689 * threads.c (mono_threads_request_thread_dump): New helper function.
2691 2006-01-25 Raja R Harinath <rharinath@novell.com>
2693 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2695 2006-01-25 Ankit Jain <jankit@novell.com>
2697 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2698 move definition to ..
2699 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2701 2006-01-25 Ankit Jain <jankit@novell.com>
2702 Raja R Harinath <rharinath@novell.com>
2704 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2705 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2708 2006-01-25 Martin Baulig <martin@ximian.com>
2710 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2711 `MonoDebuggerThread' into debug-debugger.c.
2713 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2715 * profiler.c: fix printing of data.
2717 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
2719 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2720 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2722 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2724 * object.c: fix deadlock related to string interning.
2726 2006-01-23 Martin Baulig <martin@ximian.com>
2728 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2730 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2732 2006-01-23 Martin Baulig <martin@ximian.com>
2734 * mono-debug.h: Moved the prototypes of some functions which are
2735 used by the JIT here from mono-debug-debugger.h.
2737 2006-01-21 Martin Baulig <martin@ximian.com>
2739 * Makefile.am: Don't install mono-debug-debugger.h.
2741 2006-01-21 Martin Baulig <martin@ximian.com>
2743 * mono-debug-debugger.h: Enforce the private status of this header
2744 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2745 Moved some stuff from mono-debugger-jit-wrapper.h here.
2747 2006-01-20 Raja R Harinath <rharinath@novell.com>
2749 * class.c (mono_class_from_typeref): Add a sanity test to help
2750 catch lack of assembly load/search hooks.
2752 2006-01-19 Zoltan Varga <vargaz@gmail.com>
2754 * marshal.c (emit_struct_conv): Relax the fields with same offset
2755 check even more. Fixes #77230.
2757 2006-01-18 Martin Baulig <martin@ximian.com>
2759 * loader.c (find_method_in_class): Added `gboolean is_inflated'
2760 argument; if false, we compare the uninstantiated signatures.
2761 (method_from_memberref): Compare the uninstantiated signatures;
2764 2006-01-18 Robert Jordan <robertj@gmx.net>
2766 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2767 Clear the weak link. Fixes bug #77170.
2769 * gc.c (mono_gchandle_free):
2770 Reflect *-gc.c changes (tiny optimization).
2772 2006-01-18 Zoltan Varga <vargaz@gmail.com>
2774 * metadata.c (mono_metadata_signature_dup): Applied patch from
2775 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2778 2006-01-17 Zoltan Varga <vargaz@gmail.com>
2780 * marshal.c (emit_struct_conv): Allow fields with the same offset when
2781 marshalling from native to managed code. Fixes #77230.
2783 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2785 * threadpool.c: fix problem (Mac only) when more than one asynchronous
2786 connect. Fixes bug #77020.
2788 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2790 * class.c: fixed id assignement for nested interfaces (bug #77275).
2791 Added also better info for --print-vtable debugging.
2793 2006-01-12 Martin Baulig <martin@ximian.com>
2795 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2796 interfaces on-the-fly; fixes #76625.
2799 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2800 don't need that anymore.
2802 2006-01-12 Miguel de Icaza <miguel@novell.com>
2805 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2806 To avoid initing the nested_classes when not needed I turned the
2807 PeerCredData as a toplevel internal class, as it has to be shared
2810 Fixes the CASA issue.
2812 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
2814 * domain.c: Accessors for MonoJitInfo
2816 * profiler-private.h: Add jitinfo to the end jit hook
2818 * profiler.[ch]: Define new hooks, called after jitting which give
2819 the MonoJitInfo that was compiled
2821 2006-01-10 Martin Baulig <martin@ximian.com>
2823 * class.c (mono_class_setup_events): Add support for generic
2824 classes; fixes #76440.
2826 2006-01-06 Raja R Harinath <rharinath@novell.com>
2829 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2830 on passed-in method.
2832 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2834 * object.c (mono_runtime_invoke_array): Add Nullable support.
2836 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2838 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
2840 * file-io.c: Don't consider sockets as directory and avoid an endless
2841 loop. Fix bug #76966.
2843 2006-01-03 Zoltan Varga <vargaz@gmail.com>
2845 * object.c (mono_nullable_init): New helper function.
2846 (mono_nullable_box): Ditto.
2848 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2850 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2852 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2854 2006-01-02 Zoltan Varga <vargaz@gmail.com>
2856 * class.c (mono_class_is_assignable_from): Make T assignable to
2859 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
2861 * appdomain.c: Bump corlib version to 46.
2862 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2863 serialization purpose) and changed ves_icall_System_Reflection_
2864 Assembly_get_code_base signature to accept a boolean (to escape, or
2865 not, the assembly code base).
2867 2005-12-23 Dick Porter <dick@ximian.com>
2871 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2872 CreateEvent icall now returns "created" boolean parameter.
2874 2005-12-22 Zoltan Varga <vargaz@gmail.com>
2876 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2879 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
2880 when attr_klass is an interface. Fixes #77045.
2882 2005-12-20 Zoltan Varga <vargaz@gmail.com>
2884 * marshal.c (emit_struct_conv): Fix previous patch.
2886 * marshal.c (emit_struct_conv): Add a check for fields with the same
2889 2005-12-20 Raja R Harinath <rharinath@novell.com>
2891 Fix regression in Mono.C5.
2892 * class.c (mono_class_create_generic): If 'klass' is an interface
2893 set up the interface offsets.
2894 (mono_class_is_assignable_from): Don't throw away generic arguments.
2896 2005-12-19 Raja R Harinath <rharinath@novell.com>
2898 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2901 2005-12-15 Raja R Harinath <rharinath@novell.com>
2903 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2905 (do_mono_metadata_parse_generic_class): Don't pass the current
2906 generic context when parsing the type being instantiated: it
2907 cannot use it, anyway.
2909 * loader.c (method_from_memberref): Don't inflate a signature if
2910 it doesn't contain any type parameters.
2912 2005-12-15 Zoltan Varga <vargaz@gmail.com>
2914 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2916 2005-12-14 Martin Baulig <martin@ximian.com>
2919 (mono_type_get_name_recurse): Don't return null for type
2920 parameters and open generic classes.
2921 (mono_class_setup_methods): Don't exclude generic instances.
2922 (mono_get_unique_iid): Use different IDs for different
2923 instantiations of the same generic type.
2924 (mono_class_setup_vtable): Only use setup_generic_vtable() for
2925 open generic instances; create a normal vtable for closed generic
2927 (mono_class_setup_vtable_general): We're now also called for
2928 closed generic instances.
2931 (mono_reflection_bind_generic_parameters): Correctly use
2932 mono_metadata_lookup_generic_inst() everywhere.
2934 2005-12-14 Zoltan Varga <vargaz@gmail.com>
2936 * object.c (mono_class_create_runtime_vtable): Call
2937 mono_class_setup_vtable ().
2939 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2941 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2944 * loader.c (mono_loader_set_error_type_load): Print the type load
2945 warnings to the console so they are more visible to the user.
2946 (mono_loader_set_error_method_load): Ditto.
2948 * reflection.c (ensure_runtime_vtable): Revert the last change as it
2951 * reflection.c (ensure_runtime_vtable): Fix build.
2953 * reflection.c (ensure_runtime_vtable): Disable an optimization which
2954 doesn't work in all cases.
2956 2005-12-13 Zoltan Varga <vargaz@gmail.com>
2958 * object.c (mono_array_new_full): Treat a single dimensional array
2959 with 0 lower bounds as an szarray. Fixes #76973.
2961 * reflection.c (custom_attr_visible): Really fix this.
2963 2005-12-12 Zoltan Varga <vargaz@gmail.com>
2965 * reflection.c (custom_attr_visible): Allow nested public attributes
2968 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2971 2005-12-12 Raja R Harinath <harinath@gmail.com>
2973 * class.c (set_generic_param_owner): Delete.
2974 (mono_class_create_from_typedef): Don't set ->owner field of
2975 generic parameters to "param containers" of enclosing classes.
2976 * reflection.c (mono_reflection_initialize_generic_parameter):
2979 2005-12-11 Zoltan Varga <vargaz@gmail.com>
2981 * reflection.c (custom_attr_visible): Fix build.
2983 2005-12-10 Zoltan Varga <vargaz@gmail.com>
2985 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2988 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2989 handling of null parameter defaults.
2991 2005-12-09 Raja R Harinath <rharinath@novell.com>
2993 * class.c (mono_class_from_generic_parameter): Don't set
2994 klass->generic_container.
2995 (my_mono_class_from_generic_parameter): Likewise.
2997 2005-12-07 Zoltan Varga <vargaz@gmail.com>
2999 * reflection.c (load_public_key): Fix a warning.
3000 (method_encode_code): Fix unaligned accesses.
3002 2005-12-07 Martin Baulig <martin@ximian.com>
3004 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
3007 (write_generic_param_entry): Encode our custom attrs.
3009 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
3011 2005-12-07 Martin Baulig <martin@ximian.com>
3013 * reflection.c (encode_new_constraint): Removed; we don't use the
3014 `NewConstraintAttribute' anymore.
3016 2005-12-06 Zoltan Varga <vargaz@gmail.com>
3018 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
3019 not fire a TypeResolve event when Assembly.GetType () is called.
3021 2005-12-05 Ben Maurer <bmaurer@ximian.com>
3023 Beginning of support for nullable types in the runtime. Parts of
3024 this patch are from Martin.
3026 * appdomain.c (MONO_CORLIB_VERSION): Bump
3028 * domain.c (mono_init_internal): get the nullable type
3030 * class.c (mono_class_is_nullable): New method
3031 (mono_class_get_nullable_param): New mehod
3032 (mono_class_create_generic): In types T? set cast_class to T
3034 * class-internals.h (MonoDefaults): new nullable default class
3035 (mono_class_get_nullable_param, mono_class_get_nullable_param):
3038 2005-12-05 Raja R Harinath <rharinath@novell.com>
3040 * metadata.c (select_container): New. Refactor code to select the
3041 appropriate GenericContainer given the type of generic parameter
3043 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
3044 not a MonoGenericContext. Use select_container. Update parameters.
3045 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
3047 (unwrap_arrays): Remove duplicate tests.
3048 (find_generic_param): Rename from 'has_same_context'. Now walks a
3049 generic instantiated class to find any arguments that are generic
3051 (mono_type_create_from_typespec_full): Use find_generic_param to
3052 avoid evicting some generic instantiations from the typespec
3055 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
3057 * reflection.c: fixed writing of doubles on ARM FPA.
3059 2005-12-02 Robert Jordan <robertj@gmx.net>
3061 * icall.c: Fixed EventInfo.ReflectedType (#76829).
3063 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3065 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
3066 least on SUSE 10 they are not the same (on debian, they are just the
3069 2005-12-01 Raja R Harinath <rharinath@novell.com>
3071 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
3072 DeclaringType for VARs and MVARs.
3073 * class.c (set_generic_param_owner): Fix initialization of owner
3076 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3078 * icall.c: fixed Enum.ToObject() to correctly convert the values.
3080 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3082 * threadpool.c: workaround for a bug that shows up on the Mac:
3083 select()+connect() on a blocking socket is not like it should
3084 be, so we proceed to connect() in that case, wasting the I/O
3085 threadpool thread until connect succeedes. Fixes bug #75436.
3087 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3089 * threadpool.c: fix typo when setting file descriptor states.
3091 2005-11-28 Raja R Harinath <rharinath@novell.com>
3093 * class-internals.h (MonoGenericContainer.is_signature): Remove.
3094 * metadata.c (mono_metadata_parse_method_signature_full): Don't
3095 create a temporary signature container.
3096 (mono_metadata_parse_generic_param): Update to changes.
3097 (mono_type_create_from_typespec_full): Update to changes.
3098 * loader.c (method_from_memberref): Don't use a
3099 MonoGenericContainer while parsing a memberref signature.
3100 (method_from_methodspec): Remove dead-store of the 'container'
3101 variable. It's overwritten before use.
3103 * metadata.c (mono_type_create_from_typespec_full): Make debugging
3105 (mono_metadata_parse_generic_param): Likewise.
3106 * loader.c (find_method_in_class): Does not need a
3107 MonoGenericContainer. Use 'mono_method_signature' rather than
3108 'mono_method_signature_full'.
3109 (find_method, mono_get_method_constrained, method_from_memberref):
3112 * metadata.c (mono_type_create_from_typespec_full): Ensure that
3113 owner-less generic-parameters are never evicted from the typespec
3116 * loader.c (method_from_memberref): Don't use the current context
3117 when parsing signatures.
3118 (method_from_methodspec, mono_get_method_from_token): Update to changes.
3120 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
3121 side-effects in g_assert.
3122 * loader.c (mono_get_method_from_token): Resolve klass earlier so
3123 that we don't potentially lose information.
3125 2005-11-26 Dick Porter <dick@ximian.com>
3128 * threads.c: icalls to implement basic (ie, not named)
3129 System.Threading.Semaphore.
3131 2005-11-24 Dick Porter <dick@ximian.com>
3134 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3135 Use GetProcessId() if it's available.
3137 2005-11-23 Zoltan Varga <vargaz@gmail.com>
3139 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
3141 2005-11-23 Raja R Harinath <rharinath@novell.com>
3142 Ankit Jain <jankit@novell.com>
3144 * loader.c (mono_get_method_from_token): Initialize 'method' field
3145 of all generic parameters before parsing the signature. Remove
3146 code that "fixed"-up MVAR references.
3148 2005-11-23 Ankit Jain <jankit@novell.com>
3150 * metadata.c (mono_metadata_has_generic_params):
3151 (mono_metadata_load_generic_param_constraints):
3152 (mono_metadata_load_generic_params): Move duplicate code ...
3153 (mono_metadata_get_generic_param_row): ... here. Returns the
3154 first row-id in GenericParam table for a given owner (token).
3155 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
3158 2005-11-23 Raja R Harinath <rharinath@novell.com>
3159 Ankit Jain <jankit@novell.com>
3161 * metadata.c (mono_metadata_class_equal): Pass signature_only when
3163 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
3164 type->data.generic_param only if the type is an MVAR.
3165 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
3166 leak owner-less VARs and MVARs into managed space.
3168 2005-11-21 Martin Baulig <martin@ximian.com>
3171 (MonoMethod): Moved the `generic_container' here from
3172 `MonoMethodNormal' since we now also need it for
3173 `MonoMethodPInvoke';
3174 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
3175 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
3176 an union containing both `MonoMethodNormal' and
3177 `MonoMethodPInvoke'.
3180 (mono_get_method_from_token): Allow implementing generic methods
3184 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
3187 2005-11-17 Dick Porter <dick@ximian.com>
3191 * process.c: Split the Process Start_internal icall into
3192 ShellExecuteEx_internal and CreateProcess_internal, which are
3193 called depending on whether UseShellExecute is true. Fixes bug
3196 * appdomain.c (MONO_CORLIB_VERSION): Incremented
3198 2005-11-17 Zoltan Varga <vargaz@gmail.com>
3200 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
3201 'msize' parameters, use the information in 'mspec' instead.
3202 (emit_object_to_ptr_conv): Ditto.
3204 * marshal.c (emit_struct_conv): Handle explicit layout structs with
3205 fields out of order. Fixes #76733.
3207 2005-11-17 Ankit Jain <jankit@novell.com>
3209 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
3211 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
3213 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
3216 2005-11-16 Zoltan Varga <vargaz@gmail.com>
3218 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
3219 for types with non-auto layout. Fixes #76717.
3221 2005-11-16 Ankit Jain <jankit@novell.com>
3223 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
3224 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
3225 if generic_context is null.
3226 (mono_metadata_generic_param_equal): param->owner can be null.
3227 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
3230 2005-11-16 Zoltan Varga <vargaz@gmail.com>
3232 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
3235 2005-11-15 Martin Baulig <martin@ximian.com>
3237 * object.c (set_value): Use mono_class_from_mono_type() instead of
3238 the hack for generic instances; fixes #76136.
3240 2005-11-15 Zoltan Varga <vargaz@gmail.com>
3242 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
3245 * image.c (load_metadata_ptrs): Initialize the new fields.
3247 * reflection.c (create_dynamic_mono_image): Ditto.
3249 * reflection.c (build_compressed_metadata): Use the new fields.
3251 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
3254 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
3257 2005-11-15 Ankit Jain <jankit@novell.com>
3258 Raja R Harinath <harinath@gmail.com>
3260 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
3261 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
3262 new per-generic_container cache if the cached MonoType's context matches
3263 the current context.
3264 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
3265 to the expected context.
3266 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
3268 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3270 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
3271 we changed the signature of an icall.
3272 * icall.c: Modify to mono_double_ParseImpl return true/false
3273 depending on the success, instead of throwing the exception. This will
3274 help us in Double.TryParse methods.
3276 2005-11-14 Zoltan Varga <vargaz@gmail.com>
3278 * marshal.c (emit_marshal_object): Throw an exception when
3279 marshalling 'object' instead of crashing. Fixes #76696.
3281 2005-11-11 Zoltan Varga <vargaz@gmail.com>
3283 * class-internals.h: Add prototype for mono_type_get_full_name ().
3285 2005-11-11 Dick Porter <dick@ximian.com>
3287 * threads.c (mono_thread_manage): Make sure the main thread has
3288 abandoned all its mutexes when cleaning up. Fixes bug 74680.
3290 2005-11-11 Zoltan Varga <vargaz@gmail.com>
3292 * loader.c (mono_loader_set_error_type_load): Log a warning to the
3293 console about the missing type.
3294 (mono_loader_set_error_method_load): Ditto.
3296 2005-11-09 Miguel de Icaza <miguel@novell.com>
3298 * mono-config.c (mono_get_config_dir): Set the system defaults if
3301 * assembly.c (mono_set_dirs): New API entry point to set the
3302 assembly and the config directory in one call
3304 2005-11-09 Zoltan Varga <vargaz@gmail.com>
3306 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
3307 the ftnptr was created from a delegate in a domain other than the
3308 current domain. Fixes #75377.
3310 * exception.h exception.c: Add mono_get_exception_not_supported ().
3312 2005-11-08 Martin Baulig <martin@ximian.com>
3314 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
3316 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
3318 * security-manager.h: Added definitions to deal with strongname key
3319 pairs bigger (and smaller) than 1024 bits.
3320 * reflection.c: Remove hardcoded strongname size (128 bytes) and
3321 adjust wrt the public key length being used.
3323 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
3325 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
3326 Windows build (r51396-51397).
3328 2005-11-03 Martin Baulig <martin@ximian.com>
3330 * class.c (mono_class_setup_vtable_general): Also add generic
3331 methods to the vtable; fixes #76581.
3333 2005-11-01 Miguel de Icaza <miguel@novell.com>
3335 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
3336 sure that we lookup GetString method from the System.Text.Encoding
3337 class, not the derived class or we get an empty method.
3341 2005-10-25 Miguel de Icaza <miguel@novell.com>
3343 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
3344 if it has been previously set (embedders).
3346 Make mono_set_rootdir available also on Unix.
3348 005-10-24 Robert Jordan <robertj@gmx.net>
3350 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
3352 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
3354 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
3355 only calls which are made to native code use this flag.
3357 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
3359 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
3361 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
3362 Add support for FieldBuilders.
3364 2005-10-29 Martin Baulig <martin@ximian.com>
3367 (mono_debug_using_mono_debugger): New public method; returns
3368 whether we're running inside the debugger.
3370 2005-10-27 Zoltan Varga <vargaz@gmail.com>
3372 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
3373 for Method/Constructor/FieldBuilders.
3375 2005-10-26 Zoltan Varga <vargaz@gmail.com>
3377 * reflection.c (module_add_cattrs): Save custom attributes for global methods
3380 2005-10-26 Martin Baulig <martin@ximian.com>
3382 * mono-debug-debugger.c
3383 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
3385 2005-10-24 Raja R Harinath <harinath@gmail.com>
3387 * icall.c (base64_to_byte_array): Don't pass an out-of-range
3390 2005-10-21 Zoltan Varga <vargaz@gmail.com>
3392 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
3393 when passing valuetypes byref. Fixes #76502.
3395 2005-10-19 Jackson Harper <jackson@ximian.com>
3397 * profiler.c: Don't put a . in front of types that are not in a
3400 2005-10-18 Zoltan Varga <vargaz@gmail.com>
3402 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
3404 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
3406 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
3408 (mono_marshal_get_ldflda_wrapper): Fix a warning.
3410 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3412 * assembly.c metadata-internals.h icall.c: Define an additional
3413 parameter for mono_assembly_name_parse_full, so we can avoid creating
3414 S.R.AssemblyName.Version when no version info wasn't passed.
3416 2005-10-09 Miguel de Icaza <miguel@novell.com>
3418 * class.c (mono_type_get_full_name): Reimplement method that was
3421 * image.c: Some docs
3423 2005-10-10 Zoltan Varga <vargaz@gmail.com>
3425 * profiler.c (output_newobj_profile): Fix printing of Total memory
3428 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
3430 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
3432 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
3434 * threads.c: remove debug output.
3436 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
3438 * threads.c (mono_thread_manage): Fix crashes if more than 64
3439 threads need to be aborted. Hopefully fixes #75899.
3441 * assembly.c (mono_stringify_assembly_name): New helper function.
3443 * class.c: Use mono_stringify_assembly_name instead of the similar
3446 * assembly.h assembly.c: Add support for calling a postload search
3447 hook if an assembly cannot be loaded.
3449 * appdomain.c: Register new search hooks which call the AssemblyResolve
3450 events in AppDomain. Fixes #75231
3452 2005-10-07 Martin Baulig <martin@ximian.com>
3454 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
3455 methods without debug info.
3457 2005-10-07 Zoltan Varga <vargaz@gmail.com>
3459 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3462 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3464 * file-io.c: now that we return symlinks, use lstat and, when the file
3465 is a symbolic link, stat, to get the file attributes. Also avoid the
3466 conversion to/from utf16/external.
3468 2005-10-06 Zoltan Varga <vargaz@gmail.com>
3470 * class.c (mono_class_layout_fields): Compute klass->has_references
3471 correctly if an embedded valuetype is not yet initialized. Fixes
3474 2005-10-04 Martin Baulig <martin@ximian.com>
3477 (mono_metadata_load_generic_param_constraints): New public
3478 function; splitted the constraints loading out from
3479 mono_metadata_load_generic_params().
3481 * class.c (mono_class_create_from_typedef): Call
3482 mono_metadata_load_generic_param_constraints() after setting up
3483 the type and creating our parent; fixes #75329.
3485 2005-10-04 Martin Baulig <martin@ximian.com>
3487 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3488 non-dynamic parent classes.
3490 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
3492 * file-io.c : win32 build fix (ETXTBSY seems not found).
3494 2005-10-04 Martin Baulig <martin@ximian.com>
3497 (mono_image_get_methodspec_token): Make the cache actually work;
3500 2005-10-04 Martin Baulig <martin@ximian.com>
3502 * class.c (mono_class_name_from_token): Removed the unneccessary
3503 `MonoGenericContext *' argument.
3505 2005-10-04 Martin Baulig <martin@ximian.com>
3508 (method_from_methodspec): Make the caching work again; fixes the
3509 performance regression from #76262.
3511 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3515 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3516 GetFileSystemEntries that performs the same work but without going
3517 into io-layer, locking, etc.
3519 2005-09-30 Zoltan Varga <vargaz@gmail.com>
3521 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
3522 ThreadState_Stopped as well. Fixes #76047.
3524 2005-09-29 Martin Baulig <martin@ximian.com>
3527 (inflate_generic_context): If the new context has a `gmethod', set
3528 its `container' that that gmethod's `container'.
3531 (mono_metadata_parse_generic_param): Simplify things;
3532 `generic_container = generic_context->container;' is just fine.
3534 * loader.c (method_from_methodspec): Code cleanups.
3536 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3538 * decimal.c: fix warning (and let gcc generate correct
3539 code on ARM with optimizations).
3541 2005-09-28 Martin Baulig <martin@ximian.com>
3544 (method_from_memberref): Added `MonoGenericContext *class_context'
3545 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3546 (method_from_methodspec): If we're a memberref, use the enclosing
3547 context when parsing its parent. Fixes #76262; see gtest-206.cs.
3549 2005-09-28 Martin Baulig <martin@ximian.com>
3551 * object.c (mono_runtime_invoke_array): Added support for
3552 MONO_TYPE_GENERICINST; fixes #75917.
3554 2005-09-27 Martin Baulig <martin@ximian.com>
3556 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3557 `k->byval_arg.type' to determine the actual type.
3559 * loader.c (method_from_methodspec): Removed some hacks.
3561 2005-09-27 Ben Maurer <bmaurer@ximian.com>
3563 * class-internals.h (mono_field_is_deleted): Do the test for
3564 rtspecialname before we check the actual name of the field. This
3565 prevents us from dereferencing a pointer into the string table,
3566 saving us from accessing a few pages
3568 * *.c: Replace the use of {Enter,Leave}CriticalSection with
3569 macros. This will allow a deadlock debugger to easily be plugged
3572 2005-09-27 Martin Baulig <martin@ximian.com>
3574 * loader.c (method_from_methodspec): Create a "signature"
3575 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
3577 2005-09-27 Martin Baulig <martin@ximian.com>
3580 (inflate_generic_class): Correctly set the new context's
3584 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3585 instead of a `MonoGenericContext *'.
3586 (mono_method_signature_full): Take a `MonoGenericContainer *'
3587 instead of a `MonoGenericContext *'.
3590 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3591 instead of a `MonoGenericContext *'.
3592 (mono_metadata_parse_method_signature_full): Likewise.
3594 2005-09-26 Martin Baulig <martin@ximian.com>
3597 (mono_class_from_generic_parameter): Set `klass->generic_container'
3598 (mono_class_from_generic_parameter): Likewise.
3599 (mono_bounded_array_class_get): We inherit the generic container
3600 from the element class.
3603 (find_method, find_method_in_class): Take a `MonoGenericContext *'
3604 argument rather than computing it here.
3605 (method_from_memberref): Correctly set the generic context before
3606 parsing the signature. Fixes #75681.
3608 2005-09-26 Zoltan Varga <vargaz@gmail.com>
3610 * object.c (mono_class_has_special_static_fields): Fix warnings.
3612 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3614 * assembly.c: Add parse_public_key function, to
3615 par the public keys. Also added mono_assembly_name_parse_full,
3616 to define it the parsed key should be freed or not.
3617 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3618 to parse a long format assembly name.
3619 * metadata-internals.h: Keep mono_assembly_name_parse_full as
3620 private, since calling it to preserve the key requires
3621 freeing it manually.
3623 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
3625 * locales.c : removed HAVE_ICU part.
3627 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
3629 * object.c (mono_class_create_runtime_vtable): Avoid calling
3630 field_is_special_static if the klass has no special static fields.
3632 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3633 (MonoCachedClassInfo): Likewise.
3635 * object.c (mono_class_has_special_static_fields): New helper function.
3637 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3639 * class.c (mono_class_create_from_typedef): Don't call
3640 interfaces_from_typedef_full for enums.
3641 (mono_class_create_from_typedef): Compute the base types of enums directly
3642 without calling mono_class_setup_fields ().
3643 (mono_class_find_enum_basetype): New helper function.
3645 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3646 one place inside the string heap.
3648 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3650 * class.c: locking fixes, code cleanups, some docs added.
3651 Allocate some data structures in the image mempool.
3653 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3655 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3658 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3660 * class-internals.h, class.c, reflection.c: reduce memory taken by
3663 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3665 * metadata.c, metadata.h, loader.h: documentation updates, code and
3668 2005-09-23 Zoltan Varga <vargaz@gmail.com>
3670 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3673 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3674 page faults caused by the runtime while reading metadata.
3676 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3678 * socket-io.c: the field names were changed 3 months ago and no one
3679 realized until bug #76077 got filed!
3681 2005-09-20 Martin Baulig <martin@ximian.com>
3683 * icall.c (assembly_icalls): Removed some unused debugger icalls.
3685 2005-09-20 Martin Baulig <martin@ximian.com>
3687 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3688 write the rank into the class entry.
3690 2005-09-20 Martin Baulig <martin@ximian.com>
3692 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3694 2005-09-19 Zoltan Varga <vargaz@gmail.com>
3696 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3698 * icall.c (custom_attrs_defined_internal): New icall.
3700 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3702 (mono_custom_attrs_construct_by_type): New helper function.
3704 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
3706 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3707 terminate the resulting string. Fixes #76123.
3709 2005-09-16 Martin Baulig <martin@ximian.com>
3712 (mono_debug_add_method): Ignore inflated methods for the moment.
3714 2005-09-14 Martin Baulig <martin@ximian.com>
3716 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3718 2005-09-13 Zoltan Varga <vargaz@gmail.com>
3720 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3721 return a success/failure indication.
3722 (mono_metadata_interfaces_from_typedef_full): Ditto.
3723 (get_constraints): Ditto.
3725 2005-09-12 Zoltan Varga <vargaz@gmail.com>
3727 * marshal.c (emit_marshal_array): Fix handling of null arrays.
3729 * marshal.c (emit_marshal_array): Add support for returning string
3730 arrays from delegates. Fixes #76063.
3732 * marshal.c: Use the emit_ldloc/stloc macros where possible.
3734 2005-09-11 Zoltan Varga <vargaz@gmail.com>
3736 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3739 2005-09-09 Zoltan Varga <vargaz@gmail.com>
3741 * reflection.c icall.c: Fix after mono_get_exception_type_load
3744 * assembly.c (mono_assembly_get_assemblyref): New helper function.
3745 (mono_assembly_load_reference): Use the new helper.
3747 * class-internals.h (MonoLoaderError): New structure containing
3748 information about type loading errors.
3750 * class-internals.h loader.c: Add APIs to store per-thread loader
3753 * loader.c class.c: Set the loader error if needed.
3755 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3757 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3759 * decimal.c: fixed to handle the broken ARM fp format.
3761 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3763 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3766 2005-09-06 Martin Baulig <martin@ximian.com>
3768 * domain.c (supported_runtimes): Added v2.0.50727.
3770 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3772 * culture-info.h: reduce the size of some structures.
3774 2005-09-05 Martin Baulig <martin@ximian.com>
3776 Reflect latest API changes in the August CTP.
3779 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3780 ("MonoType.HasGenericArguments"): Removed.
3781 ("MonoMethod.BindGenericParameters"): Renamed to
3782 "MakeGenericMethod".
3783 ("MethodBuilder.BindGenericParameters"): Renamed to
3784 "MakeGenericMethod".
3786 2005-09-05 Martin Baulig <martin@ximian.com>
3788 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3790 2005-09-05 Martin Baulig <martin@ximian.com>
3792 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3794 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3795 generic_container is non-NULL.
3797 2005-09-05 Martin Baulig <martin@ximian.com>
3799 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3801 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3803 2005-08-29 Michal Moskal <malekith@nemerle.org>
3805 * reflection.c (encode_locals,
3806 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3807 for large generic types.
3809 2005-09-05 Martin Baulig <martin@ximian.com>
3811 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3813 * class.c (mono_dup_array_type): New public method.
3814 (mono_metadata_signature_deep_dup): New public method.
3815 (dup_type): Correctly duplicate array and function types.
3817 2005-09-05 Martin Baulig <martin@ximian.com>
3819 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3821 * reflection.c (get_default_param_value_blobs): Handle generic types
3822 and generic methods.
3824 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
3826 * class.c: Fixed error reporting (method/class were inversed) for
3827 inheritance demands.
3828 * security-manager.c|h: Added the AppDomain when calling the managed
3829 System.Security.SecurityManager.InheritanceDemand method.
3831 2005-09-01 Raja R Harinath <rharinath@novell.com>
3833 * reflection.c (encode_marshal_blob): 'marshaltype' and
3834 'marshaltyperef' are alternate sources for the custom marshaler
3837 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3839 * class.c: fix creation of array classes with rank == 1
3840 (patch by Ankit Jain <jankit@novell.com>).
3842 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3844 * object.c: fix check for creating the bound data for arrays vs
3847 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3849 * object.c: configuration file name is now based on the executable name,
3850 not the image name. Fixes bug #75931.
3852 2005-08-29 Zoltan Varga <vargaz@gmail.com>
3854 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3855 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3857 2005-08-25 Zoltan Varga <vargaz@gmail.com>
3859 * rand.c: Use wincrypt.h instead of WinCrypt.h.
3861 2005-08-24 Ankit Jain <jankit@novell.com>
3862 Raja R Harinath <rharinath@novell.com>
3864 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3865 called by it recursively.
3866 (mono_class_init): Remove special case in pending_init handling, since it's
3867 superseded by the fix to mono_class_from_typeref.
3869 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
3871 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
3872 BROKEN_THREAD_START stuff.
3874 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
3876 * class-internals.h object.c: Add a new kind of trampoline called a delegate
3879 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3881 * object.c (mono_delegate_ctor): Replace the original function address with
3882 a delegate trampoline.
3884 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3886 * icall.c: add boolean argument to base64_to_byte_array and
3887 InternalFromBase64String to control whether a whitespace-only string
3888 is allowed (or should casue a FormatException to be thrown). We need
3889 this as the behavior has changed between MS.NET 1.x and 2.0, and we
3890 to match the MS behaviour in both profiles.
3891 * appdomain.c: Bump corlib version.
3893 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3895 This patch implements a big portion of publisher policy
3896 support, used to bind assembly versions and redirect
3897 one assembly from version A to version B.
3900 New GSList loaded_assembly_bindings, for storing the cached
3902 (assembly_binding_maps_name): New static function for checking if a
3903 assembly binding information maps an assembly name.
3904 (mono_assembly_binding_info_free): New function for freeing
3905 assembly binding information resources.
3906 (get_publisher_policy_info): New static function for retrieving
3907 assembly binding information from a MonoImage.
3908 (compare_versions): New static function for comparing an assembly
3909 binding information data and the version of an assembly name.
3910 (check_policy_versions): New static function for checking if an
3911 assembly binding info mapping an assembly name is valid for it.
3912 (mono_assembly_load_publisher_policy): New static function for
3913 loading the 'policy.major.minor.MyAssembly' image for an assembly
3914 with an assembly name 'aname'.
3915 (mono_assembly_bind_version): New static function for updating
3916 assembly redirection.
3917 (mono_assembly_apply_binding): New static function for applying
3919 (search_binding_loaded): New static function for searching
3920 loaded assembly binding infos in the cache domain.
3921 (mono_assembly_load_full): Don't apply assembly binding for
3922 reflection only assemblies.
3924 * metadata-internals.h: Add MonoAssemblyBindingInfo,
3925 which contains information about assembly binding. Also
3926 declare signature for mono_config_parse_publisher_policy ()
3927 function, used to retrieve pub policy info.
3930 (publisher_policy_start): New static function used to parse publisher
3931 policy config files.
3932 (publisher_policy_parser): New static MonoParseHandler containing
3933 the functions used when parsing config files.
3934 (mono_config_parse_publisher_policy): New function for parsing
3935 publisher policy files.
3937 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
3939 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3941 * marshal.c (mono_delegate_free_ftnptr): Ditto.
3943 * object.c (mono_get_addr_from_ftnptr): New helper function.
3945 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3947 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3949 2005-08-19 Dick Porter <dick@ximian.com>
3951 * threads.c, threads.h, appdomain.c, appdomain.h,
3952 profiler-private.h, monitor.c, object.c, object-internals.h,
3953 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3954 store the thread ID, so it can hold a 64 bit value if needed.
3956 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
3958 * reflection.c (mono_reflection_create_dynamic_method): Store the
3959 handle class into the method references as well so ldtoken works in
3962 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3965 2005-08-19 Ankit Jain <jankit@novell.com>
3968 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
3969 here rather than using the method signature of a arbitrary function
3970 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
3972 Hack done with Harinath.
3974 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3976 * threadpool.c: disable printing stack traces when we get a exception
3977 in a threadpool thread. I need to do more testing to figure out which
3978 cases actually print this. Fixes bug #75828.
3980 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3982 * icall.c: there might be ignored whitespace after the last '='. This
3983 fixes length computation and bug #75840.
3985 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
3987 * assembly.c (mono_assembly_load_full): Consider .exe extension as
3990 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3993 * reflection.c (create_custom_attr_data): Ditto.
3995 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
3997 * locales.c, culture-info.h : removed RegionLCIDMap.
3998 * culture-info-tables.h : regenerated.
4000 2005-08-16 Martin Baulig <martin@ximian.com>
4002 * class.c (mono_type_get_name_recurse): Small fix.
4004 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
4006 * locales.c : indentation fixie.
4008 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
4010 * object-internals.h,
4014 icall.c : added RegionInfo table support.
4015 * culture-info-table.h : regenerated for region support.
4017 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
4019 * reflection.c (resolve_object): handle all kinds of MonoMethod
4020 including generic ones
4022 2005-08-12 Ankit Jain <jankit@novell.com>
4024 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
4025 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
4027 2005-09-12 Lluis Sanchez <lluis@ximian.com>
4029 * process.c: Don't close a thread handle when it's NULL. This is a
4030 workaround for bug #75733.
4032 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
4034 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
4036 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
4038 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
4040 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4042 * threadpool.c: if a work item in the thread pool has a callback that
4043 catches a exception, don't propagate it after invoking the callback.
4046 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
4048 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
4050 * class-internals.h (MonoCachedClassInfo): Add some new fields.
4052 * class.c (mono_class_init): Load field info lazily in the AOT case.
4054 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
4056 2005-08-03 Ankit Jain <jankit@novell.com>
4059 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
4060 PInvoke calling convention is 0.
4062 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
4064 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
4065 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
4067 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
4069 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
4070 to handle threads not started by the GC (patch by Michael Meeks
4071 <michael.meeks@novell.com>).
4073 2005-07-31 Kamil Skalski <nazgul@omega.pl>
4075 * reflection.c: Make buffer used in emitting types larger for some
4076 big generic types (patch by Michal Moskal).
4078 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
4080 * mono-debug.c: Fix some (not all) alignment problems.
4082 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4084 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
4085 Invoke mono_image_load_from_data_full passing the refonly
4089 (mono_assembly_open_from_bundle): Add the refonly argument,
4090 in order to pass it to other methods it calls to.
4091 (do_mono_assembly_open): Add the refonly argument, in order
4092 to pass it to other methods it calls to.
4093 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
4094 the refonly parameter to it.
4096 * image.c: Add loaded_images_refonly_hash and
4097 loaded_images_refonly_guid_hash to cache the reflection
4099 (mono_images_init): Initialize the hash tables used for
4100 caching the reflection only images.
4101 (load_modules): Invoke mono_image_open_full passing the refonly
4102 parameter to load the modules the correct way.
4103 (build_guid_table): Add the refonly argument, to re-build the
4105 (do_mono_image_open): Added the refonly argument, in order to
4106 define it for the loaded image.
4107 (mono_image_loaded_full): New function, which receives an
4108 additional parameter to look for the image in the refonly or
4109 non-refonly section.
4110 (mono_image_loaded): Updated, using mono_image_loaded_full.
4111 (mono_image_loaded_by_guid_full): The same case that happens
4112 with mono_image_loaded_full.
4113 (mono_image_loaded_by_guid): Likewise.
4114 (register_image): Use the ref_only variable inside MonoImage
4115 to decide in which hash table store the current image.
4116 (mono_image_open_from_data_full): Rename
4117 mono_image_open_from_data to mono_image_open_from_data_full,
4118 adding the refonly argument, to define the ref_only variable
4120 (mono_image_open_from_data): Return
4121 mono_image_open_from_data_full.
4122 (mono_image_open_full): Rename mono_image_open to
4123 mono_image_open_full, receiving the new refonly argument,
4124 to pass it to inner methods.
4125 (mono_pe_file_open): Update this function, to open
4126 a MonoImage as a non-refonly image.
4127 (mono_image_close): Use the refonly variable inside
4128 MonoImage to remove the image from the correct caches.
4130 * image.h: Add the signatures of mono_image_open_full,
4131 mono_image_open_from_data_full, mono_image_loaded_full,
4132 mono_image_loaded_by_guid_full.
4134 * metadata-internals.h: Add the ref_only field to
4137 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4139 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
4140 Fix the last behavior, which used to load the assemblies and
4141 extract MonoReflectionAssemblyName information, instead of
4142 extract it from the metadata tables. Needed for Reflection
4145 2005-07-29 Martin Baulig <martin@ximian.com>
4147 * mono-debug-debugger.c
4148 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
4152 (mono_debug_address_from_il_offset): Check whether we have
4153 debugging support before attempting to take the lock.
4154 (mono_debug_source_location_from_address): Likewise.
4155 (mono_debug_source_location_from_il_offset): Likewise.
4156 (mono_debug_il_offset_from_address): Likewise.
4157 (mono_debug_address_from_il_offset): Likewise.
4159 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
4161 * class.c (mono_class_from_name_case): Add support for dynamic images.
4164 * object.c (mono_class_compute_gc_descriptor): Add a workaround
4167 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
4169 * reflection.c (mono_method_get_object): Fix warning.
4171 2005-07-28 Martin Baulig <martin@ximian.com>
4174 (mono_debug_add_wrapper): Also write the wrapper type.
4176 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
4178 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
4180 * class.c (mono_class_init): Avoid reading nested classes if the AOT
4181 data indicates the class has none.
4183 2005-07-26 Ben Maurer <bmaurer@ximian.com>
4185 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
4186 loader lock with the debugger lock. Prevents deadlocks for beagle.
4188 Beagle can now run on an smp box for a weekend without any
4191 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
4193 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
4194 in a module. Fixes #75629.
4196 2005-07-26 Martin Baulig <martin@ximian.com>
4198 * mono-debug.c (mono_debug_add_wrapper): New static method.
4199 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
4200 interncall or a wrapper.
4202 * mono-debug.h (MonoDebugWrapperData): New public typedef.
4203 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
4204 (MONO_DEBUGGER_VERSION): Bump to 51.
4206 * mono-debug-debugger.c
4207 (mono_debugger_add_type): Removed this empty function.
4208 (mono_debugger_add_method): Likewise.
4210 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
4212 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
4213 before accessing method->slot.
4215 2005-07-21 Jb Evain <jbevain@gmail.com>
4217 * reflection.c (method_encode_clauses/class): Handle filters clauses.
4220 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
4222 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
4225 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
4227 * image.h image.c: Add mono_image_get_guid () API function.
4229 2005-07-19 Ben Maurer <bmaurer@ximian.com>
4231 There were issues when multiple threads tried to load
4232 assemblies. A deadlock was created between assemblies_mutex and
4233 mono_domain_assemblies_lock. This fixes the issue by making the
4234 assembly ref counting be lock free. See bug 75586.
4236 * image.c (mono_image_close): The add ref function here was using
4237 Interlocked operations while the unref was using a mutex and a
4238 --. I don't think this was ever a bug that would be exposed in a
4239 non-pendantic way (ie, by an embedder doing a ref on one thread
4240 and an unref on another), but for the sake of correctness, this is
4243 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
4244 (mono_assembly_load_reference): Call mono_assembly_addref rather
4245 than touching the refcount ourselves.
4246 (mono_assembly_close): Use InterlockedDecrement to unref the
4247 assembly. Don't acquire the lock unless it is actually needed.
4249 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
4251 * class.c (mono_class_layout_fields): Fix calculation of has_references
4254 2005-07-12 Martin Baulig <martin@ximian.com>
4256 Applying a patch from Michal Moskal <malekith@nemerle.org>.
4259 (mono_type_hash): Provide better hashing for generic instances.
4260 (mono_generic_inst_hash): Improve hashing.
4261 (mono_generic_class_hash): Likewise.
4263 * reflection.c (mymono_metadata_type_hash): Improve hashing for
4266 2005-07-12 Martin Baulig <martin@ximian.com>
4268 * reflection.c (mono_reflection_create_runtime_class): Remove the
4269 hack for generic type definitions and non-`Run' assemblies.
4270 (mono_reflection_bind_generic_parameters): Also use
4271 `klass->wastypebuilder' to check for TypeBuilders.
4273 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
4275 * class.c (mono_class_layout_fields): Fix calculation of has_references
4278 * class.c (inflate_generic_class): Fix a leak.
4279 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
4282 2005-07-11 Martin Baulig <martin@ximian.com>
4284 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
4287 2005-07-11 Martin Baulig <martin@ximian.com>
4289 * loader.c (find_method): Also lookup in
4290 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
4292 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
4294 * appdomain.c (mono_domain_unload): Don't free the error message
4295 before passing it to mono_get_exception_...
4297 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
4299 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
4301 * threads.c: try to better guess an available RT signal (bug #75387).
4303 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
4305 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
4308 2005-07-07 Martin Baulig <martin@ximian.com>
4310 * class.c (mono_type_get_name_full): Return NULL for
4311 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
4314 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
4316 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
4317 exit the appdomain as well being aborted.
4319 * threadpool.c: Create all threadpool threads inside the root appdomain, and
4320 change back to the root domain after calling managed code. This enables
4321 appdomains using threadpools to be unloaded.
4323 2005-07-07 Martin Baulig <martin@ximian.com>
4326 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
4327 into `MonoDynamicGenericClass' since we only need it for dynamic
4330 * reflection.c (mono_class_bind_generic_parameters): We don't need
4331 to compute the `parent' here.
4333 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
4335 * culture-info-table.h : regenerated.
4337 2005-07-06 Martin Baulig <martin@ximian.com>
4340 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
4342 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
4344 2005-07-06 Martin Baulig <martin@ximian.com>
4346 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
4347 we're doing a signature-only comparision; fixes #74945.
4349 2005-07-06 Martin Baulig <martin@ximian.com>
4351 * class-internals.h (MonoGenericClass): Moved some things out into
4352 a new `MonoInflatedGenericClass' type.
4353 (MonoInflatedGenericClass): New type; the `klass' of a
4354 `MonoGenericClass' is now computed lazyly in
4355 mono_get_inflated_generic_class().
4357 * class.c (mono_get_inflated_generic_class): New public function.
4358 (mono_class_inflate_generic_method): Removed the unused
4359 `MonoClass *' argument.
4360 (setup_generic_vtable): Don't call mono_get_inflated_method() on
4362 (mono_class_create_generic): Make this static and merge it with
4363 mono_class_create_generic_2(); we're now called automatically from
4364 mono_get_inflated_generic_class().
4366 * loader.c (mono_method_signature): Call
4367 mono_get_inflated_method() here.
4369 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
4371 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
4372 type of fields with RVA.
4374 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
4375 for this pseudo class.
4376 (my_mono_class_from_generic_parameter): Likewise.
4377 (mono_class_init): Allow interfaces to have cctors.
4379 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
4381 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
4382 lazily for AOT methods.
4384 2005-07-05 Martin Baulig <martin@ximian.com>
4386 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
4387 returns FALSE for a successful match, not TRUE.
4389 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
4391 * loader.c (mono_method_get_index): Optimize this a bit.
4393 2005-07-04 Martin Baulig <martin@ximian.com>
4396 (class_compute_field_layout): Move the check for generic type
4397 definitions into mono_class_layout_fields(). Fixes #74684.
4398 (mono_class_from_generic_parameter): Correctly compute
4399 `klass->parent'; fixes #75457.
4401 * reflection.c (register_assembly, register_module): Make sure
4402 `domain->rejobject_hash' is already created.
4404 2005-07-02 Martin Baulig <martin@ximian.com>
4407 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
4408 `MonoDynamicGenericClass'.
4410 2005-07-01 Lluis Sanchez <lluis@ximian.com>
4412 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
4413 returned by a field getter is null, since null is a valid value.
4415 2005-07-01 Martin Baulig <martin@ximian.com>
4417 * reflection.c (mono_reflection_generic_class_initialize): Update
4418 the `dgclass->fields [i].parent' to the correct class.
4419 (mono_image_get_fieldref_token): Use the declaring type, not the
4422 2005-07-01 Martin Baulig <martin@ximian.com>
4424 * loader.c (find_method): Also look in the interfaces; fixes #75429.
4426 2005-06-30 Ben Maurer <bmaurer@ximian.com>
4428 * threads.c (thread_cleanup): assert that thread != NULL
4429 (wait_for_tids_or_state_change): We were using the wrong variable
4430 when accessing wait->threads. `i' was always out of the bounds of
4433 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4435 * loader.c: map user32 and kernel32 to libMonoSupportW
4437 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
4439 * appdomain.c (unload_thread_main): Mark this as WINAPI.
4441 2005-06-28 Martin Baulig <martin@ximian.com>
4443 * loader.c (method_from_methodspec): Fix #75334.
4445 2005-06-28 Martin Baulig <martin@ximian.com>
4447 Fix #74953 - Arrays now implement the generic IList<T> interface
4448 on the 2.0 platform.
4450 * class-internals.h (MonoDefaults): Added `generic_array_class'.
4452 * reflection.c (mono_class_bind_generic_parameters): New public
4453 function; similar to mono_reflection_bind_generic_parameters(),
4454 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
4456 * domain.c (mono_init_internal): Try to initialize.
4457 `mono_defaults.generic_array_class' here; this'll only succeed if
4458 we're using the 2.0 corlib.
4461 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4462 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4463 (mono_lookup_internal_call): Added support for nested classes.
4466 (mono_get_method_from_token): Set `result->signature->pinvoke' if
4467 we're an interncall and have generic arguments.
4470 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4471 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4472 instance of System.Array.InternalArray<T> for arrays, so they
4473 implement the generic IList<T> interface.
4475 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
4477 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4478 (chastamar@yahoo.com). Fixes #75374.
4480 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
4482 * culture-info-table.h: regenerated.
4484 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4486 * icall.c: handle spaces correctly for base64 strings.
4488 2005-06-26 Ben Maurer <bmaurer@ximian.com>
4490 * *.c: Kill some warnings.
4492 2005-06-23 Duncan Mak <duncan@novell.com>
4494 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4495 that this builds on Solaris 10 (x86).
4497 2005-06-23 Martin Baulig <martin@ximian.com>
4500 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4501 generic type definitions.
4503 2005-06-23 Martin Baulig <martin@ximian.com>
4507 * metadata.c (mono_class_get_overrides): Renamed to
4508 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4509 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4510 pass it to mono_get_method_full().
4512 2005-06-22 Ben Maurer <bmaurer@ximian.com>
4514 * reflection.c (mono_reflection_create_runtime_class): take the
4515 mono_domain_lock in this method. Prevents deadlocks
4517 2005-06-22 Martin Baulig <martin@ximian.com>
4519 * loader.c (method_from_methodspec): Fix #75330.
4521 2005-06-22 Martin Baulig <martin@ximian.com>
4523 * reflection.c (type_get_qualified_name): Use
4524 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4525 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4526 argument; use it if we don't have an assembly name.
4528 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
4530 * object.c: In mono_message_init, set "copy out" flag for in
4531 parameters with the [Out] flag.
4533 2005-06-21 Martin Baulig <martin@ximian.com>
4536 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4539 2005-06-21 Martin Baulig <martin@ximian.com>
4541 * class.c (mono_class_init): Don't initialize `class->fields' for
4542 generic instances since they're initialized again in
4543 compute_field_layout().
4544 (compute_field_layout): Set the field's `generic_info' here; fix
4547 2005-06-21 Martin Baulig <martin@ximian.com>
4550 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4552 * metadata.c (mono_metadata_generic_method_equal): Also
4553 distinguish the `generic_class'; fixes #75334.
4555 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4559 * domain-internals.h:
4560 * reflection.c: 'domain_assemblies' field is now protected by its own
4561 lock. Don't call into managed code to run the AssemblyLoad event if we
4562 now there are no registered delegates for it.
4564 2005-06-20 Martin Baulig <martin@ximian.com>
4566 * class.c (mono_class_is_assignable_from): Use a custom version of
4567 mono_class_has_parent() to make things work for generic instances;
4570 2005-06-20 Martin Baulig <martin@ximian.com>
4572 * loader.c (method_from_methodspec): Apply a patch from
4573 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4575 2005-06-20 Martin Baulig <martin@ximian.com>
4577 * class.c (mono_class_init): Reverted Zoltan's last change; it
4580 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
4582 * threads.c (wait_for_tids_or_state_change): Add missing locking.
4584 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4586 * socket-io.c: fix the index in the socket array for writable/error
4587 sockets. Fixes bug #75306.
4589 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
4591 * class.c (mono_class_init): Allow interfaces to have static ctors.
4593 2005-06-17 Martin Baulig <martin@ximian.com>
4595 * loader.c (method_from_methodspec): Use `context->container' when
4596 parsing the `gmethod->inst'.
4598 2005-06-17 Martin Baulig <martin@ximian.com>
4600 * class.c (mono_type_get_name_recurse): Don't add the assembly
4601 name for type arguments.
4603 2005-06-15 Martin Baulig <martin@ximian.com>
4605 * reflection.c (mono_image_get_inflated_method_token): Encode
4606 correct klass; fixes #75260.
4608 2005-06-13 Michal Moskal <malekith@nemerle.org>
4610 * icall.c: Make GetCorrespondingMethod/Constructor take
4611 MonoReflectionMethod method not MonoMethod. Removed
4612 MonoType.GetCorrespondingField, and make
4613 MonoGenericType.GetCorrespondingField take name not
4616 2005-06-13 Michal Moskal <malekith@nemerle.org>
4618 * reflection.c (field_encode_signature, encode_locals):
4619 Make sizes of buffers for types larger (for big generic types).
4620 (create_generic_typespec,
4621 mono_reflection_sighelper_get_signature_local,
4622 mono_reflection_sighelper_get_signature_field):
4623 Add asserts for too small buffers.
4625 2005-06-15 Martin Baulig <martin@ximian.com>
4627 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4628 if our parent is not a dynamic type.
4630 2005-06-15 Martin Baulig <martin@ximian.com>
4632 * class-internals.h (MonoTypeNameFormat): New enum.
4635 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4636 (mono_type_get_full_name): Removed.
4637 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4638 argument instead of the boolean's.
4640 * icall.c (ves_icall_System_MonoType_getFullName):
4641 Added `gboolean assembly_qualified'.
4644 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4646 * reflection.c (mono_reflection_parse_type): Parse the new type
4649 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4651 * icall.c: no need to convert from utf16 to utf8 and then back again
4652 after the call to GetLogicalDrives.
4654 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4656 * icall.c: frombase64. Fix problems exposed by new tests.
4658 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4660 * icall.c: added internal calls for converting char [] and strings in
4661 base64 into byte [].
4663 2005-06-10 Martin Baulig <martin@ximian.com>
4665 * class.c (mono_class_create_generic_2): Read the nested classes
4666 from the metadata rather than from `gklass->nested_classes' since
4667 `gklass' might not be initialized yet.
4669 2005-06-09 Duncan Mak <duncan@novell.com>
4671 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4672 all public headers. Fixes #74919.
4674 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
4676 * domain.c: The key for proxy_vtable_hash is now a pointer
4677 array. Added new GHashFunc and GCompareFunc functions for this.
4679 * class.h: The list of interfaces in MonoRemoteClass is known in
4680 advance and can't grow (we create a new MonoRemoteClass if needed),
4681 so now the interface array can be allocated together with
4684 * object.c: Added a new method create_remote_class_key.
4685 Fixed mono_remote_class so it does not depend on
4686 mono_upgrade_remote_class.
4687 Removed extend_interface_array.
4688 Added new method clone_remote_class(), which makes a copy of a remote
4689 class and adds a new interface or class to it.
4690 mono_upgrade_remote_class() now creates a new remote class (or gets
4691 it from the cache) if an vtable upgrade is needed. In this way
4692 we make sure that other objects sharing the same remote class
4693 don't get the new vtable with unwanted interfaces.
4695 * object-internals.h:
4696 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4698 * marshal.c: Track changes in mono_upgrade_remote_class().
4700 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
4701 * icall.c: Add runtime methods for obtaining members of inflated
4702 class, which were created from supplied non-inflated members. It
4703 is used in internal Get{Method,Constructor,Field} methods in
4706 2005-06-09 Martin Baulig <martin@ximian.com>
4709 (mono_reflection_bind_generic_method_parameters): Fix #75169.
4711 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4712 * reflection.c (mono_image_basic_init): Define
4713 Version in MonoDynamicAssembly.
4715 2005-06-08 Martin Baulig <martin@ximian.com>
4720 (mono_method_signature_full): New public method; takes a
4721 `MonoGenericContext *'.
4722 (find_method): Use mono_method_signature_full() and pass the
4723 klass'es context to it.
4725 * class.c (mono_class_is_inflated_method): Use
4726 mono_method_signature_full() and pass the context to it.
4728 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4730 * object.c: add proper locking in mono_remote_class_vtable(),
4731 fixes possible memory corruption.
4733 2005-06-08 Michael Meeks <michael.meeks@novell.com>
4735 * marshal.c (mono_remoting_marshal_init): set
4736 initialized after initialization.
4738 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
4742 2005-06-06 Michael Meeks <michael.meeks@novell.com>
4744 * object.c (extend_interface_array): fix really silly
4745 memory corrupting / comparison bug.
4747 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4749 * reflection.c: Functions added to support the creation
4750 of CustomAttributeData, which includes Attribute data
4751 used by ReflectionOnly methods.
4753 * reflection.h: mono_reflection_get_custom_attrs_data and
4754 mono_custom_attrs_data_construct added (functions exposed).
4756 * icall.c: Added mono_reflection_get_custom_attrs_data
4759 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
4761 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4764 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
4766 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4768 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4769 dynamic DllImportAttribute.
4771 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
4772 dynamic DllImportAttribute.
4774 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4777 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4779 * threads.c: avoid segfault when an unstarted thread is aborted.
4781 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
4783 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4784 Returns the name and version of the runtime for reporting.
4786 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4788 * appdomain.c: bump corlib version.
4789 * object-internals.h: new field in MonoReflectionAssembly.
4791 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4793 * object-internals.h: Carlos forgot to add this field.
4795 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4797 * icall.c: Added create_version to create instances
4798 of Version of MonoReflectionAssemblyName. This change helps
4799 the AssemblyName tests to keep running fine.
4801 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
4803 * object.c (mono_method_return_message_restore): A somehow less
4804 intrusive fix for #75138.
4806 2005-06-03 Raja R Harinath <rharinath@novell.com>
4808 * object.c (mono_method_return_message_restore): Fix computation
4809 of expected number of out args.
4811 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4813 * reflection.c (mono_image_get_method_info): Fix the case when the
4816 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4818 * object.c: Added missing null check in
4819 mono_method_return_message_restore.
4821 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
4823 * reflection.c (mono_image_get_method_info): Handle the case when
4826 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
4828 * object.c: When creating the vtable for a proxy, take into account
4829 all inherited interfaces, not only the ones registered in
4830 iclass->interfaces. This fixs bug #74996.
4831 Also, in mono_method_return_message_restore, verify that the array
4832 of out args has the expected lengh.
4834 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4836 * socket-io.c: update the timeout in Poll when the call is interrupte.
4838 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4840 * socket-io.c: support abort/suspend in Select_internal after last
4843 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4845 * threadpool.c: remove warning.
4847 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4850 * socket-io.[ch]: Select_internal uses poll() now when available, thus
4851 removing the 1024 limit from select(). Runtime part of the fix for
4854 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4856 * socket-io.c: when resolving the addresses for the same
4857 host returned by gethostname(), get the local IPs from the interface
4858 list. Loopback addresses are discarded if the are interfaces up with
4859 non-loopback ones. Fixes bug #63265.
4861 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
4863 * appdomain.c, verify.c, object-internals.h, reflection.c:
4864 bumped corlib number to 36, and added new extra_flags field
4865 to ReflectionMethodBuilder and friends. Fixes #75060.
4867 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4869 * gc.c: register a new weak link only if the object is non-null
4872 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4874 * culture-info.h : short time pattern too.
4876 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
4878 * culture-info.h : expand long time pattern string length.
4880 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4882 * culture-info-table.h : update (more French date format; #72788).
4884 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
4886 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4887 the method is static. Fixes #75029.
4889 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
4891 * reflection.c: Update the table_idx field of method builders after
4892 saving the module, since it can change. This is a workaround for
4895 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
4897 * culture-info-table.h : update (additional French date format).
4899 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
4901 * icall.c (ves_icall_type_Equals): Revert last change.
4903 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4905 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4907 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
4909 * class-internals.h: Added executioncontext_class field to
4910 MonoDefaults structure.
4911 * domain.c: Cache System.Threading.ExecutionContext class in
4913 * object.c: Capture the ExecutionContext for asynchroneous calls in
4914 mono_async_result_new.
4915 * object-internals.h: Added execution_context and original_context
4916 fields to MonoAsyncResult. Added execution_context to MonoThread.
4917 * security-manager.c|.h: Added mono_get_context_capture_method to
4918 return the capture method (if required by the security manager or by
4919 the framework version used).
4920 * threadpool.c: Apply capture (if present) ExecutionContext in
4921 mono_async_invoke and revert to original context after it completes.
4923 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
4925 * culture-info-table.h : updated (real hacky solution for zh-CHT).
4927 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
4929 * culture-info-table.h : zh-CHT related workaround.
4931 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4933 * marshal.c (emit_marshal_custom): Add some error checking and call the
4934 methods in the ICustomMarshaler interface. Fixes #74875.
4936 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4937 native->managed wrappers.
4939 2005-05-12 Martin Baulig <martin@ximian.com>
4941 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4942 here and use the loader lock.
4944 * mono-debug.c: Properly lock when the debugger is not attached.
4945 (mono_debug_init): Release the initial lock if we're not running
4948 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
4950 * marshal.c (emit_marshal_custom): Pass through NULL values without
4951 calling the custom marshalling routines.
4953 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4954 conversion in structures. Fixes #74882.
4956 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
4958 * culture-info-table.h : zh-* cultures were missing.
4960 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
4962 * threads.c: Added a new event background_change_event which is signaled
4963 when a thread changes its background mode.
4964 Moved here several checks previously done in managed code. The checks
4965 require the thread lock, and using the thread lock in managed code
4966 can result in deadlocks.
4967 Merged Start_internal and Thread_internal into a single method. Now
4968 Thread_internal does all work of creating and starting a thread.
4969 Added icalls for setting and getting the state of the object. Moved from
4970 managed code to avoid locking there.
4971 Added wait_for_tids_or_state_change() which is called instad of
4972 wait_for_tids when waiting for non-backround threads to end. This method
4973 will return if one of the threads ends or the background_change_event
4975 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4976 the background mode. This method signals the background_change_event
4979 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4980 removed Start_internal.
4982 2005-05-11 Martin Baulig <martin@ximian.com>
4984 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4985 to order of some fields to get proper alignment on 64-bit machines.
4987 2005-05-11 Martin Baulig <martin@ximian.com>
4989 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4990 changes as they're broken and completely fuck up the debugger.
4992 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4994 2005-05-10 Martin Baulig <martin@ximian.com>
4996 * reflection.c (mono_reflection_generic_class_initialize): Don't
4997 call mono_class_setup_parent() here.
4999 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5001 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
5002 send/receive timeout use an integer in milliseconds. We were using a
5005 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5008 (internal_get_cultures): reserve the first slot of the array for the
5009 InvariantCulture, which will be filled in managed code.
5011 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
5013 * reflection.c (mono_image_fill_module_table): Initialize the
5014 GENERATION field as well.
5016 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5018 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
5019 Monitor.Enter on the object.
5021 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
5023 * threads.c: Enable the wait for running threads when exiting.
5024 * icall.c: Suspend all threads before exiting.
5026 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
5028 * assembly.c (mono_assembly_load_reference): Fix warning.
5030 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5032 * threadpool.c: changed the default number of threads per cpu. From now
5033 on, the default will be 20 + (5 * number of cpus) instead of 50.
5035 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
5037 * loader.c (mono_method_get_signature_full): Add locking here.
5039 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
5041 * appdomain.c: Moved methods for parsing and freeing assembly
5042 names to assembly.c.
5043 * assembly.c, domain-internals.h: Created public methods for parsing
5044 assembly names. Fixed mono_assembly_load_with_partial_name:
5045 it now finds the best match, taking into account the version,
5046 token and culture specified in the partial name. Also return
5047 the latest version if no version information is specified.
5049 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
5051 * threadpool.c: replace check for SocketAsyncCall class.
5053 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5055 * threadpool-internals.h:
5056 * Makefile.am: added threadpool-internals.h
5058 * threadpool.c: call mono_unhandled_exception on exceptions not handled
5059 that happen in threadpool threads (tested on MS).
5060 (mono_thread_pool_remove_socket): new function that dispatch any pending
5061 AIO call on a socket that is closing. By now only epoll really needs it,
5062 as select/poll wake up when the socket closes.
5065 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
5067 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
5069 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
5071 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
5073 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
5075 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
5077 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
5078 has an abort request, convert it into a suspend request.
5080 2005-04-30 Ben Maurer <bmaurer@ximian.com>
5082 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
5083 warning for the usage of `UnmanagedFunctionPointerAttribute' which
5084 is not supported yet.
5086 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5088 * image.c: register assemblies loaded from data (bundles) in the loaded
5089 assemblies hash. Fixes bug #74772.
5091 2005-04-29 Martin Baulig <martin@ximian.com>
5093 * class.c (mono_type_get_name_recurse): Update to the new naming
5094 schema from the latest .NET 2.x beta2.
5095 (mono_class_setup_vtable_general): If we're a generic instance,
5096 copy the vtable from our generic type definition and inflate all
5099 * loader.c (find_method): Update to the new naming schema from the
5100 latest .NET 2.x beta2.
5102 2005-04-29 Raja R Harinath <harinath@gmail.com>
5104 * class.c (mono_class_init): Add a mono_loader_unlock to the
5107 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
5109 * icall.c (ves_icall_System_Environment_Exit): Remove the
5110 suspend_all_other_threads () call for the time being, since it can hang.
5112 * threads.c (mono_thread_manage): Similarly, disable the waiting for
5113 the background threads to exit, since it can also hang.
5115 * class.c (mono_class_init): Applied patch from Ankit Jain
5116 (radical@gmail.com). Avoid pending init errors when a field refers
5117 to a nested class using a typeref. Fixes #74734.
5119 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
5120 this for dynamic modules.
5122 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5124 * threads.c: don't wait for threads that are in the process of aborting
5125 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
5126 and waiting for background threads to finish. This makes xsp and
5127 mod-mono-server exit without random length delays and/or hangs.
5129 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5131 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
5133 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
5135 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
5136 dynamic types to prevent infinite loops. Fixes #74727.
5138 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
5139 ..._is_assignable_to.
5141 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
5143 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
5145 2005-04-25 Martin Baulig <martin@ximian.com>
5147 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
5150 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
5152 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
5154 * reflection.c (build_compressed_metadata): Set metadata header
5157 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
5159 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
5160 number into an integral and a decimal part. Fixes #70473.
5162 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
5164 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
5166 * culture-info-table.h : reflected the latest locale-builder output.
5168 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5170 * threadpool.c: check for SuspendRequested too when deciding if
5171 mono_thread_interruption_checkpoint should be called.
5173 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5175 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
5176 * threads.c: remove interruption_mutex and use Interlocked instead. When
5177 suspending all the threads, wait for all the suspended events at once.
5178 If we're shutting down and get an APC that is going to be queued,
5179 call mono_thread_execute_interruption immediately, as the thread might
5180 be sleeping on a pthread condition or mutex.
5182 * icall.c: call mono_runtime_set_shutting_down before suspending the
5185 Fixes bug #74693. And now xsp is happier when exiting.
5187 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
5189 * loader.c (mono_stack_walk): Fix #74690.
5191 2005-04-22 Martin Baulig <martin@ximian.com>
5193 * mono-debug.h (MonoDebugMethodJitInfo): Added
5194 `MonoDebugMethodJitInfo *jit'.
5196 * mono-debug.c (mono_debug_read_method): Cache the
5197 MonoDebugMethodJitInfo in `address->jit'.
5198 (mono_debug_free_method_jit_info): New public method.
5200 2005-04-22 Martin Baulig <martin@ximian.com>
5202 * class.c (mono_class_is_assignable_from): Disallow
5203 type parameter -> interface.
5205 2005-04-21 Dick Porter <dick@ximian.com>
5207 * threads.c (mono_thread_create): Turn an assertion into an error.
5209 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
5211 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
5213 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
5214 Fix some gcc 4.0 warnings.
5216 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
5218 * file-io.c: fix alt dir separator char on unix systems
5219 and cleanup (fixes bug #71214).
5221 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
5223 * marshal.c: Use CALLVIRT instead of CALL when dispatching
5224 a call to a remote domain, since the method may be an
5225 interface method in the client domain. This fixes bug #74192.
5227 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5229 * threadpool.c: recv/send are now performed before going back to managed
5230 code to save one transition.
5232 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5234 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
5236 * metadata/threadpool.c: removed hack to workaround the bug above.
5240 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
5242 * reflection.c reflection.h: Fix handling of parameter defaults in
5243 dynamic methods. Also fixes handling of parameter attributes.
5246 * mono-debug.c (mono_debug_close_image): Fix warning.
5248 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5250 * socket-io.h: replaced old unused field with new 'blocking'.
5251 * threadpool.c: restore socket blocking state on windows(tm).
5253 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
5255 * icall.c: don't return the codebase in the AssemblyName[] returned by
5256 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
5257 * object-internals.h: Removed FIXME (fields were presents) and fixed
5258 versioncompat declaration.
5260 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5262 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
5263 not closed, so don't cleanup when it happens.
5265 2005-04-13 Chris Toshok <toshok@ximian.com>
5267 * mono-debug-debugger.h: change prototype for
5268 mono_debugger_lookup_type.
5270 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
5271 this function, although it should probably be named
5272 mono_debugger_init_type.
5274 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5276 * threadpool.c: fix non-AIO case.
5278 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
5280 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
5281 the built-in profiler to measure just JIT compilation times.
5283 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5285 * threadpool.c: the epollfd might be closed by another thread at
5286 any time, so ignore EBADF at treat it as a "we're closing" sign.
5288 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5290 * threadpool.c: release the semaphores with a count equals to the number
5291 of working threads in both IO and regular pools. Fixed typo that messed
5292 up the count of IO pool threads. Don't initialize the pipe handles if
5295 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5297 * threadpool.c: some systems don't like a NULL when deleting the socket
5300 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5302 * threadpool.c: fix semaphore allocation.
5304 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5306 * threadpool.c: added epoll() based implementation for asynchronous IO
5307 that is used instead of the default poll() when available.
5308 It can be disabled by setting MONO_DISABLE_AIO.
5310 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5312 * threadpool.c: windows needs 'closesocket' and instead of returning
5313 0 when the stream is closed while in select, it returns -1. Fixes bug
5316 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
5318 * class.c (class_compute_field_layout): Fix the regression caused by
5321 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5323 * threadpool.c: separate pool for socket async. IO.
5324 * threadpool.h: mono_max_worker_threads is not a global any more.
5326 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
5328 * class.c (class_compute_field_layout): Fix #74549.
5330 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5332 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
5333 use 2 connected sockets instead.
5335 2005-04-08 Miguel de Icaza <miguel@novell.com>
5337 * mono-config.c: Add new entry point for mkbundle
5338 mono_config_parse_memory.
5340 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5342 * threadpool.c: removed another unused function.
5344 2005-04-08 Ankit Jain <radical@corewars.org>
5346 * reflection.c (get_default_param_value_blobs): Add 'types'
5347 parameter to get the types encoded in the constant table.
5348 (mono_param_get_objects): Use the type from the constant table,
5349 not the type of the parameter, when creating default values.
5350 Handle null default values correctly.
5352 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5359 * socket-io.c: removed dead code for async IO.
5361 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5363 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
5365 * threadpool.c: intercept socket async. calls and pass them to a thread
5366 that is polling and dispatching the job items to the threadpool as
5367 socket become ready. Fixes bugs #71217, #71933.
5369 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
5370 between char and short/ushort arrays.
5372 * socket-io.c: remove dead code.
5374 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
5377 icall.c : removed InternalToUpper_Comp() and
5378 InternalToLower_Comp().
5380 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
5382 * char-conversions.h : The tables were incorrectly generated. Should
5383 be generated against invariant culture.
5385 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
5387 * object.c (mono_runtime_invoke_array): Fix return value when
5388 passing pre-created valuetype objects to ctors.
5390 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
5391 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
5394 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
5396 * domain.c: removed g_assert for runtimesecurityframe_class. This is
5397 only used with --security and hides the wrong corlib version error.
5399 2005-03-30 Joshua Tauberer <tauberer@for.net>
5401 * class.c: Changed mono_class_name_from_token so that types
5402 outside of a namespace don't have an initial period. Improved
5403 the g_warning message used in _mono_class_get when loading
5405 * assembly.c: In mono_assembly_load_reference, when an assembly
5406 can't be found, "No such file or directory" is misleading and
5407 unhelpful because a few paths were checked for the presence of
5408 the assembly. When that happens (ENOENT), display a nicer
5409 message indicating the directories that were searched. In all
5410 cases, the warning is made easier to read for non-hackers.
5412 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
5414 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
5416 * appdomain.h|domain.c: Removed inline from functions.
5417 * appdomain.c: Reduced warnings when compiling on windows.
5418 * icall.c: Fixed output_debug declaration to gunichar2*.
5419 * mono-config.c: Reduced warnings when compiling on windows.
5420 * rand.c: Added missing "windows.h". Added missing return value.
5421 * rawbuffer.c: Added missing winsock2.h for windows.
5422 * sysmath.h: Added mono-compiler.h header to allow/ease
5423 compilation with non-GCC compilers.
5424 * threads.c: Fixed declarations to compile with VS.NET C compiler.
5425 Removed cast warnings.
5427 Adapted from the work of J Lothian (for VC6).
5429 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
5431 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
5434 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
5436 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
5439 2005-03-27 Raja R Harinath <harinath@gmail.com>
5441 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
5442 has to be in $(exec_prefix). $(prefix) is for arch-independent
5443 stuff, and it would probably use $(prefix)/share rather than
5446 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5448 * console-io.c: added 2 includes that might be missing.
5450 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
5452 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
5455 * reflection.c (create_custom_attr): Allocate the params array using
5456 alloca so it gets GC tracking.
5458 2005-03-23 Chris Toshok <toshok@ximian.com>
5460 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5463 2005-03-24 Raja R Harinath <rharinath@novell.com>
5465 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5466 changes to pick up any changes in prefix, etc.
5468 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5470 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5472 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5473 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5475 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5477 * class-internals.h object-internals.h class.c reflection.c: Extend the
5478 mono_lookup_dynamic_token () function to return the class of the
5481 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5484 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
5486 * security-manager.c: Skip inheritance checks for intra-corlib
5487 class inheritance and method overrides. This skips a lot of checks
5488 and (anyway) permissions cannot work until corlib is loaded.
5490 2005-03-23 Martin Baulig <martin@ximian.com>
5492 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5493 MONO_TYPE_GENERICINST.
5495 2005-03-23 Martin Baulig <martin@ximian.com>
5497 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5499 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5501 * class.c: added locking comments to some functions.
5502 Cache the interface offsets arrays (saves about 20 KB
5503 of runtime memory in a typical app).
5504 Reduce the time overhead in mono_class_setup_supertypes ().
5506 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5508 * icall.c: speedup and fix leaks in GetMethodsByName and
5509 GetPropertiesByName.
5511 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5513 * reflection.c: some locking fixes.
5515 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5517 * metadata.c: added missing break in case statement.
5519 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
5521 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5522 typedbyref return values. Fixes #73941.
5524 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
5526 * security-manager.c|h: Added demandunmanaged method and
5527 suppressunmanagedcodesecurity class to MonoSecurityManager.
5528 Renamed aptc class to allowpartiallytrustedcallers.
5530 2005-03-17 Martin Baulig <martin@ximian.com>
5532 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5534 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5536 * file-io.c: disabled file async. IO using aio_*. It uses the
5537 threadpool now. Workaround for bug #73718.
5539 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5541 * assembly.h, mono-config.c: added code to deal with bundled configs
5542 for bundled assemblies.
5544 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5546 * *.c, private.h: cleanup, removing old private.h header file.
5548 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
5550 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5551 and throw_on_unmappable_char attributes.
5553 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
5555 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5556 _ProcessName_internal.
5558 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
5560 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5563 * icall.c threads.c threads-types.h: Remove slothash icalls as they
5566 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
5568 * object.c (compute_class_bitmap): Add support for generics. Fixes
5571 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5573 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5575 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5577 * filewatcher.c: commented out the code for windows watcher, as we don't
5578 use it (we use the managed implementation instead).
5580 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
5582 * object-internals.h (MonoThread): Remove 'unused1' field.
5584 * appdomain.c: Bump corlib version.
5586 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5588 * reflection.c (mono_reflection_create_runtime_class): Remove the
5589 AssemblyBuilder.Save optimization since it causes too many problems.
5591 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
5593 * exception.c|h: Added mono_get_exception_reflection_type_load to
5594 create a ReflectionTypeLoadException object.
5595 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5596 to return NULL is a InheritanceDemand fails during reflection. Updated
5597 ves_icall_System_Reflection_Assembly_GetTypes to throw a
5598 ReflectionTypeLoadException if an InheritanceDemand fails during
5599 reflection. Added icall mapping for GetLinkDemandSecurity.
5600 * security-manager.c|h: Added ves_icall_System_Security_
5601 SecurityManager_GetLinkDemandSecurity internal call to return the
5602 class and methods permissions set for a LinkDemand. Removed unused
5603 fields in MonoSecurityManager.
5605 2005-03-10 Martin Baulig <martin@ximian.com>
5607 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5608 it's a generic instance.
5610 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
5612 * reflection.c (mono_get_object_from_blob): Applied patch from
5613 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5615 * class.c (mono_class_is_assignable_from): Another try at fixing
5616 #73469 without breaking anything.
5618 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
5620 * class.c: (mono_class_is_assignable_from): Revert the last changes
5621 since they don't work with generics.
5623 * class.c (mono_class_is_assignable_from): Fix build bustage.
5625 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5626 the managed IsAssignableFrom method. Fixes #73469.
5628 * reflection.c (mono_reflection_call_is_assignable_from): New helper
5631 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
5633 * object.c (mono_load_remote_field_new): Fix returning uninitialized
5634 memory when the remoting callback does not sets the out arguments.
5637 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5640 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5642 * object-internals.h (MonoStackFrame): Sync with managed object layout.
5644 * appdomain.c: Bump corlib version.
5646 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
5648 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5651 * threads.c (mono_thread_attach): Detect threads which are not started
5652 by the GC pthread wrappers.
5654 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
5656 * icall.c: Added new icall for RNG.
5657 * rand.c|h: Added new icall to open the RNG. This allows to share a
5658 single handle on Linux to access /dev/urandom and fix #73183.
5660 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5662 * object.c: setting the new vtable in a transparent proxy object must
5663 not change the GC descriptor.
5665 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5667 * object.c: fixed compilation without GCJ support.
5668 * reflection.c: for runtime-created types ensure klass->has_references
5669 is correct (bug #73215).
5671 2005-03-02 Martin Baulig <martin@ximian.com>
5673 * class.c (mono_class_is_assignable_from): Make this work if
5674 `oklass' is a generic instance; fixes #72831.
5676 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5678 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5681 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5683 * marshal.c: Reorganize native->managed marshalling code to also use
5684 the emit_marshal_... functions.
5686 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5688 * object.c: typed allocs have issues with bitmap sizes > 30,
5689 so check for max_set >= 30.
5691 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
5693 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5694 managed code. Fixes #73012.
5696 * metadata.h (MonoMarshalSpec): Add elem_mult field.
5698 * metadata.c reflection.c: Load/Emit elem_mult as well.
5700 * metadata.h (MonoMarshalSpec): Add comment.
5702 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5704 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5705 num_elem to -1 if not given.
5707 * object-internals.h (MonoReflectionMarshal): Add has_size field.
5709 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5712 2005-03-01 Marek Safar <marek.safar@seznam.cz>
5714 * null-gc.c (mono_gc_free_fixed): Was not compilable.
5716 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
5718 * reflection.c (encode_marshal_blob): Encode param_num field as well.
5720 * object-internals.h (MonoReflectionMarshal): Add param_num field.
5722 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5724 * object.c: generalized the reference bitmap creation
5725 and added hooks for the new GC.
5726 * class-internals.c: removed the gc_bitmap field from MonoClass.
5728 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5730 * domain.c: help the compiler to produce better code
5731 in mono_jit_info_table_find ().
5733 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5735 * object.c: make all allocations look typed.
5737 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5739 * socket-io.c: load Mono.Posix if it's not loaded already
5742 2005-02-24 Martin Baulig <martin@ximian.com>
5744 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5745 * reflection.c (dup_type): Likewise.
5747 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
5749 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5750 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5752 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5754 * domain.c, threads.c, object-internals.h: make the critical thread
5755 local vars use the fast access mode (even when we're compiled in
5756 a lib). Provide accessors to be used by the jit during codegen.
5758 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5760 * appdomain.c: Changed hook functios behavior to include
5761 support for the reflection only assemblies. Some icalls were changed
5762 to support the mentioned assemblies too. Signatures of static methods
5763 try_assembly_resolve and real_load now have an additional parameter:
5766 * assembly.c: General changes to mono_assembly_ methods to support
5767 reflection only api. Functions mono_assembly_open, mono_assembly_load,
5768 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5769 suffix, to support an additional gbool parameter to specify whether
5770 the assembli is reflection only or not. Created some new hook functions
5771 to add support for reflection only assemblies. Signatures of static
5772 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
5773 have now an additional parameter: refonly.
5775 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5776 indicating whether the assembly is reflection only or not.
5778 * exception.c: Add mono_get_exception_invalid_operation.
5780 * icall.c: Throw an InvalidOperationException when trying to invoke
5781 a property/method/event, or trying to set/get the value of a field.
5782 Also add an icall to retrieve the ref_only flag to the
5783 MonoReflectionAssembly.
5785 2005-02-23 Chris Toshok <toshok@ximian.com>
5787 Part of fix for #72827.
5788 * mono-debug.c (mono_debug_add_method): add lexical block data to
5789 the info we write. Kind of a hack at the moment - we copy the
5790 lexical block info from the MonoDebugMethodInfo to the
5791 MonoDebugMethodJitInfo here, before writing it.
5792 (mono_debug_read_method): read the lexical block info.
5794 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5796 * debug-mono-symfile.h: add lexical block support.
5798 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5801 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5803 * loader.c (mono_lookup_pinvoke_call): Fix warning.
5805 * object.c (mono_runtime_free_method): Call mono_free_method () and
5806 put the TODOs there.
5808 * loader.c (mono_free_method): Free up most memory allocated for
5811 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5813 * reflection.c: properly flag a Type argument to a
5814 named custom attr value (bug #72248).
5816 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5818 * reflection.c: reduce code duplication in named custom
5821 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5823 * reflection.c: properly encode custom attrs of type object
5826 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
5828 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5830 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5832 * socket-io.c: load System.dll if it's not loaded already
5833 (bug #72850 and #70477).
5835 2005-02-21 Martin Baulig <martin@ximian.com>
5837 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5840 2005-02-21 Martin Baulig <martin@ximian.com>
5842 * reflection.c (mono_image_build_metadata): We also need to
5843 "fixup" the MethodImpl table after we computed the final method
5844 indices. Call fixup_methodimpl() to do that.
5845 (fixup_methodimpl): New private method.
5847 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5849 * assembly.c: special case mscorlib.dll (bug#72536),
5850 patch from Carlos Alberto Cortez.
5852 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
5854 * threads-types.h threads.c: Fix build bustage.
5856 * threads.c: Use a union for long<->double conversions.
5858 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5859 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5861 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
5862 containing the checkpoint call with NOT_TAKEN.
5864 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
5865 checkpoint before pushing the arguments, so they won't have to be
5868 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5870 * domain.c, assembly.c, domain-internals.h: make some data
5871 const and relocation-free.
5873 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5875 * object.c, appdomain.c, class-internals.h: introduce the
5876 MonoClassRuntimeInfo structure to hold the info needed to
5877 use a class at runtime. Made mono_class_vtable() lock-free
5878 for all the appdomains.
5880 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5882 * metadata-internals.h, image.c: introduce a per-image mempool to
5883 be used for memory that has the same lifetime as the image.
5885 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
5887 * domain.c: In mono_init_internal(), instead of selecting the first
5888 runtime version supported by an executable, get a list of all
5889 supported versions and select the one for which an mscorlib exists
5890 (since even if the runtime supports a given version, it doesn't mean
5891 that the framework for that version is installed).
5892 Modified get_runtimes_from_exe to support this behavior.
5893 In supported_runtimes, added information about additional system
5896 * assembly.c: Added support for more than one system assembly version
5897 per runtime version. Updated the assembly list.
5898 In mono_assembly_remap_version, removed the initial version check,
5899 since we don't know to which version we need to compare until we
5900 get the version set on which the assembly is based.
5901 Moved the code for loading corlib into the new method
5902 mono_assembly_load_corlib(), so it can be used by the initialization
5905 * domain-internals.h: Updated data structures and added declaration
5906 for mono_assembly_load_corlib.
5908 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5910 * reflection.c (resolve_object): Fix the creation of the signature in
5911 the SignatureHelper case.
5913 * assembly.c (mono_assembly_remap_version): Fix binary search.
5915 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
5917 * class.c: Added inheritance check when a method is overloaded (from a
5918 virtual method or when implementing an interface) and when a class is
5919 inherited. Added functions to set a failure for a class and to
5920 retreive the exception from a failure.
5921 * class-internals.h: Added fields to MonoClass to keep the exception
5922 information status for inheritance (or other exceptions) to be thrown
5923 later (i.e. not at load time).
5924 * object.c: Throw the inheritance SecurityException when a type is to
5925 be created with either class or method inheritance violations.
5926 * reflection.c|h: Fix when getting declsec from a class. Removed
5927 unrequired code for class. Improved sanity in parameter naming.
5928 * security-manager.c|h: Added functions to check for class and method
5931 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
5933 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5934 and has_finalize in dynamic types as well.
5936 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
5938 * culture-info-table.h : fixed currency format for en-GB (and so on).
5940 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5942 * gc.c: ensure the GC handles never have 0 as a value.
5944 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5946 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5947 a pointer to a struct to unmanaged code. Fixes #72625.
5949 2005-02-16 Martin Baulig <martin@ximian.com>
5951 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5953 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
5955 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5957 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5959 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5961 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
5962 UnmanagedFunctionPointerAttribute, use it for determining calling convention
5965 * reflection.c (mono_custom_attrs_get_attr): New helper function.
5967 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5969 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5971 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5972 changes to make the current context a field in MonoThread.
5974 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
5976 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5979 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5980 extracted from mono_marshal_get_native_wrapper.
5982 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5983 to create wrappers around native functions.
5985 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
5986 delegates for arbitrary function pointers. Fixes #71472.
5988 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5990 * threads.c: cleaned up the code a little.
5992 2005-02-15 Martin Baulig <martin@ximian.com>
5994 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5997 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5998 allocate larger chunks if needed.
6000 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
6002 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
6005 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
6007 * domain.c: keep the domains in an array and ensure the domain ids
6008 are kept small, so they can be used as indexes to domain-specific data
6009 with a small memory overhead.
6011 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
6013 * icall.c: Handle byref types in Type icalls. Fixes #72544.
6015 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
6017 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
6019 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
6021 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
6023 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
6026 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
6028 2005-02-12 Ben Maurer <bmaurer@ximian.com>
6030 * domain-internals.h: add the hashtable here.
6032 * class-internals.h: Remove `info' from MonoMethod
6034 * domain.c: Add a new hashtable, jit_trampoline_hash
6036 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6038 * object.c: don't set the value of static fields
6041 2005-02-11 Martin Baulig <martin@ximian.com>
6043 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
6044 (mono_debug_add_method): Silently ignore the method if it's too big.
6045 (mono_debug_add_type): Likewise.
6047 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
6049 * threads.c, appdomain.c: remove #ifdefs from the code.
6051 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
6053 * metadata-internals.h: Added flags to MonoAssembly to cache the most
6054 common security informations. This allows us to stay in unmanaged code
6055 when doing LinkDemand and it's special cases (except for the first
6056 time for initialization). The flags a very much used with --security.
6057 * reflection.c|h: Added code to get declarative security attributes
6058 for LinkDemand and InheritanceDemand. This required to refactor the
6059 existing code for Demand.
6060 * security-manager.c|h: Added new method fields for the special cases
6063 2005-02-10 Martin Baulig <martin@ximian.com>
6065 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
6066 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
6068 2005-02-10 Martin Baulig <martin@ximian.com>
6070 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
6071 debugging code; this is almost a complete rewrite.
6073 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
6075 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6077 * domain.c, object.h: expose mono_string_equal () and
6078 mono_string_hash ().
6079 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
6080 it's implemented in managed code.
6082 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6084 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
6085 lo leak objects between appdomains.
6087 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6089 * assembly.c: old compilers compilation fix from
6090 robertj@gmx.net (Robert Jordan).
6092 2005-02-09 Ben Maurer <bmaurer@ximian.com>
6094 * class-internals.h: Little reminder for the future.
6096 * debug-helpers.c: Fix up wrapper_type_names
6098 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6100 * image.c, metadata-internals.h: when loading an image from a file,
6101 mmap all of it and use the same codepaths as when using a
6102 in-memory image: the code is simpler and we use less memory
6103 (both writable and readonly).
6105 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6107 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
6108 API to alloc runtime data structures that need to be tracked by the
6109 GC and contain pointers.
6110 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
6111 make the code more readable and eventually use a different GC.
6113 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
6115 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
6118 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
6120 * object.c: In release_type_locks(), don't release the cctor lock
6121 if it has already been released. This fixes a crash in the
6124 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6126 * gc.c, marshal.c, icall.c: register a delegate for finalization
6127 only when the native function pointer has been allocated for it.
6129 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6131 * object.c: cleaned up some code, allocate objects that are
6132 pointer free with the atomic malloc variant. Allocate memory
6133 for static data from the mempool if it's pointer-free.
6134 Allocate the bounds array at the end of the array data, when needed.
6135 * object-internals.h, object.h: move a private function in a private
6137 * class.c: handle missing case in tracking references in fields.
6139 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6141 * class.c, class-internals.h: keep track if a type has
6142 reference fields in either the instance or static fields.
6144 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
6146 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
6147 and renamed to MonoRuntimeInfo. Added fields to store the expected
6148 framework assembly version. Changed mono_get_framework_version and
6149 mono_get_runtime_version for a single mono_get_runtime_info method.
6151 * assembly.c: Added method to remap system assembly versions to the
6152 current executing runtime version. Removed old mapping code.
6153 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
6155 * icall.c, reflection.c: Track api changes.
6157 2005-02-06 Miguel de Icaza <miguel@novell.com>
6159 * loader.c (method_from_memberref): Improve error reporting,
6160 produce the class name instead of the typeref/typedef index.
6162 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
6164 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
6166 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
6168 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
6169 stdcall and charset name mangling. Reorganize the code and add
6172 2005-02-05 Ben Maurer <bmaurer@ximian.com>
6174 * monodiet.c: More iters!
6176 * marshal.c: Iter usage.
6178 * icall.c: Iter usage.
6180 * object.c: Use iters.
6182 * debug-helpers.c: More iters
6184 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
6186 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
6189 2005-02-05 Ben Maurer <bmaurer@ximian.com>
6191 * mono-debug-debugger.c: use iters
6193 * class.c, class-internals.h: mono_class_setup_events is static
6196 * All callers: use iters
6198 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
6200 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
6201 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
6203 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
6205 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
6207 * marshal.h: Add prototypes for ldfld/stfld_remote.
6209 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
6210 this is called during startup.
6212 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
6214 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
6215 MonoThreadsSync struct private in monitor.c. Changed the way
6216 MonoThreadsSync is allocated so it's faster and there is no
6217 need to keep track of it with a finalizer and it uses less memory.
6218 This also finally allows us to allocate mono objects as ptrfree when
6219 there are no reference fields.
6221 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
6223 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
6224 disappearing link to the GC interface and use them to simplify
6227 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
6229 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
6230 stfld_remote which call mono_load/store_field_new. This allows methods
6231 calling ldfld/stfld wrappers to be AOTed.
6233 * console-io.c: Include sys/filio.h under solaris.
6235 * console-io.c: Include curses.h if needed correctly.
6237 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
6239 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
6240 method->klass as well.
6242 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
6244 * class.c (mono_class_init): Switch on lazy initialization of
6247 * class.c (mono_class_get_finalizer): Handle the case when the
6248 finalizer is inherited.
6250 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6252 * console-io.c: <curses.h> is needed by term.h on solaris.
6254 2005-02-03 Ben Maurer <bmaurer@ximian.com>
6256 * icall.c, class-internals.h, monodiet.c, class.c: Remove
6257 mono_class_setup_properties where possible. Remove this ftn from
6258 the header file, and make it static.
6260 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
6262 * loader.c: Add missing setup_... call.
6264 * class.c: Add missing setup_... calls.
6266 * class.c (mono_class_init): Switch on lazy initialization of
6269 * class.c (mono_class_init): Fix generics broken by the recent changes.
6271 * monodiet.c (handle_type): Add missing setup_... calls.
6273 * class.c: Back out garbage in previous patch.
6275 * class.c: Add missing setup_... calls.
6277 * class.c (mono_class_get_method_from_name_flags): Avoid calling
6278 mono_class_setup_methods () if possible.
6280 * class-internals.h (MonoClass): Add 'has_cctor' flag.
6282 * class-internals.h (MonoCachedClassInfo): New structure.
6284 * class.c: Initialize properties and events fields of MonoClass lazily.
6286 * class.c: Add infrastructure for lazily initializing the methods and
6287 vtable fields of MonoClass. Not yet used.
6289 * class.c (mono_class_get_finalizer): New helper function.
6291 * class.c: Add infrastructure for loading some class related data from
6294 * object.c: Add infrastructure for initializing the vtable from data
6297 * gc.c (run_finalize): Use mono_class_get_finalizer ().
6299 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
6300 appropriate initialization function before accessing parts of the
6301 MonoClass structure.
6303 * marshal.c: Fix warnings.
6305 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
6307 * mono-debug-debugger.c (get_exception_message): Use
6308 mono_class_get_method_from_name_flags ().
6310 2005-02-02 Ben Maurer <bmaurer@ximian.com>
6312 * reflection.c, appdomain.c: Replace a few manual searches that
6313 Zoltan missed. (Paolo approved this part of my initial patch).
6315 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
6317 * profiler.c: disable recording statistical events at report time.
6319 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6321 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
6322 to byteswap arrays of enum values, too (bug #72080).
6324 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
6326 * appdomain.c (set_domain_search_path): Allow this to be called if
6327 domain->setup is not yet set.
6329 * loader.c (mono_method_get_index): New helper function.
6331 * loader.c reflection.c: Use mono_method_get_index ().
6333 * class.c (mono_class_get_method_from_name_flags): New helper method.
6335 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
6338 * class.c (mono_class_get_cctor): New helper method.
6340 * string-icalls.c object.c class.c marshal.c reflection.c: Use
6341 mono_class_get_method () to look up methods.
6343 2005-02-01 Miguel de Icaza <miguel@novell.com>
6345 * console-io.c: Fix the build, this should work on Windows.
6347 2005-01-31 Ben Maurer <bmaurer@ximian.com>
6349 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
6350 be set to null to keep things valid
6352 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6354 * icall.c: added Console 2.0 icalls.
6355 * Makefile.am: added console-io.[ch]
6356 * console-io.[ch]: internal calls for Console 2.0 API.
6358 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6360 * class.c: make sure we consider all the interfaces
6361 when calculating max_interface_id (bug found by
6362 Jeroen Frijters running ikvm).
6364 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
6366 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
6367 valuetype fields to null.
6369 * object.c (set_value): Ditto. Fixes #71669.
6371 2005-01-31 Martin Baulig <martin@ximian.com>
6373 * metadata.c (mono_metadata_has_generic_params): New public
6374 function; checks whether something is a generic method.
6376 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6378 * appdomain.c: fix infinite recursion when adding assemblies.
6380 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
6382 * object.c: Fix small typo to return all items for Environment.
6385 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6387 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
6388 reflection.c: more domain and assembly-unload related fixes
6389 and memory leaks plugs.
6391 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
6393 * 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.
6395 2005-01-29 Ben Maurer <bmaurer@ximian.com>
6397 * loader.c (mono_method_signature): Make this method lazy
6398 (mono_get_method_from_token): Don't computate the signature here.
6400 Doing this saves quite a bit of memory. I got 90 kb on starting up
6401 monodoc. It should also save some disk reads on startup.
6403 * *: MonoMethod->signature might be NULL now. You *MUST* use
6404 mono_method_signature.
6406 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
6408 * object.c (mono_runtime_get_main_args): Return an array from the
6409 current domain here. Fixes #71938.
6411 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
6413 * monitor.c: formatting changes to comply with the
6414 mono coding style and remove #ifdefs from the code.
6416 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6418 * metadata.c, private.h: remove some unneeded data
6419 and use a more compact representation for table schemas.
6421 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
6423 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
6424 to get a better distribution in hash tables.
6425 * *.c: use mono_aligned_addr_hash() where appropriate.
6426 * assembly.c: make var static.
6428 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
6430 * domain-internals.h: Put MonoJitInfo on a diet.
6432 * domain.c: Fix a warning.
6434 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6436 * gc.c: rework the gc handles code to reuse handles
6439 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6441 * domain.c: fixed long standing bug in mono_string_equal() which
6442 was brought to light with the ldstr changes.
6444 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
6446 * reflection.c: Remove warning by adding missing include for marshal.h
6448 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6450 * domain.c, object.c: change the ldstr_table to hold
6451 MonoString* as keys: makes the runtime isinterned lookup
6452 faster and simplifies memory management.
6454 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
6456 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
6457 possible to add imperative security checks before calling the icall.
6458 * reflection.c: Return security attributes on the original MonoMethod
6459 (and not the wrapped one). This fix permissions on icalls.
6461 2005-01-25 Dick Porter <dick@ximian.com>
6463 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6464 the check for mktime() support actually test the mktime() return
6465 value. "Fixes" bug 71682, though the output is still different to
6468 2005-01-25 Martin Baulig <martin@ximian.com>
6470 * class.c (mono_class_is_assignable_from): Make this work for
6473 2005-01-24 Ben Maurer <bmaurer@ximian.com>
6475 * marshal.c (mono_string_utf8_to_builder)
6476 (mono_string_builder_to_utf16): We might not have ownership of the
6477 string. In thise case, we need to create a new buffer.
6479 * object-internals.h (mono_stringbuilder_capacity): sb->str might
6480 be null, in which case, use the default capacity.
6482 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6484 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6485 GC events to the profiler.
6487 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6489 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6490 if you don't want the GC to run.
6492 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6494 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6495 start providing a GC API and keeping different implementations in
6497 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6499 2005-01-22 Ben Maurer <bmaurer@ximian.com>
6501 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6502 mmap rather than allocating a huge buffer.
6503 (mono_debug_close_mono_symbol_file): Free the buffer allocated
6506 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
6508 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6509 and CheckExecutionRights.
6510 * reflection.c|h: Keep the index of the declarative security to be
6511 used, instead of the pointer, when AOT compiler is used. Also add
6512 class initialization when requesting demands.
6513 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6514 CheckExecutionRights. Both properties are now FALSE by default, and
6515 unmodifiable, unless the --security option is used.
6517 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6519 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6520 reflection.c: properly refcount images and assemblies, many leaks fixed.
6522 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6524 * threadpool.c: increase the timeout for threads in the thread pool to
6525 10s. Fixes bug #67159.
6527 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
6529 * class-internals.h: Sun's compiler insists on explicit
6530 signed on bit fields to handle then correctly.
6532 2005-01-19 Miguel de Icaza <miguel@ximian.com>
6534 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6535 Make the size of the array fit only the number of invalid path
6538 * class.c (_mono_class_get): Improve the error reporting when a
6539 class referenced is not found, to assist debugging.
6541 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6543 * threads.c: fix off-by-one error.
6544 * domain.c: free data allocated in the domain.
6546 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6548 * reflection.c (mono_method_body_get_object): Fill out exception info
6551 * object-internals.h: Add MonoReflectionExceptionHandlingClause
6554 2005-01-19 Martin Baulig <martin@ximian.com>
6556 * loader.c (mono_get_method_constrained): Make this work again.
6558 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
6560 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
6561 guint16 to match the managed side.
6563 * reflection.c (mono_reflection_body_get_object): Fill out local
6566 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6569 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6570 'local_var_sig_token'.
6572 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
6574 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
6577 * reflection.c (mono_method_body_get_object): Handle abstract and
6580 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6582 * marshal.c, loader.c, class-internals.h, reflection.c:
6583 store the emthod data for a wrapper in an array instead of a list.
6585 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6587 * marshal.c: change the code to allocate memory more
6588 conservatively for method wrappers.
6590 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6592 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6593 fields from MonoClass to the marshal info structure where they belong.
6595 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6597 * class.c, object.c, class-internals.h, marshal.c: rearrange
6598 some fields and tweak some types to lower memory usage.
6600 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
6602 * threads.c (signal_thread_state_change): Handle the case when the
6603 target thread is the current thread.
6605 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6607 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
6608 emit_ptr_to_object_conv.
6610 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6611 marshalling. Fixes #71352.
6613 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6615 * metadata.h, blob.h: move table enum to blob.h so it can be included
6617 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6618 cut the size of MonoImage/MonoDynamicImage.
6620 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
6622 * profiler.c (mono_profiler_install_simple): Fix default arguments.
6624 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6626 * reflection.c, reflection.h, icall.c: add a function to check
6627 if an attribute type is defined for a metadata object.
6629 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
6631 * object-internals.h: Added some needed fields from StringBuilder class.
6632 * marshal.c: Set the maxCapacity when creating a StringBuilder.
6634 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
6636 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6637 threads before shutting down the runtime.
6639 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6641 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6643 * object-internal.h, threads.c: implement stacksize and
6644 parameterized thread start functionality (requires
6645 matching corlib). Marked broken code for later removal.
6647 2005-01-12 Martin Baulig <martin@ximian.com>
6649 * class-internals.h (MonoGenericClass): Moved the `initialized'
6650 flag to MonoDynamicGenericClass, removed `init_pending'.
6651 (MonoGenericInst): Added `is_reference' flag.
6653 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
6655 * reflection.c (mono_image_create_pefile): Only set the pe_offset
6656 inside the MSDOS header. Fixes #71201.
6658 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6660 (mono_domain_finalize): Ditto.
6662 2005-01-12 Martin Baulig <martin@ximian.com>
6664 * class.c (mono_get_shared_generic_class): Use the cache for
6665 non-dynamic generic classes.
6667 * class-internals.h (mono_class_create_generic_2): Removed
6668 function prototype, this function is now static inside class.c.
6670 * class.c (mono_class_create_generic_2): Made this static, only
6671 call it from mono_class_init() and mono_class_setup_parent().
6672 (collect_implemented_interfaces_aux): Call mono_class_init() on
6673 the interfaces we collect.
6674 (mono_class_setup_vtable): Call mono_class_init (class->parent).
6676 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6678 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6679 it a real thread handle.
6681 * domain-internals.h: Move exvar_offset from MonoJitInfo to
6682 MonoJitExceptionInfo, since each catch clause needs its own variable.
6684 2005-01-11 Dick Porter <dick@ximian.com>
6686 * image.c (mono_pe_file_open): New variant on mono_image_open()
6687 that does not set up the CLI metadata; used for FileVersionInfo so
6688 it can get the data for windows binaries too.
6690 * process.c (process_read_string_block): Don't read off the end of
6691 the StringTable block.
6693 These both fix bug 70766.
6695 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6697 * gc.c: set some fields to NULL at GC cleanup time.
6698 * threads.c: if we quit the main thread, call exit ().
6700 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
6702 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6704 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6706 * threads.h, threads.c, object.c: added accessor and settor for
6707 main_thread. Handle it specially when exiting from it: wait
6708 for other foreground threads to exit.
6710 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6712 * process.c, verify.c: remove some bloat.
6714 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
6716 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6717 the calling convention to cdecl under win32.
6719 2005-01-08 Ben Maurer <bmaurer@ximian.com>
6721 * object.c (mono_object_get_size): New function to get the size of
6724 * profiler.c (simple_allocation): Use above.
6726 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
6728 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6729 ves_icall_System_AppDomain_getRootDomain (as it's not required to
6730 get an appdomain by it's id and we can't assume the root's id is 0).
6731 * domain-internals.h: Change the function prototype to match.
6732 * icall.c: Change the icall table for AppDomain.
6734 2005-01-08 Miguel de Icaza <miguel@ximian.com>
6736 * locales.c (string_invariant_compare_char): Only compute
6737 GUnicodeTypes in the case where we need them. Test for ordinality
6738 first and return if so.
6743 * FIXME: here we must use the information from c1type and c2type
6744 * to find out the proper collation, even on the InvariantCulture, the
6745 * sorting is not done by computing the unicode values, but their
6746 * actual sort order.
6749 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6751 * loader.c: for P/Invoke methods, allow the "Internal" shared
6752 library name to refer to the calling process symbol namespace.
6754 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
6756 * Makefile.am: Add the security manager to the build.
6757 * security-manager.c|h: New. Initialization of the security manager.
6759 2005-01-07 Dick Porter <dick@ximian.com>
6762 * monitor.c: Update thread state during Monitor and WaitHandle
6763 waits. Fixes bug 71031.
6765 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
6767 * reflection.c (property_encode_signature): Correctly handle when the
6768 property has no methods.
6770 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
6772 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6774 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6775 fields from mb, not rmb. Fixes #71017.
6777 * marshal.c (emit_ptr_to_str_conv): Add support for
6778 ByValTStr -> string conversion. Fixes #71015.
6780 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6782 * mempool.c (mono_mempool_contains_addr): New helper function.
6784 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6786 * metadata.c (mono_metadata_compute_size): Fix size calculation of
6787 HasSematics encoded fields.
6789 * metadata.c (mono_type_to_unmanaged): Improve error message for
6790 invalid string marshalling.
6792 * metadata.c: Fix warnings.
6794 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6796 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6799 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
6801 * domain.c object.c domain-internals.h: Revert part of r38077 since the
6802 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6805 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
6807 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6808 so methods containing these can be AOTed.
6810 2005-01-03 Martin Baulig <martin@ximian.com>
6812 * loader.c (find_method): Removed the hack for generic instances.
6813 (method_from_memberref): If our parent is a generic instance, pass
6814 its generic type definition to find_method() and then inflate the
6816 (mono_get_method_constrained): Pass the generic type definition to
6817 find_method() and inflate the method later.
6819 * class-internals.h (MonoStats): Added `generic_class_count'.
6821 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6822 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6824 * reflection.c (mono_custom_attrs_from_params): Don't ignore
6825 generic type definitions.
6827 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
6829 * loader.c icall.c: Fix warnings.
6831 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
6833 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6834 blittable types. Fixes #70864.
6836 2004-12-29 Martin Baulig <martin@ximian.com>
6839 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6841 * reflection.c (mono_method_get_object): Create a
6842 "System.Reflection.MonoGenericMethod" for inflated methods; don't
6843 call mono_get_inflated_method().
6845 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6847 2004-12-27 Martin Baulig <martin@ximian.com>
6849 * class-internals.h (MonoMethod): Added `is_inflated' flag.
6850 (MonoMethodInflated): Added `inflated' field.
6852 * class.c (mono_class_inflate_generic_method): Don't really
6853 inflate the method here; just set the `is_inflated' flag in the
6855 (mono_class_get_inflated_method): Actually inflate the method here
6856 if it's not already inflated; we use the MonoMethodInflated's new
6857 `inflated' field as a cache.
6859 2004-12-26 Martin Baulig <martin@ximian.com>
6862 (inflate_generic_class): Moved some code out of inflate_generic_type().
6863 (mono_class_inflate_generic_method): If we're already inflated,
6864 inflate the context and use the declaring method; ie. make sure
6865 the declaring method of an inflated method is always the generic
6867 (mono_class_create_from_typedef): Create
6868 `class->generic_container->context->gclass'.
6870 2004-12-24 Ben Maurer <bmaurer@ximian.com>
6872 * metadata-internals.h, marshal.c, reflection.c: More
6873 MonoGHashTable->GHashTable.
6875 * domain-internals.h, class.c: Change MonoGHashTable's into
6876 GHashTables for some cases where no gc stuff is used
6878 All users: update apis
6880 2004-12-23 Ben Maurer <bmaurer@ximian.com>
6882 * metadata.c (builtin_types): Make this `const'. Makes this get
6883 put into the shareable section.
6884 (mono_metadata_init): Casts to make gcc happy.
6886 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
6888 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6890 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
6892 * icall.c: Added an internal call to retrieve the position and length
6893 of assembly-level declarative security attributes (RequestMinimum,
6894 RequestOptional and RequestRefuse). This is used by the Assembly class
6895 to re-create the corresponding permission sets.
6897 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6899 * marshal.c: fix the stelemref wrapper to be type correct
6902 2004-12-20 Ben Maurer <bmaurer@ximian.com>
6904 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6905 to do key & 0x7fffffff. Hashtable already does this. It just
6906 results in longer code.
6908 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
6910 * appdomain.c: Bump corlib version.
6911 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6912 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6913 * reflection.c|h: Add functions to get declarative security infos
6914 (blob position and length) for assemblies, classes and methods.
6916 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6918 * reflection.c: sort the constant table (bug #70693).
6920 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6922 * object-internals.h, threads.c, domain.c: add accessors for
6923 the MonoThread and MonoDomain tls keys.
6925 2004-12-18 Martin Baulig <martin@ximian.com>
6927 * class.c (inflate_generic_type): If we're inflating a generic
6928 instance, set `ngclass->context->container = context->container';
6929 ie. the container we inflated into.
6931 * metadata.c (mono_metadata_parse_generic_param): Reflect above
6932 inflate_generic_type() changes.
6934 2004-12-17 Martin Baulig <martin@ximian.com>
6937 (MonoGenericClass): Replaced `MonoType *generic_type' with
6938 `MonoClass *generic_class'. Removed `dynamic_info'; if
6939 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6940 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6942 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
6944 * exception.c (mono_exception_from_token): New helper function.
6946 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
6948 * assembly.c (mono_assembly_load_with_partial_name): Call
6949 mono_assembly_loaded before invoking the preload hooks. Fixes
6952 * object-internals.h (MonoThread): Change culture_info and
6953 ui_culture_info into an array.
6955 * threads.c: Cache culture info objects from more than one appdomain.
6957 * threads.c threads-types.h icall.c: Add icalls for manipulating the
6960 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
6962 * threads.h threads.c appdomain.c: Clear the culture_info field of
6963 all threads during unloading if they point to an object in the dying
6966 2004-12-13 Ben Maurer <bmaurer@ximian.com>
6968 * culture-info.h (TextInfoEntry): New struct
6969 * object-internals.h: sync with managed
6970 * locales.c: fill the `text_info_data' field
6971 * culture-info-tables.h: update
6973 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6975 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6978 2004-12-12 Ben Maurer <bmaurer@ximian.com>
6980 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6981 (ves_icall_ModuleBuilder_getMethodToken): Ditto
6983 2004-12-12 Martin Baulig <martin@ximian.com>
6985 * mono-debug-debugger.c (write_type): If we're an enum and the
6986 builtin types have already been initialized, call mono_class_init().
6988 2004-12-11 Martin Baulig <martin@ximian.com>
6990 * metadata.c (mono_metadata_load_generic_params): Added
6991 `MonoGenericContainer *parent_container' argument; automatically
6992 compute `container->is_method'; pass the correct owner to
6995 * reflection.c (compare_genericparam): Sort the GenericParam table
6996 according to increasing owners.
6998 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
7000 * profiler.c: allow disabling the default profiler.
7002 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
7004 * decimal.c, icall.c: allow disabling System.Decimal support.
7006 2004-12-09 Marek Safar <marek.safar@seznam.cz>
7008 * reflection.c: Add support for null attribute arguments.
7010 2004-12-09 Martin Baulig <martin@ximian.com>
7012 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
7013 names to get rid of compiler warnings.
7015 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
7017 * marshal.c (mono_marshal_get_struct_to_ptr): Call
7018 mono_marshal_load_type_info (). Fixes #69625.
7019 (mono_marshal_get_ptr_to_struct): Likewise.
7021 2004-12-08 Martin Baulig <martin@ximian.com>
7023 * mono-debug.h: Bumped version number to 47.
7025 * mono-debug-debugger.c
7026 (mono_debugger_event_handler, mono_debugger_event): Take two
7027 guint64 arguments insteed of a gpointer and a guint32.
7029 2004-12-08 Martin Baulig <martin@ximian.com>
7031 * debug-mono-symfile.h
7032 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
7033 `address' to `native_offset'.
7035 2004-12-08 Martin Baulig <martin@ximian.com>
7037 * class.c (mono_class_create_from_typespec): Only inflate if we
7038 either have `context->gclass' or `context->gmethod'.
7040 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
7042 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
7044 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
7046 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
7048 * reflection.c (mono_assembly_get_object): Remove the workaround put
7051 * appdomain.c: Use the corlib_internal field from MonoAssembly.
7053 * appdomain.c: Bump corlib version.
7055 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
7056 be visible in other appdomains.
7058 2004-12-07 Ben Maurer <bmaurer@ximian.com>
7060 * threads.c: Interlocked inc and dec for longs were messed up,
7061 use a KISS based impl for this. Fixes 70234
7063 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
7065 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
7067 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7069 * icall.c: fix to follow policy not to allow struct
7070 arguments in icalls.
7072 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7074 * process.c: make the patch that handles spaces in file paths work
7075 on mono/windows too.
7077 2004-12-06 Martin Baulig <martin@ximian.com>
7079 * class.c (mono_class_create_generic): Call
7080 mono_class_setup_supertypes() if we're dynamic.
7081 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
7083 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
7085 * object-internals.h: Add new fields to MonoThread.
7087 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7089 * icall.c threads-types.h threads.c: Add new icalls.
7091 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
7093 * object-internals.h (MonoReflectionAssembly): Sync object layout with
7096 * appdomain.c: Bump corlib version.
7098 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
7099 internal assemblies. Fixes #69181.
7101 2004-12-05 Martin Baulig <martin@ximian.com>
7103 * class.c (mono_class_inflate_generic_signature): Make this a
7104 no-op if `context' is NULL or we don't have any type parameters;
7105 also copy `sentinelpos'.
7107 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
7109 * image.c: Add unbox_wrapper_cache.
7111 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
7113 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
7116 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
7119 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
7121 2004-12-04 Martin Baulig <martin@ximian.com>
7123 * loader.c (mono_method_get_signature_full): New public function;
7124 like mono_method_get_signature(), but with an additional
7125 `MonoGenericContext *' argument.
7127 * class.c (mono_class_inflate_generic_signature): Formerly known
7128 as inflate_generic_signature(); make this public.
7130 2004-12-04 Martin Baulig <martin@ximian.com>
7133 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
7134 instead of a `MonoGenericContainer *'.
7135 (mono_metadata_parse_array_full): Likewise.
7136 (mono_metadata_parse_signature_full): Likewise.
7137 (mono_metadata_parse_method_signature_full): Likewise.
7138 (mono_metadata_parse_generic_inst): Likewise.
7139 (mono_metadata_parse_generic_param): Likewise.
7140 (mono_metadata_parse_mh_full): Likewise.
7141 (mono_type_create_from_typespec_full): Likewise.
7143 2004-12-03 Martin Baulig <martin@ximian.com>
7145 * class-internals.h (MonoGenericContainer): Replaced the
7146 `MonoGenericContext * pointer with a `MonoGenericContext'
7147 structure and made it the first element.
7149 2004-12-03 Martin Baulig <martin@ximian.com>
7152 (inflate_generic_type): Set the `context->container' when creating
7153 a new MonoGenericContext.
7154 (mono_class_inflate_generic_method): Likewise.
7155 (mono_class_create_from_typespec): Just use `context->container'
7156 to get the container.
7158 * loader.c (method_from_methodspec): Set `context->parent' from
7159 `context->container' - and if that's a method container, use its
7160 parent. Also set the `context->container' when creating a new
7162 (mono_get_method_from_token): Use just `context->container' to get
7165 * metadata.c (do_mono_metadata_parse_generic_class): Also set
7166 `gclass->context->container'.
7168 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
7169 the `context->container' when creating a new MonoGenericContext.
7171 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
7173 * reflection.c (compare_genericparam): Sort params with identical
7174 owner by their number. Fixes gen-111 on sparc.
7176 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
7178 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
7179 around the domain changes.
7181 * appdomain.c (mono_domain_unload): Handle the case when the thread
7182 calling Unload is itself being aborted during unloading. Fixes #70022.
7184 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
7186 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
7187 checkpoint_func as an icall so it gets a wrapper.
7188 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
7189 in the cross-appdomain wrappers too.
7191 * threads.c (mono_thread_has_appdomain_ref): Make this public.
7193 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
7195 * reflection.c: Fix some memory leaks.
7197 2004-12-02 Martin Baulig <martin@ximian.com>
7199 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
7201 * metadata.c (generic_class_cache): New static hashtable.
7202 (mono_metadata_lookup_generic_class): New public method.
7204 2004-12-02 Martin Baulig <martin@ximian.com>
7206 * class.c (mono_class_create_from_typedef): Call
7207 mono_class_setup_parent() and mono_class_create_mono_type() before
7208 parsing the interfaces.
7210 2004-12-02 Martin Baulig <martin@ximian.com>
7212 * metadata.c (generic_inst_cache): New static hashtable.
7213 (mono_metadata_lookup_generic_inst): New public function.
7214 (mono_metadata_inflate_generic_inst): New public function.
7215 (mono_metadata_parse_generic_inst): New public function.
7216 (do_mono_metadata_parse_generic_class): Use the new
7217 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
7218 since this'll also use the cache.
7220 * reflection.c (mono_reflection_bind_generic_method_parameters):
7221 Use mono_metadata_lookup_generic_inst() to use the new cache.
7223 * class.c (inflate_mono_type): Use
7224 mono_metadata_inflate_generic_inst() to inflate a generic
7225 instance; this'll also use the new cache.
7227 * loader.c (method_from_methodspec): Use
7228 mono_metadata_parse_generic_inst() and
7229 mono_metadata_inflate_generic_inst() rather than parsing it
7230 manually, so we can use the new cache.
7232 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
7234 * threads.c (wait_for_tids): Do not incorrectly free threads when
7237 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7239 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
7240 iter->args based on whether parameters are passed in registers (i.e.
7241 MONO_ARCH_REGPARMS is defined)
7243 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
7245 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
7246 the exception message. Fixes #70070.
7247 (method_from_methodspec): Fix warnings.
7249 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7251 * process.c: (complete_path) return the path quoted
7253 2004-12-01 Martin Baulig <martin@ximian.com>
7255 * class-internals.h (MonoGenericInst): New structure.
7256 (MonoGenericClass): Replaced `type_argc', `type_argv' and
7257 `is_open' with `MonoGenericInst *inst'.
7258 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
7259 `is_open' with `MonoGenericInst *inst'.
7261 2004-11-30 Martin Baulig <martin@ximian.com>
7263 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
7265 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
7266 to `generic_class_cache'.
7269 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
7270 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
7271 (mono_generic_inst_is_valuetype): Renamed to
7272 mono_generic_class_is_valuetype().
7275 (MonoGenericInst): Renamed to MonoGenericClass.
7276 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
7277 (MonoClass): Renamed `generic_inst' to `generic_class'.
7278 (MonoGenericContext): Renamed `ginst' to `gclass'.
7280 * object-internals.h
7281 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
7283 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
7284 mono_reflection_generic_class_initialize().
7286 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
7287 now known as "System.Reflection.MonoGenericClass".
7288 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
7290 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
7292 * class-internals.h: Added a flag field to MonoClass to cache the
7293 declarative security attributes actions associated with the class.
7294 * domain-internals.h: Added booleans to MonoJitInfo to cache the
7295 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
7296 applicable to the JITted method.
7297 * reflection.c|h: Added functions to extract (as flags) which security
7298 actions are available (declaratively) for a method, class or assembly.
7299 * metadata.c|h: Added functions to search the declarative security
7300 table in the metadata.
7302 2004-11-29 Ben Maurer <bmaurer@ximian.com>
7304 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
7305 EXPORTEDTYPES are already in the class name cache, so there is no
7306 need to add extra code here to look at them. Just removes a bit of
7309 (ves_icall_System_Environment_get_TickCount): No need for #if
7310 WINDOWS. We already have the code in io-layer.
7312 2004-11-28 Martin Baulig <martin@ximian.com>
7315 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
7318 2004-11-27 Miguel de Icaza <miguel@ximian.com>
7320 * assembly.c (do_mono_assembly_open): Instead of having a
7321 conditional WITH_BUNDLE, incorporate support for bundles here, by
7322 having a global `bundles' variable holding a pointer to the actual
7325 (mono_register_bundled_assemblies): New API call used by the
7328 See mkbundle.1 for details.
7330 2004-11-27 Martin Baulig <martin@ximian.com>
7332 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
7333 the vtable for generic methods.
7335 2004-11-26 Martin Baulig <martin@ximian.com>
7338 (mono_metadata_generic_method_hash): New public function.
7339 (mono_metadata_generic_method_equal): Likewise.
7342 (MonoGenericContainer): Added `GHashTable *method_hash'.
7344 * reflection.c (ReflectionMethodBuilder): Added
7345 `MonoGenericContainer *generic_container'.
7346 (reflection_methodbuilder_to_mono_method): Don't create a new
7347 MonoGenericContainer each time we're called.
7348 (mono_reflection_bind_generic_method_parameters): Use
7349 `container->method_hash' to cache the results so we don't create a
7350 different method if we're called several times with the same
7353 * loader.c (method_from_methodspec): Use the new
7354 `container->method_hash' here, too.
7356 2004-11-26 Martin Baulig <martin@ximian.com>
7358 * class.c (inflate_generic_signature): Correctly compute
7359 `res->has_type_parameters'.
7360 (mono_class_vtable): Use the `has_type_parameters' flag to
7361 determine whether we're a generic method.
7363 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
7365 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
7367 * object.c (mono_runtime_run_main): Fix a small memory leak.
7369 2004-11-25 Martin Baulig <martin@ximian.com>
7371 * class.c (set_generic_param_owner): Fixed the loop.
7373 2004-11-25 Martin Baulig <martin@ximian.com>
7375 * object.c (mono_class_vtable): Don't create any JIT wrappers for
7378 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
7380 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
7381 names. Fixes #69787.
7383 2004-11-24 Martin Baulig <martin@ximian.com>
7385 * class.c (mono_class_create_generic_2): If we don't have a
7386 `ginst->parent', inflate `gklass->parent' to get our parent.
7388 2004-11-24 Martin Baulig <martin@ximian.com>
7390 * reflection.c (compare_genericparam): Correctly sort the
7391 GenericParam table; fixes #69779.
7393 2004-11-23 Ben Maurer <bmaurer@ximian.com>
7395 * reflection.c: When writing a PE file, don't create a huge
7396 buffer in memory. Just write the arrays we have to the file.
7397 This reduces memory usage.
7399 * metadata-internals.h: MonoDynamicStream pefile is no longer used
7402 2004-11-17 Martin Baulig <martin@ximian.com>
7404 * class.c (mono_class_init): Don't setup `class->parent' for
7405 dynamic instances; moved this to mono_class_generic_2().
7406 (mono_class_create_generic): Also set `klass->inited' for dynamic
7408 (mono_class_create_generic_2): Don't do anything for dynamic
7409 generic instances. Set `klass->parent' here and also call
7410 mono_class_setup_parent() here.
7412 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
7413 `MonoType *parent' argument; set `ginst->parent' before calling
7414 mono_class_create_generic_2(), so we set the correct parent.
7416 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
7418 * reflection.c: allow getting attributes from ModuleBuilder
7421 2004-11-17 Martin Baulig <martin@ximian.com>
7423 * class.c (mono_class_create_from_typedef): If a type parameter is
7424 inherited from an outer class, set its owner to that class.
7426 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
7428 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
7429 for (int*) written size. This fixes bug #69592.
7431 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
7433 * icall.c: Added IsAuthenticodePresnet internal call.
7434 * image.c|h: New function that check a MonoImage for an Authenticode
7435 signature in the certificate PE data directory.
7436 * security.c|h: New internal call to ask the runtime if an
7437 Authenticode signature seems referenced in the PE header.
7439 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
7441 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
7443 * reflection.c (mono_image_create_pefile): Free the assembly streams
7444 after writing out the assembly file.
7446 * object.c (mono_runtime_run_main): Fix small memory leak.
7448 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
7449 property access modifiers. Fixes #69389.
7451 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
7453 * domain.c, object.c, object-internals.h, domain-internals.h,
7454 object.h, marshal.c: keep dynamic code info per domain.
7456 2004-11-15 Martin Baulig <martin@ximian.com>
7458 * class.c (mono_type_get_name_recurse): Put type arguments in
7459 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
7462 2004-11-15 Martin Baulig <martin@ximian.com>
7464 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7465 (mono_class_setup_vtable): When computing `the_cname' for a
7466 generic instance, don't include the namespace since we'd otherwise
7469 2004-11-15 Martin Baulig <martin@ximian.com>
7471 * class.c (mono_class_create_generic): Changed return type to void.
7472 (mono_class_create_generic_2): New public function; setup
7473 `class->method', `class->field' and `class->interfaces' here
7474 instead of in mono_class_init().
7476 * class.h (mono_class_create_generic): Moved to class-internals.h.
7478 2004-11-14 Ben Maurer <bmaurer@ximian.com>
7480 * reflection.c (mono_image_create_pefile): take a file HANDLE.
7481 rather than writing to memory, write to this file. Right now,
7482 we are just writting into a buffer, and copying that. However
7483 we can avoid the buffer later.
7485 (mono_dynamic_stream_reset): new function
7487 * icall.c, object-internals.h: update for the above.
7489 2004-11-13 Ben Maurer <bmaurer@ximian.com>
7491 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7492 have been using gc'd memory. First it is slower, unlikely
7493 the comment in the source code said, secondly, it increases
7494 our footprint to do it in the gc.
7496 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7497 the method so that it does not have to copy to managed code.
7499 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
7501 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7503 2004-11-12 Martin Baulig <martin@localhost>
7505 * reflection.c (mono_image_create_token): Allow generic method
7506 definitions here, since they may appear in an `.override'; see
7507 gen-98/gen-99 for an example.
7509 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
7511 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7514 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7517 2004-11-11 Martin Baulig <martin@ximian.com>
7519 * class.c (mono_class_setup_vtable): In an explicit interface
7520 implementation, the method name now includes the arity.
7522 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
7524 * object.c (mono_array_full_copy): Fix warning.
7526 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
7528 * appdomain.c: Removed look_for_method_by_name(). Use the new method
7529 mono_class_get_method_from_name() instead.
7531 * class-internals.h: Added two new types of wrappers.
7532 Added MonoRemotingTarget enum. Added new trampoline function type, which
7533 takes an additional MonoRemotingTarget value as parameter, so it is
7534 possible to request a trampoline for a specific target.
7536 * class.c: Added new mono_class_get_method_from_name() method.
7538 * class.h: In MonoRemoteClass, we can have now to vtables, one for
7539 general remoting sinks and one specific for cross domain calls.
7541 * debug-helpers.c: Added new wrapper names.
7543 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7546 * image.c: Porperly delete value objects form the remoting invoke hashtable.
7548 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7549 with several other methods (mono_marshal_get_xappdomain_dispatch,
7550 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7551 and others) can generate a fast remoting wrapper for cross domain calls.
7552 More information can be found in docs/remoting.
7553 Other changes: Removed mono_find_method_by_name, and used
7554 mono_class_get_method_from_name instead.
7555 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7556 is stored in the remoting invoke hashtable.
7558 * marshal.h: published the new method for getting the xdomain wrapper,
7559 and also added a method for getting the adequate wrapper for a given
7562 * object-internals.h, object.c: Added a couple of methods for capying and
7564 Modified mono_install_remoting_trampoline, which takes the new remoting
7565 trampoline that has a remoting target as parameter.
7566 mono_class_proxy_vtable now also takes a remoting target as parameter, and
7567 will return the most suitable vtable for the target.
7568 Added mono_remote_class_vtable, which returns the vtable of a remote class
7569 (which can be the normal remoting vtable or the xdomain vtable).
7571 * threads.c: the xdomain invoke and dispatch wrappers must also be
7572 protected against interruptions.
7574 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7576 * icall.c: use memmove in BlockCopyInternal when the source and
7577 destination arrays are the same.
7579 2004-11-09 Martin Baulig <martin@ximian.com>
7581 * class-internals.h (MonoGenericContainer): Removed `method' and
7582 `signature', replaced them with `is_method' and `is_signature'
7583 flags. Added `context'.
7585 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7586 instead of a `MonoGenericContainer *'.
7588 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7589 for dynamic type parameters.
7590 (mono_metadata_load_generic_params): Setup `container->context'.
7592 * reflection.c (mono_reflection_setup_generic_class): Setup
7593 `tb->generic_container->context'.
7594 (do_mono_reflection_bind_generic_parameters): Use
7595 mono_class_inflate_generic_type() to correctly inflate types,
7596 rather than using our own hack just for MONO_TYPE_VAR.
7598 2004-11-09 Martin Baulig <martin@ximian.com>
7600 * class.c (mono_class_inflate_generic_method): Small fix; don't
7604 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7605 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7606 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7607 (ves_icall_Type_BindGenericParameters): Likewise.
7608 (ves_icall_Type_get_IsGenericInstance): Likewise.
7609 (ves_icall_Type_GetGenericParameterPosition): Likewise.
7610 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7611 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7612 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7614 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
7616 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7617 assembly versions and public key tokens. Fixes #69113.
7619 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7621 * metadata.c: fix bug introduced with the type cache changes
7624 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7626 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7627 the MonoClass pointer instead of the token in exception clauses.
7628 * reflection.c: updates for the above and make the code not depend
7629 on the structure of MonoExceptionClause.
7631 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
7633 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7634 Add support for dynamic assemblies. Fixes #69114.
7636 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7638 2004-11-07 Ben Maurer <bmaurer@ximian.com>
7640 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7641 since most only those methods use it. the code member of
7642 MonoMethodPInvoke was dead, so that can be removed too. Also,
7643 remove inline_count (again, not used), and move slot so that it
7644 can share bits with some other flags. This saves 8 bytes in the
7645 structure and gives us about 50 kb back for mcs helloworld.cs
7647 * *.[ch]: Do naming changes for the above.
7649 * loader.c (mono_method_get_header): Lazily init the header
7651 (mono_get_method_from_token): don't init the header here
7652 (mono_free_method): the header may never be allocated
7654 Overall, this saves 150 kb of unmanaged allocations
7655 for mcs helloworld.cs. That accounts for 10% of the unmanaged
7658 * loader.c, loader.h (mono_method_get_header): new accessor.
7660 * *.[ch]: use the above method. Prepares us to lazily load
7663 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7664 three warnings, which are actual bugs (see 69206).
7666 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7667 unused. Saves a cool 4 bytes / method.
7669 2004-11-06 Ben Maurer <bmaurer@ximian.com>
7671 * metadata.c (builtin_types): Add types for System.Object here.
7672 (mono_metadata_parse_type_full): Cache MonoType*'s that are
7673 for a class or valuetype from klass->this_arg or klass->byval_arg.
7675 On mcs for a hello world, this gets us down from 21836 MonoType's
7678 (mono_metadata_free_type): Account for the above change.
7680 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
7682 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
7683 exception instead of asserting if name is null.
7684 (ves_icall_System_AppDomain_GetData): Ditto.
7686 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
7688 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7691 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
7692 Return NULL when the domain does not have entry_assembly set.
7694 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
7695 Add a 'resource_modules' argument.
7696 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7698 * reflection.c (mono_reflection_create_runtime_class): Move setting
7699 of wastypebuilder here, so mono_get_type_object () returns a MonoType
7702 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7703 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7704 Throw an ArgumentNullException if 'ptr' is null.
7706 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7707 assemblies here. Fixes #69020.
7709 2004-11-05 Geoff Norton <gnorton@customerdna.com>
7711 * reflection.c (build_compressed_metadata): Fix the previous patch for
7712 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
7715 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
7717 * assembly.c (mono_assembly_names_equal): Allow a match if one of
7718 the cultures is false. Fixes #69090.
7720 * reflection.c (build_compressed_metadata): Fix invalid memory read
7721 detected by valgrind.
7723 * reflection.c (mono_reflection_get_type): Avoid triggering a
7724 TypeResolve multiple times for the same type. Fixes #65577.
7726 2004-11-04 Ben Maurer <bmaurer@ximian.com>
7728 * marshal.c: Avoid using ldftn to call managed functions. It is
7729 much slower than just a call.
7731 * reflection.c (mono_module_get_object): free the basename we
7732 allocate here from glib.
7734 * reflection.c (ensure_runtime_vtable): make sure to free
7735 overrides. Also, we were allocating an array of MonoMethod not an
7736 array of MonoMethod*.
7738 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7740 * image.c (mono_image_close): free image->guid here.
7742 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
7744 * reflection.c: Fix some spec conformance issues with the PE file
7745 structures so mcs compiled apps run on the Net 2.0 beta.
7747 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
7749 * string-icalls.c (ves_icall_System_String_ctor_encoding):
7750 Implement this. Fixes #67264.
7752 * debug-helpers.h debug-helpers.c marshal.c: Move
7753 mono_find_method_by_name to debug-helpers.c.
7755 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
7757 * object.c (mono_release_type_locks): type_initialization_hash is
7760 * reflection.c object.c object-internals.h: Fix warnings.
7762 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7763 without accessors. Fixes #61561.
7765 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7766 application base from the root domain if not set. Fixes #65641.
7767 (mono_runtime_init): Fix warning.
7769 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7771 * appdomain.c: call mono_thread_pool_init.
7772 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7773 of worker threads based on the number of CPUs and the environment
7774 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7775 for non-windows (windows) systems.
7777 2004-10-27 Chris Toshok <toshok@ximian.com>
7779 * mono-debug-debugger.c (write_class): don't call mono_class_init
7780 here, as even with the check for (!klass->init_pending), we get
7781 into a situation where we're hitting cycles in class
7782 initialization. Fixes #68816.
7784 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
7786 * image.c: Avoid overwriting values in the loaded_images_hash when an
7787 assembly is loaded multiple times. Fixes #61152.
7789 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7790 so multiple satellite assemblies for the same name can be loaded.
7793 * mono_domain_assembly_preload: Actually return the loaded assembly,
7796 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7797 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7799 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7800 pending finalizers are not invoked after the appdomain has been
7801 unloaded. Fixes #67862.
7803 2004-10-22 Martin Baulig <martin@ximian.com>
7805 * mono-debug-debugger.c
7806 (mono_debugger_runtime_invoke): Don't box valuetypes.
7808 2004-10-22 Chris Toshok <toshok@ximian.com>
7810 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7811 don't hide private methods.
7813 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
7815 * icall.c: Allows the runtime to "share" (when known) the public key
7816 token of an assembly. This avoid the need to recalculate the token
7817 (from the public key) in managed code.
7819 2004-10-21 Chris Toshok <toshok@ximian.com>
7821 * debug-helpers.c (append_class_name): argh, revert last patch.
7823 2004-10-21 Chris Toshok <toshok@ximian.com>
7825 * debug-helpers.c (append_class_name): use '+' as the delimiter,
7826 not '/', so that it matches what the debugger uses to look up
7829 2004-10-21 Martin Baulig <martin@ximian.com>
7831 * mono-debug-debugger.c (mono_debugger_throw_exception): New
7832 public method; this is called each time an exception is thrown and
7833 allows the debugger to use exception catch points.
7835 2004-10-21 Martin Baulig <martin@ximian.com>
7837 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7838 the stack pointer and the exception object in some struct and pass
7839 that to the debugger.
7841 2004-10-21 Chris Toshok <toshok@ximian.com>
7843 * mono-debug-debugger.c (do_write_class): add instance/static
7844 event support. We don't expose "raise" or "other" yet.
7845 (event_is_static): new method.
7847 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
7849 * mono-debug-debugger.c
7850 (mono_debugger_handle_exception): Remove
7851 bogus return value for fussy compilers.
7853 2004-10-20 Martin Baulig <martin@ximian.com>
7855 * mono-debug-debugger.c
7856 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7857 (mono_debugger_handled_exception): Likewise.
7859 2004-10-20 Martin Baulig <martin@ximian.com>
7861 * mono-debug-debugger.h (MonoDebuggerEvent): Added
7862 MONO_DEBUGGER_EVENT_EXCEPTION.
7864 * mono-debug-debugger.c (mono_debugger_handle_exception): New
7865 public function to send the debugger a notification for an
7866 exception and inform it about a catch/finally clause.
7868 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
7870 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7871 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7874 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7876 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
7878 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7879 marshalled as [In,Out]. Fixes #58325.
7881 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
7883 * reflection.c (mono_method_body_get_object): Implement some fields.
7885 2004-10-12 Martin Baulig <martin@ximian.com>
7887 * reflection.c (mono_reflection_bind_generic_parameters): Small
7888 fix, correctly retrieve our parent from a generic instance.
7890 2004-10-12 Martin Baulig <martin@ximian.com>
7892 * metadata.c (mono_metadata_generic_param_equal): We always have
7896 (mono_class_from_generic_parameter): We need to have an owner.
7897 (my_mono_class_from_generic_parameter): Likewise.
7899 * reflection.c (mono_reflection_setup_generic_class): Renamed to
7900 mono_reflection_create_generic_class() and added a new
7901 mono_reflection_setup_generic_class().
7902 (mono_reflection_initialize_generic_param): If we're a nested
7903 generic type and inherited from the containing class, set our
7904 owner to the outer class.
7906 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
7908 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7910 * reflection.c (mono_method_body_get_object): New function to create
7911 a MethodBody object.
7913 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7915 2004-10-11 Martin Baulig <martin@ximian.com>
7917 * metadata.c (_mono_metadata_type_equal): Renamed to
7918 do_mono_metadata_type_equal() and made static.
7920 2004-10-11 Martin Baulig <martin@ximian.com>
7922 * appdomain.c: Bump corlib version number to 28.
7924 2004-10-10 Martin Baulig <martin@ximian.com>
7927 (MonoGenericInst): Added `MonoGenericContainer *container'.
7928 (MonoGenericMethod): Likewise.
7929 (MonoGenericContext): Likewise.
7930 (MonoGenericParam): Added `MonoGenericContainer *owner'.
7933 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7934 (do_mono_metadata_parse_generic_inst): Likewise.
7935 (mono_metadata_parse_type_full): New public method. This is the actual
7936 mono_metadata_parse_type() implementation - with an additional
7937 `MonoGenericContainer *' argument.
7938 (mono_metadata_parse_array_full): Likewise.
7939 (mono_metadata_parse_signature_full): Likewise.
7940 (mono_metadata_parse_method_signature_full): Likewise.
7941 (mono_metadata_parse_mh_full): Likewise.
7942 (mono_type_create_from_typespec): Likewise.
7943 (mono_metadata_interfaces_from_typedef_full): New public method;
7944 this is similar to the other _full() methods, but we take a
7945 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7946 (mono_metadata_parse_generic_param): Take an additional
7947 `MonoGenericContainer *' argument and lookup the MonoGenericParam
7948 from that container.
7949 (mono_metadata_generic_param_equal): New static method to compare
7950 two type parameters.
7951 (_mono_metadata_type_equal): New static method; takes an
7952 additional `gboolean signature_only' argument - if true, we don't
7953 compare the owners of generic parameters.
7954 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7955 with a TRUE argument - do a signature-only comparision.
7957 * loader.c: Use the new _full() methods and pass the
7958 MonoGenericContainer to them.
7960 * object-internals.h (MonoReflectionTypeBuilder): Added
7961 `MonoGenericContainer *generic_container' field.
7962 (MonoReflectionMethodBuilder): Likewise.
7964 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
7966 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7967 case initial images of dynamic assemblies.
7969 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7971 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7973 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7974 length of event->other array.
7975 (typebuilder_setup_events): Ditto.
7977 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7978 'assembly_by_name' and add an 'assemblies' list.
7980 * assembly.h assembly.c: Add a new search hook for determining whenever
7981 an assembly is already loaded. Use this instead of searching in the
7982 loaded_assemblies list.
7984 * domain.c appdomain.c: Implement the new search hook so loaded
7985 assemblies are now scoped by appdomain. Fixes #67727.
7987 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
7989 * threads.c (mono_thread_attach): Initialize synch_lock field so
7990 mono_thread_detach works again.
7992 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7993 'lib' too. Fixes #63130.
7995 2004-10-06 Jackson Harper <jackson@ximian.com>
7997 * culture-info-tables.h: regenerated.
7999 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
8001 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
8002 implemented by other interfaces in the result. Fixes #65764.
8004 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8005 Handle unloadable modules without crashing.
8007 * image.c (load_modules): Revert the previous patch since modules must
8008 have a fixed index inside the array.
8010 * image.c (load_modules): Don't include native modules in the modules
8013 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
8015 * reflection.h: Add param_defaults field.
8017 * reflection.c: Add support for parameter defaults in dynamic methods.
8020 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
8021 an empty string when a type has no namespace. Fixes #64230.
8023 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
8025 * tabledefs.h: Added "internal" security actions to support non-CAS
8026 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
8027 Note: they do not seems to be used anymore in 2.0 (new metadata format)
8029 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
8031 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
8032 constructor of abstract class. Fixes #61689.
8034 2004-10-04 Martin Baulig <martin@ximian.com>
8036 * class-internals.h (MonoGenericContainer): New type.
8037 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
8038 `MonoGenericContainer *generic_container'.
8039 (MonoClass): Replaced `gen_params' and `num_gen_params' with
8040 `MonoGenericContainer *generic_container'.
8042 * metadata.c (mono_metadata_load_generic_params): Return a
8043 `MonoGenericContainer *' instead of a `MonoGenericParam *';
8044 removed the `num' argument.
8046 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
8048 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
8051 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
8054 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
8056 * reflection.c: Save pe_kind and machine values into the generated
8059 * appdomain.c: Bump corlib version number.
8061 * object-internals.h: Reorganize layout of LocalBuilder.
8063 * class-internals.h class.c (mono_class_get_implemented_interfaces):
8064 New helper function.
8066 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
8067 created MonoType for dynamic types. Fixes #66180.
8069 2004-10-02 Ben Maurer <bmaurer@ximian.com>
8071 * threadpool.c: the ares hashtable needs a critical section around it.
8072 this prevents some nasty segfaults
8074 2004-10-02 Massimiliano Mantione <massi@ximian.com>
8076 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
8077 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
8080 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
8082 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
8084 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
8086 * image.c: Always canonicalize image file names, to avoid loading
8087 the same assembly twice when referenced using a relative path.
8089 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
8091 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
8093 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
8095 * marshal.c: Fix warnings.
8097 2004-09-29 Geoff Norton <gnorton@customerdna.com>
8099 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
8100 attempting to marshal the delegate_trampoline as the method_addr.
8101 This patch has a static hashtable of marshalled delegates so that
8102 we can map delegate_trampoline addresses back to delegates. This
8103 allows a delegate passed to managed code to be passed back into native
8106 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
8108 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
8110 * reflection.c (method_encode_code): Align method headers properly.
8113 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
8115 * marshal.c: In the runtime invoke wrapper, reset the abort
8116 exception if it is cached. This avoids the automatic rethrowal of
8117 the exception after the catch of the wrapper. Also check for pending
8118 interruptions before calling the managed method. This is done using
8119 the new method emit_thread_force_interrupt_checkpoint, since the
8120 normal checkpoint method is ignored when running the invoke wrapper.
8121 * object.c: If the abort exception is rethrown, set the abort_exc
8122 field of the thread, so it will be rethrown aftere every catch.
8123 * threadpool.c: Only run an interruption checkpoint if what has been
8124 requested is a stop of the thread (aborts will be ignored).
8125 * threads.c: By default, a thread will now never be interrumped while
8126 running the runtime invoke wrapper (this ensures that runtime_invoke
8127 will always return to the caller if an exception pointer is provided).
8128 There is a new special method mono_thread_force_interruption_checkpoint()
8129 to force an interruption checkpoint even if running a protected
8130 wrapper, which is used by the same runtime invoke wrapper to do a check
8133 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
8135 * object.c, object-internals.h: Implemented mono_release_type_locks,
8136 which releases the cctor locks held by a thread.
8137 * threads.c, threads.h: In thread_cleanup, release cctor locks held
8138 by a thread. Added mono_thread_exit() method to be used to safely stop
8141 2004-09-28 Raja R Harinath <rharinath@novell.com>
8143 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8144 Move null check before dereference. Avoid indexing beyond the end
8145 of the 'modules' array.
8147 2004-09-28 Raja R Harinath <rharinath@novell.com>
8149 * metadata-internals.h (MonoImage): Add module_count field.
8150 * image.c (load_modules): Set image->module_count.
8151 (mono_image_load_file_for_image): Use image->module_count.
8152 * reflection.c (mono_image_load_module): Append to image->modules array
8153 of dynamic assembly.
8154 (mono_module_get_object): Fix loop to actually increment index.
8155 Use image->module_count.
8156 * assembly.c (mono_assembly_load_references): Use image->module_count.
8157 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8160 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
8162 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
8163 Avoid assert on generic types.
8165 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
8167 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
8169 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
8171 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
8172 function to convert a MarshalSpec structure to its managed counterpart.
8174 * reflection.c: Fix warnings.
8176 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
8179 * icall.c (mono_create_icall_signature): Fix build.
8181 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
8183 * icall.c: Add MakePointType icall.
8185 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
8188 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8190 * threadpool.c: reuse allocated slots in the queue.
8192 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
8194 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
8196 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
8198 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
8201 * tabledefs.h: Add constants for pinvoke attributes BestFit and
8202 ThrowOnUnmappableChar.
8204 * icall.c (ves_icall_Type_GetPacking): New icall.
8206 2004-09-24 Martin Baulig <martin@ximian.com>
8208 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
8210 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8213 (mono_domain_set): allow setting a domain that is being unloaded.
8214 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
8217 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
8219 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
8220 the GetCustomAttributes icall.
8222 2004-09-23 Martin Baulig <martin@ximian.com>
8224 * object-internals.h (MonoReflectionGenericParam): Replaced
8225 'has_ctor_constraint', `has_reference_type' and `has_value_type'
8226 with `guint32 attrs'.
8228 2004-09-23 Martin Baulig <martin@ximian.com>
8230 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
8232 2004-09-23 Martin Baulig <martin@ximian.com>
8234 * object-internals.h (GenericParameterAttributes): New enum.
8236 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
8238 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
8240 * class.c (init_events): Fill out event->other field.
8242 * class.c: Fix warnings.
8244 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
8246 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
8248 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
8249 walk which doesn't supply the IL offset.
8251 2004-09-22 Martin Baulig <martin@ximian.com>
8253 * reflection.c (mono_reflection_setup_internal_class): If we're
8254 System.ValueType, System.Object or System.Enum, set
8255 `klass->instance_size' and create the vtable.
8256 (mono_reflection_create_internal_class): If we're an enum type,
8257 get the base class from our current corlib.
8259 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
8261 * reflection.h (MonoResolveTokenError): New type.
8263 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
8266 * icall.c: Add an 'error' argument to the ResolveToken icalls.
8268 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
8270 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
8271 Support also calling constructors, but only for already allocated objects.
8273 2004-09-17 Geoff Norton <gnorton@customerdna.com>
8275 * reflection.c (type_get_qualified_name): If the klass is null
8276 return the typename to avoid a NullRefEx.
8277 (encode_cattr_value): Get the qualified name of the boxed type,
8278 not the underlying enumtype. Fixes #62984.
8280 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
8282 * marshal.c: Fix problems with previous checkin.
8284 2004-09-21 <vargaz@freemail.hu>
8286 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
8287 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
8289 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
8291 2004-09-21 Geoff Norton <gnorton@customerdna.com>
8293 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
8294 should only return a type for pointers, arrays, and passbyref types.
8297 2004-09-21 Martin Baulig <martin@ximian.com>
8299 * domain.c (mono_debugger_check_runtime_version): New public
8302 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
8304 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
8306 * reflection.c: Added missing sort to the declarative security
8307 attributes table. MS implementation stops seeing the attributes if the
8308 token number regress in the table (as shown by ildasm and permview).
8310 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
8312 * object-internals.h (MonoReflectionModule): Add 'token' field.
8314 * reflection.c (mono_reflection_get_token): Add support for Module
8316 (mono_module_get_object): Set 'token' field.
8317 (mono_module_file_get_object): Set 'token' field.
8319 * icall.c: Add new Assembly and Module icalls.
8321 * appdomain.c: Bump corlib version.
8323 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
8325 * loader.h loader.c class.h class.c: Add helper functions for obtaining
8326 tokens of metadata objects.
8328 * reflection.h reflection.c (mono_reflection_get_token): New function
8329 to obtain the token of a metadata object.
8331 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
8333 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
8335 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
8337 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
8339 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
8341 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
8342 * object-internals.h: Added 3 MonoArray* members to MonoReflection
8343 AssemblyBuilder to access the permissions set in the class lib.
8344 * reflection.c: Added security attributes encoding step in
8345 mono_image_build_metadata.
8346 * tabledefs.h: Added new security actions defined in 2.0:
8347 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
8349 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
8351 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
8354 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
8356 * locales.c: nullify the ICU_collator member of CompareInfo when it is
8357 finalized. There where random SIGSEVs at program termination, when
8358 an object being finalized was trying to do a string comparison and
8359 the current culture was already finalized.
8361 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8363 * threads.c: call thread_cleanup before finishing the thread if we get
8366 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
8368 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
8369 assemblies from the parent. Fixes #65665.
8371 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
8373 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
8376 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
8378 * reflection.h: add prototype for mono_get_dbnull_object
8379 * reflection.c: add prototypes for get_default_param_value_blobs
8380 and mono_get_object_from_blob for fussier compilers
8382 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
8384 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
8385 false deadlock checks in class initialization.
8387 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
8389 * image.c (mono_image_addref): Fix comment.
8391 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
8394 2004-09-12 Jambunathan K <kjambunathan@novell.com>
8396 * reflection.c (mono_param_get_objects): Modified to return
8397 ParameterInfo.DefaultValue object.
8399 (get_default_param_value_blobs):
8400 (mono_get_object_from_blob):
8401 (mono_get_dbnull_object): New helper routines.
8403 * object.c (mono_get_constant_value_from_blob): New helper routine
8404 carved out from get_default_field_value ()
8406 * object-internals.h (mono_get_constant_value_from_blob): Added
8407 function declaration.
8409 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
8411 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
8412 referenced assemblies. Fixes #62135.
8414 * exception.h exception.c (mono_get_exception_file_not_found2): New
8417 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
8419 * class.h class.c: Add mono_type_get_underlying_type ().
8421 2004-09-09 Geoff Norton <gnorton@customerndna.com>
8423 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
8424 Fix GetTypes() to support dynamically created assemblies.
8426 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
8428 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
8430 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
8433 * reflection.h reflection.c loader.c: Allow dynamic construction of
8434 pinvoke methods. Fixes #65571.
8436 * reflection.c (mono_reflection_get_type): Revert previous change since
8437 it causes regressions.
8439 2004-09-08 Martin Baulig <martin@ximian.com>
8441 * class.c (class_compute_field_layout): Don't call
8442 mono_class_layout_fields() for open generic instances.
8444 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
8445 * threads.c appdomain.c: fix typo in GC macro
8447 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8449 * threads.c: don't call mono_thread_detach() in start_wrapper(),
8450 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
8452 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
8454 * image.c (mono_image_close): Applied patch from
8455 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
8456 assembly is loaded multiple times from data.
8458 * image.c (mono_image_open): Fix warning.
8460 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8462 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8465 * reflection.c (mono_reflection_create_runtime_class): Initialize
8466 klass->nested_classes. Fixes #61224.
8468 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8470 * threads.c: sched_yield() on exit, to allow threads to quit.
8472 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8474 * object.c (mono_unhandled_exception): Remove leftover debug code.
8476 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
8478 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8480 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8482 * marshal.c (emit_marshal_array): Really null terminate string arrays.
8484 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8486 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8488 * marshal.c (emit_marshal_array): Null terminate string arrays.
8490 * marshal.c (raise_auto_layout_exception): Fix warning.
8492 * reflection.c (mono_param_get_objects): Initialize the default value
8493 with DBNull.Value, not null. Fixes #62123.
8495 2004-09-01 Miguel de Icaza <miguel@ximian.com>
8497 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8498 throw an exception with a cute explanation.
8500 2004-09-06 Dick Porter <dick@ximian.com>
8502 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8503 Close the new process's thread handle, as we don't use it. The
8504 handle stays around forever otherwise.
8506 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8508 * object.c (arith_overflow): Fix warning.
8510 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8511 calling conventions in method refs. Fixes #65352.
8513 * reflection.c: Fix warnings.
8515 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8517 * icall.c: Add a new icall for Array.Clear
8519 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
8521 * object.c: When allocating an array, we have to throw
8522 an overflow exception if any of the lengths are < 0.
8524 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8526 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8527 properly. Also move implementation of string array marshalling to
8528 managed code. Fixes #42316.
8530 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8532 * assembly.c: provide more information when loading an assembly fails.
8534 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8536 * filewatcher.c: don't expect the development fam package to be
8539 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
8541 * marshal.c: Make a copy of the signature cookie since it will be
8542 freed by the caller.
8544 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8546 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8548 * metadata.c (mono_metadata_free_marshal_spec): New function to free
8551 * marshal.c: More refactoring.
8553 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8556 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
8558 * object.c: In mono_message_invoke, fill the output parameter array after
8559 calling the managed method (it was done before the call). This fixes
8562 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8564 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8567 2004-09-02 Martin Baulig <martin@ximian.com>
8569 * class.c (mono_class_instance_size): Don't allow generic type
8570 definitions or open generic instances.
8571 (mono_class_array_element_size): If we're a value type, call
8572 mono_class_instance_size() on the original class.
8574 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8575 handle generic instances.
8577 * mono-debug-debugger.c (write_type): Handle generic instances
8580 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
8582 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8583 the allocation request fails. Fixes #65089.
8585 * object.c (mono_runtime_free_method): Do not call mono_free_method.
8587 * object.c (mono_runtime_free_method): New function to free a dynamic
8590 * marshal.c (mono_delegate_free_ftnptr): New function to free the
8591 delegate trampoline.
8593 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8594 with hasthis as dynamic,
8596 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8598 * domain.c (mono_jit_info_table_remove): New function to remove an
8599 entry from the jit info table.
8601 * class-internals.h (MonoMethod): Add 'dynamic' field.
8603 * loader.c: Fix warnings.
8605 2004-09-01 Martin Baulig <martin@ximian.com>
8607 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8608 instead of mono_debugger_lock() because the latter one is a no-op
8609 unless running in the debugger.
8611 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8613 * class.c (class_compute_field_layout): Classes with auto-layout or
8614 reference fields are not blittable.
8616 2004-09-01 Dick Porter <dick@ximian.com>
8618 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8619 mono_image_get_filename() to get the assembly location.
8622 * metadata.h: Fix compile warnings
8624 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
8626 * class.c (class_compute_field_layout): System.Object is blittable.
8628 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8629 as in/out. Fixes #59909.
8631 2004-09-01 Martin Baulig <martin@ximian.com>
8633 * metadata.h (MONO_TYPE_ISREFERENCE): Call
8634 mono_metadata_generic_inst_is_valuetype() if we're a generic
8635 instance to check whether our underlying type is a reference type.
8637 2004-09-01 Martin Baulig <martin@ximian.com>
8639 * metadata.c (mono_type_size): If we're a generic instance, call
8640 mono_class_value_size() for value types.
8642 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
8644 * marshal.c: Implement more custom marshalling functionality. Fixes
8647 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8649 * mono-debug.c, debug-mono-symfile.c: add some locking love.
8651 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
8653 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8655 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8657 * icall.c: Fix some warnings.
8659 * threads.c (abort_appdomain_thread): Fix unref errors.
8660 (mono_thread_current): Fix THREAD_DEBUG define.
8662 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
8664 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8666 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8668 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
8670 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
8673 2004-08-28 Martin Baulig <martin@ximian.com>
8676 (mono_metadata_generic_inst_is_valuetype): New public function.
8678 * metadata.h (MONO_TYPE_ISSTRUCT): Call
8679 mono_metadata_generic_inst_is_valuetype() if we're a generic
8680 instance to check whether our underlying type is a valuetype.
8682 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
8684 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8687 2004-08-25 Martin Baulig <martin@ximian.com>
8689 * loader.c (mono_get_method_from_token): Abstract methods can also
8690 be generic and thus have type parameters.
8692 * metadata-internals.h
8693 (MonoDynamicImage): Added `GPtrArray *gen_params'.
8695 * reflection.c (mono_image_get_generic_param_info): Don't create a
8696 metadata row, just add an entry to the `gen_params' array.
8697 (build_compressed_metadata): Sort the `gen_params' array and then
8698 actually create the metadata.
8700 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8702 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8704 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
8706 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8708 2004-08-24 Martin Baulig <martin@ximian.com>
8710 * class.cs (mono_class_is_subclass_of): Like an interface, a
8711 generic instance also derives from System.Object.
8713 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
8715 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8716 custom modifiers to be in any order. Fixes #61990.
8718 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
8720 * object.c: Register mono_object_new_fast icall.
8722 * object.c (mono_class_get_allocation_ftn): Return to calling
8723 mono_object_new_fast, since it seems faster to compute the object
8724 size in unmanaged code than passing it as a parameter.
8726 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8728 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8729 this function with Boehm as the oom handler, so we don't have to check
8730 the result of GC_malloc.
8732 * object.c: Remove checks for oom.
8734 * object.h object.c (mono_class_get_allocation_ftn): New function to
8735 return the icall which can be used to allocate an instance of a given
8738 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8740 * class-internals.h: Add 'enabled' field.
8742 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
8744 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8746 2004-08-18 Jambunathan K <kjambunathan@novell.com>
8747 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8750 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
8752 * appdomain.c: use the Tls function for appdomain too,
8753 at Zoltan's request. Actually return in mono_context_get
8755 * appdomain.c, profiler.c, threads.c: use __thread
8757 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
8759 * appdomain.c threads.c: Call GC_CreateThread on windows.
8761 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8762 multiple libraries since this don't work on windows.
8764 2004-08-18 Martin Baulig <martin@ximian.com>
8767 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8770 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8771 MonoMethodNormal since we also need it for abstract and interface
8775 (build_compressed_metadata): Sort the GenericParam table.
8776 (mono_image_create_token): Added `gboolean create_methodspec'
8777 argument; this is false when generating a MethodImpl token.
8778 (reflection_methodbuilder_to_mono_method): Abstract and interface
8779 methods may also have generic parameters.
8781 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
8783 * appdomain.c: thread local alloc
8785 2004-08-17 Martin Baulig <martin@ximian.com>
8787 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8790 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8793 * class.c (mono_type_get_full_name): New public function.
8794 (mono_type_get_name): Don't include the type arguments.
8796 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
8798 * Makefile.am: Build static versions of libmetadata and libmonoruntime
8799 for inclusion into the mono executable.
8801 2004-08-16 Martin Baulig <martin@ximian.com>
8803 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8804 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8806 2004-08-14 Martin Baulig <martin@ximian.com>
8808 * class.c (dup_type): Also copy the `byref' field.
8810 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
8812 * reflection.c (create_dynamic_mono_image): Revert the last change
8813 since it breaks bootstrap.
8815 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
8817 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8819 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8820 not free them with g_free.
8822 2004-08-11 Martin Baulig <martin@ximian.com>
8824 * reflection.c (mono_reflection_setup_internal_class): Also call
8825 mono_class_setup_mono_type() if we already have a `tb->type.type'.
8827 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
8829 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
8830 called during default (first) AppDomain creation. Keep track of
8831 Evidence when loading assemblies.
8833 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8835 * opcodes.c, opcodes.h: reduce runtime relocations.
8837 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8839 * culture-info.h, locales.c: fixes and chages to sue the new
8840 optimized format of the locale data.
8841 * culture-info-tables.h: regenerated.
8843 2004-08-06 Geoff Norton <gnorton@customerdna.com>
8845 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8847 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
8849 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8850 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8851 * domain-internals.h: icall declaration.
8852 * icall.c: icall registration.
8853 * object-internals.h: New fields in MonoAssembly for CAS.
8855 2004-08-05 Duncan Mak <duncan@ximian.com>
8857 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8860 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8862 * reflection.c: fix to deal with object[] arrays in custom ctors
8865 2004-08-05 Martin Baulig <martin@ximian.com>
8867 * class.c (mono_class_array_element_size): Added support for
8868 generic instances and correctly handle "recursive" types.
8870 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
8872 * assembly.c: Fix warnings.
8874 2004-08-04 Martin Baulig <martin@ximian.com>
8877 (mono_type_get_name_recurse): Added `gboolean include_arity'
8878 argument specifying whether or not we should include the generic
8879 arity in the type name.
8880 (_mono_type_get_name): New static function.
8881 (mono_class_setup_vtable): If we're a generic instance, don't
8882 include the generic arity in the names of explicit method
8885 2004-08-03 Martin Baulig <martin@ximian.com>
8887 * class.c (mono_type_get_name_recurse): Enclose the generic type
8888 arguments in `<', '>'.
8890 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8892 * gc.c: make GC warning messages use the trace API, they are just
8893 noise to most of the users.
8895 2004-08-03 Martin Baulig <martin@ximian.com>
8897 * debug-mono-symfile.c (read_string): Correctly read the string.
8899 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
8901 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8903 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8905 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8907 2004-07-30 Martin Baulig <martin@ximian.com>
8909 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8910 Reflect latest symbol writer changes.
8912 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8914 * object.c: always create an object if null is passed
8915 to Invoke() where a valuetype is expected.
8917 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
8919 * marshal.c (mono_marshal_init): make managed
8920 signatures match native ones better for 64bits.
8922 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8924 * appdomain.c: hack to build correctly the private bin path on windows.
8927 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
8929 * assembly.c: Load mscorlib from the correct framework directory
8930 (mono/<version>/mscorlib.dll).
8931 * appdomain.h: Added prototypes for new functions.
8932 * internals.h: Added some prototypes.
8933 * domain.c: When initializing the runtime, get from the executable and
8934 the configuration files the runtime version that the app supports.
8935 Added support methods for reading app.exe.config. Added list of versions
8936 supported by the JIT. Added two new methods: mono_init_from_assembly,
8937 which initializes the runtime and determines the required version from
8938 the provided exe file, and mono_init_version, which initializes
8939 the runtime using the provided version.
8940 * icall.c: Get machine.config from version-specific directory.
8941 * reflection.c: When generating an image, embed the version number
8942 of the current runtime.
8944 2004-07-28 Dick Porter <dick@ximian.com>
8947 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8948 returned sockaddr size before creating the remote address object.
8949 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8952 2004-07-28 Dick Porter <dick@ximian.com>
8954 * locales.c (string_invariant_compare_char): Fix invariant char
8955 compares between upper and lower cases. Fixes bug 61458.
8957 2004-07-27 Ben Maurer <bmaurer@ximain.com>
8959 * marshal.c: actually cache stelem.ref wrappers.
8961 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8963 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
8964 sections and remove the mono_cli_rva_map () function.
8966 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8968 * debug-mono-symfile.c: fix one more endianess issue, from a patch
8969 by Geoff Norton (<gnorton@customerdna.com>).
8971 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8973 * class.c: fix class loads for pointer types (typeof(int) !=
8976 2004-07-27 Martin Baulig <martin@ximian.com>
8978 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8979 reading the debugging information from an external ".mdb" file.
8981 2004-07-24 Martin Baulig <martin@ximian.com>
8983 * reflection.c (mono_image_get_type_info): Only write a class
8984 layout entry if we actually have a size or a packing size.
8986 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8988 * reflection.c (type_get_fully_qualified_name):
8989 insert cast to get type checking of ?: with non-gcc compilers
8991 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
8993 * rand.c: use g_getenv for both lookups of
8996 2004-07-17 Martin Baulig <martin@ximian.com>
8998 * reflection.c (mono_reflection_bind_generic_method_parameters):
8999 Set `gmethod->reflection_info'.
9001 2004-07-17 Martin Baulig <martin@ximian.com>
9003 * class.c (mono_class_create_from_typedef): Insert the newly
9004 created class into the hash table before computing the interfaces
9005 since we could be called recursively.
9007 2004-07-16 Ben Maurer <bmaurer@ximain.com>
9009 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
9010 function to implement stelem.ref in managed code
9011 * class-internals.h, debug-helpers.c: a new wrapper type
9014 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
9016 * gc.c: allow GC handles to work even when no GC is compiled in.
9017 Fix part of bug #61134 (GetAddrOfPinnedObject).
9019 2004-07-13 Peter Williams <peter@newton.cx>
9021 * process.c (complete_path): Make sure we don't attempt to execute
9024 2004-07-12 Geoff Norton <gnorton@customerdna.com>
9026 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
9027 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
9028 and will add/subtract the hour if needed
9030 2004-07-12 Martin Baulig <martin@ximian.com>
9032 * reflection.c (mono_field_get_object): If we have
9033 `field->generic_info', take the attributes from
9034 `field->generic_info->generic_type'.
9036 2004-07-12 Martin Baulig <martin@ximian.com>
9038 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
9039 This function must be called before initializing the runtime.
9040 (mono_debug_init_1): New function; call this after initializing
9041 the runtime, but before loading the assembly. It tells the
9042 debugger to load corlib and the builtin types.
9044 * mono-debug-debugger.c: Did some larger changes in the debugging
9045 code; support recursive class declarations, make sure we actually
9048 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9050 * debug-helpers.c: undo my previous patch and fixed the real issue in
9051 ../mini/exceptions-x86.c
9053 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9055 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
9056 when no HOME env. variable was set and a NullRef was thrown in a .cctor
9057 called from other .cctors.
9059 2004-07-09 Miguel de Icaza <miguel@ximian.com>
9061 * loader.c: Removed the mono_loader_wine_init hack now that we are
9062 doing a managed version of Windows.Forms.
9064 2004-07-09 Ben Maurer <bmaurer@ximian.com>
9066 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
9067 threadpool.c, threads.c: remove static data from rootset.
9069 2004-07-09 Dick Porter <dick@ximian.com>
9071 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
9072 Don't do any more processing if the matched length was 0. It was
9073 increasing the size of the string before. Fixes bug 61167.
9075 2004-07-09 Dick Porter <dick@ximian.com>
9079 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9080 Add support for SO_PEERCRED if its available.
9082 2004-07-09 Peter Bartok <pbartok@novell.com>
9083 * loader.c: winelib.exe.so error message is now only displayed if
9084 MONO_DEBUG is set. To help us avoid questions when people are trying
9085 out the new Managed.Windows.Forms.
9087 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
9089 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
9090 for isinst and castclass wrappers.
9092 * class-internals.h icall.c: Move registration and lookup of JIT icalls
9093 to libmetadata from the JIT, so they could be used by the marshalling
9094 code and the interpreter.
9096 * marshal.c: Register marshalling related JIT icalls here instead of
9097 in mini.c. Use CEE_MONO_ICALL instead of the family of
9098 CEE_MONO_PROC<x> opcodes to call marshalling functions.
9100 * metadata.h: Remove unneeded marshalling conversions.
9102 * opcodes.c: Update for new opcodes.
9104 2004-07-08 Martin Baulig <martin@ximian.com>
9106 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
9107 (mono_debug_get_domain_data): Make this function static.
9109 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9111 * gc.c, object.h: add nice GC handle API for embedders.
9113 2004-07-06 Ben Maurer <bmaurer@ximian.com>
9115 * reflection.c: more changes for the new api
9117 * object.c: When we reflect on a field w/ a constant value, it
9118 will not have a memory location, so we must access metadata. Also,
9119 allow easier reading of strings so that we can read them from
9122 * class.c (mono_class_layout_fields): no need for literal fields here.
9124 * class-internals.h: api changes for const fields
9126 * icall.c (ves_icall_get_enum_info): use new apis for const fields
9128 2004-07-06 Martin Baulig <martin@ximian.com>
9130 * mono-debug.h: Increment version number to 44.
9132 * mono-debug.c (mono_debug_add_wrapper): The second argument is
9133 now a gpointer, rewrote this whole method.
9135 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
9136 function. Add information about the wrapper in a new "misc table".
9138 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
9139 for the new misc table.
9141 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
9143 * metadata-internals.h image.c: Add a cache for helper signatures.
9145 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
9147 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
9149 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
9150 delegates from a delegate. Fixes #61033.
9152 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
9153 marshalling of stringbuilder arrays. Fixes #59900.
9155 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
9157 * icall.c: Add EnumBuilder:setup_enum_type icall.
9159 2004-06-30 Ben Maurer <bmaurer@ximian.com>
9161 * icall.c: Added a new icall for the property version of
9164 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
9166 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
9167 it has a constant size across platforms.
9169 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
9172 2004-06-29 Martin Baulig <martin@ximian.com>
9174 * mono-debug.c (mono_debug_add_method): Protect the whole function
9175 in mono_debugger_lock(), not just parts of it.
9177 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9179 * reflection.c: make sure padding bytes in heaps are zeroed.
9181 2004-06-24 David Waite <mass@akuma.org>
9183 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
9184 image.c, loader.c, locales.c, marshal.c, metadata.c,
9185 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
9186 string-icalls.c, threads.c: change to C90-style comments from C99 /
9189 2004-06-24 Dick Porter <dick@ximian.com>
9192 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
9193 return createdNew. Fixes bug 60412.
9196 * icall.c: Add createdNew parameter to CreateMutex icall
9198 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9200 * reflection.c, object-internals.h: save default value in params.
9202 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9204 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
9205 no need to build a new path combining that with the application base.
9208 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
9210 * reflection.c: fixed minor standard compliance issues.
9212 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9214 * reflection.c: fixed issue with encoding some custom attributes
9215 (arrays in properties and fields, bug #60411).
9217 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9219 * reflection.c: fix start address when copying the public key token.
9221 2004-06-23 Martin Baulig <martin@ximian.com>
9223 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
9224 the `exc' object in a static object to put it into the GC's root set.
9226 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
9228 * reflection.c: make mono_reflection_setup_internal_class ()
9229 callable a second time to setup a new parent class.
9231 2004-06-23 Dick Porter <dick@ximian.com>
9233 * threads.c: Check for WAIT_IO_COMPLETION return values.
9235 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
9237 * appdomain.c: Removed the g_free on the public key token. Now copy
9238 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
9239 * assembly.c: Added public key token string value when loading
9240 assemblies. Fix bug #60439.
9241 * icall.c: Added missing informations (like public key) in
9242 GetReferencedAssemblies. Fix #60519.
9243 * image.h: Changed definition for public key token from const char*
9244 public_tok_value to guchar public_key_token [17];
9245 * reflection.c: Updated for changes to public key token.
9247 2004-06-22 Lluis Sanchez Gual
9249 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
9250 for the field in base classes.
9252 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9254 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
9255 mark headers as not supported, they are installed only for use by the
9258 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
9260 * *.c, *.h: avoid namespace pollution in public headers.
9262 2004-06-21 Martin Baulig <martin@ximian.com>
9264 * exception.c (mono_get_exception_security): It's in
9265 "System.Security", not in "System".
9267 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
9268 the exception classes.
9270 2004-06-21 Martin Baulig <martin@ximian.com>
9272 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
9273 Protect the exception object from being finalized.
9275 2004-06-21 Martin Baulig <martin@ximian.com>
9277 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
9280 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
9282 * reflection.c: Load the assembly in mono_reflection_type_from_name,
9283 if it was not loaded before. Fix parts of #60439.
9285 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
9287 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
9288 code that was broken since Ben's change: wrappers are now
9289 dependent on the method signature only again.
9291 2004-06-21 Martin Baulig <martin@ximian.com>
9293 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
9294 added interface support.
9296 2004-06-21 Martin Baulig <martin@ximian.com>
9298 * class.c (mono_vtable_get_static_field_data): New public method.
9300 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
9302 * filewatcher.c : Windows build fix to be compliant with API changes.
9304 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9306 * class.h, class.c: more accessors.
9307 * metadata.h, metadata.c: prepare for hiding MonoType and
9308 MonoMethodSignature: people should use the accessors from now on
9309 outside of the tree.
9311 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9313 * *.c, *.h: more API cleanups.
9315 2004-06-18 Jackson Harper <jackson@ximian.com>
9317 * assembly.c: Trace loading assemblies.
9318 * loader.c: Trace loading native libraries.
9319 * mono-config.c: Trace loading config files.
9321 2004-06-18 Dick Porter <dick@ximian.com>
9323 * locales.c: Tell ICU the lengths of strings, it can cope with
9324 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
9326 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9328 * image.c: swapped name/filename;
9330 2004-06-18 Martin Baulig <martin@ximian.com>
9332 * mono-debug-debugger.c (write_class): Write the parent class at
9333 the end of the header.
9335 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9337 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
9339 2004-06-17 Raja R Harinath <rharinath@novell.com>
9341 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
9342 (bundle_obj): New conditional define.
9343 (BUILT_SOURCES): Remove.
9344 ($(bundle_srcs)): Make parallel-make safe.
9345 (libmonoruntime_la_LIBADD): Make unconditional.
9346 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
9347 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
9349 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
9351 * culture-info-tables.h: It was inconsistent with the latest
9354 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
9356 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
9359 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
9362 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9364 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
9365 cleaned up public header threads.h.
9367 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9369 * Makefile.am, *.c, *.h: more API cleanups.
9371 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9373 * Makefile.am: removed monosn from compilation.
9374 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
9375 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
9376 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
9377 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
9378 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
9379 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
9381 2004-06-15 Jackson Harper <jackson@ximian.com>
9383 * assembly.c: Make locales lower case when searching the GAC for
9384 assemblies. gacutil will always make locales lowercase when
9385 installing so this effectively makes them case insensitive.
9387 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
9389 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
9390 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
9391 parameter which allows to choose whether the wait can be interrupted or
9392 not. Also added the method mono_monitor_enter(), which locks the monitor
9393 using an infinite wait and without allowing interruption.
9394 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
9396 * object.h: Added new fields in MonoThread. suspend_event holds the event
9397 used to susped/resume the thread. synch_lock is the lock object to use for
9398 modifying the thread state.
9399 * threads.c: Use the new synch_lock object for locking, instead of "this",
9400 which can generate deadlocks.
9401 Moved thread state change in Thread.Sleep and Thread.Join from managed
9402 to unmanaged code. This avoids a deadlock when the thread was suspended
9403 just after acquiring the thread lock.
9404 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
9405 Implemented Thread.Suspend using an event instead of ThreadSuspend,
9406 which is not fully implemented in the io-layer.
9407 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
9409 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
9411 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
9412 threads-types.h: more API cleanups.
9414 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9416 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
9417 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
9418 threadpool.c, threads.c: first pass at the exported API cleanup.
9420 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9422 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
9424 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9426 * icall.c: added internalGetHome.
9428 2004-06-14 Dick Porter <dick@ximian.com>
9430 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
9431 possible to return successfully when '.' or '..' were the only
9432 entries in a directory, but were skipped. The MonoIOStat was not
9433 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
9436 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9438 * reflection.c: make binaries run on .Net 1.1 by default.
9440 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9442 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
9444 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
9446 * marshal.c: keep track of struct size with explicit layout
9449 2004-06-12 Martin Baulig <martin@ximian.com>
9451 * mono-debug-debugger.c: Comment out a debugging g_message().
9453 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9455 * reflection.c, reflection.h: do not free custom attrs that are cached.
9456 * icall.c: use braces to make code clearer.
9458 2004-06-11 Martin Baulig <martin@ximian.com>
9460 * class.h (MonoInflatedField): New type.
9461 (MonoClassField): Replaced `MonoType *generic_type' with
9462 `MonoInflatedField *generic_info'.
9465 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9467 2004-06-11 Martin Baulig <martin@ximian.com>
9469 * reflection.c (mono_image_create_method_token): Correctly encode
9472 2004-06-11 Martin Baulig <martin@ximian.com>
9474 * metadata.c (mono_metadata_parse_method_signature): When parsing
9475 a MethodDef which has VarArgs, also set sentinelpos if we don't
9476 have any parameters.
9478 2004-06-11 Martin Baulig <martin@ximian.com>
9480 * verify.c (mono_method_verify): In CEE_CALL, use
9481 mono_method_get_signature() to get the method's signature, unless
9482 we're a PInvoke method.
9484 2004-06-10 Jackson Harper <jackson@ximian.com>
9486 * assembly.c: Use <path>/lib/mono/gac for the extra paths
9487 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9488 logical name as the supplied path is just a prefix to the gac not
9489 the direct path to it.
9491 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9493 * reflection.c: make the token for a created method match
9494 the token of the MethodBuilder it was created from
9495 (IKVM requires this behaviour now).
9497 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9499 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9500 reflection.c, socket-io.c: leak fixes.
9502 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9504 * icall.c: handle sentinel pos in vararg methods in position different
9507 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9509 * culture-info-tables.h: freshly generated.
9511 2004-06-09 Martin Baulig <martin@ximian.com>
9513 * loader.c (mono_get_method_constrained): Call `mono_class_init
9514 (constrained_class)'.
9516 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
9518 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9519 any methods. Fixes #59629.
9521 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9523 * culture-info-tables.h: reflecting locale-builder updates.
9525 2004-06-08 Dick Porter <dick@ximian.com>
9528 * locales.c: Fixed compile warnings, including a real bug in
9529 CompareInfo_internal_compare.
9531 2004-06-08 Dick Porter <dick@ximian.com>
9534 (ves_icall_System_Globalization_CompareInfo_internal_index):
9535 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9536 Double-check the resuls of usearches, because ICU currently
9537 ignores most of the collator settings here. Fixes bug 59720.
9539 2004-06-08 Dick Porter <dick@ximian.com>
9542 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9543 Fix memory leak and segfault-causing typo. No idea how this one
9544 lasted so long without being noticed.
9546 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
9548 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9549 any methods. Fixes #59629.
9551 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9554 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9555 own the critical section before). Removed dead code (that's done
9556 in the preload hook).
9558 (mono_assembly_load_with_partial_name): call the preload hook.
9560 2004-06-08 Martin Baulig <martin@ximian.com>
9562 * metadata.c (mono_metadata_signature_alloc): Default
9563 `sentinelpos' to -1.
9565 * reflection.c (mono_image_get_array_token): Likewise.
9567 2004-06-08 Martin Baulig <martin@ximian.com>
9569 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9571 * metadata.c (mono_metadata_parse_method_signature): When parsing
9572 a MethodDef which has VarArgs, set sentinelpos.
9574 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9575 `gint16' since we're using -1 for non-varargs methods.
9578 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9579 (method_encode_signature): Added varargs support.
9580 (method_builder_encode_signature): Likewise.
9581 (mono_image_get_varargs_method_token): New static method.
9582 (mono_image_create_method_token): New public method; this is
9583 called via an icall instead of mono_image_create_token() when
9584 calling a varargs method.
9586 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
9588 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9590 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9592 * culture-info-tables.h : Reflecting the latest locale-builder that
9593 fixed empty array representation ({} to {0}).
9595 2004-06-07 Jackson Harper <jackson@ximian.com>
9597 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9598 looking up extra gac paths. This allows MONO_GAC_PATH to act
9599 exactly like a prefix.
9601 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9603 * reflection.c (mono_reflection_type_from_name): Make a copy of the
9604 type name before modifying it. Fixes #59405.
9606 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
9608 * culture-info.h: added fields for "all datetime patterns".
9609 * locales.c: ( ves_icall_System_Globalization_CultureInfo
9610 _construct_datetime_format ()): fill xxx_patterns fields.
9611 * object.h: added fields for "all datetime patterns" to
9612 MonoDateTimeFormatInfo.
9613 * culture-info-tables.h: reflecting locale-builder updates.
9615 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
9617 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9618 the event has no add and remove methods. Fixes #59629.
9620 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
9622 * object.c: Fixed possible integer overflow when allocating large
9625 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9627 * culture-info-tables.h: reflecting locale-builder updates.
9629 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
9631 * culture-info-tables.h: reflecting locale-builder updates.
9633 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
9635 * culture-info-tables.h: reflecting locale-builder updates.
9637 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
9639 * threads.c: Made Thread.Sleep abortable.
9641 2004-06-02 Martin Baulig <martin@ximian.com>
9643 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9645 * debug-mono-symfile.h: Bumped symbol file version number to 37.
9647 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
9649 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9651 2004-05-30 Jackson Harper <jackson@ximian.com>
9653 * reflection.c: Do not hardcode assembly versions or public key
9654 tokens anymore. All of this except the corlib section was dead
9657 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
9659 * object.c (mono_runtime_invoke_array): Automatically create boxed
9660 objects for byref valuetypes if needed. Fixes #59300.
9662 * object.c (mono_method_return_message_restore): Handle
9663 MONO_TYPE_OBJECT as well.
9665 2004-05-28 Jackson Harper <jackson@ximian.com>
9667 * reflection.c: The modified type encoding was causing build
9668 problems. Reverted for now.
9670 2004-05-28 Jackson Harper <jackson@ximian.com>
9672 * reflection.c/h: Take an assembly ref so that we dont create
9673 fully qualified names when encoding types in the same assembly as
9674 the custom attribute being emitted.
9675 * appdomain.c: Increment version number.
9677 2004-05-26 Duncan Mak <duncan@ximian.com>
9680 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9681 Set the full version number (major, minor, build, revision).
9683 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
9685 * marshal.c (emit_struct_conv): increment src/dst after blit
9686 (mono_marshal_get_managed_wrapper,
9687 mono_marshal_get_native_wrapper): make sure we have marshalling
9688 info before marshalling params (info computation affects
9691 * class.c (class_compute_field_layout): correctly deal with
9693 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9694 value types (as per what windows dows by default)
9695 (mono_class_setup_mono_type): System.ValueType is blittable
9696 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9699 * marshal.c (mono_marshal_load_type_info): flag types as
9700 non-blittable if the native layout doesn't match the managed
9703 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9705 * appdomain.c: don't add stuff in the private search path that is
9706 above the application base. If application base is not set, there's
9707 no private search path.
9709 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
9711 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9712 byref struct arguments in native->managed marshalling.
9714 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
9716 * marshal.c (mono_marshal_get_runtime_invoke): correctly
9717 cache methods using signature (special case for methods
9718 that are value type or string class)
9720 * image.c (mono_image_close): clean up allocated GSList's
9721 in runtime_invoke_cache.
9723 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9725 * mono-config.c: set the correct path for mono_cfg_dir on windows when
9726 there's no MONO_CFG_DIR environment variable defined.
9728 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9730 * threads.c: windows version must be >= 0x0500 to include OpenThread.
9732 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
9734 * threadpool.c: Really wait for 500ms after the async call, even if the wait
9736 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9737 before waiting for it, and call CloseHandle after the wait to unref it.
9738 This will make sure that handles are not disposed too early.
9740 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9745 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9748 * object.c: se the application_base only for the domain that runs
9749 Main. Fixes bug #59216,
9751 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9754 * object.c: only the domain in which Main is run have
9755 SetupInformation.ConfigurationFile set, so moved a few lines from
9756 appdomain.c to object.c.
9758 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9760 * appdomain.c: we tried to load [name].(dll|exe), but according
9761 to bug #57710, we must also try [culture]/[name].(dll|exe) and
9762 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9763 There's a test case attached to bug #58922.
9765 2004-05-27 Dick Porter <dick@ximian.com>
9768 * file-io.c: Implemented icalls for locking and unlocking regions
9770 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9771 FALSE on error (fixes both compiler warning and real bug.)
9773 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
9775 * culture-info-tables.h: reflecting locale-builder updates.
9777 (Added missing ChangeLog entry for 05/26)
9779 2004-05-27 Jackson Harper <jackson@ximian.com>
9781 * locales.c: Fix some cut and paste errors.
9783 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9785 * mono-config.c: set the correct path for config. directory on windows.
9787 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9789 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9792 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9794 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9795 from pinvoke functions.
9797 * marshal.c (mono_ftnptr_to_delegate): Implement this.
9799 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
9801 * culture-info-tables.h: reflecting locale-builder updates.
9803 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
9805 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9808 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
9810 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9811 * icall.c: Modified icalls for RNG.
9812 * rand.c|h: Changed RNG interface to allow thread-safe usage under
9813 Windows (CryptoAPI).
9815 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9817 * locales.c: Fix build.
9819 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
9821 * culture-info-tables.h: reflecting locale-builder updates.
9823 2004-05-25 Jackson Harper <jackson@ximian.com>
9825 * locales.c: When creating the current culture use the $LANGs
9826 specific culture. So DateTimeFormat and NumberFormat entries are created.
9828 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
9830 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9831 a char array as parameter.
9833 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
9835 * image.c: In mono_image_open(), always use an absolute path name to
9836 look for already loaded images.
9838 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
9840 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9841 missing in the windows build (like older cygwin include files).
9843 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
9845 * icall.c: Fixed check for possible integer overflow in Buffer_
9846 BlockCopy icall. Replaced comments style // by /* */.
9848 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
9850 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9852 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9853 check after MONO_VTADDR. Fixes pinvoke2.exe.
9855 * marshal.h marshal.c metadata.h: Add beginnings of support for
9856 ftnptr -> delegate marshalling.
9858 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
9860 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9861 * threads.c: Fix warnings.
9863 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
9865 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9866 * icall.c: Registered icalls for Suspend and Resume.
9867 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9869 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9870 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9871 * process.c: Use WaitForSingleObjectEx.
9872 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
9874 * threads.c, threads.h: Make use of new Ex wait methods. Improved
9875 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9876 for Suspend and Resume. Added new mono_thread_stop, used for stoping
9877 background threads. Added basic support for Abort in Windows.
9878 Start new threads using a managed delegate invoke wrapper. This wrapper
9879 has an interruption checkpoint that is needed since an interruption
9880 can be requested before the thread leaves the unmanaged code that starts
9882 * marshal.c: Added interruption checkpoint after every native call, and
9883 also before managed calls for wrappers called from unmanaged code to
9884 go into managed code.
9885 * object.h: Added new field in MonoThread to keep track of interruption
9888 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
9890 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9893 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9900 * rand.c: getenv -> g_getenv (windows!)
9902 * process.c: complete_path is also used on non-windows platforms.
9904 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9906 * icall.c: new signature for Process_Start.
9908 * process.[ch]: new signature for Process_Start. If we're on windows
9909 and UseShellExecute is false, we have to search for the program by
9910 ourselves if we don't get a full path.
9912 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
9914 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
9915 marshalling and call CleanUpNativeData if needed. Fixes #58646.
9917 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9919 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9922 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9924 * process.c: use double quotes to quote program name and arguments on
9925 windows. Fixes bug #58575.
9927 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9929 * file-io.c: don't return "." and ".." when using windows Find*File.
9931 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
9933 * marshal.c: Don't pass wrappers to message init because method
9934 addressed used to lookup metadata. part of remoting[2|3] fix.
9936 2004-05-15 Jackson Harper <jackson@ximian.com>
9938 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9939 path is essentially the same as MONO_PATH except that it points to
9940 GACs instead of lib directories.
9941 * loader.h: The user gac is gone so we dont need function to
9943 * mono-config.c: user gac option is now gone.
9945 2004-05-15 Jackson Harper <jackson@ximian.com>
9947 * culture-info.h: Make defines more consistent, add calendar data
9948 to the culture info table.
9949 * culture-info-tables.h: Add basic calendar data. Basically
9950 everyone gets default gregorian until all the data is
9952 * locales.c: Use the new consistent defines. Set calendar data for
9953 culture info objects.
9954 * object.h: add a field for calendar data to CultureInfo
9956 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
9958 * image.c: image->runtime_invoke_cache is keyed on signatures now.
9959 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9961 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9962 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9963 an extra param that is the pointer of the method to invoke. The IL for
9964 the invoke method is no longer specific to the method, but to the
9965 signature of the method. Thus, we can share the same code for multiple
9966 methods. This reduces the number of methods that have to be compiled.
9968 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
9970 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9972 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9974 * icall.c: Optimize Buffer.BlockCopy.
9976 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9978 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9979 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9980 quote). Changed them to "MMMM yyyy".
9982 2004-05-12 Miguel de Icaza <miguel@ximian.com>
9985 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
9987 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
9989 * reflection.h: Updated after changes to managed structures.
9991 * appdomain.c: Bump corlib version.
9993 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9995 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9998 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10000 * Makefile.am: link to ../os/libmonoos.la on windows.
10003 -If MONO_DEBUG, warn about non-existing directories in
10005 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
10006 compile time variable.
10007 -Removed init_default_path and call mono_set_rootdir from
10008 libmonoos.a instead (windows only).
10010 * assembly.h: declare mono_assembly_getrootdir().
10013 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
10015 * loader.c: s/getenv/g_getenv/
10017 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
10019 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
10021 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
10023 * metadata.h: Add new marshalling conversions.
10025 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
10028 * reflection.c (mono_reflection_get_type): Lookup the type in all
10029 modules of a multi-module assembly. Fixes #58291.
10031 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
10033 * threads.c: Before aborting a background, set the StopRequested
10034 state. This avoids throwing the Abort exception.
10035 In mono_thread_manage, don't continue with the shutdown until all
10036 aborted threads have actually stopped.
10038 2004-05-10 Jackson Harper <jackson@ximian.com>
10040 * locales.c: Remove the modifier from culture names.
10042 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10044 * Makefile.am: monosn is not installed any more. It has been deprecated
10047 2004-05-07 Jackson Harper <jackson@ximian.com>
10050 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
10051 Fix array construction, add bailout if the length is 0.
10053 2004-05-07 Dick Porter <dick@ximian.com>
10055 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
10056 machine doesn't have a DNS entry. Patch by Urs Muff
10057 (umuff@quark.com), fixes bug 57928.
10059 2004-05-06 Jackson Harper <jackson@ximian.com>
10061 * reflection.c: Handle null PublicTokens properly. alloc mem for
10062 assembly names culture so we dont crash when freeing it.
10064 2004-05-06 Jackson Harper <jackson@ximian.com>
10066 * assembly.c: Check the usergac when loading with partial names.
10068 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
10070 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
10071 does nothing for now (not required for Linux/Windows) but the class
10072 library can call it (and a newer or modified runtime could need it).
10073 * icall.c: Registred icall.
10075 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10077 * loader.c: prints a message on module loading error we set MONO_DEBUG
10078 environment variable.
10080 2004-05-05 Jackson Harper <jackson@ximian.com>
10082 * appdomain.c: Handle PublicKeyToken=null properly.
10084 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
10086 * environment.c|h: Added icall ves_icall_System_Environment_
10087 GetOSVersionString to get the current OS version as a string.
10088 * icall.c: Registred icall.
10090 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
10092 * object.c: in mono_object_get_virtual_method(), take into account that
10093 non-virtual methods don't have a slot in the vtable. Check needed when
10094 the object is a proxy.
10096 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
10098 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
10099 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
10101 * object.c (mono_class_compute_gc_descriptor): Fix warning.
10103 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
10104 passed when a valuetype is expected.
10106 * object.c (mono_unhandled_exception): Only set the exit code if the
10107 exception happens in the main thread. Fixes thread5.exe.
10109 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
10110 invalid names. Fixes #58047.
10112 2004-05-03 Jackson Harper <jackson@ximian.com>
10114 * assembly.c: This line was committed accidently and is unneeded.
10116 2004-05-03 Jackson Harper <jackson@ximian.com>
10118 * icall.c: Add new icall for Assembly::LoadWithPartialName
10119 * assembly.c/.h: new function that probes the GAC to load partial
10120 assembly names by Paolo Molaro.
10122 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10124 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
10125 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
10126 (type_get_fully_qualified_name): Added PublicKeyToken when building a
10129 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10131 * appdomain.c: fixed check for 'neutral' culture and removed warning.
10132 * reflection.c: fix bug when parsing a full type name and Version is not
10133 the last thing in the string.
10135 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
10137 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
10138 crashes when it is freed.
10140 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10142 * assembly.c: print the compat warning to stderr.
10144 2004-05-01 Miguel de Icaza <miguel@ximian.com>
10146 * assembly.c (mono_assembly_load_references): Add a compatibility
10147 hack to run old applications that might be still referencing the
10148 3300-based assemblies, only do this for System.xxx.
10150 2004-05-01 Jackson Harper <jackson@ximian.com>
10152 * appdomain.c: If the culture is neutral we set it to "".
10154 2004-04-29 Jackson Harper <jackson@ximian.com>
10156 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
10158 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
10160 * string-icalls.c: added low overhead function for copying chars
10161 * icall.c: added needed icall for the above function
10163 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10165 * icall.c: fix return value of get_global_assembly_cache. Implemented
10166 Environment.GetLogicalDrives.
10168 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
10170 * rand.c: try and talk to egd or prngd
10171 for random bytes if opening devices fail.
10173 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
10175 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
10176 alignment for the type using the native alignment of its members
10177 instead of using klass->min_align.
10179 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
10181 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10184 * socket-io.c: added check for sys/aio.h.
10186 2004-04-28 Dick Porter <dick@ximian.com>
10188 * threads.c: Don't abort a thread thats already aborting, when
10189 terminating everything.
10191 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10193 * icall.c: added 2 new async calls for Socket.
10195 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
10196 IO on *nix systems.
10198 * threadpool.c: removed unused variable.
10200 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
10202 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
10204 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10206 * locales.c: put back string_invariant_tolower () and
10207 string_invariant_toupper ().
10209 2004-04-26 David Waite <mass@akuma.org>
10214 * unicode.h: remove comma from end of enumeration declarations
10216 2004-04-26 David Waite <mass@akuma.org>
10218 * debug-mono-symfile.h:
10221 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
10224 2004-04-26 Jackson Harper <jackson@ximian.com>
10226 * appdomain.c: Increment version number.
10228 2004-04-26 Jackson Harper <jackson@ximian.com>
10230 * appdomain.c: Set assembly references public token value when
10231 PublicKeyToken is specified, not the hash_value. Free public token
10232 values when free assembly name data. Previously the public key
10233 token was hex decoded, however we are using hex encoded public key
10234 tokens, so this is not neccasary.
10235 * assembly.c: Lookup assemblies in the gac if their public token
10236 value is set. Add function to allow enabling user gac
10237 lookups. Specify whether or not the assembly was loaded from the
10238 GAC. Compare full assembly names when checking the cache for
10239 assemblies (Temporarily disabled see comment in code). Remove
10240 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
10241 specifies trace-loader they get extra info to stdout on the
10242 loading of assemblies.
10243 * image.h: Add a field for an assembly references public token
10244 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
10245 whether an assembly has been loaded from the GAC.
10246 * image.c: Remove a corlib -> mscorlib name mapping.
10247 * loader.h: Add function to enable/disable the user gac.
10248 * mono-config.c: Check if the usergac is enabled in the config
10250 * icall.c: New icall to determine whether or not an assembly has
10251 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
10252 * tabldefs.h: Add constant for assemblyref flag that specifies a
10253 full public key is used instead of a public token.
10254 * reflection.c: Remove mscorlib -> corlib mappings. Set
10255 PublicTokenValue instead of hash value. This value is a hex
10256 string so it does not need to be expanded.
10258 2004-04-26 Martin Baulig <martin@ximian.com>
10260 * mono-debug-debugger.c (mono_debugger_initialize): Set
10261 `mono_debugger_initialized' before calling mono_debug_lock().
10263 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
10265 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
10266 InternalToUpper/InternalToLower.
10267 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
10268 removed invariant culture shortcut. This is now done in managed code.
10269 * locales.c: (string_invariant_toupper/tolower) removed.
10271 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10273 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
10274 Added Poll internal call.
10276 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
10277 call for Poll. Select was too heavy for polling a single socket.
10279 * threadpool.[ch]: added mono_threadpool_cleanup.
10280 * threads.c: use it. Don't use Thread_Abort on windows.
10282 2004-04-23 Martin Baulig <martin@ximian.com>
10284 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
10286 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
10288 * icall.c: Registred new icalls for key pair protection and added an
10289 icall for Environment.GetFolderPath on Windows.
10290 * security.c|h: Added new icalls for key pair protection.
10292 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10294 * socket-io.c: don't display the non-supported family warning for known
10295 families. Now this is not displayed on windows when checking support
10298 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10300 * class.c: don't display the layout warning for static fields.
10302 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
10304 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
10305 * locales.c, locales.h: Added new icalls for culture-specific
10306 Char.ToLower and Char.ToUpper.
10308 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10310 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
10313 2004-04-20 Martin Baulig <martin@ximian.com>
10315 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
10316 of the type name before passing it to mono_reflection_type_from_name().
10318 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
10320 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
10321 encodings here. Fixes #56965.
10323 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
10325 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10326 fix test on strstr result not that I can see anything that
10327 relies on the result.
10329 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
10331 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
10334 * marshal.c (mono_marshal_get_string_encoding): New helper function.
10336 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
10337 function to determine which marshalling to use for strings. Fixes
10340 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
10342 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
10344 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
10346 * icall.c: #include mono-config.h
10348 2004-04-15 Jackson Harper <jackson@ximian.com>
10350 * culture-info-tables.h: Fix date formats for en-US culture.
10352 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
10354 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
10355 ThreadPool.SetMinThreads.
10356 * threadpool.c: Implemented ThreadPool.GetMinThreads and
10357 ThreadPool.SetMinThreads.
10359 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10361 * mono-config.c: also load the .config file in the directory
10362 where the assembly was found.
10364 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10366 * assembly.c: load per-assembly config files.
10367 * icall.c: decrapified code to get the config dir and moved to
10369 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
10370 per-assembly config files. When doing a dll map lookup give precedence
10371 to the per-assembly data.
10373 2004-04-14 Martin Baulig <martin@ximian.com>
10375 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
10376 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
10377 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
10379 * mono-debugger-debugger.c: While the debugger is locked, remember
10380 whether the symbol tables have changes and send one single
10381 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
10383 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
10385 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
10387 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
10390 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
10391 account when marshalling string arrays. Fixes #56965.
10393 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
10395 * icall.c: Add new icalls mapping for security.
10396 * security.c|h: Add internal calls for WindowsIdentity,
10397 WindowsImpersonationContext and WindowsPrincipal.
10399 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
10401 * class.c: Added comment to ensure the System.MonoDummy class
10402 is removed when no longer necessary
10404 2004-04-13 Miguel de Icaza <miguel@ximian.com>
10406 * appdomain.c: Pass arguments to the bootstraping exceptions to
10407 minimize JITed methods at boot
10409 * metadata.c (mono_exception_from_name_two_strings): Allow for the
10410 second string to be null.
10412 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10413 Change the protocol to minimize the JIT methods at startup. Now
10414 it Returns the internal codepage, if the value of "int_code_page"
10415 is 1 at entry, and we can not compute a suitable code page
10416 number, returns the code page as a string.
10418 2004-04-13 Jackson Harper <jackson@ximian.com>
10420 * culture-info-tables.h: Fix number of decimal digits for all
10423 2004-04-13 Jackson Harper <jackson@ximian.com>
10425 * icall.c: Clairfy out of sync error message. It is not always
10426 your corlib that is out of sync.
10428 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
10430 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
10431 properties when only the set accessor is overriden. Fixes #55874.
10433 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
10435 * assembly.c (mono_assembly_load_references): Make this thread safe.
10438 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
10440 * monosn.c: Add missing initialization calls.
10442 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
10445 ves_icall_System_Globalization_CultureInfo_construct_number_format
10446 Fix g_assert so it compiles on fussier compilers re int/ptr
10449 2004-04-08 Dick Porter <dick@ximian.com>
10452 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
10453 53992. Also rearrange the code so that the internal calls return
10454 an error value and exceptions are thrown from managed code.
10456 * icall.c: Add type info to the socket icalls.
10458 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10460 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10463 2004-04-07 Martin Baulig <martin@ximian.com>
10465 * class.c (mono_class_from_generic_parameter): Don't default
10466 `klass->parent' to `mono_defaults.object_type'.
10468 2004-04-07 Martin Baulig <martin@ximian.com>
10470 * reflection.c (mono_reflection_initialize_generic_parameter): Set
10471 `param->pklass->reflection_info'.
10473 2004-04-07 Jackson Harper <jackson@ximian.com>
10475 * culture-info-tables.h: Fix date separator symbol.
10477 2004-04-07 Martin Baulig <martin@ximian.com>
10479 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10480 from System.Type to System.MonoType.
10482 2004-04-07 Martin Baulig <martin@ximian.com>
10485 (MonoReflectionGenericParam): Added `has_reference_type' and
10486 `has_value_type' fields.
10488 * reflection.c (mono_image_get_generic_param_info): Encode the
10489 correct flags if we have the `class' or `struct' constraint.
10491 2004-04-07 Martin Baulig <martin@ximian.com>
10494 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10496 2004-04-07 Jackson Harper <jackson@ximian.com>
10498 * appdomain.c: Revert extra patches, just wanted to bump the
10501 2004-04-07 Jackson Harper <jackson@ximian.com>
10503 * Makefile.am: Add culture-info private headers.
10504 * icall.c: Add new icalls for contructing locales.
10505 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10506 * locales.h: Declare new culture info construction methods.
10507 * object.h: Add new fields used to avoid the CultureMap to
10509 * culture-info.h: Definition of structs used in the culture info
10511 * culture-info-tables.h: Autogenerated tables that contain culture
10512 info data. This file was generated with the locale-builder tool.
10513 * appdomain.c: Incement corlib version number.
10515 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
10517 * appdomain.c: (mono_runtime_init) move mono_thread_init
10518 to before mono_object_new calls so critical sections
10519 are initialized before use.
10521 2004-04-07 Martin Baulig <martin@ximian.com>
10524 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10525 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10526 (ves_icall_MonoGenericParam_initialize): Removed.
10527 (monogenericparam_icalls): Removed.
10528 (generictypeparambuilder_icalls): Added new table for
10529 System.Reflection.Emit.GenericTypeParameterBuilder.
10532 (mono_reflection_define_generic_parameter): Removed.
10533 (mono_reflection_initialize_generic_parameter): This is now called
10534 from GenericTypeParameterBuilder's .ctor.
10536 2004-04-06 Martin Baulig <martin@ximian.com>
10538 * class.c (mono_class_init): Don't inflate nested classes in a
10540 (mono_type_get_name_recurse): Include the generic arguments for
10541 generic instances and generic type declarations.
10542 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10543 (_mono_class_get_instantiation_name): Removed.
10544 (mono_class_create_generic): Always use `gklass->name' as our name.
10546 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10548 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10549 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10550 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10551 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10552 closed generic methods here.
10555 (mono_reflection_generic_inst_get_nested_types): Removed.
10556 (inflate_mono_method): Copy the generic parameters from the
10557 MonoMethodHeader into out MonoGenericMethod.
10559 2004-04-06 Martin Baulig <martin@ximian.com>
10562 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10564 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10566 * reflection.c (build_compressed_metadata): If we have any entries
10567 in the GenericParam, MethodSpec or GenericParamConstraint tables,
10568 set the header version to 1.1.
10570 2004-04-06 Martin Baulig <martin@ximian.com>
10572 * class.c (mono_class_init): If we're a generic instance,
10573 initialize our nested classes, too.
10574 (_mono_class_get_instantiation_name): Deal with the new `!%d'
10577 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10579 * process.c: quote the argument passed to the shell on windows.
10581 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
10583 * threads.c (mono_alloc_special_static_data): Allow this to be
10584 called during startup.
10586 2004-04-02 Martin Baulig <martin@ximian.com>
10589 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10591 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
10593 * icall.c: Fix build.
10595 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
10597 * Makefile.am: Added security.c|h.
10598 * icall.c: Added icall for get_UserName;
10599 * security.c: New file for security related icalls. Added function
10600 get_UserName for System.Environment (fix #56144).
10601 * security.h: New. Header file for security.c
10603 2004-04-02 Dick Porter <dick@ximian.com>
10605 * icall.c: Deleted the icalls that were obsoleted some time ago
10606 by the ICU string code, and which were mixed into the icall
10607 rearranging. Fixes bug 55969.
10610 * string-icalls.c: Deleted the code that those icalls reference.
10612 2004-04-01 Martin Baulig <martin@ximian.com>
10614 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10616 * class.c (mono_class_from_generic_parameter): Don't set
10617 TYPE_ATTRIBUTE_INTERFACE.
10618 (my_mono_class_from_generic_parameter): Likewise.
10620 2004-04-01 Martin Baulig <martin@ximian.com>
10622 * loader.c (find_method): Added an optional `MonoClass *ic'
10623 argument to search in a specific interface.
10624 (mono_get_method_constrained): New public function.
10626 2004-04-01 Martin Baulig <martin@ximian.com>
10628 * reflection.c (mono_image_get_generic_field_token): Use the
10629 `handleref' cache here.
10631 2004-04-01 Martin Baulig <martin@ximian.com>
10633 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10635 * reflection.c (create_generic_typespec): Use the `typespec' hash
10636 here, not the `typeref' one.
10638 2004-04-01 Martin Baulig <martin@ximian.com>
10640 * class.c (mono_class_inflate_generic_type): Moved the
10641 functionality into a new static inflate_generic_type() which
10642 returns NULL if it didn't do anything. Only increment the
10643 `mono_stats.inflated_type_count' if we actually inflated
10645 (mono_class_get_full): Check the classes type to see whether we
10646 need to inflate it; also inflate MONO_TYPE_(M)VAR.
10648 2004-04-01 Jackson Harper <jackson@ximian.com>
10650 * reflection.c: Set culture for assembly references.
10652 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
10654 * reflection.[ch], icall.[ch], Fix support for pinning variables.
10656 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10659 (do_mono_assembly_open): the critical section also covers
10660 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10662 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10665 (mono_manage_threads): abort the background threads when finishing.
10668 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10670 * gc.c: only close the done_event handle if there was no timeout.
10673 2004-03-30 Martin Baulig <martin@ximian.com>
10675 * icall.c (icall_entries): It's called "System.Activator", not
10676 "System.Activation".
10678 2004-03-30 Martin Baulig <martin@ximian.com>
10680 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10681 (mono_class_create_from_typespec): Likewise.
10683 2004-03-30 Martin Baulig <martin@ximian.com>
10685 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10686 `has_ctor_constraint' and `initialized'.
10688 2004-03-30 Martin Baulig <martin@ximian.com>
10690 * reflection.c (encode_new_constraint): New static function to add
10691 the constructor constraint attribute to a type parameter.
10692 (encode_constraints): Call encode_new_constraint() if necessary.
10695 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10697 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10699 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
10701 * reflection.c, icall.c: add support for pinning variables.
10703 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
10705 * marshal.c (mono_marshal_get_managed_wrapper):
10706 init bool local with zero rather than null.
10708 2004-03-29 Martin Baulig <martin@ximian.com>
10710 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10711 the "official" behavior here.
10712 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10714 2004-03-29 Martin Baulig <martin@ximian.com>
10716 * icall.c: Reflect latest API changes.
10718 2004-03-29 Martin Baulig <martin@ximian.com>
10720 * loader.c (mono_get_method_from_token): Also call
10721 mono_metadata_load_generic_params () for abstract and interface
10722 methods; replace the type arguments in the method signature with
10723 the ones which are loaded from the metadata.
10725 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
10727 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10728 of the lock is not the current thread. MS.NET don't do it, in spite of
10729 what the documentation says. See bug #56157.
10731 2004-03-28 Martin Baulig <martin@ximian.com>
10733 * class.c (mono_class_init): Don't call init_properties() and
10734 init_events() for generic instances; set `prop->parent' when
10735 inflating properties.
10737 * reflection.c (mono_generic_inst_get_object): Call
10738 `mono_class_init (ginst->klass)'.
10739 (mono_type_get_object): Only create a MonoGenericInst if your
10740 generic type is a TypeBuilder.
10741 (do_mono_reflection_bind_generic_parameters): Only set
10742 `ginst->is_dynamic' if our generic type is a TypeBuilder.
10744 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
10746 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10749 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10751 * icall.c: added Kill_internal icall.
10752 * process.[ch]: added Kill_internal icall.
10754 2004-03-25 Martin Baulig <martin@ximian.com>
10756 * class.h (MonoStats): Added `generic_instance_count',
10757 `inflated_method_count', `inflated_type_count' and
10758 `generics_metadata_size'.
10760 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10762 * reflection.c: no warnings now.
10764 2004-03-25 Martin Baulig <martin@ximian.com>
10766 * class.c (mono_class_get_full): New public function; does a
10767 mono_class_get(), but also takes a `MonoGenericContext *'.
10769 * loader.c (mono_field_from_memberref): Renamed to
10770 `field_from_memberref', made static and added `MonoGenericContext *'
10772 (mono_field_from_token): Added `MonoGenericInst *' argument.
10773 (method_from_memberef): Likewise.
10774 (mono_get_method_from_token): Likewise.
10775 (mono_get_method_full): New public function; does a
10776 mono_get_method(), but also takes a `MonoGenericContext *'.
10778 * verify.c (mono_method_verify): Get the method's generic context
10779 and pass it to mono_field_from_token(), mono_get_method_full() and
10780 mono_class_get_full().
10782 2004-03-25 Martin Baulig <martin@ximian.com>
10784 * class.c (mono_class_inflate_generic_type): Take a
10785 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10786 `MonoGenericMethod *'.
10788 2004-03-25 Martin Baulig <martin@ximian.com>
10790 * loader.h (MonoMethodInflated): Store the MonoGenericContext
10791 instead of the MonoGenericMethod here.
10793 2004-03-25 Martin Baulig <martin@ximian.com>
10795 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10796 each time we create a new MonoGenericInst, we also create a new
10797 context which points back to us.
10799 * class.c (inflate_method): Use `ginst->context' instead of
10800 creating a new context.
10802 * loader.c (method_from_memberref): Use
10803 `klass->generic_inst->context' instead of creating a new context.
10805 2004-03-25 Martin Baulig <martin@ximian.com>
10807 * class.h (MonoGenericContext): New struct.
10808 (MonoGenericMethod): Removed `generic_inst'.
10810 * class.c (mono_class_inflate_generic_method): Take a
10811 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10813 2004-03-25 Martin Baulig <martin@ximian.com>
10815 * loader.h (MonoMethodInflated): New typedef.
10817 * metadata.h (MonoMethodSignature): Removed `gen_method', make
10818 `generic_param_count' consume just 30 bits, added `is_inflated'
10819 and `has_type_parameters' flags (one bit each).
10821 * class.c (mono_class_inflate_generic_method): Create a
10822 MonoMethodInflated instead of a MonoMethodNormal and set
10823 `is_inflated' in the method signature.
10825 * class.h (MonoGenericMethod): Removed `generic_method'.
10827 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
10829 * image.c: Make sure the name of a MonoImage is always an absolute path.
10830 This fixes bug #54415.
10832 2004-03-24 Martin Baulig <martin@ximian.com>
10834 * class.c (mono_class_setup_vtable): If we're a generic instance,
10835 use our generic type's vtable size.
10837 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
10839 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10840 MONO_NO_UNLOAD env var as a temporary workaround for unloading
10843 2004-03-23 Martin Baulig <martin@ximian.com>
10845 * class.h (MonoDynamicGenericInst): Added `int count_events' and
10846 `MonoEvent *events'.
10848 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10849 (typebuilder_icalls): Added "get_event_info"; calls
10850 mono_reflection_event_builder_get_event_info().
10852 * reflection.c (mono_reflection_generic_inst_initialize): Added
10853 `MonoArray *events'.
10854 (mono_reflection_event_builder_get_event_info): New function.
10856 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
10858 * object.h: add mono_type_initialization_init
10860 * object.c (mono_runtime_class_init):
10861 implement class constructor synchronization rules
10862 to cope with threading issues.
10863 add mono_type_initialization_init
10865 * appdomain.c (mono_runtime_init): call
10866 mono_type_initialization_init
10868 * class.h: removing initializing field from MonoVTable
10870 2004-03-23 Martin Baulig <martin@ximian.com>
10872 * class.c (my_mono_class_from_generic_parameter): Use
10873 `param->name' if it's not NULL.
10875 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
10877 * class.c: do not insert non-virtual methods in the vtable.
10878 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10879 that means the method is non-virtual. This never would have
10882 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
10884 * profiler.c: Added lock for accessing coverage_hash.
10886 2004-03-22 Martin Baulig <martin@ximian.com>
10888 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10889 `method->method->signature->generic_param_count != 0' to make it
10890 work for interface methods.
10892 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10894 * process.c: quote the string passed to the shell using g_shell_quote.
10896 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10899 (mono_threads_manage): don't remove the finalizer thread and self
10900 from the threads hash table so that mono_thread_manage can be called
10903 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10905 * process.c: quote the arguments when UseShellExecute is true. Fixes
10908 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10910 * threads.c: set mono_thread_detach as a cleanup routine for every
10911 thread. This way it's always executed upon thread termination, either
10912 aborted or finished normally. No more xsp hangs!
10914 2004-03-17 Martin Baulig <martin@ximian.com>
10916 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10917 `int count_nested' and a `MonoType **nested'.
10919 * reflection.c (mono_reflection_bind_generic_parameters): Moved
10920 most of the functionality into a new static
10921 do_mono_reflection_bind_generic_parameters() and don't take a
10922 `MonoType *nested_in' argument any more. Don't compute nested
10924 (mono_reflection_generic_inst_get_nested_types): New public method
10925 to get nested types.
10927 * class.c (mono_class_create_generic): Set `klass->nested_in' if
10928 we're a nested class.
10930 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10931 mono_reflection_generic_inst_get_nested_types() to compute the
10934 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10936 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10937 descriptive error message under windows.
10939 2004-03-17 Martin Baulig <martin@ximian.com>
10941 * class.c (dup_type): Added `const MonoType *original' argument;
10942 copy the attrs from the original type.
10944 2004-03-17 Martin Baulig <martin@ximian.com>
10946 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10947 `m->generic_inst_cache' here.
10949 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
10951 * exception.h exception.c: Add stack_overflow_exception.
10953 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10956 (overlapped_callback): call SetEvent *after* invoking the callback.
10957 No need to call CloseHandle.
10959 2004-03-16 Martin Baulig <martin@ximian.com>
10961 * reflection.c (mono_image_get_fieldref_token): Take a
10962 `MonoReflectionField *' instead of a `MonoClassField *' and a
10963 `MonoClass *'; store the `MonoReflectionField *' in the hash.
10965 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10967 * appdomain.c: don't add the culture to the filename we're looking for
10968 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10970 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10972 * locales.c: don't ignore symbols when doing case insensitive compares.
10973 Thanks Dick! Fixes bug #54046.
10975 * threads.c: surround 'threads' usage with enter/leave in
10976 mono_thread_manage.
10978 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
10980 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
10981 implicitly marshalled as [Out]. Fixes #55450.
10983 (mono_marshal_get_runtime_invoke): Zero out the result if there is
10986 2004-03-16 Martin Baulig <martin@ximian.com>
10988 * class.c (mono_class_from_generic_parameter): Use the actual
10991 2004-03-16 Martin Baulig <martin@ximian.com>
10993 * reflection.c (type_get_signature_size): New static function.
10994 Compues the size of the type in a method signature.
10995 (method_get_signature_size): New static function; calls
10996 type_get_signature_size() to compute the actual size of the
10997 method's signature.
10998 (method_encode_signature): Use method_get_signature_size() to get
10999 the signature's size rather than using `nparams * 10'.
11001 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11003 * file-io.h: define here WapiOverlapped on windows. I don't want the
11004 regular OVERLAPPED one.
11007 * threadpool.c: somehow, BindIoCompletionCallback is not found.
11008 Disabling AIO on windows.
11010 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11012 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
11015 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11017 * appdomain.c: upgraded corlib version.
11019 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
11020 and BeginWrite. Allow opening files for asynchrnous operations.
11022 * file-io.h: new struct that maps FileStreamAsyncResult.
11023 * icall.c: added new icalls.
11024 * process.[ch]: support setting child process environment variables
11025 and use the SHELL or COMSPEC when UseShellExecute is true.
11027 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
11028 callback for async. IO is here and also BindHandle.
11030 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
11033 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
11035 * reflection.c (create_custom_attr): Allow len == 0.
11037 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
11038 computation on big-endian machines.
11040 2004-03-13 Martin Baulig <martin@ximian.com>
11042 * class.h (MonoGenericInst): Added `int count_ifaces'.
11044 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
11045 `ginst->count_ifaces' instead `klass->interface_count' since we
11046 may get called before the vtable is created.
11048 * loader.c (mono_method_get_param_names): If we're a generic
11049 instance, return and don't initialize the class.
11051 * reflection.c (mono_reflection_setup_generic_class): Don't call
11052 ensure_runtime_vtable().
11053 (mono_reflection_bind_generic_parameters): Set
11054 `ginst->count_ifaces'.
11056 2004-03-11 Jackson Harper <jackson@ximian.com>
11060 * unicode.h: Remove unused System.Char icalls.
11062 2004-03-11 Miguel de Icaza <miguel@ximian.com>
11064 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
11065 code when we P/Invoke the first library in Windows.Forms, instead
11066 of when we first open the assembly.
11068 * assembly.c: Drop the lookup from here.
11070 2004-03-10 Martin Baulig <martin@ximian.com>
11072 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
11073 class for properties, fields and events. Finally fixes #54945.
11075 2004-03-10 Martin Baulig <martin@ximian.com>
11077 * metadata.c (mono_metadata_class_equal): New static function;
11078 checks whether two generic instances or two generic parameters are
11080 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
11083 2004-03-10 Martin Baulig <martin@ximian.com>
11085 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
11087 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
11088 argument and write it into the `reflection_info' field.
11091 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
11092 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
11094 2004-03-09 Jackson Harper <jackson@ximian.com>
11096 * char-conversions.h: use 8 bits for numeric data its all we need
11097 * icall.c: numeric data is only 8 bits now.
11099 2004-03-09 Martin Baulig <martin@ximian.com>
11101 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
11103 * class.c (init_properties, init_events): Initialize the new
11106 * reflection.c (typebuilder_setup_properties): Likewise.
11107 (typebuilder_setup_events): Likewise.
11109 * reflection.h (MonoEventInfo): Replaced `parent with
11110 `declaring_type' and `reflected_type'.
11112 * icall.c (ves_icall_get_property_info): Distinguish between
11113 declaring and reflected type.
11114 (ves_icall_get_event_info): Likewise.
11116 2004-03-09 Martin Baulig <martin@ximian.com>
11118 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
11119 (ves_icall_Type_GetField): Correctly set field->klass.
11121 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
11123 * loader.h: Fix warning.
11125 2004-03-08 Miguel de Icaza <miguel@ximian.com>
11127 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
11128 library routine if present. Notice that it will still continue
11129 executing even if its missing, for those working on the Gtk#
11130 edition of Windows.Forms.
11132 * assembly.c (do_mono_assembly_open): If loading the
11133 System.Windows.Forms call mono_loader_wini_init.
11135 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
11137 * class.h: Added MonoRemoteClass struct.
11138 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
11139 function for MonoStrings.
11140 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
11141 Added internal call for getting the proxy type.
11142 * marshal.c: Get the type of transparent proxies from its remote_class.
11143 Added methods that generate the IL for type checks and casts:
11144 mono_marshal_get_isinst, mono_marshal_get_castclass,
11145 mono_marshal_get_proxy_cancast.
11146 * marshal.h: Declaration of the previous new methods.
11147 * object.c: Added new moethods for creating and updating MonoRemoteClass
11148 instances: mono_remote_class, mono_upgrade_remote_class,
11149 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
11150 * verify.c: FIx transparent_proxy_fields layout.
11151 * appdomain.c: Bump corlib version.
11153 2004-03-04 Jackson Harper <jackson@ximian.com>
11155 * icall.c: Add icall to access char conversion tables.
11156 * char-conversions.h: Character conversion tables.
11157 * Makefile.am: Add char-conversions.h private header file.
11159 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
11161 * appdomain.c (unload_thread_main): Increase unloading timeout to
11162 10 sec as a temporary workaround for Nant problems.
11164 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
11166 * gc.c: Add checks for GC_enable and GC_disable.
11168 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
11169 (jaak@zd.com.pl). Fix memory corruption in String.Replace
11172 2004-02-27 Martin Baulig <martin@ximian.com>
11174 * reflection.c (mono_reflection_bind_generic_parameters): Take a
11175 `MonoReflectionType *' instead of a `MonoType *'.
11177 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
11179 * gc.c (run_finalize): Avoid finalizing the object representing the
11181 (finalizer_thread): Fix warning.
11183 2004-02-25 Martin Baulig <martin@ximian.com>
11185 * class.c (_mono_class_get_instantiation_name): Added `int offset'
11186 argument for nested types.
11187 (mono_class_create_generic): Added support for nested generictypes.
11189 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
11192 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
11194 * reflection.c (method_encode_signature): Increase the minimum
11195 value of `size' from 10 to 11.
11196 (mono_reflection_bind_generic_parameters): Take `int type_argc'
11197 and `MonoType **types' arguments instead of the `MonoArray
11198 *types'; added `MonoType *nested_in'. Recursively instantiate
11201 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
11203 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
11204 stack_overflow_ex members which are used by exception handling.
11206 * appdomain.c (mono_runtime_init): Initialize the new members.
11208 * gc.c (mono_gc_enable): New helper function.
11209 * gc.c (mono_gc_disable): New helper function.
11211 2004-02-23 Martin Baulig <martin@ximian.com>
11213 * icall.c: I must have been really stupid - make it actually work
11216 2004-02-23 Martin Baulig <martin@ximian.com>
11218 * loader.c (method_from_memberref): Only inflate the method if
11219 it's in another klass.
11221 2004-02-23 Martin Baulig <martin@ximian.com>
11223 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
11224 (mono_class_init): If we're a generic instance and an interface,
11225 compute `class->interface_id'; also create `class->interfaces'
11226 here and inflate them.
11228 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
11230 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
11232 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
11234 2004-02-15 Miguel de Icaza <miguel@ximian.com>
11236 * reflection.c (method_encode_code): Improved the error message
11237 generated by the exception.
11239 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11241 * icall.c: Martin did not do what he said in the ChangeLog for
11242 2004-02-18, but put back the changes for properties and events.
11243 Commenting those changes out again and adding comment to bug #54518.
11245 * process.c: removed warning.
11247 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
11249 * marshal.c (emit_struct_conv): Print an error message instead of
11250 asserting when a type does not have the StructLayout attribute.
11252 2004-02-20 Martin Baulig <martin@ximian.com>
11254 * reflection.c (mono_type_get_object): Also use the cache for
11256 (mono_reflection_bind_generic_parameters): Always compute
11259 2004-02-20 Martin Baulig <martin@ximian.com>
11261 * class.h (MonoGenericMethod): Removed `klass'.
11263 * class.c (mono_class_inflate_generic_method): Added `MonoClass
11266 2004-02-20 Martin Baulig <martin@ximian.com>
11268 * reflection.c (method_encode_methodspec): Actually use the
11269 uninflated signature for the memberref.
11271 2004-02-20 Martin Baulig <martin@ximian.com>
11273 * class.h (MonoGenericMethod): Removed `declaring'.
11275 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
11276 is NULL, compute it here.
11278 2004-02-20 Martin Baulig <martin@ximian.com>
11280 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
11282 * metadata.c (mono_metadata_generic_inst_hash): New method.
11283 (mono_metadata_generic_inst_equal): New method.
11285 * reflection.c (mono_reflection_bind_generic_parameters): Use the
11286 `klass->image->generic_inst_cache' cache to avoid creating
11287 duplicate MonoGenericInst's.
11289 * class.c (mono_class_inflate_generic_type): Use the cache.
11291 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11293 * object.c: fixed gc descriptor calculation for embedded valuetypes.
11295 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11297 * icall.c: added Socket.WSAIoctl icall.
11299 * socket-io.[ch]: implemented
11300 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
11302 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
11304 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
11306 2004-02-18 Urs C Muff <umuff@quark.com>
11308 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
11309 this work on PPC and other big-endian architectures.
11311 * debug-mono-symfile.h: Prepended the names of all the `guint32'
11312 fields with an underscore to make sure they're only accessed by
11313 the read32() macro.
11315 2004-02-18 Martin Baulig <martin@ximian.com>
11317 * icall.c: Put the klass->refclass changes back for methods and
11318 fields, but not for properties and events. We're currently not
11319 distinguishing between DeclaringType and ReflectedType for
11320 properties and events, that's what caused the regressions.
11322 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11325 (mono_async_result_new): the handle can be NULL.
11327 * threadpool.c: Use an event instead of a semaphore, don't initialize
11328 it until needed. This saves quite a few semaphores from being created
11329 when using the threadpool.
11331 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
11333 * object.c (mono_string_is_interned_lookup): Fix interning of long
11334 strings. Fixes #54473.
11336 * domain.c (ldstr_equal): Optimize if the two strings are equal.
11338 * icall.c: Revert the klass->refclass changes since they introduce
11339 regressions (bug #54518).
11341 2004-02-18 Martin Baulig <martin@ximian.com>
11343 * class.c (mono_class_init): If we're a generic instance and don't
11344 come from a TypeBuilder, inflate our members here.
11345 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
11346 (mono_class_create_generic): New public method.
11347 (mono_class_initialize_generic): Removed.
11348 (get_instantiation_name): Renamed to
11349 _mono_class_get_instantiation_name() and made it public.
11351 2004-02-18 Martin Baulig <martin@ximian.com>
11353 * class.c (mono_class_inflate_generic_type): Clear the new
11354 instance's `nginst->klass' when inflating a generic instance.
11355 (mono_class_is_subclass_of): Added (basic) support for generic
11358 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
11360 * appdomain.h, domain.c: use a MonoCodeManager instead of a
11361 MonoMempool to hold compiled native code.
11363 2004-02-17 Martin Baulig <martin@ximian.com>
11365 * class.h (MonoDynamicGenericInst): Added `count_properties' and
11368 * reflection.c (mono_reflection_generic_inst_initialize): Added
11369 `MonoArray *properties' argument.
11371 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
11373 2004-02-17 Martin Baulig <martin@ximian.com>
11375 * icall.c (ves_icall_Type_GetFields): Renamed to
11376 ves_icall_Type_GetFields_internal() and added a
11377 `MonoReflectionType *rtype' argument; pass it to
11378 mono_field_get_object() to set the field's "reflected" type.
11379 (ves_icall_Type_GetConstructors): Likewise.
11380 (ves_icall_Type_GetEvents): Likewise.
11381 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
11382 argument; pass it to mono_method_get_object() to set the method's
11385 2004-02-17 Martin Baulig <martin@ximian.com>
11387 * class.h (MonoDynamicGenericInst): New type.
11388 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
11390 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
11391 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
11392 (ves_icall_MonoGenericInst_GetFields): New interncall.
11394 * class.c (mono_class_from_generic): Don't call
11395 mono_class_initialize_generic() if this is a dynamic instance;
11396 ie. it's being created from a TypeBuilder.
11397 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
11398 `class->byval_arg.type'.
11400 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
11401 to `inflate_method' and made static.
11402 (mono_reflection_inflate_field): Removed.
11403 (mono_reflection_generic_inst_initialize): New public method.
11405 * reflection.h (MonoReflectionGenericInst): Removed `methods',
11406 `ctors' and `fields'; added `initialized'.
11408 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
11410 * debug-helpers.c (mono_method_full_name): Fix output for empty
11413 2004-02-12 Martin Baulig <martin@ximian.com>
11415 * class.h (MonoClassField): Added `MonoType *generic_type'.
11417 * reflection.c (mono_image_get_fieldref_token): Added support for
11418 instantiated generic types.
11419 (field_encode_inflated_field): Removed.
11420 (mono_image_get_inflated_field_token): Removed.
11421 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
11423 * reflection.h (MonoReflectionInflatedField): Removed.
11425 2004-02-12 Martin Baulig <martin@ximian.com>
11427 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
11428 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
11430 * reflection.c (mono_image_get_methodspec_token): Take a
11431 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
11432 (mono_image_create_token): Check whether we have a
11433 `method->signature->gen_method' and call
11434 mono_image_get_methodspec_token() if appropriate.
11435 (inflated_method_get_object): Removed.
11436 (mono_reflection_bind_generic_method_parameters): Return a
11437 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
11438 (mono_reflection_inflate_method_or_ctor): Likewise.
11440 * reflection.h (MonoReflectionInflatedMethod): Removed.
11442 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
11444 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
11445 for custom valuetype marshalling.
11447 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
11449 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11451 * icall.c: fixed WSAGetLastError_internal name.
11453 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
11455 * threads.c (mono_thread_attach): Allow this to be called multiple
11456 times for a thread.
11458 * threads.c (build_wait_tids): Do not wait for ourselves.
11460 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
11461 appdomain list is empty.
11463 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11464 memory returned by mono_string_builder_to_utf16, since it points into
11465 managed memory. Thanks to Bernie Solomon for noticing this.
11467 * icall.c: Add AppDomainSetup icalls.
11469 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11471 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11474 * reflection.c (reflection_methodbuilder_to_mono_method): Save
11475 custom attributes to the method_aux struct. Also fix array indexes etc.
11477 * loader.c (mono_method_get_param_names): Make dynamic case work again.
11479 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11481 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11482 (both static and runtime) and reduce startup time.
11484 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
11486 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11487 AsAny marshalling conversion instead of crashing.
11489 * marshal.c: Fix warnings.
11491 2004-02-09 Martin Baulig <martin@ximian.com>
11493 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11495 * reflection.h (MonoReflectionInflatedMethod): Removed the
11496 `declaring' field, it's now in the unmanaged MonoGenericMethod.
11498 * reflection.c (method_encode_methodspec): Removed the `method'
11499 argument; we get it from `gmethod->declaring'.
11500 (inflated_method_get_object): Removed the `declaring' argument.
11502 2004-02-09 Martin Baulig <martin@ximian.com>
11504 * class.h (MonoGenericMethod): New type.
11505 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11508 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11509 a `MonoGenericMethod *gen_method' one.
11511 * class.c (mono_class_inflate_generic_type): Take an additional
11512 `MonoGenericMethod * argument. This is only non-NULL if we're
11513 inflating types for a generic method.
11514 (mono_class_inflate_generic_signature): Renamed to
11515 inflate_generic_signature() and made static; take a
11516 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11517 (inflate_generic_header): Take a `MonoGenericMethod *' argument
11518 instead of a `MonoGenericInst *' one.
11519 (mono_class_inflate_generic_method): Likewise.
11521 * reflection.c (encode_generic_method_sig): Take a
11522 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11523 (method_encode_methodspec): Likewise.
11524 (inflated_method_get_object): Likewise.
11526 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11527 field with a `MonoGenericMethod *gmethod' one.
11529 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
11531 * class.h (mono_class_has_parent): add parens to expansion
11534 2004-02-08 Martin Baulig <martin@ximian.com>
11536 * image.h (MonoImage): Removed `generics_cache'.
11538 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11539 instead of a `MonoType *' argument; removed the `inflate_methods'
11540 argument. Don't inflate methods here.
11542 * loader.c (find_method): If it's a generic instance, call
11543 mono_class_init() on the `sclass->generic_inst->generic_type'.
11545 * metadata.c (mono_type_size): Make this work on uninitialized
11546 generic instances; call it on the `ginst->generic_type's class.
11548 * reflection.c (mono_reflection_bind_generic_parameters): Call
11549 mono_class_from_generic() to create the `ginst->klass'.
11551 2004-02-08 Martin Baulig <martin@ximian.com>
11553 * class.h (MonoClass): Changed type of `generic_inst' from
11554 `MonoType *' to `MonoGenericInst *'.
11556 2004-02-08 Martin Baulig <martin@ximian.com>
11558 * icall.c (ves_icall_Type_BindGenericParameters): Just call
11559 mono_type_get_object(), this is now creating a `MonoGenericInst'
11560 for MONO_TYPE_GENERICINST.
11561 (ves_icall_MonoGenericInst_GetParentType): Likewise.
11562 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11564 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11565 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11566 (inflated_method_get_object): Added `MonoClass *refclass' argument.
11567 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11568 and reflected type.
11570 * reflection.h (MonoReflectionInflatedMethod): Removed
11571 `declaring_type' and `reflected_type'.
11573 2004-02-08 Martin Baulig <martin@ximian.com>
11575 * class.h (MonoGenericInst): Added `MonoType *parent' and
11576 `MonoType **ifaces'.
11578 * reflection.h (MonoReflectionGenericInst): Removed `klass',
11579 `parent' and `interfaces'.
11581 * reflection.c (mono_reflection_bind_generic_parameters): Take a
11582 `MonoType *' argument and return a `MonoType *'.
11585 (ves_icall_MonoGenericInst_GetParentType): New interncall.
11586 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11588 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11590 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11591 valuetype marshalling.
11593 2004-02-06 Martin Baulig <martin@ximian.com>
11596 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11597 (my_mono_class_from_generic_parameter): Likewise.
11599 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
11601 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11602 contents of the symbol files lazily.
11604 * object.h (MonoThread): Add 'name' and 'name_len' fields.
11606 * threads.h threads.c icall.c: New icalls for getting and setting the
11609 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
11611 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
11612 Raise an exception when the domain is not found.
11614 2004-02-03 Martin Baulig <martin@ximian.com>
11616 * reflection.c (mono_image_get_methodspec_token): Use the
11617 uninflated signature; fixes gen-33.
11619 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
11621 * gc.c threads.c: Make the finalizer thread a normal managed thread so
11622 the finalizer code can use thread functionality.
11624 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
11625 the finalizer thread.
11627 * threads.c: Make some functions more robust.
11629 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11631 * metadata.h: Add new marshalling conventions.
11633 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11634 stringbuilder marshalling. Fixes #53700.
11636 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11638 * reflection.c (mono_image_get_type_info): Save declarative security
11641 * reflection.c (mono_image_get_field_info): Handle uninitialized
11642 unmanaged fields as well.
11644 * appdomain.c: Bump corlib version.
11646 2004-02-01 Martin Baulig <martin@ximian.com>
11648 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11649 method type arguments.
11651 2004-01-30 Duncan Mak <duncan@ximian.com>
11653 * marshal.h: Add prototype for
11654 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11656 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11659 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
11661 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11662 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11664 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11666 * marshal.c (mono_marshal_get_native_wrapper): Add support for
11667 custom marshalling of valuetypes.
11669 * marshal.c: Fix some warnings.
11671 2004-01-29 Martin Baulig <martin@ximian.com>
11673 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11674 for generic method parameters.
11676 * reflection.c (method_encode_methodspec): Write the uninflated
11677 signature into the methodspec table.
11678 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11679 is always the uninflated method.
11680 (reflection_methodbuilder_to_mono_method): Copy the generic
11681 parameters from the MethodBuilder into `header->gen_params'.
11683 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
11685 * class.c (mono_class_from_generic_parameter): Fix warning.
11687 2004-01-27 Martin Baulig <martin@ximian.com>
11689 * class.c (mono_class_from_generic_parameter): Don't create
11690 `klass->methods' here.
11692 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
11694 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11695 extension since it does not work with libraries named lib<FOO>.dll.so.
11697 2004-01-25 Martin Baulig <martin@ximian.com>
11699 * class.c (mono_class_inflate_generic_type): Added support for
11700 MONO_TYPE_GENERICINST.
11702 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11703 inflate methods on open constructed types.
11705 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11707 * object.c: fire ProcessExit event in the root AppDomain after running
11708 Main. Fixes bug #53299.
11710 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11712 * socket-io.c: include the new socket-wrappers.h header.
11713 Use the wrappers instead of the unix socket functions to make the code
11716 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
11718 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11720 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11723 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
11725 * reflection.c (mono_image_create_pefile): Handle the case when the
11726 entry point is not a MethodBuilder.
11728 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11729 field to ReflectionMethod since it is not allways a builder.
11731 * reflection.c (type_get_fully_qualified_name): New helper function to
11732 return the fully qualified name of a type.
11734 * reflection.c (encode_marshal_blob): Always emit the fully qualified
11735 type name for custom marshallers.
11737 * reflection.c (mono_marshal_spec_from_builder): Ditto.
11739 * class.c (mono_class_setup_vtable): If a parent class already
11740 implements an interface, use the implementing methods from that class.
11743 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11745 * threadpool.c: just return instead of ExitThread to allow for thread
11748 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
11750 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11751 when closing resource modules.
11753 * reflection.c (mono_image_create_pefile): Handle the case when the
11754 entry point is not a MethodBuilder.
11756 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11757 field to ReflectionMethod since it is not allways a builder.
11759 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
11761 * marshal.c (mono_marshal_get_managed_wrapper):
11762 mono_marshal_alloc takes native int so CONV_I
11763 the arg for 64bits.
11765 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
11767 * reflection.c (fixup_cattrs): New function to fixup the methoddef
11768 tokens in the cattr table. Fixes #53108.
11770 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11772 * loader.c: don't trim ".dll" before looking up in the config file.
11773 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11775 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
11777 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11778 Return the module which contains the resource as well.
11779 (ves_icall_System_Reflection_Module_Close): New icall.
11781 * appdomain.c: Bump corlib version number.
11783 * image.c (mono_image_addref): New public function.
11785 * assembly.c: Call mono_image_addref.
11787 * reflection.c (mono_module_get_object): Increase reference count of
11790 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11793 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11794 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
11795 proper exceptions on DllImport problems.
11797 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11799 * class.c, metadata.c: eliminate CSIZE macro.
11801 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
11803 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11804 * object.h: Added async_callback field in MonoAsyncResult.
11805 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11806 * verify.c: Added async_callback in MonoAsyncResult layout.
11808 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
11810 * reflection.c (mono_reflection_get_custom_attrs): Add support
11813 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11815 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
11817 (mono_marshal_method_from_wrapper): Add null pointer check.
11819 2004-01-16 Martin Baulig <martin@ximian.com>
11821 * debug-mono-symfile.h: Set version number to 36 and reflect
11822 latest symbol writer changes.
11824 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
11826 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11827 multi-dimensional arrays.
11828 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11829 (mono_class_from_mono_type): Use bounded_array_class_get.
11831 * class.c (mono_bounded_array_class_get): New function which takes
11832 a 'bounded' bool argument to distinguish vectors from one dimensional
11835 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
11836 bounded_array_class_get if the array has bounds.
11838 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11839 Search modules loaded using AssemblyBuilder:AddModule as well.
11841 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11843 * appdomain.c: increased corlib version.
11844 * filewatcher.c: removed g_print.
11846 (get_property_info): only allocate what is actually requested.
11847 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11849 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11851 * Makefile.am: added filewatcher.[ch]
11852 * filewatcher.[ch]: FileSystemWatcher runtime support.
11853 * icall.c: added new FSW icalls.
11855 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11857 * string-icalls.c: fix stringbuilder regression as suggested by
11858 Iain McCoy <iain@mccoy.id.au>.
11860 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
11862 * process.c (process_read_stringtable_block): Recognize '007f' as
11863 a language neutral stringtable block.
11865 2004-01-12 Patrik Torstensson
11867 * object.h (MonoStringBuilder) : Changed layout to support our
11868 new stringbuilder class.
11869 * marshal.c: Change marshalling to support the new layout of
11871 * appdomain.c: increased version number because new layout of
11874 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
11876 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11877 assembly name as an string instead of an AssemblyName, since it is
11878 easier to extract info from it.
11880 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11881 the culture subdirectories too. Fixes #52231.
11883 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11885 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11886 It takes 2 new parameters with an optional name for the method to look
11887 for and case ignoring info.
11889 * threadpool.c: removed unused variable.
11891 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11893 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11894 It takes 2 new parameters with an optional name for the property to look
11895 for and case ignoring info.
11898 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
11900 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11903 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11906 * assembly.c: escape the uri before passing it to g_filename_from_uri.
11909 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
11911 * reflection.c: Add support for more than one unmanaged resource.
11913 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11914 in field->def_value, as done in all other cases.
11916 * reflection.c (mono_reflection_get_custom_attrs): Add support for
11919 * reflection.c (mono_reflection_create_runtime_class): Remove
11920 errorneous assignment to klass->element_class, since it is already
11921 done in mono_reflection_setup_internal_class.
11923 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11925 * gc.c: added missing LeaveCriticalSection.
11926 * icall.c: indented a couple of lines.
11927 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11928 if we call EndInvoke inside a callback. Fixes bug #52601.
11930 2004-01-07 Martin Baulig <martin@ximian.com>
11932 * mono-debug-debugger.h
11933 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11935 2004-01-06 Miguel de Icaza <miguel@ximian.com>
11937 * appdomain.c: Use messages in NotImplementedException.
11939 * exception.c (mono_get_exception_not_implemented): Now this takes
11940 a message argument.
11942 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11943 exception instead of g_asserting an aborting when something is not
11946 Add some inline docs.
11948 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
11950 * reflection.h: Update after changes to object layout.
11952 * reflection.c: Implement saving of unmanaged aka win32 resources.
11954 * appdomain.c: Bump version number.
11956 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
11957 Handle missing domains gracefully.
11959 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
11961 * file-io.c : On Windows, there are much more invalid_path_chars.
11963 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11965 * class.h, object.c: prepare for GetType () speedup.
11967 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
11969 * profiler.c: workaround for --profile null reference exception on
11970 cygwin. Patch by Patrik Torstensson.
11972 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
11974 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11975 make work for unaligned access.
11977 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11979 * class.c: small cleanup (class->fields [i] -> field).
11980 * image.c: check address of metadata is valid.
11982 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
11984 * assembly.h assembly.c (mono_assembly_loaded): New public function to
11985 search the list of loaded assemblies.
11987 * reflection.c (mono_reflection_type_from_name): Use
11988 mono_assembly_loaded instead of mono_image_loaded.
11990 * reflection.c: Fix warnings.
11992 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
11994 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
11995 is dynamic. This is needed since an assembly can contain both dynamic and
11996 non-dynamic images.
11998 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
12001 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
12003 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
12004 to store modules loaded using AddModule.
12006 * reflection.c (mono_image_fill_file_table): Generalize this so it works
12009 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
12011 * reflection.c (mono_image_fill_export_table_from_module): New function to
12012 fill out the EXPORTEDTYPES table from a module.
12014 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
12015 into a separate function. Also handle loaded non-dynamic modules.
12017 * reflection.c (mono_image_basic_init): Fix memory allocation.
12019 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12021 * assembly.c (mono_assembly_load_references): Make this public.
12023 2003-12-19 Martin Baulig <martin@ximian.com>
12025 * class.c (mono_class_initialize_generic): Made this static, take
12026 a `MonoGenericInst *' instead of a `MonoClass *'.
12027 (mono_class_from_generic): Call mono_class_initialize_generic()
12028 unless we're already initialized or being called from
12029 do_mono_metadata_parse_generic_inst().
12031 * class.h (MonoGenericInst): Added `initialized' and
12032 `init_pending' flags.
12034 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
12035 `mono_class_init (gklass)' or mono_class_initialize_generic()
12036 here; set `generic_inst->init_pending' while parsing the
12039 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
12041 * locales.c: include string.h for memxxx prototypes
12043 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
12045 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
12046 constructor when accessing literal fields.
12048 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
12050 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12052 * reflection.c (assembly_add_resource_manifest): New function to fill
12053 the MANIFESTRESOURCE table.
12055 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
12057 * reflection.h: Update to changes in class layout.
12059 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
12060 Reenable call to mono_runtime_is_shutting_down ().
12062 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
12063 determine if the runtime is shutting down.
12065 2003-12-16 Jackson Harper <jackson@ximian.com>
12067 * icall.c: comment out call to mono_runtime_is_shutting_down to
12070 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
12072 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
12073 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
12075 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
12077 * reflection.c: move definition of swap_with_size
12078 to before its first call
12080 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
12082 * appdomain.c (mono_runtime_is_shutting_down): New public function.
12084 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
12087 * object.c: Fix warnings.
12089 * icall.c (ves_icall_Type_Get...): Only consider inherited static
12090 members if FlattenHierarchy is set.
12092 * reflection.c (mono_image_add_decl_security): New function to emit
12093 declarative security.
12095 * reflection.h reflection.c: Add support for declarative security.
12097 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12099 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
12101 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12103 * appdomain.c verify.c: Moved corlib version checking into its own
12104 function in appdomain.c since it needs to create vtables etc.
12106 2003-12-13 Patrik Torstensson <p@rxc.se>
12108 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
12109 instead of unwrapped server.
12111 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
12113 * verify.c (check_corlib): Fix field index.
12115 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
12117 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
12120 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
12122 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
12123 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
12124 cope with sizeof(size_t) != sizeof(guint32).
12126 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12128 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
12129 in case of failure.
12131 2003-12-10 Mark Crichton <crichton@gimp.org>
12133 * icall.c: removed the GetNonZeroBytes. We now handle this case
12136 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
12138 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
12140 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
12143 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
12145 * verify.c (check_corlib): Handle the case when the version field is
12146 initialized by a static constructor.
12148 2003-12-08 Patrik Torstensson <p@rxc.se>
12150 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
12152 2003-12-08 Martin Baulig <martin@ximian.com>
12154 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
12155 a MonoReflectionGenericParameter, also take the parameter index
12156 and name as arguments.
12157 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12158 (ves_icall_MonoGenericParam_initialize): New interncall.
12159 (ves_icall_Type_make_byref_type): New interncall.
12161 * reflection.h (MonoReflectionGenericParam): Derive from
12162 MonoReflectionType, not just from MonoObject. Added `refobj' and
12165 * reflection.c (mono_reflection_define_generic_parameter): Create
12166 and return a new MonoReflectionGenericParam; don't initialize the
12168 (mono_reflection_initialize_generic_parameter): New public method;
12169 initializes the constraints and creates the `param->pklass'.
12171 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
12173 * reflection.h reflection.c: Use the new fields 'num_types',
12174 'num_fields' and 'num_methods' to track the number of types etc.
12176 * verify.c (check_corlib): Check corlib version number.
12178 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
12180 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
12181 function works on all methods.
12183 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
12185 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
12186 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
12187 the custom_type_info flag of the transparent proxy.
12188 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
12189 objects that supports IRemotingTypeInfo.
12190 * object.h: Added custom_type_info field in transparent proxy.
12192 2003-12-06 Martin Baulig <martin@ximian.com>
12194 * class.c (mono_class_create_from_generic): Removed.
12195 (mono_class_from_generic): Check `ginst->klass' before doing
12196 anything else. This is important to fully support "recursive"
12199 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
12200 empty `generic_inst->klass' before doing anything else.
12202 2003-12-06 Dick Porter <dick@ximian.com>
12207 * locales.c: Use C structs to access class fields. Don't do a
12208 conversion between MonoString and UChar because both are
12209 platform-endian UTF-16. Compare now takes startindex and count
12210 parameters. Add a char overload for IndexOf. Speed up the
12211 invariant string IndexOf.
12213 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
12215 * Makefile.am (monosn_LDADD): Fix parallel build.
12217 2003-12-04 Martin Baulig <martin@ximian.com>
12220 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12221 (ves_icall_Type_make_array_type): New interncall.
12223 2003-12-04 Martin Baulig <martin@ximian.com>
12225 * locales.c: also change it in the !HAVE_ICU case.
12227 2003-12-04 Dick Porter <dick@ximian.com>
12230 * locales.c: construct_compareinfo is now in CompareInfo, not
12233 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
12235 * image.c (mono_image_load_file_for_image): Cache loaded images in the
12236 image->files array.
12238 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
12241 * assembly.c (mono_assembly_load_references): Only load references
12244 * class.c (mono_class_from_name): Avoid linear search of the
12245 EXPORTEDTYPE table.
12247 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
12249 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
12251 * image.h (MonoImage): Add 'field_cache' field.
12253 * loader.c (mono_field_from_token): Cache field lookups.
12255 * reflection.c (mono_module_get_object): Fix name property.
12257 * icall.c (ves_icall_get_enum_info): Update after changes to
12258 mono_metadata_get_constant_index ().
12260 * icall.c: Get rid of get_type_info icall, use a separate icall for
12261 each type property to avoid needless memory allocations. Fixes #51514.
12263 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
12264 to avoid needless binary searches.
12266 * class.c (class_compute_field_layout): Move the initialization of
12267 field->def_value to mono_class_vtable ().
12269 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
12272 * object.c (mono_object_allocate): Make it inline.
12274 * object.c (mono_object_allocate_spec): Make it inline.
12276 2003-12-02 Dick Porter <dick@ximian.com>
12278 * locales.c (create_NumberFormat): NumberFormatInfo construction.
12279 Patch by Mohammad DAMT (mdamt@cdl2000.com).
12281 2003-12-01 Dick Porter <dick@ximian.com>
12283 * threads.c: Fix signature and call in CreateMutex and
12286 2003-12-01 Dick Porter <dick@ximian.com>
12289 * locales.c: Implement string compares and searching
12291 * object.h: Add extra Thread field
12293 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
12295 * reflection.c (fixup_method): Add support for MonoCMethod.
12297 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
12299 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
12301 * reflection.c (assembly_name_to_aname): Allow extra characters in
12302 assembly names. Fixes #51468.
12304 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
12306 * exception.c (mono_exception_from_name_domain): New helper function.
12308 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
12309 exception object in the correct domain.
12311 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
12312 formatting + make a copy a the input data.
12314 * loader.c (mono_get_method_from_token): Methods which contain
12315 native code do not have entries in the ImplMap.
12317 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
12318 Thanks to Gonzalo for spotting this.
12320 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
12321 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
12323 * assembly.h (mono_assembly_load_from): Split the second part of
12324 assembly loading into a new public function.
12326 * exception.h (mono_get_exception_bad_image_format): New function.
12328 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
12330 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12331 Enumerate all modules inside a dynamic assembly. Fixes #51293.
12333 * icall.c: Add new icall for creating dynamic methods.
12335 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
12337 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
12339 * reflection.c (mono_reflection_create_dynamic_method): New icall to
12340 create a dynamic method.
12342 * reflection.c (resolve_object): New helper function.
12344 * reflection.c: Generalize ReflectionMethodBuilder and the functions
12345 which manipulate it so they can also work on dynamic methods.
12347 * reflection.c (reflection_method_builder_to_mono_method): Avoid
12348 creating the MonoReflectionMethodAux structure if it is not needed.
12350 * reflection.h verify.c: Update after changes to object layout.
12352 * reflection.c (method_builder_encode_signature): Fix compilation on
12355 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
12357 * appdomain.h: Added support for context static fields. Added static_data
12358 field to MonoAppContext and renamed thread_static_fields to a more
12359 generic special_static_fields in MonoAppDomain, since it can now contain
12360 context static fields.
12361 * domain.c: Updated hashtable name.
12362 * object.c: Replaced field_is_thread_static() for a more generic
12363 field_is_special_static() which also checks for context static attribute.
12364 In mono_class_vtable(), added support for static context fields.
12365 * threads.c: Changed methods that manage thread static fields to more
12366 generic methods so they can be reused both for thread and context static
12368 * threads.h: Declared some new methods.
12370 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
12372 * reflection.h: Update after changes to the managed types.
12374 * reflection.c (encode_custom_modifiers): New helper function.
12376 * reflection.c (method_encode_signature): Emit custom modifiers.
12378 * reflection.c (field_encode_signature): Emit custom modifiers.
12380 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
12382 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
12384 * icall.c (ves_icall_System_ValueType_Equals): New optimized
12387 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
12390 * object.c (mono_field_get_value_object): New function.
12392 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
12395 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
12397 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
12398 return a preallocated out-of-memory exception instance.
12400 * object.c (out_of_memory): Use the new function.
12402 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
12403 flag is before the custom modifiers. Fixes #49802.
12405 2003-11-16 Martin Baulig <martin@ximian.com>
12407 * class.c (mono_class_is_open_constructed_type): Implemented the
12408 MONO_TYPE_GENERICINST case.
12410 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
12412 * assembly.c (mono_assembly_fill_assembly_name): New function to
12413 fill out the MonoAssemblyName structure.
12414 (mono_assembly_open): Use the new function.
12416 * icall.c (fill_reflection_assembly_name): New helper function.
12418 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
12421 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
12423 2003-11-15 Martin Baulig <martin@ximian.com>
12425 * class.c (mono_class_is_open_constructed_type): New public
12426 function; checks whether a type is an open constructed type,
12427 ie. whether it still contains type parameters.
12428 (mono_class_inflate_generic_type): If we're a type parameter and
12429 the inflated type is also a MONO_TYPE_(M)VAR, return the original
12432 * class.h (MonoGenericInst): Added `guint32 is_open'.
12434 * loader.c (method_from_methodspec): Check whether we're an open
12435 or closed constructed type and set `ginst->is_open'.
12437 * reflection.c (mono_reflection_bind_generic_parameters): Check
12438 whether we're an open or closed constructed type and set
12440 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
12441 from open constructed types.
12443 2003-11-15 Martin Baulig <martin@ximian.com>
12445 * reflection.c (mono_reflection_bind_generic_parameters): If we're
12446 a generic instance (instead of a generic type declaration) with
12447 unbound generic parameters, bind them to our actual types.
12449 2003-11-14 Martin Baulig <martin@ximian.com>
12451 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
12453 * reflection.c (mono_reflection_bind_generic_parameters): If we're
12454 an interface type, populate `res->interfaces' with instantiated
12455 versions of all the interfaces we inherit.
12457 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
12459 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12460 when MONO_PATH is set but doesn't contain the install dir.
12462 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12465 (ves_icall_Type_GetInterfaces): don't return an interface twice when
12466 it's also implemented in base classes. Fixes bug #50927.
12468 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
12470 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12471 if this method is called from a finalizer. Fixes #50913.
12473 2003-11-12 Miguel de Icaza <miguel@ximian.com>
12475 * threads.c: Implement VolatileRead/VolatileWrite
12477 * icall.c: Add new icalls for VolatileRead/VolatileWrite
12479 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12481 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
12482 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12485 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
12486 from Peter Ross (pro@missioncriticalit.com).
12488 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
12490 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12492 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12494 * assembly.c (mono_assembly_load_references): Disable check because it
12495 triggers on older corlibs which lots of people have.
12497 2003-11-12 Jackson Harper <jackson@ximian.com>
12499 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12500 load corlib.dll if mscorlib.dll is not found.
12501 * assembly.h: Remove corlib name define.
12504 * image.c: Change corlib name to mscorlib.
12506 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12508 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12510 2003-11-11 Miguel de Icaza <miguel@ximian.com>
12512 * appdomain.h: Added loader_optimization here to sync with the C#
12513 code, and add disallow_binding_redirects field.
12515 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12517 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12519 * reflection.c (mono_image_build_metadata): Fix crash on modules
12522 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12524 * icall.c (ves_icall_get_method_info): Return callingConvention as
12527 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
12528 namespaces from the EXPORTEDTYPE table as well.
12530 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12531 from all modules inside the assembly.
12533 2003-11-11 Martin Baulig <martin@ximian.com>
12535 * reflection.c (mono_reflection_bind_generic_parameters): Make
12536 this work for interfaces.
12538 2003-11-11 Martin Baulig <martin@ximian.com>
12540 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12542 2003-11-11 Martin Baulig <martin@ximian.com>
12544 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12545 "MonoInflatedMethod" and "MonoInflatedCtor".
12547 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
12549 * reflection.c (resolution_scope_from_image): Use the assembly table
12550 from the manifest module, since other modules don't have it.
12552 * debug-helpers.c (mono_type_full_name): New helper function.
12554 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12556 * image.c (mono_image_load_file_for_image): New public function which
12557 is a replacement for the load_file_for_image in class.c.
12559 * assembly.c (mono_assembly_load_module): A wrapper for the function
12560 above which does assembly association and reference loading too.
12562 * class.c (mono_class_from_name): Call mono_assembly_load_module.
12564 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12566 * appdomain.c: not all of the attributes for the full assembly name
12567 are required and the order doesn't matter. Fixes bug #50787.
12569 2003-11-10 Dick Porter <dick@ximian.com>
12571 * locales.c: Use platform-endian UTF16
12573 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12575 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12577 2003-11-10 Martin Baulig <martin@ximian.com>
12580 (mono_metadata_load_generic_params): Make this actually work.
12582 * reflection.c (mono_reflection_bind_generic_parameters): If our
12583 parent is a generic instance, pass all the `types' to it, no
12584 matter whether it has the same number of type parameters or not.
12586 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
12588 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12590 * assembly.c (mono_assembly_load_references): Move the image<->assembly
12591 assignment code to this function so it gets called recursively for all
12594 * image.c (load_modules): Remove the assembly assignment since it is
12595 now done by mono_assembly_load_references.
12597 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12598 Add 'module' argument.
12599 (mono_module_get_types): New helper function.
12600 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12602 2003-11-08 Martin Baulig <martin@ximian.com>
12604 * class.c (mono_class_inflate_generic_method): Interface method
12605 don't have a header.
12607 * reflection.c (mono_image_get_methodspec_token): Take an
12608 additional `MonoGenericInst *' argument instead of reading it from
12609 the header; this is necessary to support interfaces.
12610 (mono_image_create_token): Pass the `MonoGenericInst *' from the
12611 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12612 (inflated_method_get_object): Take an additional `MonoGenericInst *'
12615 * reflection.h (MonoReflectionInflatedMethod): Added
12616 `MonoGenericInst *ginst'.
12618 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
12620 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12622 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
12624 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12626 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
12629 (reflection_methodbuilder_from_method_builder):
12630 (reflection_methodbuilder_from_ctor_builder): New helper functions to
12631 initialize a ReflectionMethodBuilder structure.
12632 (mono_image_get_methodbuilder_token):
12633 (mono_image_get_ctorbuilder_token): New functions to emit memberref
12634 tokens which point to types in another module inside the same assembly.
12636 * reflection.c: Use the new helper functions.
12638 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12640 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
12641 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12643 * reflection.c (resolution_scope_from_image): Emit a moduleref if
12646 * reflection.c (mono_image_build_metadata): Emit metadata only for the
12647 current module. Emit the manifest only for the main module.
12649 * reflection.c (mono_image_create_token): Add assertion when a
12650 memberref needs to be created.
12652 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12654 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
12655 larger buffer for the custom attribute blob. Fixes #50637.
12657 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12659 * threadpool.c: notify listener on async processing handles after
12660 invoking the async callback. Thanks to Zoltan.
12662 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12664 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
12665 avoid code duplication.
12667 * reflection.h (MonoDynamicImage): New type which is currently unused,
12668 but will be used through the ref.emit code in place of
12669 MonoDynamicAssembly.
12671 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12674 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12675 a MonoDynamicImage instead of just a MonoImage.
12677 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12678 icalls to ModuleBuilder but keep their semantics, so they will work
12679 with moduleb->assemblyb. This will change later.
12681 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12683 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12686 * reflection.c (mono_image_build_metadata): Avoid creation of a default
12687 main module, since it is now done by the managed code.
12689 2003-11-03 Martin Baulig <martin@ximian.com>
12691 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12692 `ginst->klass' here.
12693 (method_encode_methodspec): Don't use the `ginst->generic_method's
12694 klass if it's a generic instance, use `ginst->klass' in this case.
12696 2003-11-03 Martin Baulig <martin@ximian.com>
12698 * reflection.c (mono_image_get_generic_method_param_info):
12699 Removed, use mono_image_get_generic_param_info() instead.
12700 (mono_image_get_type_info): Write the GenericParam table before
12701 the Method table. This is neccessary because in the GenericParam
12702 table, type parameters of the class (ie. '!0' etc.) must come
12703 before the ones from its generic methods (ie. '!!0' etc).
12705 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
12707 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12709 2003-11-02 Martin Baulig <martin@ximian.com>
12711 * reflection.c (create_generic_typespec): Take a
12712 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12713 the generic parameters from it.
12715 2003-11-02 Martin Baulig <martin@ximian.com>
12717 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12718 instead of a `MonoClassField *' since we just need the type.
12719 (create_generic_typespec): New static function. Creates a
12720 TypeSpec token for a generic type declaration.
12721 (mono_image_get_generic_field_token): New static function.
12722 (mono_image_create_token): If we're a FieldBuilder in a generic
12723 type declaration, call mono_image_get_generic_field_token() to get
12726 2003-11-02 Martin Baulig <martin@ximian.com>
12729 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12730 `MonoReflectionGenericInst *declaring_type' and
12731 `MonoReflectionGenericInst *reflected_type' fields.
12733 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12734 `MonoReflectionGenericInst *declaring_type' and a
12735 `MonoReflectionGenericInst *reflected_type' argument instead of a
12736 single `MonoReflectionGenericInst *type' one. Set
12737 `res->declaring_type' and `res->reflected_type' from them.
12738 (mono_reflection_inflate_field): Likewise.
12740 2003-11-02 Martin Baulig <martin@ximian.com>
12742 * class.c (mono_class_setup_vtable): Don't store generic methods
12745 2003-11-02 Martin Baulig <martin@ximian.com>
12747 * reflection.h (MonoReflectionGenericInst): Added
12748 `MonoReflectionType *declaring_type'.
12750 * reflection.c (mono_reflection_bind_generic_parameters): Use
12751 `if (tb->parent)' instead of `klass->parent'.
12753 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
12755 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12756 with an empty ASSEMBLY table.
12758 * reflection.c (mono_image_build_metadata): Avoid using the same loop
12759 variable in the inner and outer loops.
12761 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
12763 * metadata.h (mono_metadata_make_token): Put parentheses around macro
12766 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12768 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
12769 icalls. Instead, do everything in managed code. This is needed since
12770 it is hard to restore the original domain etc. in unmanaged code in the
12771 presence of undeniable exceptions.
12773 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
12774 New icalls to push and pop appdomain refs.
12776 2003-10-31 Martin Baulig <martin@ximian.com>
12778 * class.c (inflate_generic_type): Renamed to
12779 mono_class_inflate_generic_type() and made it public.
12781 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12784 * loader.c (mono_field_from_memberref): Also set the retklass for
12787 * fielder.c (mono_image_get_inflated_field_token): New static
12788 method; creates a metadata token for an inflated field.
12789 (mono_image_create_token, fixup_method): Added support for
12790 "MonoInflatedField".
12791 (fieldbuilder_to_mono_class_field): New static function.
12792 (mono_reflection_inflate_field): New public function.
12795 (MonoReflectionGenericInst): Added `MonoArray *fields'.
12796 (MonoReflectionInflatedField): New typedef.
12798 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
12800 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12801 for Solaris and other platforms without s6_addr16
12803 2003-10-30 Martin Baulig <martin@ximian.com>
12805 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12806 argument instead of two.
12807 (mono_class_inflate_generic_signature): Likewise.
12808 (inflate_generic_header): Likewise.
12809 (mono_class_inflate_generic_method): Likewise. In addition, if
12810 `ginst->klass' is set, it becomes the new `method->klass'.
12812 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12815 * reflection.c (encode_generic_method_sig): Write a 0xa as the
12816 first byte. [FIXME]
12817 (method_encode_methodspec): If we have generic parameters, create
12818 a MethodSpec instead of a MethodRef.
12819 (fixup_method): Added support for "MonoInflatedMethod" and
12820 "MonoInflatedCtor".
12821 (mono_image_create_token): Added support for "MonoInflatedMethod"
12822 and "MonoInflatedCtor".
12823 (inflated_method_get_object): New static function; returns a
12824 managed "System.Reflection.MonoInflatedMethod" object.
12825 (mono_reflection_bind_generic_method_parameters): Return a
12826 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12827 (mono_reflection_inflate_method_or_ctor): Likewise.
12828 (mono_image_get_generic_method_param_info): Initialize unused
12830 (mono_image_get_generic_param_info): Likewise.
12832 * reflection.h (MonoReflectionInflatedMethod): New public
12833 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
12834 "S.R.MonoInflatedCtor" classes.
12836 * loader.c (method_from_memberref): If we're a TypeSpec and it
12837 resolves to a generic instance, inflate the method.
12839 2003-10-28 Dick Porter <dick@ximian.com>
12841 * object.c (mono_runtime_run_main): Convert command-line arguments
12842 into utf8, falling back to the user's locale encoding to do so.
12844 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
12846 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12849 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12851 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12852 up icalls at method definition time. Partially fixes #33569.
12854 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
12856 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12857 marshalling of arrays. Fixes #50116.
12859 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12861 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12862 points to a vtable in the dying appdomain.
12864 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12865 listeners into unmanaged code inside the lock.
12867 * object.c (mono_class_vtable): Turn off typed allocation in non-root
12868 domains and add some comments.
12870 2003-10-25 Martin Baulig <martin@ximian.com>
12872 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12874 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12876 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12877 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12878 currently parsing. Create the generic class and store it in
12879 `generic_inst->klass' before parsing the type arguments. This is
12880 required to support "recursive" definitions; see mcs/tests/gen-23.cs
12882 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12883 to support recursive typespec entries.
12885 * class.c (mono_class_setup_parent): If our parent is a generic
12886 instance, we may get called before it has its name set.
12887 (mono_class_from_generic): Splitted into
12888 mono_class_create_from_generic() and mono_class_initialize_generic().
12890 2003-10-25 Martin Baulig <martin@ximian.com>
12892 * icall.c (ves_icall_Type_BindGenericParameters): Return a
12893 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12894 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12895 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12897 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12898 (create_typespec): Likewise.
12899 (mono_reflection_bind_generic_parameters): Return a
12900 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12901 (mono_reflection_inflate_method_or_ctor): New public function.
12903 * reflection.h (MonoReflectionGenericInst): New typedef.
12905 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
12907 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12908 inside the domain lock. Fixes #49993.
12910 * object.c (mono_class_vtable): When typed allocation is used,
12911 allocate vtables in the GC heap instead of in the mempool, since the
12912 vtables contain GC descriptors which are used by the collector even
12913 after the domain owning the mempool is unloaded.
12915 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12917 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12918 reflect what it does. Also invalidate mempools instead of freeing
12919 them if a define is set.
12921 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12924 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12925 hold the finalizable objects in this domain.
12927 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12930 * appdomain.c (mono_domain_set): New function to set the current
12931 appdomain, but only if it is not being unloaded.
12933 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12934 appdomain which is being unloaded.
12936 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12937 unloading of the root appdomain.
12939 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12940 icall to execute a method in another appdomain. Intended as a
12941 replacement for InternalSetDomain, which can confuse the code
12942 generation in the JIT.
12944 * appdomain.c (mono_domain_is_unloading): New function to determine
12945 whenever an appdomain is unloading.
12947 * appdomain.c (mono_domain_unload): New function to correctly unload
12950 * assembly.c (mono_assembly_load_references): Check that an assembly
12951 does not references itself.
12953 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12954 domain manually, it asks the finalizer thread to do it, then waits for
12955 the result. Also added a timeout.
12957 * icall.c: Register the new icalls.
12959 * threads.h threads.c: Export the mono_gc_stop_world and
12960 mono_gc_start_world functions.
12962 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
12963 function to fill out the mempool with 0x2a.
12965 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
12967 * reflection.h (MonoReflectionMethodAux): New structure to store
12968 information which is rarely used, thus is not in the MonoMethod
12971 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12972 store the aux info.
12974 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12975 and marshalling info into the aux structure.
12977 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12978 from the aux structure.
12980 * loader.c (mono_method_get_param_names): Retrieve the param names from
12983 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
12985 * exception.h exception.c: Add AppDomainUnloadedException && fix
12988 2003-10-21 Dick Porter <dick@ximian.com>
12991 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12992 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12994 2003-10-21 Martin Baulig <martin@ximian.com>
12996 * reflection.c (mono_reflection_bind_generic_parameters):
12997 `klass->parent' is NULL for interfaces.
12999 2003-10-21 Martin Baulig <martin@ximian.com>
13001 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13003 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
13005 * exception.c (mono_exception_from_name_msg): New helper function for
13006 creating exceptions and initializing their message field.
13008 * exception.c: Simplify functions using the new helper.
13010 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
13013 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
13014 mono_raise_exception, since otherwise gcc doesn't generate the function
13015 epilog for raise_exception, confusing the stack unwinding in the JIT.
13018 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
13019 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
13022 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13024 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
13027 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
13029 * icall.c: Removed GetUninitializedObject method because
13030 AllocateUninitializedClassInstance does the same.
13032 2003-10-18 Martin Baulig <martin@ximian.com>
13034 * class.c (inflate_generic_signature): Renamed to
13035 mono_class_inflate_generic_signature() and made it public.
13036 (my_mono_class_from_generic_parameter): New static function; if we
13037 don't already have the generic parameter's MonoClass, create a
13038 very simple one which is just used internally in the runtime and
13039 not passed back to managed code.
13041 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
13043 * metadata.h (MonoMethodSignature): Moved the
13044 `MonoGenericParam *gen_params' to the MonoMethodHeader.
13045 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
13047 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
13048 ves_icall_MonoMethod_GetGenericArguments(); this is now an
13049 interncall on the MonoMethod class, not on MethodInfo.
13050 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
13051 calling mono_reflection_bind_generic_method_parameters() directly.
13053 * loader.c (mono_method_get_signature): If this is a MethodSpec;
13054 return the already computed `method->signature'.
13055 (method_from_methodspec): New static function to load a method
13056 from a MethodSpec entry.
13057 (mono_get_method_from_token): Call the new method_from_methodspec()
13058 for MethodSpec tokens.
13059 (mono_get_method_from_token): If we're a generic method, load the
13062 * reflection.c (mono_image_get_memberref_token): Allow
13063 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
13065 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
13066 (mono_image_create_token): First check whether it's a generic
13067 method (so we'd need to create a MethodSpec), then do the other
13069 (mono_reflection_bind_generic_method_parameters): Return a
13070 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
13071 called directly from the interncall.
13073 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
13075 * reflection.c (load_public_key): Move loading of the public key
13078 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
13080 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
13083 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
13084 culture, hash_alg and public_key. Fixes #49555.
13086 2003-10-17 Martin Baulig <martin@ximian.com>
13088 * class.h (MonoGenericInst): Moved this declaration here and added
13089 `MonoMethod *generic_method'.
13092 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
13093 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
13095 * metadata.c (mono_metadata_type_equal): Two types of
13096 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
13097 index; ie. don't compare the address of the `MonoGenericParam'
13099 (mono_metadata_load_generic_params): Removed the `MonoMethod
13102 * metadata.h (MonoGenericInst): Moved declaration to class.h.
13103 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
13105 * reflection.c (method_encode_signature): Encode the number of
13106 generic parameters.
13107 (encode_generic_method_sig): New static function.
13108 (method_encode_methodspec): New static function; creates an entry
13109 in the MethodSpec table for a generic method.
13110 (mono_image_get_methodspec_token): New static function.
13111 (mono_image_create_token): Call mono_image_get_methodspec_token()
13112 for generic methods.
13113 (mono_reflection_bind_generic_method_parameters): New public
13114 function. Instantiates a generic method.
13116 2003-10-16 Martin Baulig <martin@ximian.com>
13118 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
13119 *gen_params' here from MonoMethodHeader.
13121 * metadata.c (mono_metadata_parse_method_signature): If we have
13122 generic parameters, initialize `method->gen_params' and then set
13123 the correct `type->data.generic_param' in all the parameters.
13125 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
13127 * threads.c (mono_threads_get_default_stacksize): New function to
13128 return the default stacksize.
13130 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
13131 termination of the finalizer thread, since the previous method had
13132 race conditions. Fixes #49628.
13134 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
13135 as for the other managed threads.
13137 2003-10-16 Martin Baulig <martin@ximian.com>
13139 * class.c (inflate_generic_signature): Copy `generic_param_count'
13142 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
13145 * metadata.c (mono_metadata_parse_method_signature): Actually set
13146 the `method->generic_param_count' here.
13147 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
13149 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
13151 * object.h: Add a new field to TypedRef to simplify the implementation
13152 of the REFANY opcodes in the JIT.
13154 * icall.c: Make use of the new field.
13156 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
13159 2003-10-15 Martin Baulig <martin@ximian.com>
13161 * class.c (mono_class_from_gen_param): Renamed to
13162 mono_class_from_generic_parameter() and moved most of the
13163 functionality from mono_reflection_define_generic_parameter()
13164 here; ie. we create a "real" class here.
13165 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
13166 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
13167 previously been called.
13169 * class.h (MonoGenericParam): Moved the declaration of this struct
13170 here from metadata.h and added `MonoMethod *method'.
13172 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
13175 * loader.c (mono_get_method_from_token): If we have any generic
13176 parameters, call mono_metadata_load_generic_params() to read them
13177 from the MONO_TABLE_GENERICPAR.
13179 * metadata.c (mono_metadata_load_generic_params): Added
13180 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
13182 * metadata.h (MonoMethodSignature): Replaced
13183 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
13184 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
13186 * reflection.c (mono_reflection_define_generic_parameter): Moved
13187 most of the functionality into the new
13188 mono_class_from_generic_parameter(); set the `method' field if
13189 we're a method parameter.
13191 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
13193 * marshal.c (emit_struct_conv): if native size is 0
13196 2003-10-14 Martin Baulig <martin@ximian.com>
13198 * icall.c: The generics API has changed in the spec since it was
13199 added to System.Type; these modifications make it match the spec
13201 (ves_icall_Type_GetGenericParameters): Renamed to
13202 `ves_icall_Type_GetGenericArguments'.
13203 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
13204 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
13205 `ves_icall_MonoType_get_HasGenericArguments'.
13206 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
13207 `ves_icall_MonoType_get_IsGenericParameter'.
13208 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
13209 this is no interncall anymore.
13210 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
13211 `ves_icall_TypeBuilder_get_IsGenericParameter'.
13213 2003-10-14 Martin Baulig <martin@ximian.com>
13215 * reflection.c (mono_reflection_bind_generic_parameters): Also
13216 inflate generic methods if we're reading the class from IL.
13218 2003-10-13 Martin Baulig <martin@ximian.com>
13220 * reflection.c (mono_reflection_define_generic_parameter): This
13221 method isn't called directly from the icall anymore; take a
13222 `MonoReflectionAssemblyBuilder *' so we can use this for type and
13223 method generic parameters.
13224 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
13225 (method_builder_encode_signature): Encode generic parameters.
13226 (mono_image_get_method_info): Write generic params to the
13227 MONO_TABLE_GENERICPARAM table.
13229 * reflection.h (MonoReflectionMethodBuilder): Added
13230 `MonoArray *generic_params'.
13232 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
13234 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
13235 wrapper for mono_reflection_define_generic_parameter().
13236 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
13238 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
13240 * marshal.h: Add missing function to fix build.
13242 * marshal.c (mono_marshal_get_native_wrapper): Add support for
13243 the SetLastError pinvoke attribute.
13245 * marshal.c (mono_marshal_set_last_error): New helper function called
13246 by the generated code.
13248 * marshal.c (mono_mb_emit_branch): New helper function.
13250 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
13252 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13253 classes as parameters and return values of delegates. Fixes #29256.
13255 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
13257 * locales.c: use gint32 in non HAVE_ICU case
13259 2003-10-11 Martin Baulig <martin@ximian.com>
13261 * mono-debug.c (mono_debug_add_method): Added a workaround for
13264 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
13266 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
13267 delegates passed to native code must use the STDCALL calling
13268 convention. Fixes #35987.
13270 2003-10-10 Martin Baulig <martin@ximian.com>
13272 * class.c (inflate_generic_type): If we're inflating for a generic
13273 type instance (and not for a generic method), return
13274 MONO_TYPE_MVAR unchanged.
13276 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13278 * string-icalls.c: Join ignores null strings in the source array.
13279 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
13280 * threads.c: GetAvailableTheads is slightly more accurate.
13282 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
13284 * threads.h threads.c : add mono_threads_set_default_stacksize
13285 and pass default to CreateThread calls.
13287 2003-10-09 Dick Porter <dick@ximian.com>
13291 * locales.c: Internal calls for constructing CultureInfo and
13292 related objects from libicu (if its available.)
13294 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
13296 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
13298 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13300 * threadpool.c: added an argument to async_invoke_thread that is the
13301 item to process, pass the MonoAsyncResult to the thread start function
13302 when creating a new thread. This way we don't need to acquire any lock
13303 when we're creating a new thread. Readded a semaphore for faster
13304 response times (instead of that Sleep i added).
13306 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
13308 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13309 get daylight change dates better on Windows, fix handling
13310 of platforms without tm_gmtoff.
13312 2003-10-06 Martin Baulig <martin@ximian.com>
13314 * class.c (inflate_generic_method): Renamed to
13315 mono_class_inflate_generic_method() and made public.
13316 (mono_class_init): Don't inflate the generic methods here.
13317 (mono_class_from_generic): Added `gboolean inflate_methods'
13318 argument. Inflate the methods here.
13320 * loader.c (mono_method_get_param_names): Ignore instances of
13321 generic types for the moment.
13323 * reflection.c (fixup_method): Added support for inflated methods.
13324 (mono_image_create_token): Use mono_image_get_methodref_token()
13325 for inflated methods.
13326 (mono_custom_attrs_from_param): Ignore instances of generic types
13328 (mono_reflection_bind_generic_parameters): New public function.
13329 Moved all the functionality from
13330 ves_icall_Type_BindGenericParameters() here and added support for
13332 (mono_reflection_define_generic_parameter): Initialize
13333 `klass->methods' here.
13335 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
13336 functionality into mono_reflection_define_generic_parameter().
13337 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
13338 TypeBuilder, return that TypeBuilder.
13340 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13342 * appdomain.c: removed mono_delegate_semaphore.
13345 (mono_thread_pool_add): moved hash table creation inside and the thread
13346 creation outside of the critical region.
13347 (mono_thread_pool_finish): removed obsolete code.
13348 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
13349 continue or exit the thread depending on the queue.
13351 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
13353 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
13354 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
13355 handle more bool marshalling options
13357 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
13359 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
13360 arrays of structs. Also add a more descriptive error message when
13361 a structure member is marshalled as LPArray.
13363 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
13365 * marshal.c (mono_marshal_get_native_wrapper): Add support for
13366 marshalling arrays of complex types. Fixes #29098. Also remove an
13367 usused and incomplete function.
13369 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13371 * gc.c: report heap_size - free_bytes as total memory allocated
13374 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
13376 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
13377 fix timezone handling problems on Windows.
13379 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
13380 asserts when the year is outside the range handled by ms the functions.
13382 * class.c (setup_interface_offsets): If the class is an interface,
13383 fill out its interface_offsets slot.
13385 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13387 * threadpool.c: mark threadpool threads as background.
13389 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
13391 * decimal.c - define DECINLINE to nothing if not using GCC
13393 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
13395 * assembly.c: More refcount fixes.
13397 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13399 * string-icalls.c: if we're not trimming, return the same string.
13400 When not splitting, don't create a new string.
13402 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13405 (mono_image_open): increment the ref_count inside the critical section.
13407 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
13409 * image.c (mono_image_open): Fix reference counting bug.
13411 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
13413 * marshal.c (mono_marshal_type_size) struct alignment changed for
13414 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
13415 64bits. Avoid leak in mono_marshal_get_native_wrapper when
13416 mono_lookup_pinvoke_call throws.
13418 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
13420 * reflection.c (mono_reflection_parse_type): Fix #49114.
13422 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
13423 temporary workaround for cygwin header problem.
13425 * object.c (mono_object_isinst): Synchronize this with the code
13426 generated by the JIT for casts.
13428 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
13430 * reflection.c (encode_type): Fix #38332.
13432 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
13434 * marshal.c (mono_marshal_method_from_wrapper): New function to return
13435 the original method from the wrapper method.
13437 2003-09-25 Martin Baulig <martin@ximian.com>
13439 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
13440 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
13441 (ves_icall_Type_get_IsGenericInstance): New interncall.
13443 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
13445 * object.c: fix cast warning in big endian code.
13447 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
13449 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
13451 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13453 * assembly.c: don't call check_env from mono_assembly_load. It's
13454 already done once in mono_assemblies_init and may cause headaches when
13455 multiple threads are loading assemblies.
13457 2003-09-19 Martin Baulig <martin@ximian.com>
13459 * reflection.c (mono_reflection_define_generic_parameter): Don't
13460 allocate `klass->methods', set `klass->flags' to
13461 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13463 2003-09-18 Martin Baulig <martin@ximian.com>
13465 * class.c (mono_class_init): Don't create `class->methods' if it's
13466 already initialized.
13468 * metadata.c (mono_metadata_load_generic_params): Make this
13471 * reflection.c (mono_reflection_define_generic_parameter): Set
13472 parent class and interfaces from the constraints.
13474 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13475 to keep this struct in sync with the declaration in TypeBuilder.cs.
13477 2003-09-17 Martin Baulig <martin@ximian.com>
13479 * metadata.h (MonoType): Replaced the data's `int type_param'
13480 field with `MonoGenericParam *generic_param'.
13481 (MonoGenericParam): Added `MonoClass *klass'.
13483 * class.c (mono_class_from_gen_param): Removed the
13484 `MonoImage *image' and `int type_num' arguments.
13486 * metadata.c (mono_metadata_parse_generic_param): New static
13487 method; creates a MonoGenericParam which just contains the index.
13488 (do_mono_metadata_parse_type): Call
13489 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13492 * reflection.c (mono_image_typedef_or_ref): Generic type
13493 parameters may be in the same assembly, but never use a typedef
13495 (mono_reflection_define_generic_parameter): We're now creating a
13496 "real" class for the type parameter; it's now safe to call
13497 mono_class_from_mono_type() on the class'es type, it'll do the
13500 2003-09-16 Martin Baulig <martin@ximian.com>
13502 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13503 `symfile->range_entry_size' and `symfile->class_entry_size' here;
13504 the `symfile' data structure must be fully initialized before it
13505 gets added to the table.
13507 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
13509 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13511 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13512 class init trampolines.
13514 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
13516 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13517 to the built-in profiler to turn off time and allocation profiling
13520 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
13522 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13525 * debug-helpers.c (mono_method_full_name): Print the wrapper type
13526 in human readable form.
13528 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
13530 * reflection.c icall.c: Fixed warnings.
13532 * image.c (load_class_names): Use a temporary hash table to hold the
13533 namespaces in order to avoid doing many string comparisons.
13535 * image.h: Fix typo.
13537 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13538 Pass NULL instead of g_direct_equal to the GHashTable constructor
13539 since the NULL case is short-circuited inside g_hash_table_lookup,
13540 leading to better performance.
13542 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13543 obtain the first custom attribute for a given index. Depends on the
13544 CustomAttribute table being sorted by the parent field.
13546 * reflection.c (mono_custom_attrs_from_index): Use the new function
13547 for better performance.
13549 2003-09-07 Martin Baulig <martin@ximian.com>
13551 * class.c (mono_class_init): If we're a generic instance, inflate
13552 all our methods instead of loading them from the image.
13553 (mono_class_from_generic): Set `class->methods = gklass->methods'.
13555 2003-09-07 Martin Baulig <martin@ximian.com>
13557 * mono-debug-debugger.c: Added support for constructors.
13559 2003-09-06 Martin Baulig <martin@ximian.com>
13561 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13564 * reflection.c (mono_reflection_setup_generic_class): Call
13565 ensure_runtime_vtable() to create the vtable.
13567 2003-09-05 Martin Baulig <martin@ximian.com>
13569 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13572 2003-09-04 Martin Baulig <martin@ximian.com>
13574 * reflection.c (mono_reflection_define_generic_parameter): Generic
13575 parameters start with zero.
13577 2003-09-04 Martin Baulig <martin@ximian.com>
13579 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13581 * reflection.h (MonoReflectionGenericParam): New typedef.
13582 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13583 the generic parameters from the managed TypeBuilder.
13585 * reflection.c (mono_reflection_define_generic_parameter): New function.
13586 (mono_reflection_create_runtime_class): Encode generic parameters.
13587 (mono_reflection_setup_generic_class): New function; this is
13588 called after adding adding all generic params to the TypeBuilder.
13589 (encode_type): Added MONO_TYPE_VAR.
13591 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
13593 * class.h class.c (mono_class_needs_cctor_run): Moved this method
13596 * assembly.h assembly.c: Moved the AOT loading code into an assembly
13599 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
13601 * reflection.h reflection.c class.h class.c: Delete duplicate
13602 definition of mono_type_get_name () from reflection.c and export the
13605 * class.c: Class loading fixes from Bernie Solomon
13606 (bernard@ugsolutions.com).
13608 * reflection.c: Endianness fixes from Bernie Solomon
13609 (bernard@ugsolutions.com).
13611 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
13613 * assembly.h assembly.c: Define a file format version for AOT
13616 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13618 * appdomain.h (MonoJitInfo): New field to determine whenever the
13619 code is domain neutral.
13621 2003-08-31 Miguel de Icaza <miguel@ximian.com>
13623 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13625 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
13627 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
13628 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13629 Avoid caching the result since strings must be domain specific. Fixes
13632 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
13634 * marshal.c (mono_marshal_init): Make this callable multiple times
13635 since it is hard to find a correct place to call it.
13637 * object.c (mono_runtime_class_init): Execute static constructors in
13638 the correct appdomain.
13640 * image.c (build_guid_table): Handle the case when multiple images have
13643 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13645 * icall.c: added a couple of icalls for System.Web.
13647 2003-08-28 Martin Baulig <martin@ximian.com>
13649 * icall.c (ves_icall_Type_BindGenericParameters): Use
13650 `klass->generic_inst' instead of `&klass->byval_arg' in the
13651 mono_type_get_object() call. The returned type must be
13652 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13654 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
13658 * object.c (mono_class_proxy_vtable): Make it thread safe.
13660 * pedump.c: Fix warning.
13662 * object.c appdomain.h: Get rid of metadata_section.
13663 It is no longer needed and it was causing deadlocks with domain->lock.
13665 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13667 2003-08-26 Martin Baulig <martin@ximian.com>
13669 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13671 2003-08-26 Martin Baulig <martin@ximian.com>
13673 * pedump.c (main): Call mono_metadata_init(),
13674 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13675 and mono_loader_init().
13677 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
13679 * loader.h: Add missing include to fix build.
13681 * image.h: mono_image_load_references is no more.
13683 * assembly.c: Reworked assembly loading to make it really thread safe.
13684 After these changes, the assembly returned by mono_assembly_open is
13685 fully initialized, i.e. all its references assemblies are loaded.
13687 * assembly.c (mono_image_load_references): Renamed to
13688 mono_assembly_load_references, and made private, since clients no
13689 longer need to call it.
13691 * class.c: Removed calls to mono_assembly_load_references, since it was
13692 a source of deadlocks.
13694 * loader.h loader.c class.h class.c: Protect data structures using a
13695 new lock, the loader lock.
13697 * class.c (mono_class_setup_vtable): Create temporary hash tables and
13698 GPtrArrays only when needed.
13700 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
13701 into empty structures by mcs. Fixes pinvoke7.cs.
13703 * domain.c (mono_init): Call a new initialization function.
13705 * appdomain.c (mono_runtime_init): Call the new initializer function
13706 of the marshal module.
13708 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13709 inserted into empty structures by mcs. Fixes pinvoke7.cs.
13711 * marshal.h marshal.c: Added locks around the wrapper caches to make
13712 this module thread safe.
13714 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13715 this argument. Fixes pinvoke1.exe.
13717 2003-08-25 Lluis Sanchez <lluis@ximian.com>
13719 * object.h: Added call_type field to MonoMethodMessage and the corresponding
13720 enumeration of values. Removed fields to store remote call output values in
13721 MonoAsyncResult. Not needed any more.
13722 * object.c: Initialize call_type and async_result fields in mono_message_init.
13723 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13724 dispatching the message.
13725 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13726 async call to finish. To do it use a message with EndInvoke call type.
13728 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
13730 * loader.h loader.c (mono_method_hash_marhal_info): New function which
13731 determines whenever a method has marshalling info.
13733 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13735 * assembly.c: fix the build on windows.
13737 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13739 * object.cs: Fixed bug #47785.
13741 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13743 * string-icalls.c (StringReplace): If their are no occurances of
13744 the old string found return a reference to the supplied
13745 string. This saves some memory and matches MS behavoir.
13747 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13749 * socket-io.c: fixed compilation for systems that define AF_INET6
13750 and don't define SOL_IP/SOL_IPV6.
13752 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
13754 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13755 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13757 * rawbuffer.c rawbuffer.h: Make this module thread safe.
13759 * domain.c: Make this module thread safe.
13761 * domain.c (mono_init): Call new initialization function.
13763 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13764 reference types too. Fixes #38812.
13766 * image.c (mono_image_init): Fixed warnings.
13768 * class.c (mono_class_from_typeref): Handle assembly load failure
13771 * appdomain.c (add_assemblies_to_domain): Handle the case when
13772 the references of an assembly are not yet loaded.
13774 * metadata.c image.c assembly.c: Moved initialization of global
13775 variables to a separate function called at startup since lazy
13776 initialization of these variables is not thread safe.
13778 * image.c assembly.c: Made this module thread safe by adding locks in
13779 the appropriate places.
13781 * domain.c (mono_init): Call the new initialization functions of the
13784 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
13786 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13787 make a direct call. It is proxy's work to make the call asynchronous.
13788 mono_delegate_end_invoke(): If the targe is a proxy, just collect
13790 * object.cs: mono_method_call_message_new(): read AsyncResult and
13791 state object from parameters list, if this info is requested.
13792 * object.h: Added fields to store remote call output values in
13793 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13795 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13797 * object.h: add needed fields to MonoThread.
13798 * threads.c, threads.h: allow registering a function to cleanup data
13799 allocated per thread by the JIT.
13801 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13803 * loader.h: portability fix by Bernie Solomon
13804 * <bernard@ugsolutions.com>.
13806 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
13808 * reflection.h reflection.c (mono_param_get_objects): Changed this to
13809 return a MonoArray. This simplifies the code and also ensures that
13810 the cache allways contains an object reference as a value.
13812 * icall.c (ves_icall_get_parameter_info): Simplified using the new
13815 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13817 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13818 fixes a problem with byte ordering when getting the address family for
13821 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
13823 * .cvsignore: Added monosn.
13825 * reflection.h reflection.c loader.c: Added support for parameter
13826 marshalling to dynamically created types. Fixes #47295.
13828 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13830 * rand.c: remove useless warnings.
13832 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13834 * class.c: implemented ldtoken for methods and fieldrefs.
13836 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13838 * threadpool.c: when mono_async_invoke was called, no one took care of
13839 monitoring the queue. So if the method invoked took some time and we
13840 got new async invoke requests after 500 ms (the thread created waited
13841 that long in WaitForSingleObject), the new async invoke was not called
13842 until the previous one finished.
13844 This is fixed now. Thanks to Totte for helping with it.
13846 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13848 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13850 2003-08-11 Martin Baulig <martin@ximian.com>
13852 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13854 2003-08-06 Martin Baulig <martin@ximian.com>
13856 * mono-debug-debugger.c: Added support for static fields,
13857 properties and methods.
13859 2003-08-06 Martin Baulig <martin@ximian.com>
13861 * mono-debug-debugger.c: Don't store the MonoString's vtable to
13862 make this work for applications with multiple application domains.
13864 2003-08-04 Martin Baulig <martin@ximian.com>
13866 * mono-debug-debugger.c: Completely reworked the type support; the
13867 most important thing is that we're now just using one single
13868 `MonoType' instance per type.
13870 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13872 * mono-endian.h, mono-endian.c, icall.c: Added icall
13873 ves_icall_System_Double_AssertEndianity to assert double word endianity
13874 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13876 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13878 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13879 support, icalls and fixes.
13881 2003-07-31 Miguel de Icaza <miguel@ximian.com>
13883 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13884 classes that are a punctuation character in .NET is not the same a
13887 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13889 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13891 2003-07-29 Miguel de Icaza <miguel@ximian.com>
13893 * icall.c: Add new MemCopy internalcall.
13894 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13895 Simplified code; It is not necessary to handle all the cases here,
13896 as the C# code takes care of it. Only handle the case of the name
13897 resource embedded into the assembly.
13899 Changed signature to return the data pointer and the size of the
13902 2003-07-26 Miguel de Icaza <miguel@ximian.com>
13904 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13905 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13907 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13909 * socket-io.c: ignore EINTR error in select.
13911 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13913 * class.h, class.c: removed unused subclasses field in MonoClass.
13915 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
13917 * icall.c: improve fix of get_base_definition(). If the parent class
13918 doesn't have the mehod, look at the parent of the parent.
13919 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13920 to check if a parameter is an in or out parameter
13921 (PARAM_ATTRIBUTE_IN is not set by default).
13922 mono_method_return_message_restore(): Use mono_class_value_size to
13923 get the size of a value type. mono_type_stack_size (parameterType)
13924 does not return the correct value if parameterType is byRef.
13925 mono_load_remote_field(), mono_load_remote_field_new(),
13926 mono_store_remote_field(), mono_store_remote_field_new():
13927 raise exception if the remote call returns an exception.
13929 2003-07-28 Martin Baulig <martin@ximian.com>
13931 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13932 method. This is a wrapper around mono_runtime_invoke() which
13933 boxes the instance object if neccessary.
13935 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13937 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13938 metadata.h, row-indexes.h, verify.c: first cut of generics support.
13940 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13942 * icall.c: disable mcs bug workaround.
13944 2003-07-21 Miguel de Icaza <miguel@ximian.com>
13946 * object.c (mono_runtime_class_init): Take the metadata_section
13947 mutex before obtaining the domain mutex.
13949 * appdomain.h: Added definition of metadata_section mutex here.
13951 * object.c: define metadata_mutex here.
13953 2003-07-24 Ravi Pratap <ravi@ximian.com>
13955 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13958 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
13960 * reflection.c: Fix bug #46669
13962 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13967 * object.h: fill in the type name for TypeLoadException.
13969 2003-07-23 Ravi Pratap <ravi@ximian.com>
13971 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13972 relationship between TypeBuilders while compiling corlib) and bug
13973 45993 (Array types returned from the runtime while compiling
13974 corlib were from the loaded corlib).
13976 2003-07-22 Martin Baulig <martin@ximian.com>
13978 * mono-debug-debugger.c: Reworked the type support a bit more;
13979 distinguish between types and classes.
13981 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13983 * icall.c: add IsArrayImpl icall.
13985 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
13987 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13988 initializing real_size only once. Also fix bug #46602.
13990 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
13992 * object.c: Renamed mono_metadata_section to metadata_section.
13994 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
13996 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13997 empty array if the type is an array. Fixed.
13998 ves_icall_MonoMethod_get_base_definition: if the base method
13999 is abstract, get the MethodInfo from the list of methods of
14001 * reflection.c: ParameterInfo.PositionImpl should be zero-based
14002 and it was 1-based. Fixed in mono_param_get_objects.
14004 2003-07-20 Martin Baulig <martin@ximian.com>
14006 * mono-debug.h: Set version number to 31.
14007 (mono_debug_init): Added `MonoDomain *' argument.
14009 * mono-debug-debugger.c: Reworked the type support; explicitly
14010 tell the debugger about builtin types; pass the `klass' address to
14013 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
14015 * image.c: Allow new metadata tables to be loaded without a
14016 warning. Also update the warning message to give the new constant value.
14018 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14020 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
14021 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
14022 array type representation changes.
14024 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14026 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
14027 on Environment.Exit () call.
14029 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14031 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
14032 requires a matching corlib.
14034 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
14036 * Changelog: My editor decided to add a CR to each line. Sorry about that.
14037 Committed again without the CRs.
14039 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
14041 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
14042 getting it from the "this" socket instance. Did not work
14043 if the socket is a subclass of Socket.
14044 Also fixed bug #35371.
14046 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14048 * metadata.c: fixed size for TypedByRef.
14049 * loader.c: when searching for a method, consider the vararg amrker.
14050 * unicode.c, decimal.c: constify some arrays.
14052 2003-07-15 Dick Porter <dick@ximian.com>
14054 * socket-io.c: Fixed compilation for gcc < 3.2.
14056 Fixed compilation for machines that don't have AF_INET6 (thanks to
14057 Bernie Solomon <bernard@ugsolutions.com> for that part.)
14059 Fixed compile warnings.
14061 Fixed formatting and line endings.
14063 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
14066 * socket-io.c: Added IPv6 support.
14068 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
14070 * class.c (mono_class_is_assignable_from): New function to implement
14071 the is_assignable_from logic. Used by mono_object_isinst,
14072 Type::IsAssignableFrom () and the interpreter.
14074 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
14075 Object, even interfaces.
14077 * object.c (mono_object_isinst): Implement in terms of
14078 is_assignable_from.
14080 * icall.c (ves_icall_type_is_assignable_from): New icall.
14082 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
14084 * domain.c (foreach_domain): fix compiler warning.
14086 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
14088 * image.c (load_metadata_ptrs): use g_strndup because strndup is
14089 not available on all plattforms
14091 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
14093 * image.h image.c: Store the metadata version string in MonoImage.
14094 * icall.c: New icall to retrieve the image version.
14095 * reflection.c (create_dynamic_image): Fill in the image version field
14096 * reflection.c (build_compressed_metadata): Use the image version
14097 from the image structure.
14099 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14101 * appdomain.c: modified comment.
14102 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
14103 That will be its last iteration when mono_gc_cleanup is called from
14104 mono_runtime_cleanup and before the domain is unloaded.
14108 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
14110 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
14113 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14115 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
14116 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
14117 Bernie Solomon <bernard@ugsolutions.com>.
14119 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14121 * object.c, object.h: provide mono_object_new_fast() for faster
14122 allocation in some special cases.
14124 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14126 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
14127 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
14129 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14131 * threadpool.c: fix leaks.
14133 2003-07-01 Dick Porter <dick@ximian.com>
14135 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
14136 using MonoGHashTables. Fixes threadpool bug posted to list.
14138 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14140 * image.h, image.c: added support to load an assembly from a byte array.
14141 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
14142 assembly bundle support.
14144 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
14146 * threadpool.c (mono_thread_pool_add): keep a reference to the
14147 AsyncResult to prevent GC
14149 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14151 * class.c: leak fix.
14153 2003-06-25 Dick Porter <dick@ximian.com>
14155 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
14156 for the async object, the WaitHandle object will close the handle.
14159 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14161 * class.c: in mono_array_class_get (), lookup from the hash with the
14162 same type we insert: this works around a bug in
14163 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
14164 lluis. The real fix will have to wait for after the release.
14166 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14168 * icall.c: fix memory leak when getting type members.
14170 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14172 * reflection.c: added more pubtoken special cases.
14174 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14176 * class.c: handle field offset correctly when class size
14177 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
14179 2003-06-20 Martin Baulig <martin@ximian.com>
14181 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
14184 2003-06-20 Martin Baulig <martin@ximian.com>
14186 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
14188 2003-06-20 Martin Baulig <martin@ximian.com>
14190 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
14191 just distinguish between variables in registers and variables at
14192 an offset relative to a register.
14194 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14196 * icall.c: #ifdef out latest changes until mcs is fixed.
14198 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14200 * icall.c: return members in metadata order.
14202 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14204 * icall.c: avoid infinite loop in GetTimeZoneData.
14206 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14208 * icall.c: added Marshal.Prelink/All icalls.
14210 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14212 * object.c, object.h: fix warnings and do some overflow checking
14213 when creating arrays.
14215 2003-06-17 Dick Porter <dick@ximian.com>
14218 * file-io.c: File attributes need to be tweaked slightly when
14219 passed from the managed to the w32 world.
14221 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
14222 * profiler.h profiler-private.h profiler.c: Rework last patch
14223 based on suggestion by Paolo.
14225 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
14227 * profiler.h profiler-private.h profiler.c: Added infrastructure for
14228 instruction level coverage data collection.
14229 * profiler.h profiler.c (: Added new callback function which can be
14230 used by the profiler to limit which functions should have coverage
14232 * profiler.c (mono_profiler_load): Call g_module_build_path to
14233 generate the file name of the profiler library.
14235 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14237 * profiler.c, profiler.h, profiler-private.h: added basic block
14238 coverage profiling API.
14240 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
14242 * reflection.c (mono_reflection_create_runtime_class): Add support
14243 for events in dynamically generated code.
14245 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
14248 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14250 * icall.c: when getting timezone info, return reasonable values if we
14251 can't get the actual data.
14253 2003-06-14 Dick Porter <dick@ximian.com>
14255 * threads.c (start_wrapper): Remove the reference to the thread
14256 object in the TLS data, so the thread object can be finalized.
14257 This won't be reached if the thread threw an uncaught exception,
14258 so those thread handles will stay referenced :-( (This is due to
14259 missing support for scanning thread-specific data in the Boehm GC
14260 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
14262 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
14264 * reflection.c: ensure streams and tables are first allocated with
14265 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
14267 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14269 * icall.c: fixed GetElementType for byrefs (bug# 44792).
14271 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
14273 * reflection.c (mono_reflection_create_runtime_class): Add support for
14274 properties to dynamically created classes.
14275 * reflection.c: Fix a few places where non-MonoObjects were inserted
14276 into the tokens hashtable.
14278 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14280 * object.c: some support to handle out of memory exceptions.
14282 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
14284 * marshal.c (mono_marshal_get_native_wrapper): support reference
14287 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14289 * object.h, object.c: more portability stuff from Bernie Solomon.
14290 Unexport mono_object_allocate(). Added mono_object_unbox ().
14291 Set exitcode when an unhandled exception is thrown.
14293 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
14295 * marshal.c (mono_marshal_get_native_wrapper): use custom
14296 marshaler for return types.
14298 2003-06-10 Dick Porter <dick@ximian.com>
14300 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
14301 ip_mreq is available
14303 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14305 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
14306 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
14307 by Bernie Solomon <bernard@ugsolutions.com>.
14309 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
14311 * gc.c (mono_gc_init): Avoid error message on shutdown when
14312 GC_DONT_GC=1 is used.
14314 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
14315 New icall to return the GUID of a module.
14317 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14319 * class.c: ensure instance size always includes the parent's size
14320 even whem class size is set explicitly (fixes bug#44294).
14322 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14324 * profiler.h, profiler.c: made the simple profiler thread-safe,
14325 get more accurate timing info. Allow the loading of an
14326 externally-developed profiler module.
14328 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
14330 * marshal.c (mono_marshal_get_native_wrapper): improved
14331 class/byref arguments.
14332 (mono_marshal_get_native_wrapper): better string marshaling support.
14334 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14336 * class.c: ensure .pack and .size are handled correctly and
14337 simplified layout of static fields.
14339 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
14342 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
14344 * loader.c (mono_lookup_pinvoke_call): look for modules in the
14345 current directory (fix bug 44008)
14347 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
14349 * marshal.c (mono_marshal_get_native_wrapper): started support for
14351 (mono_delegate_to_ftnptr): consider marshalling specifications
14353 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14355 * reflection.c, reflection.h: emit custom marshal info.
14357 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14359 * object.c: free the GError.
14360 * icall.c: added CloseEvent_internal.
14362 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
14365 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
14367 * loader.c (mono_method_get_signature): Add support for dynamic
14370 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14372 * reflection.c: fixed bug #43905.
14374 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14376 * class.c, domain.c, icall.c, metadata.h, object.h: support for
14377 handling TypedReference and ArgIterator.
14378 * loader.c, loader.h: added function to get signature at call site.
14380 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14382 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
14383 data readonly. Buglets and warning fixes. Some MethodSpec support.
14385 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14387 * class.h, class.c, object.c: remove relative numbering support.
14389 2003-05-26 Miguel de Icaza <miguel@ximian.com>
14391 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
14392 free the string, until we get a chance to fix Gtk#
14394 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14396 * marshal.c: revert last patch.
14398 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14400 * icall.c: updates for new mono_class_vtable() not calling
14401 the type constructor anymore.
14403 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14405 * object.h, object.c: separate vtable creation from type
14406 initialization. Make running the .cctor thread safe.
14408 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
14410 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
14412 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
14414 * loader.c (mono_get_method): consider calling convention
14416 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
14418 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
14419 to return the invisible global type for a module.
14421 * reflection.c (mono_image_build_metadata): Emit global fields too.
14423 2003-05-20 Peter Williams <peterw@ximian.com>
14425 * loader.c (mono_lookup_internal_call): Add a few newlines.
14427 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
14429 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
14432 * appdomain.c (set_domain_search_path): Recalculate search path when
14433 AppDomainSetup.PrivateBinPath changes.
14435 * object.c (mono_class_compute_gc_descriptor): It turns out some
14436 parts of the class libs (like System.Thread) holds pointers to
14437 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
14438 to treat native int a pointer type here.
14440 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
14442 * appdomain.h, domain.c: add hashtable for jump target resolution.
14444 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
14446 * reflection.h reflection.c icall.c: Added new icalls
14447 GetManifestResourceInfoInternal, GetModulesInternal and support
14450 2003-05-16 Dick Porter <dick@ximian.com>
14454 * file-io.c: Implement System.IO.MonoIO::GetTempPath
14456 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
14458 * object.c: mono_store_remote_field: little fix to previous patch.
14460 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14462 * class.c: add constructors to array classes.
14463 * icall.c: special case array construction for InternalInvoke (),
14465 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
14467 * class.h class.c reflection.c object.c: Added support for field
14468 defaults in dynamically generated classes.
14470 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14472 * reflection.c: properly encode charset for ddlimport.
14474 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14476 * threads.c: allow compiling without GC.
14478 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14480 * appdomain.h, object.c, object.h, threads.c, threads.h: added
14481 handling of thread static data.
14483 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14485 * reflection.h, reflection.c: added mono_custom_attrs_free ().
14487 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
14489 * class.c (mono_array_class_get): always set the serializable flags
14490 (mono_array_class_get): always set the SEALED attribute for array types
14492 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
14494 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14495 attributes (fix for bug 42021).
14497 2003-05-12 Dick Porter <dick@ximian.com>
14499 * gc.c: Don't run finalizers when the finalizer thread is
14500 finishing up, because the default domain has already been
14503 2003-05-11 Miguel de Icaza <miguel@ximian.com>
14505 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14506 value is null, we should throw an exception. This is slightly
14507 different than the other conventions used for the constructor.
14509 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14511 * socket-io.c: fixed windows build.
14513 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14515 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14517 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
14519 * object.c (mono_string_new_wrapper): Compatibility fix for MS
14522 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
14524 * class.c (mono_class_layout_fields): Add experimental GC aware
14525 auto layout facility. Requires class library changes to work correctly.
14527 (mono_class_setup_vtable): Avoid overriding explicit interface
14528 method implementations. Fixes iface3.exe test.
14530 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14532 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14533 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14535 * metadata.h: Add new type classification macro which determines
14536 whenever the type holds an object reference.
14538 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
14540 * marshal.c (mono_marshal_get_native_wrapper): cleanups
14542 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
14544 * gc.c (finalizer_thread): Work around a GC bug.
14546 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
14548 * marshal.c (emit_struct_conv): allow unions
14550 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14552 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
14554 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14556 2003-05-06 Martin Baulig <martin@ximian.com>
14558 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14560 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14563 (Select_internal): allow NULLs, don't create arrays if not needed.
14564 Coupled with Socket.cs changes.
14567 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14568 register a finalizer for it that will close the semaphore handle. This
14569 fixes the leak and make Lupus' test run with > 4080 loops.
14571 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
14573 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14574 Jerome Laban (bug #42287)
14576 2003-05-02 Martin Baulig <martin@ximian.com>
14578 * debug-mono-symfile.h
14579 (MonoSymbolFile): Moved declaration into mono-debug.h.
14580 (MonoDebugMethodJitInfo): Likewise.
14581 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14583 (_mono_debug_address_from_il_offset): Take a
14584 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14587 (MonoDebugDomainData): New struct.
14588 (mono_debug_get_domain_data): New function.
14589 (mono_debug_add_method): Take an additional `MonoDomain *'
14591 (mono_debug_source_location_from_address): Likewise.
14592 (mono_debug_il_offset_from_address): Likewise.
14593 (mono_debug_address_from_il_offset): Likewise.
14595 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14597 * reflection.c: one more check for null type in custom attrs.
14599 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14601 * reflection.c: avoid warning (comparison is always false due to limited
14602 range of data type).
14604 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14606 * icall.c: throw an exception in Type.GetField if the argument 'name'
14609 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14611 * reflection.c: fixed handling of enums in named arguments to custom
14612 attributes (bug #42123).
14614 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14616 * reflection.c: use the right array element type and handle
14617 a null for a Type argument, too.
14619 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14621 * reflection.c: handle arrays as arguments to custom attributes.
14623 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14625 * reflection.c: handle a string value in a custom attr
14626 ctor that takes an object.
14628 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
14630 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14633 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
14635 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14637 2003-04-27 Martin Baulig <martin@ximian.com>
14639 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14640 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14641 MONO_DEBUGGER_EVENT_BREAKPOINT.
14642 (mono_breakpoint_trampoline_code): Removed.
14643 (mono_debugger_event_handler): The last argument is now a
14645 (mono_debugger_insert_breakpoint_full): Removed the
14646 `use_trampoline' argument.
14647 (mono_debugger_method_has_breakpoint): Likewise.
14648 (mono_debugger_trampoline_breakpoint_callback): Renamed to
14649 mono_debugger_breakpoint_callback(); take the method and
14650 breakpoint number as arguments.
14652 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14654 * metadata.c: fix off by one when loading parameters attributes.
14656 2003-04-24 Martin Baulig <martin@ximian.com>
14658 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14660 2003-04-24 Martin Baulig <martin@ximian.com>
14662 * mono-debug-debugger.c: Moved all code which interacts with the
14663 Mono Debugger here.
14665 * debug-mono-symfile.c: This code now just deals with the symbol
14666 file itself, the debugger code is now in mono-debug-debugger.c.
14668 2003-04-23 Martin Baulig <martin@ximian.com>
14670 * mono-debug.c (mono_debug_source_location_from_il_offset):
14671 New method; like mono_debug_source_location_from_address(), but
14672 takes an IL offset instead of a machine address.
14674 2003-04-23 Martin Baulig <martin@ximian.com>
14676 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14677 `line' field; this is now computed by the debugger.
14679 2003-04-23 Martin Baulig <martin@ximian.com>
14681 * mono-debug.[ch]: New files. This is the new debugging interface.
14683 * mono-debug-debugger.[ch]: New files. Moved all code which
14684 interacts with the Mono Debugger here.
14686 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
14688 * domain.c (mono_init): initialize mono_defaults.monitor_class
14690 2003-04-21 Miguel de Icaza <miguel@ximian.com>
14692 * reflection.c (method_encode_code): Add a spicy exception to help
14693 future compiler authors.
14695 2003-04-21 Martin Baulig <martin@ximian.com>
14698 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14699 Make this work with relative pathnames; g_filename_to_uri() needs
14700 an absolute filename.
14702 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
14704 * icall.c: Track name changes in Object and ValueType.
14706 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
14708 * metadata.c (mono_type_stack_size): size should be a multiple of
14711 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14714 (internal_domain_finalize): moved into mono_domain_finalize. No need
14715 to create another thread because the finalizers will be run in the
14718 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14719 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14720 to be run (MS does this too).
14722 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
14724 * object.c (mono_class_compute_gc_descriptor): Update comment.
14726 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14728 * image.h: Add synchronized wrapper cache.
14730 * image.c (do_mono_image_open): Initialize cache.
14732 * reflection.c (create_dynamic_mono_image): Initialize cache.
14734 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14736 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14737 ves_icall_System_Buffer_ByteLengthInternal.
14739 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14741 * reflection.c: setup klass->nested_in earlier. Allow
14742 a dash in the assembly name.
14744 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
14746 * metadata.c (mono_type_to_unmanaged): dont access
14747 type->data.klass for MONO_TYPE_OBJECT
14748 (mono_type_to_unmanaged): consider System.Delegate class
14750 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14752 * class.c: just setup supertypes in the proper place instead of
14753 initializing the full element class for arrays.
14755 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14757 * class.c: ensure the element class of arrays is initialized.
14758 Setup the supertype info for array classes, too.
14760 2003-04-14 Miguel de Icaza <miguel@ximian.com>
14762 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14764 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14766 * Makefile.am: re-added -m option when running cygpath. This way,
14767 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14769 * mono-config.c: same codepath for locating mono config file for WIN32
14771 * assembly.c: if mono_assembly_setrootdir is called, don't override
14774 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14776 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14777 MONO_ASSEMBLIES variable.
14779 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14781 * icall.c: added Assembly::GetNamespaces() icall.
14783 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14785 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14787 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
14789 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14790 * object.c: fixed bug in the construction of vtable for proxies
14792 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
14794 * object.c (mono_array_new): Mark mono_array_new as an icall.
14796 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14798 * class.c: fixed test for public method when overriding interfaces.
14801 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14803 * appdomain.h, domain.c: added mono_domain_foreach() to
14804 be able to access the currently loaded appdomains.
14805 * object.c: make string interning work across sppdomains.
14806 Mark some functions for use as icalls.
14808 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
14810 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14812 * reflection.h reflection.c: Allocate long living data using
14813 GC_MALLOC_ATOMIC so the collector does not need to scan it.
14815 * reflection.c: Double the allocation size in streams instead of
14816 increasing it, to prevent unneccesary copying on large assemblies.
14818 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14819 creation if the assembly does not have the Run flag set.
14821 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14823 * class.h: avoid the C++ keywords in header files (Jerome Laban
14824 spotted and fixed this).
14826 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14829 (mono_unhandled_exception): fill in the arguments for the
14830 UnhandledException event. Only trigger that event for the default
14831 domain (as MS does).
14833 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
14835 * object.c: Improve typed allocation stuff based on suggestions from
14836 Paolo. Also turn it on if the GC library supports it.
14838 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14840 * object.c object.h class.h: Added experimental typed allocation
14841 facility using the interfaces in gc_gcj.h.
14843 * os/gc_wrapper.h: Added new include files.
14845 2003-04-03 Martin Baulig <martin@ximian.com>
14847 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14848 which is not yet enabled by default.
14850 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14852 (mono_gc_lock, mono_gc_unlock): New static functions.
14854 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14855 functions; stop/start the world for the garbage collector. This
14856 is using the windows API; we need to complete the SuspendThread()/
14857 ResumeThread() implementation in the io-layer to make this work on Unix.
14858 (mono_gc_push_all_stacks): New public function; tells the garbage
14859 collector about the stack pointers from all managed threads.
14861 2003-04-03 Martin Baulig <martin@ximian.com>
14863 * object.h (MonoThread): Added `gpointer stack_ptr'.
14865 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14867 2003-04-03 Martin Baulig <martin@ximian.com>
14869 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14871 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
14873 * reflection.c (typebuilder_setup_fields): Initialize field.first and
14876 2003-04-02 Miguel de Icaza <miguel@ximian.com>
14878 * loader.c (mono_lookup_internal_call): Report the corlib that is
14881 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
14883 * icall.c (ves_icall_type_GetTypeCode): fixed check for
14884 System.DBNull (it's class not valuetype).
14886 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14888 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
14889 if the array method was already assigned a token (fixes bug#40646).
14891 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
14893 * reflection.c (mono_reflection_get_type): Attempt type resolve even
14894 if no assembly is given.
14896 2003-04-01 Miguel de Icaza <miguel@ximian.com>
14898 * metadata.h: Added the new tables.
14900 * row-indexes.h: Added definitions for new tables.
14902 * metadata.c: Add schemas for new tables, and add support for
14903 computing the sizes of them.
14905 * class.c: Update for handling the new type cases.
14907 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
14909 * metadata.h (MONO_TYPE_IS_VOID): new macro
14911 2003-03-31 Martin Baulig <martin@ximian.com>
14913 * threads.h (MonoThreadCallbacks): Added `thread_created'.
14915 * threads.c (mono_thread_new_init): Call `thread_created' in the
14916 mono_thread_callbacks.
14918 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
14920 * loader.h: added marshalbyrefobject_class to mono_defaults
14921 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
14922 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14923 generation of output parameters.
14924 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14925 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14926 contextbound and the target object belongs to the context of the caller.
14927 * object.h: added context and unwrapped_server variables in MonoRealProxy.
14928 * object.c: Implemented support for interfaces and abstract classes
14929 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14930 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14932 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
14934 * class.h class.c (mono_class_is_subclass_of): New function.
14936 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14937 routines for most common case (calls from ArrayList::ToArray).
14939 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
14940 routine so programs which call Environment::Exit() can be profiled.
14942 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14943 Added MONO_ARCH_SAVE_REGS.
14945 * icall.c (ves_icall_type_is_subtype_of): Use new function.
14947 2003-03-29 Miguel de Icaza <miguel@ximian.com>
14949 * blob.h: Add a couple of new MonoType types definitions.
14951 * tabledefs.h: Add a couple of new call convs.
14953 2003-03-27 Zoltan Varga <vargaz@freemail.h>
14955 * reflection.h (MonoReflectionDynamicAssembly): track changes in
14956 the layout of the class.
14958 * reflection.c (alloc_table): double the size on overflow to avoid
14959 unnecessary copying.
14961 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14962 avoid filling out metadata tables and blobs. Also set mb->ilgen to
14963 null so it can be garbage collected.
14965 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
14967 * reflection.c (mono_reflection_get_type): Return the resolved type
14968 only if it is in the assembly we searched.
14970 * reflection.c (ensure_runtime_vtable): Initialize method slots.
14972 * class.c (mono_class_setup_vtable): Set the slot of the overriding
14975 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14978 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14979 the right one is 'file:///blah', but MS allows it.
14981 (mono_assembly_open): allow 'file://blah'
14983 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14985 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
14987 * socket-io.c: fixes bug #40310.
14989 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
14991 * reflection.c (mono_reflection_parse_type): handle deeply nested
14994 * reflection.c (mono_image_create_token): Use unique token values
14995 since they will be put into a hash table.
14997 * class.c (mono_class_setup_vtable): If a method occurs in more than
14998 one place in the vtable, and it gets overriden, then change the
14999 other occurances too.
15001 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
15002 object as return type.
15004 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
15006 * icall.c: Deleted "ToString" implementation for double and float
15007 because they are full implemented in managed code.
15009 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15011 * reflection.c, reflection.h: implemented and exported functions
15012 to retrieve info about custom attributes.
15014 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15016 * appdomain.c: moved Uri handling to assembly.c
15017 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
15018 work when using a file Uri in *nix and windows.
15020 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
15021 GetReferencedAssemblies.
15023 2003-03-18 Dick Porter <dick@ximian.com>
15025 * icall.c: Rename a couple of internal calls
15027 * threads.c: Set the thread state to Stopped when a thread exits.
15030 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
15032 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
15035 * object.c (mono_class_vtable): fix warning.
15037 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
15039 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
15041 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
15043 (method_encode_clauses): Create exception info structures in the right
15045 (mono_reflection_setup_internal_class): Initialize supertypes field.
15047 * class.c object.c: Handle interfaces which implement other interfaces
15050 * class.h class.c: Move the supertypes array initialization code into
15051 a separate function so it can be used for dynamic types too. Also call
15052 it earlier, in mono_class_init(), since it can be used before the
15053 type is initialized.
15055 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15059 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
15064 * object.c: remove warnings.
15066 2003-03-13 Martin Baulig <martin@ximian.com>
15068 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
15069 (MonoDebugLexicalBlockEntry): New types.
15071 * debug-mono-symfile.c
15072 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
15074 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15076 * process.c: ret can be any non-zero value accroding to MS doc.
15078 2003-03-07 Miguel de Icaza <miguel@ximian.com>
15080 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
15081 fixing a warning for a miss-used prototype, would have cause
15082 random memory corruption.
15084 2003-03-07 Martin Baulig <martin@ximian.com>
15086 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
15087 getting really annoying ....
15089 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
15091 * reflection.c (fixup_method): added support for array methods.
15093 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15095 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
15096 (pointed out by Michael Adams).
15098 2003-03-04 Dick Porter <dick@ximian.com>
15100 * icall.c: Temporarily reverted the Double and Single ToString()
15101 change, because it broke nunit.
15103 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
15105 * object.h, threads.h: make include files compatible with C++
15106 (patch by Jerome Laban <jlaban@wanadoo.fr>).
15108 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
15110 * icall.c: Erased ToString helper functions for Double and Single.
15111 Now, that implementations ar all in managed code (Double and Single
15114 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
15116 * appdomain.c: Added method for initializing the default context of
15117 a domain. Added internal call for getting the default context.
15118 * appdomain.h: Added context variable in MonoDomain struct.
15119 * domain.c: mono_domain_set also sets the default context of the domain
15120 * icall.c: Mapped internal method InternalGetDefaultContext.
15121 * object.c: mono_object_get_virtual_method returns always a remoting
15122 wrapper if the object is a transparent proxy.
15123 mono_runtime_invoke_array: when creating an object by calling the
15124 constructor, if the created object is a proxy, then the constructor should
15125 be called using the a remoting wrapper.
15127 2003-03-03 Dick Porter <dick@ximian.com>
15129 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
15130 variable so it compiles on solaris. Problem spotted by
15131 Christopher Taylor <ct@cs.clemson.edu>
15133 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15136 (get_info_from_assembly_name): don't leak value.
15139 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
15142 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15144 * assembly.c: export mono_image_load_references ().
15145 * class.c: handle function pointers. mono_class_from_name() now
15146 supports nested type names directly.
15148 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
15150 * reflection.h reflection.c: Encode already created dynamic methods
15151 and fields correctly as a DEF instead of a REF.
15153 * reflection.c: Get rid of the force_ref argument to
15154 mono_image_typedef_or_ref since it was wrong in the first place.
15156 * string-icalls.c: add error checking to string constructors according
15159 * reflection.c: Emit types in the order their TypeBuilders were
15160 created. Previously, a new table index was assigned to each type before
15161 the tables were emitted. This was wrong because the signature blob
15162 might already refer to a type by its original table index.
15164 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
15166 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
15169 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15171 * Makefile.am: make assemblies dir have \ instead of / on windows.
15173 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
15175 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
15176 iterate over the NESTEDCLASS table using a linear search since the
15177 table is not guaranteed to be sorted by the secondary key.
15179 * class.c (mono_class_create_from_typedef): fixed up call to
15180 mono_metadata_nesting_typedef.
15182 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
15184 * marshal.c (mono_string_to_byvalstr): clear the memory as
15185 suggested by Jerome Laban <jlaban@wanadoo.fr>
15187 2003-02-26 Dick Porter <dick@ximian.com>
15189 * process.c: Cope with padding in .rsrc blocks
15191 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
15193 * metadata.h: reverted the filter_len change, it breaks reflection
15195 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
15197 * metadata.h: added a new field to store the filter_len
15200 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15202 * reflection.c: handle custom attributes for types and members
15203 created with Reflection.Emit (bug#38422).
15205 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
15207 * reflection.c: define RTSpecialName automatically for constructors for
15208 compatibility with MS.NET.
15210 * reflection.c (mono_reflection_create_runtime_class): initialize
15211 nested_in field of dynamically created classes.
15213 2003-02-22 Martin Baulig <martin@ximian.com>
15215 * debug-mono-symfile.h: Incremented version number.
15217 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
15219 * object.h icall.c process.c: fix warnings.
15221 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
15223 * appdomain.h appdomain.c:
15224 (mono_domain_try_type_resolve): split the
15225 name_or_tb argument into a name and a tb argument.
15226 (mono_domain_has_type_resolve): new function to check whenever the
15227 application has registered a TypeResolve event handler.
15229 * icall.c reflection.h reflection.c: move the type resolve logic into
15230 mono_reflection_get_type () so it will be invoked when
15231 Assembly::GetType () is called.
15234 (mono_reflection_get_type): renamed to get_type_internal.
15235 (mono_reflection_get_type): fixed type name generation so it works
15236 for nested types too.
15237 (mono_reflection_get_type): call has_type_resolve () to avoid the
15238 costly type name generation if there is no resolve event handler.
15240 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15242 * class.c, image.c: load exported types from file references.
15244 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
15246 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
15247 used to cache the managed methods used to create proxies and make
15248 remote invocation of methods.
15249 * class.h: Added in MonoVTable a flag to indicate that a class needs
15250 to be remotely created.
15251 * object.c: Modified the method mono_class_vtable(). It now initializes
15252 the remote flag of the vtable. Modified mono_object_new_specific(),
15253 so now it checks the remote flag.
15254 * icall.c: Added a couple of internal methods, one for enabling instance
15255 creation interception for a type, and one for creating objects bypassing
15258 2003-02-18 Martin Baulig <martin@ximian.com>
15260 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
15261 New interncall to get a method's metadata token.
15263 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
15264 New interncall for the debugger.
15266 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
15268 * class.c (mono_class_setup_vtable): allocate supertype array
15270 2003-02-18 Martin Baulig <martin@ximian.com>
15272 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
15274 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15277 (assembly_name_to_aname): jump over unknown properties (i've found
15278 something like: 'type, assembly, version=xxx, custom=null, public...',
15279 so now will ignore custom=null and still get the rest of the values).
15281 2003-02-17 Dick Porter <dick@ximian.com>
15283 * threads.c: Have Thread.Start() wait for a semaphore to signal
15284 that the thread has set up all its local data. This fixes bug
15285 34323, where Abort() raced the new thread's TLS data.
15287 Also removes the handle_store() call from start_wrapper, because
15288 threads are now always created suspended and there is no longer a
15289 race between the parent and child threads to store the info.
15291 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
15293 * image.c: explain the #- heap issue in a message, hopefully
15294 avoiding FAQs on mono-list.
15296 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15299 (GetEntryAssembly): if the domain has not invoked
15300 AppDomain.ExecuteAssembly yet, return the assembly of the default
15303 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
15305 * class.c (mono_ldtoken): make it work in dynamic assemblies.
15307 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15309 * metadata.c, reflection.c: simple speedup to type hash
15312 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
15314 * image.c, image.h, class.c, assembly.c: move module loading
15315 to MonoImage. When loading metadata, consider alignemnet from
15316 the start of metadata, not from the metadata address in memory.
15318 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
15320 * reflection.c (mono_reflection_get_custom_attrs): Added support for
15321 AssemblyBuilder objects. Factored out custom attribute creation into
15322 a separate function.
15323 (create_custom_attr): new function to create custom attributes.
15325 2003-02-12 Miguel de Icaza <miguel@ximian.com>
15327 * Makefile.am: Got tired of typing the full pathname to pedump.
15328 Until there is another option, am installing this.
15330 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
15332 * class.c (class_compute_field_layout): always set field->parent
15333 (mono_ldtoken): use mono_defaults.fieldhandle_class;
15335 2003-02-11 Dick Porter <dick@ximian.com>
15338 * monitor.c: Rewrote Monitor, making lock much faster and
15339 Pulse/Wait work as specified. Also uses much fewer handles, and only
15340 creates them as needed.
15342 * exception.c: Added SynchronizationLockException
15344 * threads.c: Deleted old Monitor implementation. The new one is
15347 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15349 * class.c: handled TypedReference type code. Set the correct size for
15350 class data. Setup interface_offsets for interface classes, too.
15352 2003-02-09 Martin Baulig <martin@ximian.com>
15354 * debug-mono-symfile.h: Reflect latest symbol writer changes.
15356 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
15358 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
15359 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
15360 * object.c: fixed mono_object_get_virtual_method () for interfaces.
15361 * verify.c: check for code that runs after the end of the method.
15363 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
15365 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
15366 "System.Math::Round2".
15367 * sysmath.h: Added Floor, Round and Round2 definitions.
15368 * sysmath.c: Modified certain functions that were not 100% compliant
15369 with MS.NET (math precision) and added the implementation of Floor,
15372 2003-02-07 Martin Baulig <martin@ximian.com>
15374 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
15376 2003-02-07 Martin Baulig <martin@ximian.com>
15378 * debug-mono-symfile.c: Reflected latest symwriter changes.
15379 (mono_debug_create_mono_symbol_file): Removed.
15380 (mono_debug_open_mono_symbol_file): Take an argument which
15381 specifies whether to create a dynamic symbol file.
15383 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
15385 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
15387 2003-02-05 Martin Baulig <martin@ximian.com>
15389 * reflection.c (mono_image_build_metadata): Make this public,
15390 protect it against being called multiple times, don't create
15391 resources and don't build the compressed metadata here.
15392 (mono_image_create_pefile): Do this here.
15395 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
15397 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15399 * socket-io.c: fixed bug #36322.
15401 2003-02-06 Piers Haken <piersh@friskit.com>
15405 * debug-mono-symfile.c:
15411 * socket-io.c: warning cleanups
15413 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
15415 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
15416 function. works like remoting invoke, but does a check for the Proxy first.
15418 2003-02-05 Miguel de Icaza <miguel@ximian.com>
15420 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
15422 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
15424 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
15426 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
15427 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
15429 * object.c (mono_store_remote_field_new): used by the new jit
15430 instead of mono_store_remote_field
15431 (mono_load_remote_field_new): used by the new jit
15432 instead of mono_load_remote_field
15434 2003-02-05 Patrik Torstensson
15436 * appdomain.c: changed unload to take the domain id instead
15439 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
15442 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15444 * appdomain.c: don't look for assemblies in ApplicationBase if
15445 PrivateBinPathProbe is set.
15447 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15449 * object.c: make the first argument in main_args contain the absolute
15450 path to the assembly. Fixes bug #37511.
15452 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15454 * icall.c: get correct UTC offset for countries not using daylight
15455 time saving. Fixes bug #30030.
15457 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15459 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15460 and 1 are the family).
15462 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
15464 * icall.c (ves_icall_InternalExecute): removed wrong assertion
15466 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15468 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
15470 * reflection.c: added support for SignatureHelper tokens, which is
15471 needed by the Calli opcode.
15473 * reflection.h: track changes to SignatureHelper class.
15475 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15477 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15479 * appdomain.c: fixed loading assemblies from PrivateBinPath.
15481 2003-02-03 Patrik Torstensson
15482 * appdomain.[c|h], domain.c :
15483 - Added support for getting a domain via domain id
15484 - Support for setting and getting domain from System.AppDomain
15485 (used in cross appdomain channel)
15486 - Added support for get/set for a MonoAppContext on a thread
15487 (Context class in System.Runtime.Remoting.Contexts),
15488 - Removed hack in Get/SetData and ExecuteAssembly.
15490 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15491 the managed world to get control when a proxy is created.
15493 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15495 2003-02-03 Miguel de Icaza <miguel@ximian.com>
15498 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15499 Populate the codebase field as well.
15501 2003-02-02 Martin Baulig <martin@ximian.com>
15503 * debug-mono-symfile.c
15504 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15505 (mono_debug_symfile_add_method): Allow interncalls.
15507 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15509 * icall.c: throw parse exception if strtod fails or the string is empty.
15511 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15513 * marshal.c: handle object type separately from defined
15516 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15518 * marshal.c: handle NATIVE_LPSTR for strings when it's
15519 explicitly specified.
15521 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15523 * reflection.c, reflection.h, icall.c: setup the reflection
15524 handle cache for ModuleBuilders and AssemblyBuilders.
15526 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
15528 * reflection.c (reflection_methodbuilder_to_mono_method): set
15531 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15533 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15535 2003-01-29 Dick Porter <dick@ximian.com>
15537 * threads.c: No need for the fake_thread kludge now that Thread
15538 doesn't run a class constructor
15540 2003-01-29 Dick Porter <dick@ximian.com>
15542 * threads.c: Use g_direct_hash instead of the rather bogus
15545 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
15547 * marshal.c (mono_marshal_get_native_wrapper): add check for null
15548 (fix pinvoke12.exe)
15549 (mono_marshal_get_struct_to_ptr): generate valid IL code
15550 (mono_marshal_get_ptr_to_struct): generate valid IL code
15551 (*): correctly set sig->pinvoke, we need to memdup the signature
15554 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15556 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15557 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15559 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15561 * profiler.c: provide more callers information.
15563 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
15565 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15567 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15569 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15571 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15573 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15574 exception instead of going into an infinite loop on dates which it
15577 * string-icalls.c (ves_icall_System_String_get_Chars): raise
15578 out-of-range exception if needed.
15580 * class.c (mono_class_setup_vtable): allow a virtual method to provide
15581 an implementation for an interface method and to override an inherited
15582 method at the same time.
15583 Imagine a scenario when a virtual method is used to override a
15584 virtual abstract method in a parent class, and this same method
15585 provides an implementation for an method inherited from an interface.
15586 In this case, the interface resolution code will set im->slot, which
15587 means that the virtual method override pass will skip this method
15588 which means a pointer to the abstract method inherited from the parent
15589 will remain in the vtable of this non-abstract class.
15591 * class.c: (mono_class_setup_vtable): continue search for a real
15592 method if only an abstract method is found.
15594 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15596 * reflection.c: add size to encoding for ByValStr and ByValArray
15597 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15599 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15601 * class.c (mono_class_setup_vtable): pass the override info as an
15604 * class.c (mono_class_setup_vtable): set the slot of overriding methods
15607 * reflection.c (ensure_runtime_vtable); add support for method
15610 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15612 * reflection.c (resolution_scope_from_image): Hack to work to work with
15613 dynamic assemblies.
15615 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
15616 added a 'force_ref' argument to force this function to allways return
15617 a TypeRef. This is needed by mono_image_get_memberref_token ().
15619 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15621 * reflection.c (mono_image_get_type_info): interfaces really don't have
15624 * reflection.c (mono_image_basic_init): fill out missing fields of
15627 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
15628 dynamic assemblies. This is required so dynamic assemblies show up in
15629 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15630 Type::GetType() etc. This is consistent with MS behaviour.
15632 * image.c image.h reflection.c: add newly created classes to the name
15633 cache so mono_class_get () will find them.
15635 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
15637 First part of changes to get IKVM.NET running under mono.
15639 * appdomain.h, appdomain.c: added new function
15640 mono_domain_try_type_resolve() which will emit TypeResolve events.
15641 This function will call AppDomain::DoTypeResolve to do the actual work.
15643 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
15644 moved existing code dealing with dynamic tokens to a new function
15645 called mono_reflection_lookup_dynamic_token (). This function will
15646 raise TypeResolve events when appropriate. Since reflection.c is not
15647 part of libmetadata, a new hook function called
15648 mono_lookup_dynamic_token() is added to class.c which will call this.
15650 * assembly.h assembly.c: make the invoke_load_hook function public,
15651 so it can be called for dynamic assemblies.
15653 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15655 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
15658 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
15659 MonoGHashTable, since it contains pointers to objects which the GC
15662 * assembly.c (search_loaded): remove unused variable.
15664 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15666 * object.c: fixed issue exposed by gcc-generated IL programs
15667 that use RVA data for pointers.
15669 2003-01-25 Martin Baulig <martin@ximian.com>
15671 * threads.c (start_wrapper): Moved the initialization of
15672 `start_func' above the mono_new_thread_init() call to which we
15673 pass it as argument.
15675 2003-01-24 Martin Baulig <martin@ximian.com>
15677 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15678 the MonoThread pointer.
15680 2003-01-21 Miguel de Icaza <miguel@ximian.com>
15682 * icall.c: Rename `PowImpl' to Pow.
15684 2003-01-23 Dick Porter <dick@ximian.com>
15686 * threads.c (start_wrapper): Create a Thread object if needed, so
15687 the Main() thread can do the class initialisation in a subthread
15688 that has been set up to allow managed code execution.
15690 Pass the thread ID instead of the MonoThread pointer to the thread
15691 start and attach callbacks. This change is required, because the
15692 jit thread start callback must be called _before_ the Thread
15693 object can be created.
15695 (mono_thread_init): Removed much object creation code that is no
15696 longer needed. No managed code is called from here now.
15698 * object.c (mono_runtime_exec_managed_code): Create a subthread
15699 for Main, and call back to the runtime to use it.
15700 Set the exit code when Main exits.
15702 * gc.c: Make sure domain finalisation happens in a subthread.
15703 Re-enable threaded GC, fixing bug 31333 (again).
15705 * environment.c: System.Environment internall calls (so far just
15706 ExitCode is here, the others are still in icall.c)
15708 * appdomain.c (mono_runtime_cleanup): All threads running managed
15709 code should have finished before mono_runtime_cleanup() is
15710 reached, so no need to clean up threads.
15712 2003-01-22 Martin Baulig <martin@ximian.com>
15714 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15715 `gpointer func' arguments.
15716 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15717 but added `MonoThread *thread' argument.
15718 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15720 * threads.c (mono_new_thread_init): Added `gpointer func' argument
15721 and pass it to the mono_thread_start_cb callback.
15722 (mono_install_thread_callbacks): New public function to install a
15723 set of callbacks which are set by the debugger.
15724 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15726 2003-01-22 Martin Baulig <martin@ximian.com>
15728 * Makefile.am: Install debug-mono-symfile.h.
15730 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
15732 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15734 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
15736 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15737 * class.c (mono_ptr_class_get): correctly set access levels of pointers
15738 (mono_array_class_get): correctly set access levels of arrays
15740 2003-01-20 Patrik Torstensson
15741 * image.h (MonoAssemblyName): changed major, minor, build, revision
15742 from signed to unsigned.
15744 2003-01-20 sean kasun <skasun@azstarnet.com>
15746 * reflection.c (load_cattr_value): Now this handles
15747 MONO_TYPE_SZARRAY. Fixes bug #35629
15749 2003-01-20 Miguel de Icaza <miguel@ximian.com>
15751 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15754 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15756 * decimal.c: fixed bug #26056.
15758 2003-01-17 Martin Baulig <martin@ximian.com>
15760 * gc.c: Raise an ExecutionEngineException instead of using g_error().
15762 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15765 (mono_get_exception_type_initialization): new function.
15767 * object.c: throw a TypeInitializationException when an exception is
15768 thrown invoking the class constructor.
15770 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15772 * reflection.c: fixed attribute reading.
15774 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15777 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15778 provided, look for the type in the calling assembly and then in
15779 mscorlib; if the assembly name is provided, only try that one.
15781 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15783 * object.c: register the vtable before there is a chance it's
15784 queried again recursively.
15786 2003-01-13 Duncan Mak <duncan@ximian.com>
15788 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15791 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
15793 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15795 2003-01-11 Martin Baulig <martin@ximian.com>
15797 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15798 this to 20 for the release.
15800 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
15802 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15804 * loader.c (mono_method_get_marshal_info): bug fix
15806 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15807 structures with explicit layout
15809 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15811 * profiler.c: made the output more readable (and sorted).
15812 Added caller information for the allocation profiler.
15814 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
15816 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15818 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15820 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15821 to get value types.
15823 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15825 * object.c, profiler.h, profiler.c, profiler-private.h:
15826 Added object allocation profiler.
15828 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15830 * reflection.h, reflection.c: handle global methods.
15831 Compress blob entries.
15833 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15835 * marshal.c: fix compilation.
15837 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
15839 * loader.c (mono_method_get_marshal_info): impl.
15841 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15843 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15845 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15846 for reference types.
15848 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15850 * loader.c: fixed off by one error in loaded parameter names.
15852 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
15854 * marshal.c (mono_marshal_get_icall_wrapper): like
15855 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15856 instead of a MonoMethod.
15858 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15860 * decimal.c: fixed bug #36537.
15862 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15864 * marshal.c: throw a missing method exception if a
15865 P/Invoke method is not found.
15867 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15869 * icall.c: allow a null this for constructors.
15871 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15873 * icall.c: raise the proper exceptions if the arguments to the
15874 internal Invoke are incorrect.
15876 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
15878 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15880 2003-01-03 Martin Baulig <martin@ximian.com>
15882 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15884 2002-12-31 Martin Baulig <martin@ximian.com>
15886 * debug-mono-symfile.c: Completely rewrote the type section.
15887 Instead of using individual malloc()ed fields, we use one big
15888 continuous memory area and offsets into this area.
15889 See the comments in the source code for details.
15891 2002-12-30 Martin Baulig <martin@ximian.com>
15893 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15895 2002-12-30 Martin Baulig <martin@ximian.com>
15897 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15898 line number table in this data blob instead of using an external
15901 2002-12-28 Martin Baulig <martin@ximian.com>
15903 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15905 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
15907 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15908 as a boxed return type.
15910 2002-12-21 Miguel de Icaza <miguel@ximian.com>
15913 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15914 g_build_filename to properly get separators on the filename created.
15916 * object.h: Small change, introduce MonoMarshalByRefObject to
15917 track the layout of that structure in the C# universe as we make
15920 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15922 * object.c: removed assert to allow static fields on interfaces.
15923 * loader.c: a TypeSpec may be used for any type, not just arrays.
15925 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15927 * class.c, class.h: added mono_class_array_element_size ().
15928 Ignore static methods in interfaces.
15930 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15932 * threads.c: fixed the build under cygwin.
15934 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15936 * reflection.c: handle nullref constants. Allocate keys for
15937 reflection handles with the GC.
15939 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15941 * threads.c, threads.h: added mono_thread_get_abort_signal()
15942 to get a suitable signal for thread abort.
15944 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15946 * metadata.c: fix handling of ExportedType table.
15948 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15950 * icall.c: added WriteWindowsDebugString internal call.
15952 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15954 * reflection.h: added fields to match C# implementation.
15956 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15958 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15960 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
15962 * gc.h, gc-internal.h: Rename header for GC internal calls to
15963 gc-internal.h from gc.h as to not clash with Boehm GC having its
15964 header installed as <gc.h> in outside include paths.
15965 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15966 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15968 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15970 * icall.c: assign minor, build and revision in FillName.
15972 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
15974 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15975 Added support for running code generated by Reflection.Emit.
15977 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15979 * appdomain.c: check for NULL argument in LoadFrom.
15981 2002-12-10 Dick Porter <dick@ximian.com>
15983 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15985 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15987 * appdomain.c: fix buglet when building exe file name. Handle full
15988 assembly name (needed after latest changes to AssemblyName).
15990 (mono_image_close): free some hashtables.
15992 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
15994 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
15995 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
15996 on some systems (redhat 7.3)
15998 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
16000 * threads.c: delete the critical section of a sync block,
16001 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
16003 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
16005 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
16007 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16009 * appdomain.[ch]: handle the assembly preload event to try loading the
16010 assemblies using the paths we have in the current domain.
16012 * assembly.[ch]: created an assembly preload hook that is called to try
16013 loading the assembly by other means that the ones provided here.
16015 * domain.c: initialize the domain search path.
16017 From now on, assemblies (TODO: except corlib and System) are loaded
16018 according to these rules when using mono_assembly_load ():
16020 1. It tries to load the assembly from the ApplicationBase
16021 of the current domain appending .dll and .exe (TODO: have to
16022 try loading from name/name.dll and name/name.exe).
16024 2. It tries the search path specified in PrivateBinPath for the
16025 current domain (if any).
16027 3. Previous behavior.
16029 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
16031 * icall.c: implemented GetInterfaceMap() related icall.
16032 * domain.c, loader.h: load MethodInfo in mono_defaults.
16034 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16036 * gc.c: disable the finalizer thread for now, untill all the issues
16037 with it are resolved.
16039 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16041 * string-icalls.c: handle embedded nulls in string ctor when the
16042 length is specified.
16044 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16046 * class.c: look for explicit interface implementation in parent
16049 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
16051 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
16053 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16055 * gc.c: protect handles with a critical section.
16057 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16060 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
16061 parameters. If no assembly specified, try getting the type from all
16062 the assemblies in the current domain, else, load the assembly and get
16065 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16067 * marshal.c: applied patch from Aleksey Demakov that fixes
16068 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
16070 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16072 * icall.c: fixed get_location.
16074 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
16076 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
16077 declarations to make it work with older gcc.
16079 * loader.c (mono_get_method): set signature->pinvoke for native calls
16081 2002-11-20 Dick Porter <dick@ximian.com>
16083 * threads.c (mono_thread_init): Set the main thread's handle
16085 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16087 * gc.c: allow compilation without GC support. Changed to match the
16090 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16092 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
16094 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
16096 * reflection.c: set a public key token on the core assemblies.
16098 2002-11-18 Dick Porter <dick@ximian.com>
16100 * threads.c: Split out some thread initialisation so that other
16101 files can set the start callback function.
16103 * gc.c: Run finalisers in a separate thread, to avoid stack
16104 overflow. Fixes bug 31333.
16106 * appdomain.c: Set up GC finalisation thread.
16110 * domain.c: Use gc.h macros for GC_malloc
16112 2002-11-15 Dick Porter <dick@ximian.com>
16116 * appdomain.c: Removed mono_runtime_init_with_attach(),
16117 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
16118 merging the extra parameter with the existing function. Removed
16119 unneeded code in mono_thread_attach().
16121 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
16123 * image.c (mono_image_loaded_by_guid): a method to get loaded
16125 (load_metadata_ptrs): we store the guid as string.
16127 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
16129 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
16131 * metadata.c (mono_guid_to_string): imported method form Zoltan
16132 Varga (slightly modified)
16134 * assembly.c (mono_assembly_open): load precompiled code
16136 * loader.h (MonoMethod): we store the method token for use in the
16139 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16141 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
16142 the hook function called when an assembly is loaded.
16144 * domain.c: Modified file.
16145 (mono_domain_assembly_load): removed hash table insertion of assemblies.
16149 2002-11-07 Miguel de Icaza <miguel@ximian.com>
16151 * reflection.c: Map PEFileKind to the value expected by the WinNT
16154 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16156 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
16157 Read until the buffer is filled completely.
16159 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16161 * icall.c: implemented MonoType.InternalGetEvent ().
16163 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16165 * appdomain.c: implemented InitAppDomainSetup. Delayed
16166 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
16167 the entry_assembly.
16169 * assembly.c: base_dir is now an absolute path ending with
16172 * icall.c: modified get_location according to the above changes.
16174 * object.c: init AppDomain.SetupInformation for the default domain after
16175 we have the entry assembly.
16177 * domain.c: when unloading a domain, setup = NULL.
16179 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
16181 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
16183 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
16185 * object.h, object.c: introduced mono_object_get_virtual_method ()
16186 to lookup the method invoked on an object when a callvirt is done on
16188 * icall.c: make MethodInfo::Invoke() always do a virtual call.
16190 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16192 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
16193 current domain when loaded an assembly and failed to load it.
16195 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
16197 2002-10-31 Dick Porter <dick@ximian.com>
16201 * file-io.c: Return the error status in a parameter, as the
16202 GetLastError() value has long since been blown away if we try and
16203 look it up in a subsequent internal call invocation. Delete the
16204 GetLastError() internal call, because it's useless.
16206 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
16208 * class.[ch]: added cast_class to fix bug 29517
16210 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
16212 * marshal.c: create valid IL code in the filter clause:
16213 the new JIT is less forgiving:-)
16215 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16217 * icall.c: removed get_property internal call.
16219 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
16221 * appdomain.h domain.c: Added an ID to appdomains.
16223 * threads.c threads.h icall.c: Implement icall
16224 Thread:GetDomainID(), and remove unused icall
16225 CurrentThreadDomain_internal.
16227 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16229 * icall.c: Don't recurse through the base types in GetConstructor.
16232 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16234 * mempool.h, mempool.c: added mono_mempool_empty() and
16235 mono_mempool_stats().
16237 2002-10-23 Dick Porter <dick@ximian.com>
16241 * icall.c: Added MonoIO.GetFileType internal call
16243 2002-10-17 Dick Porter <dick@ximian.com>
16245 * appdomain.c (mono_runtime_cleanup): Don't signal the async
16246 delegate semaphore before waiting for all threads to finish,
16247 because new threads can also call async delegates. Fixes bug
16250 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
16251 of 3 seconds, in case another async job is queued. (This part is
16252 needed because the bug fix reintroduced the 3s exit lag.) This
16253 makes the mono_runtime_shutdown flag superfluous.
16255 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16257 * reflection.c: include ehader size in method section headers.
16258 Really check for suplicated modules entries.
16260 2002-10-17 Martin Baulig <martin@gnome.org>
16262 * debug-mono-symfile.c: Added back support for locals.
16264 2002-10-14 Martin Baulig <martin@gnome.org>
16266 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
16269 2002-10-14 Martin Baulig <martin@gnome.org>
16271 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
16272 mono_class_get() instead of looking in the class cache.
16274 2002-10-13 Martin Baulig <martin@gnome.org>
16276 * debug-mono-symfile.c: Set version number to 28, include the
16277 signature in method names.
16279 2002-10-13 Martin Baulig <martin@gnome.org>
16281 * debug-mono-symfile.h: Set version number to 27.
16283 2002-10-11 Martin Baulig <martin@gnome.org>
16285 * gc.c: Don't register/unregister NULL pointers as disappearing links.
16287 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16289 * metadata.c, metadata.h: added helper function to allocate signatures.
16291 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16293 * icall.c: added internal call to get the location of machine.config.
16295 2002-10-08 Martin Baulig <martin@gnome.org>
16297 * debug-mono-symfile.c: Ignore classes with a pending init for the
16300 2002-10-03 Dick Porter <dick@ximian.com>
16302 * threads.c: Freebsd pthread_t is a pointer
16304 2002-10-03 Dick Porter <dick@ximian.com>
16306 * socket-io.c: Implemented GetHostName_internal
16308 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16311 (mono_config_parse_file): don't leak the text.
16313 2002-10-02 Martin Baulig <martin@gnome.org>
16315 * debug-mono-symfile.c: Added support for methods.
16317 2002-10-01 Martin Baulig <martin@gnome.org>
16319 * debug-mono-symfile.c: Don't emit methods and line numbers for
16320 the dynamic symbol file, just write the type table. We can easily
16321 have an external helper program which creates a symbol file for an
16324 2002-10-01 Dick Porter <dick@ximian.com>
16326 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
16327 Only add the handle to the cleanup array when we're about to
16328 launch the thread. Bug 31425 deadlocked when the test was run on
16331 2002-10-01 Martin Baulig <martin@gnome.org>
16333 * debug-mono-symfile.c: Added support for properties.
16335 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16337 * reflection.c: unaligned store fix from Mark Crichton
16338 <crichton@gimp.org>.
16340 2002-09-27 Martin Baulig <martin@gnome.org>
16342 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
16345 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16347 * assembly.h, assembly.c: use a sane API to hook into the assembly
16348 loading process instead of a useless special-purpouse hack
16349 (ngen needs a hook, too, for example).
16351 2002-09-27 Dick Porter <dick@ximian.com>
16353 * threads.c (mono_thread_init): Call GetCurrentProcess() so
16354 io-layer can set up some process handle info. Not needed on w32,
16355 but doesn't hurt either.
16357 * process.c: Pass the program name in the second parameter to
16358 CreateProcess, so the path is searched. Include the working
16359 directory. Implemented process name, process enumeration, and some
16360 process detail internal calls.
16362 * icall.c: Added internal calls for process lookup, and some
16365 2002-09-26 Martin Baulig <martin@gnome.org>
16367 * assembly.c (mono_install_open_assembly_hook): New global
16368 function to install a function to be invoked each time a new
16369 assembly is loaded.
16370 (mono_assembly_open): Run this callback function if set.
16372 * debug-mono-symfile.c: Put back line numbers for the dynamic
16373 symbol file and also record the .il file as source file. This
16374 allows us to install the temporary symbol file as `file.dbg' just
16375 like a compiler-generated one.
16377 2002-09-26 Nick Zigarovich <nick@chemlab.org>
16379 * Corrected typo in gc.c (BOHEM vs BOEHM).
16381 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16383 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
16384 GetProperties. Also avoid calling g_slist_length in GetProperties and
16387 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16389 * reflection.c: avoid unaligned stores (bug spotted by
16390 Mark Crichton <crichton@gimp.org>).
16392 2002-09-25 Martin Baulig <martin@gnome.org>
16394 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
16395 instead of guint64 for addresses and added prologue/epilogue info.
16397 2002-09-25 Martin Baulig <martin@gnome.org>
16399 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
16400 store line number info. For the dynamic symbol file, we only need
16401 to provide the JIT generated dynamic line number info for the dynamic
16404 2002-09-25 Martin Baulig <martin@gnome.org>
16406 * debug-mono-symfile.h: Incremented version number.
16408 2002-09-24 Martin Baulig <martin@gnome.org>
16410 * class.c (mono_debugger_class_init_func): New global function
16412 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
16415 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
16416 function. This is called via the mono_debugger_class_init_func
16417 hook to add all types to the dynamic type table.
16418 (ves_icall_MonoDebugger_GetType): New interncall to get a class
16419 from its metadata token.
16421 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
16422 New interncall for the debugger.
16424 2002-09-24 Nick Drochak <ndrochak@gol.com>
16426 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
16427 before using it in case it is null.
16429 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16431 * metadata.c: allow custom modifiers in local var signatures
16432 (bug spotted by Zoltan Varga).
16434 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16436 * class.c: deal with the <Module> class that may have a NULL vtable.
16437 Eliminate warnings.
16439 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16441 * image.c, image.h: more strong name helpers.
16442 * monosn.c: more work: convert pem keys to cryptoapi format.
16444 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16446 * string-icalls.c: speedup IndexOf.
16448 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16450 * icall.c: updates from Zoltan.2.Varga@nokia.com.
16452 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16454 * icall.c: cleanup: use mono_object_domain ().
16456 2002-09-23 Martin Baulig <martin@gnome.org>
16458 * debug-mono-symfile.c: Improved type support.
16460 2002-09-22 Martin Baulig <martin@gnome.org>
16462 * debug-mono-symfile.c: Added support for reference types and strings.
16464 2002-09-22 Martin Baulig <martin@gnome.org>
16466 * debug-mono-symfile.c: Started to work on the type table.
16468 2002-09-21 Martin Baulig <martin@gnome.org>
16470 * debug-mono-symfile.c: Largely reworked the symbol table format.
16471 The symbol table is now incrementally updated each time a new
16472 method is added. We're now also using our own magic and version
16473 so that you don't need to recompile all your classes if the
16474 dynamic table changes.
16475 (mono_debug_update_mono_symbol_file): Removed.
16476 (mono_debug_symfile_add_method): New function to add a method.
16478 2002-09-21 Martin Baulig <martin@gnome.org>
16481 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16484 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16485 New interncall to get a method from its metadata token.
16487 2002-09-21 Martin Baulig <martin@gnome.org>
16489 * debug-mono-symfile.c: Create type table.
16491 2002-09-20 Martin Baulig <martin@gnome.org>
16493 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16495 2002-09-20 Martin Baulig <martin@gnome.org>
16497 * debug-mono-symfile.c: Provide information about params and locals.
16499 2002-09-20 Martin Baulig <martin@gnome.org>
16501 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16504 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16505 interncall to get a method from its metadata token.
16507 2002-09-20 Martin Baulig <martin@gnome.org>
16509 * debug-mono-symfile.c: Added a few checks for method->header
16510 being non-NULL. This should never happen, but for the moment
16511 let's use a g_warning() rather than a g_assert().
16513 2002-09-19 Mark Crichton <crichton@gimp.org>
16515 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16516 even if support for it isn't present. Added an #ifdef to fix this.
16518 * socket-io.c: Added checks back for Solaris support.
16520 2002-09-19 Martin Baulig <martin@gnome.org>
16522 * debug-mono-symfile.c (read_string, write_string): Reflect latest
16523 changes in the symbol file format.
16525 2002-09-18 Martin Baulig <martin@gnome.org>
16527 * debug-mono-symfile.c: Set version number to 21.
16529 2002-09-18 Dick Porter <dick@ximian.com>
16531 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16532 on netbsd. Fixes bug 30051.
16534 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16537 (set_version_from_string): little fix.
16539 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16541 * monosn.c, Makefile.am: added strong name utility.
16542 * reflection.h, reflection.c: implemented delayed signing,
16543 locale, version and hash id assembly attributes.
16545 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16547 * loader.c, metadata.c: load param attributes in signatures.
16549 2002-09-16 Martin Baulig <martin@gnome.org>
16551 * debug-mono-symfile.c: Added string table with all method names.
16553 2002-09-14 Martin Baulig <martin@gnome.org>
16555 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16556 fast method lookup.
16558 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16560 * reflection.c: record the public key token of referenced assemblies.
16562 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16564 * image.c, image.h: added functions to get the strong name and the
16565 public key of an assembly.
16566 * pedump.c: use them.
16568 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
16570 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16572 2002-09-12 Miguel de Icaza <miguel@ximian.com>
16574 * marshal.c (mono_marshal_get_managed_wrapper): Added
16577 2002-09-11 Martin Baulig <martin@gnome.org>
16579 * gc.c: Call GC_unregister_disappearing_link() on all links when
16580 finalizing them, this is necessary to aviod a crash in boehm's
16583 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16585 * gc.c: handle GetTarget for finalized objects spotted and fixed by
16588 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16590 * icall.c: implemented MonoType::Module.
16591 * reflection.c, reflection.h: mono_module_get_object () from
16592 Tomi Pakarinen <tomi.pakarinen@welho.com>.
16594 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16596 * icall.c: ignore overridden methods in GetMethods ().
16597 Fix for FieldInfo::SetValue().
16598 * object.c: handle float/double in runtime invoke.
16600 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16602 * object.c: allow a constructor to be called again on an object.
16604 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16606 * class.h, class.c: move field layout code to it's own function and
16607 export it. Get an interface id earlier. Move fields in MonoClass
16608 so they are more cache friendly and align the bitfields.
16609 * loader.c: temporary handle get_param_names() for a runtime method.
16610 * reflection.c, reflection.h: more code to handle runtime creation of
16613 2002-09-09 Martin Baulig <martin@gnome.org>
16615 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16616 signature with the pinvoke field being set for the actual call.
16618 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16620 * icall.c: removed some unused icalls. Start of map of glib charsets
16621 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16623 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16625 * debug-helpers.c: break infinite loop (found and fixed by
16626 Holger Arnold <harnold@gmx.de>).
16628 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16630 * icall.c: target may be null in create_delegate.
16632 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16634 * marshal.c: handle a boolean return type.
16636 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16638 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16640 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16642 * gc.c: fix weakreferences.
16644 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16646 * icall.c: added icall to get default codepage.
16648 2002-09-03 Dick Porter <dick@ximian.com>
16651 * threads.c: Use MonoThread instead of MonoObject where
16654 Store running thread objects in a hash table, so that we have all
16655 the info to hand when waiting for them to finish
16656 (means we don't need OpenThread() any more, so mingw builds should
16657 be fully functional again.)
16660 * object.h: Added thread ID to MonoThread
16662 2002-09-03 Martin Baulig <martin@gnome.org>
16664 * icall.c (System.Reflection.Assembly::get_location): New interncall.
16666 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16668 * icall.c: fixed leak in get_temp_path. Thanks lupus.
16670 2002-09-03 Martin Baulig <martin@gnome.org>
16672 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16673 argument to store the end address of the disassembled instruction.
16675 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16676 here from debug-symfile.h.
16677 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16678 JIT into this struct.
16679 (MonoSymbolFile): Added `char *image_file' field.
16680 (MonoDebugGetMethodFunc): Removed.
16681 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16682 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16683 (mono_debug_find_method): New method.
16685 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16686 create a full symbol file.
16687 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16688 and static symbol files.
16689 (mono_debug_find_method): The symbol file keeps an internal method hash,
16690 call this to get a MonoDebugMethodInfo from a MonoMethod.
16692 * debug-symfile.[ch]: Removed.
16694 2002-08-29 Miguel de Icaza <miguel@ximian.com>
16696 * image.c (do_mono_image_open): Remove linker version check.
16698 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
16700 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16701 wrappers for instance methods.
16703 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16705 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16707 2002-08-28 Dick Porter <dick@ximian.com>
16709 * Makefile.am: Export HOST_CC for w32 builds
16711 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16713 * file-io.c process.c: MonoString are null terminated, no
16714 need for mono_string_to_utf16() anymore.
16716 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16718 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16720 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16722 * icall.c, reflection.h: speedup System.MonoType.
16724 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16726 * reflection.c: allow null as the value of a string argument in
16727 custom attributes constructors.
16729 2002-08-27 Martin Baulig <martin@gnome.org>
16731 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16732 `trampoline_address' field.
16734 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
16736 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16737 check (fixes bug #29486)
16739 2002-08-27 Martin Baulig <martin@gnome.org>
16741 * debug-mono-symfile.c: Changed the file format in a way that allows us
16742 open it read-only and to use a specially malloced area for all the
16743 dynamic data. We can now also generate a symbol file on-the-fly if we're
16744 debugging IL code and there is no MCS generated symbol file for it.
16746 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16748 * object.c: added a define for a good string and array
16749 creation speedup (not enabled by default because we need to deal with
16752 2002-08-26 Martin Baulig <martin@gnome.org>
16754 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16755 function to create a dynamic symbol file. This is used by the
16756 debugger to create a symbol file for IL code on-the-fly.
16758 2002-08-26 Martin Baulig <martin@gnome.org>
16760 * loader.c (mono_lookup_pinvoke_call): Include the error message
16761 from g_module_error() in the error message.
16763 2002-08-24 Martin Baulig <martin@gnome.org>
16765 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16766 function to update the symbol file. The symbol file is mmap()ed
16767 writable, but private. This allows us to install the symbol file
16768 together with the assembly.
16770 2002-08-24 Martin Baulig <martin@gnome.org>
16772 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
16773 but they can read the new symbol file format which mcs is now creating.
16775 * debug-symfile.c (mono_debug_find_source_location): Moved to
16776 debug-mono-symfile.c; this is now operating on the new symbol file.
16778 2002-08-23 Martin Baulig <martin@gnome.org>
16780 * debug-helpers.c (mono_method_desc_from_method): New function to get
16781 a MonoMethodDesc from a MonoMethod.
16783 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16785 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16786 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16788 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16790 * string-icalls.[ch]: make helper methods static.
16792 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16794 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16795 types to it and to SetValueInternal.
16797 * object.c: Moved handle_enum label to its proper place. This was the
16800 This time i compiled mcs and gtk-sharp and they both work.
16802 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16804 * icall.c: reverted partially my previous patch until
16805 object.c:set_value handles enums correcly.
16807 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16810 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16811 (ves_icall_System_Environment_get_MachineName): removed warning when
16812 compiling under cygwin.
16814 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16816 * object.c: fixed field_get_value() for reference types.
16818 2002-08-22 Dick Porter <dick@ximian.com>
16820 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16821 Don't free a buffer while it's still needed. Patch from Jonathan
16822 Liger <Jonathan.liger@wanadoo.fr>
16824 2002-08-21 Miguel de Icaza <miguel@ximian.com>
16826 * icall.c (ves_icall_System_Environment_get_Platform): Add new
16829 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
16831 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16832 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16834 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16835 we call unmanaged code which throws exceptions.
16837 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16839 * appdomain.h: added per-domain entry_assembly.
16840 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16842 * icall.c: Assembly::GetEntryAssembly icall.
16843 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16844 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16846 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16848 * appdomain.h, gc.c: added mono_domain_finalize ().
16850 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16853 (mono_print_unhandled_exception): changed g_warning by g_printerr
16854 because g_log has a 1024 characters limit (yeah, i got a big stack
16855 trace). Don't print exception name, that should be in ToString
16858 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16860 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16861 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16863 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16866 (mono_print_unhandled_exception): after previous commit, i realized
16867 that MS calls ToString on the exception. I changed this function to
16868 do that. This way we get stack_trace for free.
16870 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16873 (mono_print_unhandled_exception): invoke Message property instead of
16874 getting 'message' field from Exception. Don't allocate memory for
16875 'trace' and 'message' if not needed.
16877 2002-08-18 Dick Porter <dick@ximian.com>
16879 * unicode.c: Fix asserts to match Encoder.cs checks
16881 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16883 * marshal.c: fix unaligned store issue and a few wrong
16884 opcode argument types.
16886 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16888 * icall.c: added GetUninitializedObjectInternal internal call.
16890 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
16892 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16893 to the right domain.
16895 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
16897 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16899 * class.c (class_compute_field_layout): set blittable to false for Strings
16901 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16903 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16905 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16906 first chunk of code to create types at runtime. Code to
16907 handle ReflectedType/DeclaringType. Make reflection handles
16910 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16912 * class.c: set correct name in arrays.
16914 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
16916 * appdomain.c (mono_domain_transfer_object): make it work with
16917 valuetypes. bug fixes.
16919 2002-08-12 Dick Porter <dick@ximian.com>
16921 * object.h: Rename some parameters to avoid c++ keywords (Patch
16922 from Joseph Wenninger <kde@jowenn.at>)
16924 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16926 * icall.c: added icall to implement Assembly.GetFile*.
16928 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16930 * reflection.h, reflection.c: code to embed managed resources.
16932 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16934 * class.c: move all the type size stuff into
16935 class_compute_field_layout().
16937 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16939 * class.c: ensure enums have always the correct instance size.
16940 * unicode.c: remove wrong assert.
16942 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16944 * assembly.c: fix mem corruption issue.
16945 * image.h, image.c: added mono_image_get_resource () to access
16947 * icall.c: implemented Assembly.EntryPoint property and some
16948 Managed Resources related internalcalls.
16951 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16953 * image.c, image.h: impemented mono_image_get_entry_point ().
16954 * appdomain.c: use mono_image_get_entry_point.
16956 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16958 * reflection.c: support the object type argument when loading
16961 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
16963 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16964 String as return type.
16966 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16968 * reflection.c: fix encoding of named args for custom attrs to match
16969 the ms implementation. Read them back when instantiating custom
16972 2002-08-02 Radek Doulik <rodo@ximian.com>
16974 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16975 by Dietmar as quick fix
16976 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16977 16 as stack size, used on more places as quick fix before Dietmar
16978 will fix it properly
16980 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16982 * object.h, object.c: added accessors for fields and properties.
16984 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16986 * class.c, class.h: made mono_class_get_field_from_name ()
16987 loop on parent types.
16988 Added mono_class_get_property_from_name ().
16990 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16992 * class.c, class.h: move the code to setup the type vtable in its own
16993 function so that it can be reused also for types created at runtime.
16994 Eliminate the "class" identifier from the header file.
16995 * reflection.c: setup the vtable for enums so that we can create
16996 objects for use in SetConstant ().
16998 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
17000 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
17001 instead of the delegate itself as this pointer (bug #28383)
17003 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
17005 * marshal.c (mono_marshal_get_managed_wrapper): added return type
17008 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17010 * loader.c: don't set the pinvoke bit on icalls.
17012 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
17014 * debug-helpers.c (mono_method_full_name): only print a number to
17015 indicate wrapper type (so that the output is more readable in traces).
17017 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
17019 * class.c (mono_class_init): include method override patch from Paolo
17021 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
17023 * icall.c: fixed GetTypeCode().
17025 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
17027 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
17028 use real delegate invoke function to make it work with multicast
17029 delegates (fix bug# 28291).
17031 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17033 * object.c: load constant strings.
17035 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17037 * reflection.c: no magic numbers.
17038 * tabledefs.h: security action enum.
17040 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17042 * assembly.c: fix possible memory corruption.
17044 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17046 * reflection.h, reflection.c: added support for linking resources.
17047 * verify.c: check we have an updated corlib.
17049 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
17051 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
17053 (mono_marshal_string_array): null terminate unmanaged string arrays.
17054 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
17056 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17058 * icall.c: Type.GetType () can now return also types from the
17061 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17063 * loader.h, loader.c: stack walking support.
17064 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
17065 GetCallingAssembly.
17067 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
17069 * marshal.c: added optimisations for blittable types
17071 * class.c (mono_array_class_get): do not set blittable attribute on arrays
17072 (mono_class_setup_mono_type): set blittable attribute for single
17075 * marshal.c (mono_string_utf8_to_builder): impl.
17076 (mono_string_builder_to_utf8): impl.
17077 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
17079 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
17081 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
17082 (mono_marshal_get_managed_wrapper): impl. byref types
17084 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17087 (search_method): don't display debug message.
17089 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
17091 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
17093 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17095 * appdomain.c: set the missing filename when throwing exception.
17097 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
17099 * metadata.c (mono_type_size): code cleanup
17100 (mono_type_stack_size): removed some test code
17102 2002-07-21 Miguel de Icaza <miguel@ximian.com>
17104 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
17105 mono_get_exception_file_not_found now.
17107 * exception.c (mono_exception_from_name_two_strings): New version
17108 that will call a constructor with two string arguments.
17109 (mono_get_exception_file_not_found): New helper routine, used to
17110 report file-not-found errors.
17112 2002-07-20 Dick Porter <dick@ximian.com>
17115 * process.c: Pass file handles to CreateProcess
17119 * file-io.c: Implemented CreatePipe
17121 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
17123 * metadata.c (mono_get_param_info): set alignment for value types
17125 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17127 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
17128 Constify mono_domain_assembly_open().
17129 * loader.c: handle null namespace in icalls.
17131 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
17133 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
17134 (emit_str_to_ptr_conv): marshal object as structs
17136 * metadata.c (mono_type_to_unmanaged): marshal object as structs
17138 * marshal.c (mono_marshal_get_runtime_invoke): support value types
17140 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
17142 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
17143 (mono_marshal_get_native_wrapper): we an now return value types
17145 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17147 * verify.c: more checks implemented.
17149 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
17151 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
17153 (mono_marshal_get_native_wrapper): allow byref arguments
17154 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
17155 impl. PtrToStringXXX methods
17156 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
17157 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
17158 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
17159 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
17160 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
17162 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17164 * reflection.c: fix buglet in parsing an assembly name.
17166 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
17168 * marshal.c (emit_ptr_to_str_conv): first impl.
17170 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17172 * object.c, class.h: cache the vtable in the class as suggested by
17173 vargaz@freemail.hu (Zoltan Varga).
17175 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17177 * class.h, loader.c: added mono_field_from_token().
17178 * verify.c: first cut of type checking code.
17180 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
17182 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
17184 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
17186 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
17188 (mono_marshal_get_remoting_invoke): impl.
17189 (mono_delegate_begin_invoke): impl.
17190 (mono_mb_emit_save_args): impl.
17191 (mono_delegate_end_invoke): impl.
17192 (mono_marshal_get_delegate_begin_invoke):
17193 (mono_marshal_get_delegate_end_invoke):
17194 (mono_marshal_get_delegate_invoke): generate a special name for
17195 those methods (including the signature) and associate them whith
17196 the delegate class.
17198 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
17201 (mono_reflection_type_from_name): now it has a MonoImage parameter
17202 which is used as the default image to search the type in. If the image
17203 is NULL or getting the type from it fails, it defaults to corlib.
17205 * icall.c: changed 1 call to mono_reflection_type_from_name to match
17208 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17210 * reflection.c: update the parameter table index.
17212 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17214 * domain.c: don't include the mark byte in the string hash.
17216 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17218 * icall.cs: icall for Type.GetTypeCode ().
17219 * verify: a couple of fixes and disabled local initialization checks.
17221 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
17223 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
17225 * debug-helpers.c (mono_method_full_name): print the type of the
17228 * metadata.c (mono_signature_hash): a hash function for signatures
17229 (mono_signature_hash): better hash algorithm
17231 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
17233 * debug-helpers.c (mono_method_full_name): this can now generate
17234 method names with signatures
17236 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
17237 method dont have this pointers.
17239 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17241 * reflection.c: fixup typebuilder tokens.
17242 * image.c: fix buglet.
17243 * marshal.h: remove whitespace.
17244 * metadata.h, metadata.c: reinstate code that was removed.
17245 * verify.c: handle catch directives and fix another couple of bugs.
17247 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
17249 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
17250 (mono_marshal_get_native_wrapper): make it comp. with the old code
17251 (mono_marshal_get_native_wrapper): support boolean
17252 (mono_marshal_get_managed_wrapper): support more types
17254 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
17256 * class.c (class_compute_field_layout): compute class->blittable attribute.
17258 2002-07-09 Dick Porter <dick@ximian.com>
17260 * threads.c: Make the thread cleaning up cope with threads that
17263 2002-07-08 Radek Doulik <rodo@ximian.com>
17265 * reflection.c (method_encode_code): use non-translated values to
17266 compute finally_start, this fixes exception handling on ppc, yay!
17268 * decimal.h (struct signscale): fix endianess
17270 2002-07-07 Radek Doulik <rodo@ximian.com>
17272 * reflection.c: swap box_val and not val
17274 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17276 * reflection.c, reflection.h: handle full assembly info in type name.
17277 Handle Type arguments when loading custom attributes.
17278 * icall.c: updated to use new mono_reflection_type_from_name () method.
17280 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17283 (method_from_memberref): also print assembly name when method not found.
17285 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17288 (ves_icall_TypeGetProperties): fixed bug #27473.
17290 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17292 * reflection.c: display image name and token when cannot find the
17293 .ctor for an attribute.
17295 2002-07-05 Martin Baulig <martin@gnome.org>
17297 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17299 2002-07-04 Dick Porter <dick@ximian.com>
17301 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
17302 compile on mingw. This will cause mingw builds to not wait for
17303 subthreads to terminate after the main thread does. I've lodged a
17304 bug with the mingw developers for them to wrap OpenThread().
17306 2002-07-03 Dick Porter <dick@ximian.com>
17308 * threads.c: Store thread IDs instead of handles, because
17309 GetCurrentThread() returns a pseudohandle and therefore stores
17310 useless values. mono_thread_cleanup() continues checking the
17311 array of threads until it is empty, to cope with subthreads
17312 spawning new threads after the main thread has finished.
17316 * profiler-private.h: Pass the thread ID to thread profiler
17317 functions, instead of a handle
17319 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17321 * verify.c: fixes to make it more usable.
17322 * pedump.c: added --verify code to verify IL code in an assembly.
17324 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17326 * reflection.c: turn errors into warnings to allow compiling corlib.
17328 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17330 * reflection.c: add special cases to compile corlib.
17332 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17334 * reflection.c: handle properties with only a set method.
17336 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17338 * opcodes.h: add enum with opcodes in opval order.
17340 2002-07-01 Dick Porter <dick@ximian.com>
17343 * object.c (mono_runtime_run_main): Removed unneeded argument
17345 2002-06-28 Martin Baulig <martin@gnome.org>
17347 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17349 2002-06-27 Dick Porter <dick@ximian.com>
17351 * threads.c: Store the handle in both the parent thread and in the
17352 subthread, to minimise the time between starting a new thread and
17355 2002-06-26 Dick Porter <dick@ximian.com>
17357 * appdomain.c (mono_runtime_cleanup): Close the socket library
17358 after all the threads have finished, not before
17360 2002-06-26 Martin Baulig <martin@gnome.org>
17362 * debug-symfile.c (mono_debug_find_source_location): Added
17363 `guint32 *line_number' argument. If it's not NULL, store the line number
17364 there and return the file name without the line number.
17366 2002-06-25 Dick Porter <dick@ximian.com>
17370 * process.c: Process forking and other support functions
17372 2002-06-25 Dick Porter <dick@ximian.com>
17374 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
17375 things dont happen when the image is closed.
17376 (mono_image_lookup_resource): Walk the resource section looking
17377 for a particular entry
17379 * cil-coff.h: PE resource section decoding
17381 2002-06-25 Dick Porter <dick@ximian.com>
17385 (mono_assembly_foreach): Accessor functions to walk the list of
17387 (mono_assembly_set_main):
17388 (mono_assembly_get_main): Process methods need to know which
17389 assembly is the "main" one
17391 * object.c (mono_runtime_run_main): Record the main assembly
17393 * debug-helpers.c: Fix typo
17395 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
17397 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
17398 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
17400 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17402 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
17404 2002-06-21 Miguel de Icaza <miguel@ximian.com>
17406 * image.c (do_mono_image_open): Initialize reference count,
17407 otherwise we leak the MonoImage.
17409 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17411 * reflection.c: small tweak to handle self-hosting.
17413 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17415 * reflection.c: fix type name parse code.
17417 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17419 * reflection.c: break out of the loop.
17420 * image.c: special case corlib.
17422 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17424 * reflection.c: add all the custom attrs at the end to ensure the
17425 ctors have been properly initialized when the attributes are defined
17426 in the current assembly.
17428 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17430 * reflection.c: handle correctly multiple-nested types.
17432 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17434 * row-indexes.h: fix typos.
17435 * reflection.c: adjust for typos and fix method_def_or_ref
17436 encoding in MethodImpl table.
17438 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17440 * reflection.c: fix entry point patching (thanks Serge!).
17442 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
17444 * verify.c: add check for System.Exception
17446 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17448 * image.c, class.c: minifix for code just c&p'ed.
17449 * reflection.c: warning fix.
17450 * object.h, loader.h, domain.c: load also StringBuilder.
17452 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17454 * marshal.h, marshal.c: some support code to handle complex marshaling.
17456 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17458 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
17459 Better signatures with vtable error dump.
17461 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17463 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17465 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
17467 * icall.c (ves_icall_Type_GetField): impl.
17469 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17471 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17472 to retrieve a marshal description blob for a field or param.
17474 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17476 * reflection.h, reflection.c: change order of nested type emission
17477 to avoid table corruption. The NestedTypes table is sorted.
17478 * icall.c: change order of GetConstructor results to workaround mcs bug.
17480 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17482 * reflection.h, reflection.c: handle field and param marshal
17485 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17487 * icall.c, marshal.c marshal.h: more Marshal class implementation.
17489 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17491 * reflection.c: fix call convention.
17493 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17495 * reflection.h, reflection.c: mono_image_get_memberref_token()
17496 takes a type instead of a class, now. Added
17497 mono_image_get_array_token() to create tokens for the special
17498 multi-dim array methods.
17500 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17502 * assembly.c: handle modules (no assembly table). Split
17503 loading references in its own function.
17504 * class.c: handle moduleref resolution scope.
17505 * image.c, image.h: cache module name in image.
17507 2002-06-07 Martin Baulig <martin@gnome.org>
17509 * reflection.c (mono_image_get_type_info): Only add a class layout entry
17510 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17512 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17514 * icall.c: more signature fixes that used uint instead of int.
17516 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17518 * reflection.c: fixed signature of field refs.
17520 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17522 * class.c, reflection.c: handle typerefs of nested types
17523 (both on read and when writing files).
17525 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17527 * icall.c: fix method signatures that tried to workaround the previous
17530 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17532 * debug-helpers.c: fix typo.
17534 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17536 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17537 rewrote the PE/COFF writing code (our programs are understood by the
17540 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17542 * gc.c, gc.h, icall.c: weakreference support.
17544 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17546 * Makefile.am, mono-config.c: use $(sysconfdir).
17548 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17550 * icall.c: changed default precision of Double.ToString() to 15.
17551 Fixed memory leak. Unified with Single.ToString.
17553 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17555 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17557 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17559 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17560 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17561 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17564 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17566 * debug-symfile.c, sysmath.c: yet more compilation fixes.
17568 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17570 * reflection.c, socket-io.c: more compilation fixes.
17572 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17574 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17575 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17576 unicode.c: warning and compiler compatibility fixes.
17578 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17580 * class.h, metadata.c: fixed warnings/compilation errors.
17582 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17584 * Makefile.am, mono-config.c, mono-config.h: configuration file
17586 * loader.c, loader.h: make Dll mapping configurable at runtime in the
17587 config file. Export methods to insert and lookup mappings.
17589 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17591 * reflection.c: handle types and boxed objects in custom attr
17594 2002-05-30 Martin Baulig <martin@gnome.org>
17597 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17599 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17601 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17602 to lookup the implmap row for a P/Invoke method.
17603 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17604 P/Invoke method from the runtime on an as needed basis.
17606 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
17608 * metadata.c (mono_metadata_parse_signature): impl.
17610 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17612 * class.c: handle .pack directive.
17614 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17616 * object.c: initialize static fields with RVA data.
17618 2002-05-25 Martin Baulig <martin@gnome.org>
17621 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17623 2002-05-24 Martin Baulig <martin@gnome.org>
17626 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17627 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17628 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17630 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17632 * object.c: special case string ctros in invoke.
17633 * gc.c: silly whitespace changes.
17635 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
17637 * threadpool.[ch]: impl. a threadpool that can
17638 be used by mint and mono.
17640 2002-05-22 Martin Baulig <martin@gnome.org>
17642 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17643 The first argument is now a `MonoReflectionModuleBuilder *', the return
17644 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
17645 `methods' field to get the method builder. The `token' argument is the
17648 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17649 invalid characters instead of g_assert_not_reached()ing. This seems
17650 to be the behaviour of mscorlib.
17652 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
17654 * object.c (mono_runtime_invoke_array): applied patch from Rachel
17655 Hestilow to fix bug #25104
17657 2002-05-21 Martin Baulig <martin@gnome.org>
17659 * debug-symfile.c (mono_debug_find_source_location): New function.
17660 Looks up an IL offset in the line number table and returns the source
17661 location as a string.
17663 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17666 (mono_double_ToStringImpl): changed %f by %g until we have something
17669 2002-05-21 Nick Drochak <ndrochak@gol.com>
17671 * icall.c : Use different name for Math.Pow's icall. Needed to check
17672 parameters first in C#.
17674 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17676 * icall.c, reflection.h: added icall to get info about an event.
17678 2002-05-20 Radek Doulik <rodo@ximian.com>
17680 * object.c (mono_value_box): don't use memcpy for boxing on BIG
17682 (mono_value_box): don't use memcpy for small sizes on
17683 architectures with unaligned access
17685 2002-05-20 Martin Baulig <martin@gnome.org>
17687 * reflection.c (mono_reflection_setup_internal_class): Don't crash
17688 if `tb->parent == NULL'.
17689 (mono_reflection_create_internal_class): New function. This is
17690 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17693 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17696 2002-05-19 Martin Baulig <martin@gnome.org>
17698 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17699 argument to get the length, don't default to the array length.
17701 2002-05-18 Miguel de Icaza <miguel@ximian.com>
17703 * assembly.c (mono_assembly_setrootdir): New function used to
17704 override the MONO_ASSEMBLIES directory.
17706 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17708 * icall.c: ValueType_GetHashCode() initialize local var.
17710 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17712 * reflection.c: sort custom attributes table.
17714 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17716 * reflection.c: support named args in custom attributes (write support).
17718 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17720 * reflection.c: fix finally position calculation.
17722 2002-05-15 Radek Doulik <rodo@ximian.com>
17724 * reflection.c: fixed endianess at many places
17726 * icall.c (ves_icall_InitializeArray): comment out debug msg
17728 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
17730 * object.c (mono_unhandled_exception): new function to handle
17731 unhandled exceptions.
17732 (mono_unhandled_exception): call the UnhandledException event.
17733 (mono_runtime_delegate_invoke): impl.
17735 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17737 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17738 returns the RVA, not the direct pointer to the data. Handle the case
17739 when the class size is fixed.
17741 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17743 * reflection.c: fix some endianess issues.
17745 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
17747 * object.c (mono_runtime_invoke): is now able to catch exceptions.
17749 * threads.c (mono_thread_init): added a callback which is invoked
17752 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17754 * icall.c: make GetHashCode return non-negative values.
17756 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
17758 * object.c, icall.c, gc.c: revert to address-based hashcode.
17760 2002-05-13 Miguel de Icaza <miguel@ximian.com>
17762 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17764 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17766 * icall.c, class.c: special case <Module>.
17768 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
17770 * icall.c: fix bug in GetNow().
17772 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
17774 * object.c (mono_runtime_class_init): make sure that we call all
17775 static class constructors.
17777 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17779 * reflection.c: sort methodsemantics table.
17781 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17783 * reflection.h, reflection.c: honour init locals setting.
17785 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17787 * icall.c: copied Double ToStringImpl for Single ToStringImpl
17789 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17791 * reflection.c: support ContructorBuilders in attribute blob creation.
17793 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17795 * reflection.c: some changes to build a binary that can be run
17796 directly in windows.
17798 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17800 * loader.c: print a big message when an icall can't be found.
17802 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17804 * string-icalls.c: fix bug 24248.
17806 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17808 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17809 icall.c, reflection.h: separate assembly loading by pathname and by
17810 assembly name. Use the MONO_PATH env var to search for assemblies.
17812 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17814 * assembly.c, image.h: add some support for assemblies
17815 with multiple modules.
17816 * class.c, class.h: export mono_class_from_typeref().
17817 * loader.c: remove duplicated code and use mono_class_from_typeref(),
17820 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17822 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17823 documentation says (the ECMA one is correct).
17825 2002-05-02 Dick Porter <dick@ximian.com>
17827 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17828 Don't name the synchronisation mutex.
17830 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
17833 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17834 Make the prototypes match.
17835 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17839 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17840 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17841 all systems have tm.tm_zone, so use strftime() with %Z to print
17842 the timezone abreviation into a temp string.
17844 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17845 rather than mono_array_addr() on a MonoString on Big Endian
17848 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
17850 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17853 2002-04-30 Dick Porter <dick@ximian.com>
17855 * socket-io.c: Cope with SOCKET being an integer rather than a
17858 * threads.c: Added Thread_free_internal, to deal with thread
17859 handle cleanup. Moved calls to handle_store() and handle_remove()
17860 to start_wrapper(), so each can only be called once. Allocate
17861 synchronisation blocks with GC_malloc(), and use GC finalisation
17862 to close the handles.
17864 * icall.c: added System.Threading.Thread::Thread_free_internal
17866 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17868 * icall.c: support Environment.Exit, CommandLineArgs().
17870 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17872 * object.c, object.h: added mono_runtime_run_main () and
17873 mono_runtime_get_main_args () for use in System.Environment.
17875 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17877 * gc.c: fix thinko, enable actual finalization since the jit is now
17880 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17882 * gc.c, object.c: take into account that an object may be offset wrt the address
17883 returned by GC_malloc().
17885 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17887 * image.c: handle files without entries in the assembly table (modules).
17889 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17891 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
17892 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17893 allowed to be null when it's System.Object class setup.
17895 2002-04-27 Martin Baulig <martin@gnome.org>
17897 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17898 if `tb->parent == NULL' rather than crashing.
17900 2002-04-28 Nick Drochak <ndrochak@gol.com>
17902 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
17903 calling acos() where asin() should have been called.
17905 2002-04-26 Martin Baulig <martin@gnome.org>
17907 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17908 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17909 there's a subdirectory called `System', but we don't want to read that
17910 subdirectory as an assembly.
17912 2002-04-25 Martin Baulig <martin@gnome.org>
17914 * debug-symfile.c: Reflect latest MonoString changes.
17916 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17918 * rand.c, rand.h: instance method icalls need to have an explicit
17919 this pointer as first argument in the C implementation.
17921 2002-04-25 Nick Drochak <ndrochak@gol.com>
17923 * icall.c: Fix typo in map for GetNonZeroBytes
17925 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17927 * string-icalls.c : String does now passes unit tests without any
17928 errors, the following changes has been made:
17930 Implemented replace methods.
17931 Renaming of methods to (try) follow the standard.
17932 Fixed compare ordinal
17933 Made all memory allocated directly to function instead of via icall function.
17934 Small performance fix in is_in_array function
17936 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17938 c (mono_string_Internal_ctor_charp_int_int):
17939 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
17940 sindex < 0, throw ArgumentOutOfRangeException instead of
17941 ArgumentNullException.
17943 Added new check for length == 0, however
17944 I need to make it return String.Empty from the C code.
17946 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17947 that calculate the length for us here.
17949 (mono_string_Internal_ctor_sbytep_int_int): Replaced
17950 mono_string_new_utf16 with mono_string_new, since value is utf8.
17952 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17954 * object.c: register the object for finalization if needed.
17955 Allocate one more char in the string for the terminating 0 char.
17957 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17959 * class.c, class.h, image.c: check if a type implemenst a destructor.
17960 Use the proper key for array class lookups.
17961 * icall.c: register the icalls in the System.GC class.
17962 * gc.c, gc.h: GC-related functions and icalls.
17964 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17968 * unicode.c: free some strings gotten from mono_string_to_utf8 and
17969 changed a couple of free () by g_free ().
17971 * decimal.c: one-liner in the comments for decimal2string ().
17973 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17975 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17977 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
17979 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17980 * object.c (mono_runtime_invoke_array) : handle null in params
17982 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17984 * string-icalls.c: fixed bug in split (one off bug)
17986 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17988 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17989 * icalls.c: added String::Equals as internal method
17991 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
17993 * threads.c: fixed bug in the double interlocked functions
17995 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
17997 * threads.c: implemented all of the new interlocked icalls.
17998 * string-icalls.c: fix a bug in insert.
17999 * icalls.c: added the icalls for interlocked, removed old string functions.
18001 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18003 * loader.c: fix off-by-one error when reading argument names.
18005 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18007 * profiler.c: win32 counter implementation (untested).
18008 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
18009 (the latter needs testing and more complete impl. from win32 folks).
18011 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
18013 * object.c: mono_array_new_full workaround mono_array_class_get
18016 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18018 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
18019 * object.h (mono_string_chars): Changed casting type.
18021 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18023 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
18024 method signatures to use gunichar2 instead of gint16.
18026 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
18028 * object.h, object.c: domain-specific versions of mono_object_new and
18031 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
18033 * object.c: changed String layout
18035 * string-icalls.c (mono_string_Internal_ctor_chara): added
18036 internal string constructors.
18038 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
18040 * threads.c: pass 'this' to the thread start routine.
18042 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18044 * string-icalls.c: fix IndexOf and LastIndexOf. Now
18045 InternalCompareStr don't call twice mono_string_cmp_char for the last
18046 character. Improved performance in mono_string_cmp_char.
18048 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18050 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
18051 code into its own library: libmonoruntime.
18053 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
18055 * object.h, object.c: changed array format so that szarrays do not
18056 require a bounds structure.
18057 * icall.c, appdomain.c: support for new szarray format.
18059 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
18061 * metadata.c: compare also the retuns type when comparing signatures:
18062 we didn't do this as an optimization since really overloaded methods
18063 must differ also in the arguments, but this doesn't work with
18064 low-level IL code (or when using explicit conversion operators: see
18065 bug#23498 for an example).
18067 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18069 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
18071 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18073 * icall.c: make MonoType::GetElementType its own icall.
18075 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18077 * icall.c: remove MonoMethod_get_Name().
18078 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
18081 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18083 * string-icalls.c: optimized a few methods.
18085 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18087 * icall.c: added all new string internal calls
18088 * string-icalls.c: added, new string internal call implementation.
18089 * object.c: added mono_string_new_size for allocating a string a size
18091 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
18093 * object.c (mono_object_isinst): use the same code as in the
18094 optimized x86 version.
18096 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18098 * profiler.c: TSC-based timer code (faster and more accurate).
18099 Not hooked up in configure, yet (set USE_X86TSC to 1).
18101 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
18103 * profiler.c, profiler.h: track time spent compiling methods.
18104 * threads.c: track thread creation/destruction.
18106 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
18108 * profiler.c, profiler.h, profiler-private.h: profiling interface
18109 and sample implementation. Moved here so that it can be used also by
18112 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
18114 * reflection.c, reflection.h: keep types and other handles separate in
18115 the hash tables for referred tokens. Add guid for modules.
18117 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18119 * assembly.c: fix bugs found with valgrind.
18120 * metadata.h, metadata.c: added mono_metadata_guid_heap().
18122 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
18124 * threads: added icall support for getting current domain for
18127 2002-04-13 Martin Baulig <martin@gnome.org>
18129 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
18130 (MonoDebugVarInfo): Added `index' field for register based addresses.
18131 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
18132 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
18133 `MonoDebugVarInfo *params' and `guint32 this_offset' with
18134 `MonoDebugVarInfo *this_var'.
18136 * debug-symfile.c (relocate_variable): New static function to write
18137 a location description for a local variable or method parameter.
18139 2002-04-12 Martin Baulig <martin@gnome.org>
18141 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
18142 stack offset and begin/end scope address of a local variable.
18143 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
18144 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
18145 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
18147 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
18148 Added new relocation types for start/end scope of a local variable.
18150 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18152 * object.h: add mono_object_domain() macro.
18153 * reflection.c: handle typespecs.
18154 * icall.c: MonoMethod::get_Name() implementation.
18156 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18158 * icall.c: String::GetHashCode() icall implementation.
18160 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18162 * icall.c: String::IndexOfAny icall.
18163 * object.c, object.h: make array->max_length more useful.
18164 Intrduced mono_object_class() and mono_string_length() macros.
18166 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18168 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
18169 instead of g_unichar_isdigit.
18171 2002-04-11 Nick Drochak <ndrochak@gol.com>
18173 * icall.c: Implement a simple Double.ToString().
18175 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18177 * appdomain.h: only io-layer.h is supposed to be included.
18178 * icall.c: explicitly import environ. Fix warning.
18180 2002-04-10 Nick Drochak <ndrochak@gol.com>
18182 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
18183 return true even if it's not Daylight Savings time.
18184 Only return false for the case where the function isn't
18185 implemented for a plaform (read Windows).
18187 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18189 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
18192 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
18194 * mempool.c (mono_mempool_alloc): only use g_malloc when
18195 absolutely necessary.
18197 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
18199 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
18201 * class.c (mono_class_vtable): use domain mempool to allocate vtable
18202 (mono_class_proxy_vtable): use domain mempool
18204 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18206 * appdomain.h, appdomain.c: split initialization that requires the
18207 execution engine support into mono_runtime_init().
18209 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
18211 * class.c (mono_class_init): don't include vtable inside MonoClass
18212 to save some memory, gather some statistics.
18213 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
18215 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18217 * icall.c: internalcall implementation for ValueType.Equals().
18219 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
18221 * object.c (mono_message_init): moved
18222 (mono_runtime_exec_main): new arch. independent impl.
18223 (mono_runtime_invoke_array): new method - like
18224 mono_runtime_invoke, but you can pass an array of objects.
18225 (mono_remoting_invoke): new arch. independent impl.
18226 (mono_message_invoke): new arch. independent impl.
18227 (mono_runtime_class_init): new arch. independent impl.
18228 (mono_runtime_object_init): new arch. independent impl.
18230 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18232 * metadata.c, object.c, reflection.c: documented the exported
18235 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
18237 * icall.c: simpler code to pass the assembly builder data to corlib.
18238 Implement GetNestedTypes() internalcall.
18240 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18242 * class.c: warn if a type can't be loaded.
18244 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
18246 * image.h: typedef MonoImageOpenStatus
18247 * types.h: removed unused file
18249 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
18251 * icall.c: Enum_ToObject accepts enum value arguments.
18253 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18255 * class.c: move initialization of properties, events and nested
18256 classes, so that they happen for interfaces, too.
18258 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18260 * icall.c: cleanup some ugly casts in Array_SetValue*.
18262 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18264 * icall.c: the values array fro enums is of the correct type, now.
18265 Implement (correctly) getFullName instead of assQualifiedName for
18267 * reflection.h, reflection.c: added mono_type_get_name ().
18269 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18271 * assembly.c, image.h: for each MonoImage, record from wich assembly
18273 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
18274 Make Type.Assembly work.
18276 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
18278 * debug-symfile.h: use char* instead of gpointer to avoid
18281 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
18283 * icall.c (ves_icall_InternalExecute): impl. FielSetter
18284 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
18286 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
18288 * icall.c (mono_message_init): impl. (code cleanup)
18289 (ves_icall_InternalExecute): impl. FieldGetter
18291 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
18292 defined we call all (non-static)methods through the vtable.
18294 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
18296 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
18297 finalizer even though the memory is still referenced (and the chunk of
18298 memory is not freed).
18300 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18302 * assembly.c: fix brokeness.
18304 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
18306 * class.c: kill some warnings. Check explicit interface method
18307 implementation also without considering the namespace.
18308 Load also literal strings in static class data.
18310 2002-03-29 Miguel de Icaza <miguel@ximian.com>
18312 * assembly.c (default_assembly_name_resolver): Kill memory leak.
18313 (default_assembly_name_resolver): Make the resolver take the
18314 "base" directory where the assembly was originally defined, so we
18315 can load DLLs that are in the same directory as the assembly that
18316 is being referenced.
18318 2002-03-28 Dick Porter <dick@ximian.com>
18324 * unicode.c: Warning cleanups
18326 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
18328 * object.h, reflection.h: use the correct type instead of MonoObject.
18330 2002-03-28 Martin Baulig <martin@gnome.org>
18332 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
18333 (mono_debug_update_symbol_file): Initialize classes if necessary.
18335 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18337 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
18338 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
18340 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
18342 * assembly.h: fix function prototype.
18343 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
18344 * mono-endian.h: use const cast.
18346 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
18348 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
18350 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18352 * loader.c: don't assert when a typeref can't be loaded, give
18353 a chance to the runtime to trow an exception instead.
18354 * loader.h: fix warning.
18356 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
18358 * class.c (mono_class_proxy_vtable): added proxy support
18360 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
18362 * icall.c: removed last of PAL calls, added System.Environment
18363 * file-io.h, file-io.c: MonoIO implementation
18364 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
18366 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18368 * appdomain.c: do not use the byte marker in ldstr table lookup.
18369 * debug-helpers.c: allow two ':' to separate class and method name.
18370 * object.c: allocate arrays bounds with the GC, too.
18371 * verify: add a few more checks.
18373 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
18375 * reflection.c: output also literal strings. Allocate parameter data
18376 with GC_malloc() (thanks, Martin, for catching this!).
18378 2002-03-26 Martin Baulig <martin@gnome.org>
18380 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
18381 include the `this' offset in the `param_offsets'.
18383 2002-03-25 Martin Baulig <martin@gnome.org>
18385 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
18386 mono_debug_get_class() function to get the classes. Added new
18387 relocation types for arrays and strings.
18388 (mono_debug_get_class): New static function to search in all
18389 referenced assemblies for a metadata token.
18391 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
18393 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18395 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
18396 hold gc-allocated objects. Make the string heap a stream like the
18397 others. Removed duplicated code when writing stream info.
18398 Added asserts to catch possible buffer overflows. Set the sorted map
18399 for tables that need sorting. Added some documentation.
18401 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
18403 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
18404 for interned strings and vtables.
18406 2002-03-24 Martin Baulig <martin@gnome.org>
18408 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
18409 it in the array since it was created with g_slist_prepend().
18411 2002-03-24 Martin Baulig <martin@gnome.org>
18413 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
18414 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
18415 (mono_debug_method_from_token): Renamed to
18416 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
18417 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
18419 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
18422 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
18424 2002-03-24 Martin Baulig <martin@gnome.org>
18426 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
18427 (mono_debug_method_from_token): New func.
18429 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
18430 New interncall, calls mono_debug_local_type_from_signature().
18431 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
18432 calls mono_debug_method_from_token().
18434 2002-03-23 Martin Baulig <martin@gnome.org>
18436 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
18437 specifies the number of bytes to be converted, not the array size.
18438 Return the number of chars, not the number of bytes.
18439 (ves_icall_iconv_get_chars): The `byteCount' argument
18440 specifies the number of bytes to be converted, not the array size.
18442 2002-03-23 Martin Baulig <martin@gnome.org>
18444 * reflection.h (MonoReflectionSigHelper): New type.
18446 * reflection.c (mono_reflection_sighelper_get_signature_local),
18447 (mono_reflection_sighelper_get_signature_local): New functions.
18449 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
18450 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
18453 2002-03-23 Martin Baulig <martin@gnome.org>
18455 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
18456 is_writeable is set.
18457 (mono_raw_buffer_update): New function to write the modified map
18460 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18462 * debug-symfile.c (mono_debug_update_symbol_file): Call
18463 mono_raw_buffer_update() when done writing.
18465 2002-03-23 Martin Baulig <martin@gnome.org>
18467 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18469 * debug-symfile.c: Added support for arguments and local variables.
18471 2002-03-23 Dick Porter <dick@ximian.com>
18473 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18474 protected by ifdefs, hence breaking the w32 build.
18476 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18478 * object.c: implement is_interned() the right way.
18480 2002-03-21 Martin Baulig <martin@gnome.org>
18482 * debug-symfile.[ch]: New files to handle debugging information
18483 files. There's also support to dynamically update these symbol
18484 files to include machine dependent information.
18486 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
18488 * threads.c (mono_thread_create): new function to create thread
18491 2002-03-20 Martin Baulig <martin@gnome.org>
18493 * icall.c (ves_icall_InternalInvoke): Create a new object if the
18494 method is a constructor.
18495 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18496 points to ves_icall_InternalInvoke().
18498 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
18500 * file-io.c: Flush shouldn't throw exceptions.
18502 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
18504 * file-io.c: FileStream flush support; FileSetLength now
18505 restores file pointer.
18507 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18509 * class.c: set image for pointer classes.
18511 2002/03/19 Nick Drochak <ndrochak@gol.com>
18513 * sysmath.c: Forgot one.
18515 2002-03-18 Miguel de Icaza <miguel@ximian.com>
18517 * sysmath.c: Avoid redefining existing names.
18519 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
18521 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18522 handled by runtime as icall rather than dllimport from libm.so
18523 * file-io.c, file-io.h: fixed handle argument type.
18525 2002-03-18 Dick Porter <dick@ximian.com>
18527 * reflection.c (mono_image_get_type_info): rename interface to
18528 iface, because of "#define interface struct" on windows.
18530 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18532 * class.c, class.h: rename and export mono_ptr_class_get().
18533 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18534 * reflection.c, reflection.h, icall.c: better/saner type name
18535 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18538 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
18540 * class.c (mono_class_init): removed hardcoded GHC_SLOT
18542 * icall.c (ves_icall_InternalInvoke): impl.
18544 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18546 * reflection.c: output the interface map table, too.
18548 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18550 * class.c (class_compute_field_layout): separate computation of
18551 static field layout
18553 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
18555 * icall.c: added System.Buffer support.
18556 * file-io.c: moved file icalls from PAL to FileStream.
18558 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
18560 * icall.c (ves_icall_System_Object_GetHashCode): impl.
18562 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
18564 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18566 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18568 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18570 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18572 * debug-helpers.{c,h}: moved here from monograph some useful functions
18573 to locate a method by name/signature in a class or image. Included
18574 also a small and flexible IL disassembler.
18576 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18578 * reflection.c: fixup tokens in methods with small header size, too.
18580 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
18582 * object.c (mono_string_to_utf8): remove assert(!error), instead
18585 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18587 * icall.c: update to the new mono_Array_class_get interface.
18589 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18591 * appdomain.c, object.c: Boehm-GC enable.
18592 * icall.c: make get_data_chunk() support split data requests.
18593 Ensure a class is initialized in more cases. Return only the first
18594 property found in GetProperties() or the compiler gets confused.
18595 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18596 * reflection.h, reflection.c: add fixup mechanism for field and method
18597 tokens. Initialize assembly->typeref in a single place. Output
18598 properties after events. Support custom attributes for events, too.
18599 Typo fix for paramter custom attrs.
18601 2002-03-07 Martin Baulig <martin@gnome.org>
18603 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18605 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
18607 * class.c (mono_array_class_get): fix. for multi. dim. arrays
18609 2002-03-06 Martin Baulig <martin@gnome.org>
18611 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18612 non-zero lower bounds. See testcases #F10-#F13.
18614 2002-03-05 Martin Baulig <martin@gnome.org>
18616 * exception.c (mono_get_exception_argument_out_of_range): New exception.
18618 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18619 ves_icall_System_Array_GetValue(), only calculate the absolute array position
18621 (ves_icall_System_Array_SetValue): Likewise.
18622 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18623 as argument and does the actual work. This function is used when copying a
18624 multi-dimensional array.
18625 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18626 now do all the widening conversions of value types.
18627 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18629 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18631 * class.c: remove some magic numbers and use the smbolic names,
18632 instead. Added init_events() to load event info at class init time.
18633 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18634 and mono_metadata_methods_from_event().
18635 * reflection.h, reflection.c: added support for writing out the evnets
18636 related information.
18638 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18640 * reflection.h, icall.c: use a different method (GetInterfaces)
18641 to gather interface info and add isbyref, isprimitive and
18642 ispointer to the ves_icall_get_type_info() return value.
18644 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18646 * class.h: stared adding support for events.
18647 * icall.c: split find_members implementation. Added debug icall to get
18648 the address of an object.
18649 * reflection.c: handle TypeBuilders in mono_type_get_object().
18651 2002-03-01 Martin Baulig <martin@gnome.org>
18653 * icall.c (ves_icall_System_Array_GetLength): This must throw an
18654 ArgumentOutOfRangeException(), not an ArgumentException().
18655 (ves_icall_System_Array_GetLowerBound): Likewise.
18656 (ves_icall_System_Array_GetValue): Improved argument checking.
18657 (ves_icall_System_Array_SetValue): Improved argument checking.
18659 2002-03-01 Martin Baulig <martin@gnome.org>
18661 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18662 called with invalid arguments rather than just dying with g_assert().
18663 (ves_icall_System_Array_SetValue): Likewise.
18664 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18665 raise a NotImplementedException instead.
18666 (ves_icall_System_Array_GetLength): Added argument checking.
18667 (ves_icall_System_Array_GetLowerBound): Added argument checking.
18669 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
18671 * object.h (mono_assert): new macros mono_assert and
18672 mono_assert_not_reached
18674 2002-02-28 Martin Baulig <martin@gnome.org>
18676 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18677 and "System::String::IsInterned" to "System::String::_IsInterned".
18679 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18681 * icall.c: remove hacks for typebuilder. Added icall to create a
18682 modified type from a tybebuilder.
18683 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18684 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18685 to create a backing MonoClass for a TypeBuilder.
18687 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18689 * class.c, class.h: more refactoring of class init.
18690 Export mono_class_setup_mono_type() and mono_class_setup_parent().
18692 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18694 * marshal.c, marshal.h: start of marshaling interface.
18696 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18698 * icall.c: fix order in assembly qualified name icall.
18700 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18702 * class.c: do not free str, since we store it in the hash table.
18703 * reflection.h: add label field to MonoILExceptionInfo.
18704 * reflection.c: handle references to more than one assembly. Handle
18705 case when there isn't a module created in the assembly.
18707 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18709 * class.c: Fix typo. Start refactoring of class init code.
18711 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18713 * appdomain.c: exit with 1 on error.
18714 * class.c: we already have the name in MonoClassField.
18715 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18716 MonoStreamHeader instead of an offset of image->raw_metadata.
18718 2002-02-26 Miguel de Icaza <miguel@ximian.com>
18720 * appdomain.c (mono_init): Be even more descriptive about the error.
18722 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18724 * appdomain.c: give the user an informative message when corlib can't
18727 2002-02-26 Martin Baulig <martin@gnome.org>
18729 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18730 New icall to get the time zone data.
18732 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18734 * reflection.c: set virtual and raw size of section correctly.
18735 * threads.c: transfer domain information to newly created threads.
18737 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18739 * class.c: when instancing a class in a domain, load the default
18740 vaules for static fields from the constant table. Fix System.Enum to
18742 * icall.c: implement Object::GetType() internalcall. Implemented
18743 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18744 Fixed checking of binding flags in find_members().
18745 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18746 * reflection.c: handle enumerations when writing to the constant
18747 table. Use a different object cache for types.
18750 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
18752 * object.c (mono_object_isinst): fix for arrays
18754 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18756 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18758 * object.c: don't use mprotect () and fix intern pool hash table
18759 lookup for big endian systems.
18761 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18763 * icall.c: change type_is_subtype_of () signature.
18765 2002-02-21 Mark Crichton <crichton@gimp.org>
18767 * rand.c, rand.h: Added random number generator for
18768 System.Security.Cryptography classes.
18770 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18772 * icall.c: Added System.Security.Cryptography calls.
18774 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18776 * class.c, icall.c, metadata.c: better support for pointer types.
18777 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18778 * reflection.c: Add support for getting custom attrs for properties
18779 and simplify some code.
18781 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18783 * icall.c: change getToken () and add custom attribute GetBlob()helper
18785 * reflection.h: add custom attrs array to the reflection builder structures.
18786 * reflection.c: encode and emit custom attributes for all the relevant
18787 reflection objects. Cache fieldref and methodref tokens. Change
18788 mono_image_create_token() interface to take a MonoDynamicAssembly.
18789 More complete custom attributes decoder. Load custom attributes for
18790 Assembly, Field, Method and Constructor objects, too. Make the
18791 returned array an Attribute[] one, not object[]. Added
18792 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18793 custom attribute constructor.
18795 2002-02-20 Dick Porter <dick@ximian.com>
18799 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18800 problem code out for now).
18802 2002-02-19 Radek Doulik <rodo@ximian.com>
18804 * object.c (mono_ldstr): use hash table to avoid multiple swapping
18806 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18808 * icall.c: register the GetCustomAttributes method.
18809 * object.c, object.h: add mono_string_new_len ().
18810 * reflection.h, reflection.c: added mono_runtime_invoke(),
18811 mono_install_runtime_invoke(). Added
18812 mono_reflection_get_custom_attrs () to load custom attributes and
18813 create the attribute objects.
18815 2002-02-19 Dick Porter <dick@ximian.com>
18816 * threads-dummy-types.c:
18817 * threads-dummy-types.h:
18820 * threads-pthread-types.c:
18821 * threads-pthread-types.h:
18822 * threads-pthread.c:
18823 * threads-pthread.h: Deleted obsolete files
18825 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
18827 * class.c (mono_class_vtable): runtime init the class when we
18828 allocate static class data.
18830 * icall.c (ves_icall_System_Array_SetValue): check for null values.
18832 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18833 and String - but we will need generic marshalling support in the
18835 (mono_init): set the domain name in a ms compatible way
18837 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18840 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
18842 * object.c (mono_array_clone): use alloca() instead of g_malloc
18845 * appdomain.c (mono_domain_unload): impl.
18847 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18849 * appdomain.c, object.c: fix intern pool implementation.
18850 * class.c: fix alignment code.
18852 2002-02-16 Radek Doulik <rodo@ximian.com>
18854 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18855 and s2 > s1, just copy lower bytes to be compatible with little
18856 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18857 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18859 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18860 force big_endian to be 1 for big endian machines
18861 (ves_icall_iconv_new_decoder): ditto
18863 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
18865 * socket-io.c (convert_sockopt_level_and_name): If the system
18866 doesn't define SOL_IP or SOL_TCP, get them by hand using
18867 getprotobyname() and caching the values (because this could be a
18869 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18870 Use the appropriate struct when the system does support it. Ie,
18871 not all systems have struct ip_mreqn so use struct ip_mreq when
18874 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18876 * reflection.c: handle finally clauses.
18878 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18880 * socket-io.c: use g_snprintf() instead of snprintf.
18882 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18884 * reflection.c (mono_param_get_objects): Cast second argument to
18885 mono_method_get_param_names to a const char** to silence the
18888 * appdomain.c (mono_domain_assembly_open): Put parens around the
18889 truth statement in the for-loop.
18891 * unicode.c (iconv_convert): Got rid of a compiler warning about
18892 int i being unused when the system has a new iconv.
18893 (iconv_get_length): Same.
18895 * image.c (load_class_names): Cast the second argument to
18896 g_hash_table_insert() to char* to hush compiler warnings about the
18898 (mono_image_open): Same here.
18900 * socket-io.c: Don't conditionally include sys/filio.h or
18901 sys/sockio.h here anymore since we now get them from
18902 io-layer/io-layer.h
18903 (inet_pton): If the system doesn't support inet_aton, implement
18904 using inet_addr and also #define INADDR_NONE if it isn't defined
18907 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18909 * metadata.c, metadata.h: added function to get packing and size info
18911 * reflection.h, reflection.c: handle field RVA data. Save info about
18912 the table layout if needed. Assign typedef indexes to all the types
18913 before dumping the info about them to avoid forward reference problems.
18915 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
18917 * socket-io.c (convert_sockopt_level_and_name): ifdef
18918 SO_ACCEPTCONN because it is not defined on my system (old debian)
18920 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18922 * opcode.c: use stddef.h to get NULL.
18924 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
18926 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18927 for FIONBIO, FIONREAD and SIOCATMARK.
18928 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18929 define INADDR_NONE and besides, inet_addr() is deprecated and
18930 should not be used. Use inet_pton() instead - it also has the
18931 added bonus that it can easily handle IPv6 addresses as well.
18932 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18934 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18936 * decimal.c: remove _MSC_VER conditional.
18938 2002-02-13 Dick Porter <dick@ximian.com>
18941 * icall.c: Internal calls for Blocking, Select, Shutdown,
18942 GetSocketOption and SetSocketOption
18944 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18946 * assembly.cs: better resolver: use it instead of some kludgy
18949 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18951 * reflection.c: the best way to speed-up the compiler is to avoid
18954 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
18956 * class.c (mono_class_vtable): changed the object layout
18957 (obj->vtable->class).
18958 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18960 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18962 * assembly.c: look for assemblies in the assembly dir, too.
18964 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18966 * class.c: fix thinko in mono_class_from_type().
18968 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18970 * exception.h, exception.c: added TypeLoadException.
18971 * object.h, object.c: added mono_array_clone ().
18972 * icall.c: handle throwOnError in AssemblyGetType().
18973 Added Array.Clone().
18974 * opcode.h, opcode.c: use a single value for the opcode val.
18975 Compile fix for non-gcc compilers.
18977 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18979 * opcodes.c, opcodes.h: export interesting info about opcodes.
18981 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
18983 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18986 * class.c (class_compute_field_layout): set element_class for enums
18987 (mono_class_create_from_typedef): set element_class for normal classes
18989 * icall.c (ves_icall_System_Enum_get_value): impl.
18991 * class.c (mono_class_create_from_typedef): do not set valuetype
18992 flag for System.ValueType and System.Enum
18994 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
18996 * unicode.c (iconv_convert): fix big endian problem.
18998 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
19000 * class.c: add asserts if we are ever going to scribble over memory.
19001 * socket-io.c: not all systems have AF_IRDA defined.
19003 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
19005 * class.c (class_compute_field_layout): do not consider static
19006 fields to compute alignment
19008 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
19010 * appdomain.c (mono_appdomain_get): impl.
19011 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
19013 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19015 * icall.c: ignore "file://" prefix when loading an assembly.
19017 2002-01-23 Dick Porter <dick@ximian.com>
19021 * Makefile.am: Added socket support
19023 2002-01-23 Miguel de Icaza <miguel@ximian.com>
19025 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
19026 code back. This should return the assemblies that are loaded by
19027 the runtime on behalf of an application domain.
19029 The current implementation is still broken, it just returns every
19030 assembly loaded, but until we get real applications domain this
19033 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
19035 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
19038 2002-01-23 Miguel de Icaza <miguel@ximian.com>
19040 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
19041 the mono_class_from_name lookup.
19042 (ves_icall_get_parameter_info): ditto.
19043 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
19045 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
19047 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
19049 * class.c: load also nested classes on class init.
19050 System.ValueType instance methods gets passed boxed
19051 values, unless methods in derived classed that get a pointer to the
19053 * icall.c: use better name parsing code in GetType().
19054 * image.c, image.h: add mono_image_loaded ().
19055 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
19056 * reflection.c, reflection.h: added mono_reflection_parse_type().
19058 2002-01-22 Veronica De Santis <veron78@interfree.it>
19060 * icall.c : Added mapping of internal calls for Manual and Auto reset events
19061 * threads.c : Added the implementation of internal calls for events
19062 * threads.h : Added prototypes of internal calls for events
19064 2002-01-21 Radek Doulik <rodo@ximian.com>
19066 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
19068 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
19070 * class.c (mono_class_init): set min_align to 1 (instead of 0)
19071 (mono_class_value_size): use min_align
19073 2002-01-20 Dick Porter <dick@ximian.com>
19076 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
19077 so it compiles on w32.
19079 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
19081 * metadata.c (mono_type_stack_size): impl.
19083 * class.c (mono_class_get_field): impl. memberref token
19085 2002-01-16 Veronica De Santis <veron78@@interfree.it>
19087 * icall.h : Added the internal calls mapping for CreateMutex_internal
19088 and ReleaseMutex_internal.
19089 * threads.h : Added the prototype of mutexes internal calls.
19090 * threads.c : Added the implementations of mutexes internal calls.
19092 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
19094 * metaparse.h: removed unused file.
19095 * reflection.c, reflection.h: added stream_data_align () function
19096 to align data in streams and keep stream aligned. Add support for
19097 exception support in method headers.
19099 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
19101 * unicode.c: make iconv_convert () return the number of bytess written
19102 in the output buffer.
19104 2002-01-15 Dick Porter <dick@ximian.com>
19105 * threads.c: Make the runtime's idea of infinite timeouts coincide
19106 with the class library's
19108 Fix a particularly egregious bug in mono_thread_cleanup(). That
19109 code was so utterly bogus it must have been written on a Monday.
19111 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
19113 * reflection.h: add subtypes field to TypeBuilder.
19114 * reflection.c: encode constants for literal fields.
19115 Handle subtypes. Fix user string token (and add a zero byte)
19118 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
19120 * class.c (mono_class_init): bug fix: assign slot numbers for
19123 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19125 * reflection.c: don't try to output a code RVA for abstract methods.
19126 Small fixes for method header format. Output parameter info to the
19127 ParamDef table. Save method overriding info to MethodImpl table.
19128 Fix property support. Allow typedef.extends to be a type in the
19130 * verify.c: fix off-by-one error.
19132 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
19134 * class.c: fix mono_class_from_mono_type () for szarray types.
19135 Remove unused cache check in mono_class_from_type_spec().
19136 * icall.c: *type_from_name () functions handle simple arrays and byref.
19137 * reflection.c: handle byref and szarray types. Handle methods without
19138 body (gets P/Invoke compilation working). Handle types and fields in
19140 * reflection.h: add rank to MonoTypeInfo.
19142 2002-01-10 Dick Porter <dick@ximian.com>
19144 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
19147 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
19149 * icall.c: initialize class in type_from_handle ().
19150 Loop also in parent classes for get_method ().
19151 * reflection.c: properly encode class and valuetype types.
19152 Start on encoding TypeBuilder types. Handle fieldrefs.
19153 Use correct length when registering a user string.
19154 Handle ConstructorBuilder and MonoMethod in get_token ().
19155 Make mono_type_get_object () aware of cached types.
19156 * object.c: back out change to mono_string_new ().
19158 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
19159 * object.c: mono_string_new should return a NULL when the string
19160 passed in is NULL -- not try to deference it.
19162 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19164 * icall.c: hack to make IsSubType work for TypeBuilders.
19165 * reflection.c: emit constructors before methods.
19166 Retrieve param names in mono_param_get_objects().
19168 2002/01/05 Nick Drochak <ndrochak@gol.com>
19170 * Makefile.am: fix list of headers and sources so automake 1.5
19171 doesn't complain. Removed \# at end of list.
19173 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
19175 * reflection.c: get token for a method ref. Set return type of
19176 constructor to void.
19177 * loader.c: debug message.
19178 * class.c: typo fix.
19180 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
19182 * icall.c: fix array init with rank > 1. FindMembers
19183 loops in parent class as well.
19184 * image.c: do not insert nested types in name cache.
19185 * reflection.c: warning fix.
19186 * reflection.h: add override method (for interface impl).
19188 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
19190 * metadata.c: fix customattr decoding.
19192 2001-12-21 Miguel de Icaza <miguel@ximian.com>
19194 * rawbuffer.cs: Added native Win32 implementation, avoids using
19195 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
19197 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
19199 * class.c: make the low-level routines handle the cache.
19201 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
19203 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
19205 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
19207 * class.c: fix mono_array_element_size() for objects.
19208 * class.h, class.c: add properties to MonoClass and load them
19210 * icall.c: check with isinst() when assigning a value to an array
19211 instead of requiring the classes to match exactly.
19212 Implemented icall for System.Type::GetType().
19213 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
19214 enums. Handle bindingflags when looking for methods and fields.
19215 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
19216 and mono_metadata_methods_from_property().
19217 * reflection.h, reflection.c: added structures for propreties,
19218 parameters and enums. Implemented mono_property_get_object() and
19219 mono_param_get_objects().
19221 2001-12-18 Dick Porter <dick@ximian.com>
19223 * file-io.c: Use mono_string_to_utf16() instead of
19224 mono_string_chars()
19226 * object.c: Added mono_string_to_utf16(), which copies the non
19227 NULL-terminated MonoString into a new double-null-terminated
19230 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
19232 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
19234 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
19236 * file-io.c: raise exceptions if handle is invalid.
19238 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
19240 * assembly.c: yet another check for mscorlib.
19241 * class.c, class.h: load nesting info for classes.
19242 * icall.c: many new functions to support the Reflection classes.
19243 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
19244 * reflection.h, reflection.c: mono_image_create_token(),
19245 mono_assembly_get_object(), mono_type_get_object(),
19246 mono_method_get_object(), mono_field_get_object(): methods to return
19247 objects that parallel the C representation of assemblies, types,
19250 2001-12-11 Dick Porter <dick@ximian.com>
19253 * file-io.c: Internal calls for file IO.
19255 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
19257 * tabledefs.h: missing FileAttributes.
19258 * verify.h, verify.c: use is_valid_string () to simplify and check for
19259 valid strings more correctly. Fix warnings and speeling.
19260 Check more tables: Filed, File, ModuleRef, StandAloneSig.
19261 Check code: branches, maxstack, method calls.
19263 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
19265 * object.c (mono_object_allocate): removed static, so that the jit
19266 can allocate value types.
19268 * icall.c (ves_icall_System_DateTime_GetNow): impl.
19270 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19272 * class.c: init enum types right away and register the
19273 token->MonoClass map in mono_class_create_from_typedef ().
19274 * verify.h, verify.c: first cut of the verifier.
19275 * pedump.c: add --verify switch to verify metadata tables.
19276 * tabledefs.h: add some missing enums.
19278 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
19280 * class.c (mono_install_runtime_class_init): impl.
19281 (mono_class_init): renamed mono_class_metadata_init to
19282 mono_class_init, also removed the metadata_inited flag
19284 * object.c (mono_object_isinst): use faster algorithm
19286 2001-11-30 Radek Doulik <rodo@ximian.com>
19288 * mono-endian.h: reverted last change
19289 added function prototypes
19291 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
19292 add mono-endian.c back
19294 * mono-endian.c: returned back, as Paolo pointed out, it's needed
19295 for unaligned access, I've mistaked it with endianess. I am
19297 (mono_read16): fix reverted endianess
19298 (mono_read64): ditto
19299 (mono_read32): ditto
19301 2001-11-30 Dick Porter <dick@ximian.com>
19303 * exception.c: Implement mono_exception_from_name()
19305 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19307 * metadata.h, metadata.c: remove params_size and locals_size and their
19308 calculation from the metadata code: they are only usefult to the
19311 2001-11-29 Radek Doulik <rodo@ximian.com>
19313 * object.c (mono_ldstr): swap bytes here, it's probably not the
19314 best place, but works for me now, I'll redo it once I know mono
19315 better, also note that I add PROT_WRITE and don't reset back, also
19316 note that it's only affects big endians, so x86 should be OK
19318 * mono-endian.h (read16): use just glib macros for both endians
19320 * mono-endian.c: removed as glib macros are used in in
19321 mono-endian.h so we don't need to care about endianess for read
19322 macros as glib does that for us already
19324 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
19326 * class.h, class.h: take minimum alignment into consideration so
19327 that the fields of a class remain aligned also when in an array.
19329 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19331 * loader.h, loader.c: add mono_method_get_param_names().
19332 * class.c: 0-init class fields.
19334 2001-11-26 Dick Porter <dick@ximian.com>
19338 * threads.c: New file that handles System.Threading on all platforms
19341 * object.h: Remove the synchronisation struct from MonoObject,
19342 replace it with a pointer that gets initialised on demand
19344 * Makefile.am: Replace all the system-specific threading code with
19345 a single file that uses the new wrapper library
19347 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
19349 * class.c, class.h: add mono_install_trampoline() so that the runtime
19350 can register a function to create a trampoline: removes the ugly
19351 requirement that a runtime needed to export arch_create_jit_trampoline.
19352 * object.h, object.c: added mono_install_handler() so that the runtime
19353 can install an handler for exceptions generated in C code (with
19354 mono_raise_exception()). Added C struct for System.Delegate.
19355 * pedump.c: removed arch_create_jit_trampoline.
19356 * reflection.c: some cleanups to allow registering user strings and
19357 later getting a token for methodrefs and fieldrefs before the assembly
19359 * row-indexes.h: updates and fixes from the new ECMA specs.
19361 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
19363 * class.h, class.c: add enum_basetype field to MonoClass.
19364 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
19365 to get index in the constant table reated to a field, param or
19367 * reflection.h, reflection.c: handle constructors. Set public-key and
19368 version number of the built assembly to 0.
19369 * row-indexes.h: update from new ECMA spec.
19371 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19373 * class.h, class.c: add a max_interface_id to MonoClass.
19374 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
19375 since it's used to do that. Added mono_type_type_from_obj().
19376 Make GetType() return NULL instead of segfaulting if the type was not
19377 found. Handle simple arrays in assQualifiedName.
19378 * object.h: add a struct to represent an Exception.
19379 * reflection.c: output call convention in method signature.
19380 Add code to support P/Invoke methods and fixed offsets for fields.
19382 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
19384 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
19386 * icall.c: use mono_array_addr instead of array->vector: fixes the
19387 reflection image writing.
19388 * reflection.c: init call convention byte to 0 in method signature.
19389 Encode the property signature. Don't output property-related methods
19390 twice. Really process the properties for a type (don't cast a field to
19391 a property, my mom always told me that).
19392 Fix 64 bit issues in pointer alignment in a different and more
19395 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
19397 * loader.h: Removed type class from MonoDefaults, added monotype
19399 * loader.c: Loaded MonoType, removed loading of Type
19401 * icall.c (my_mono_new_object): Now returns a System.MonoType,
19402 and fills in System.Type._impl with a RuntimeTypeHandle rather
19403 than the actual MonoClass *
19405 (ves_icall_type_from_handle): change from type_class to
19408 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
19411 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
19414 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
19416 (ves_icall_System_Reflection_Assembly_GetType): implemented
19418 (ves_icall_System_MonoType_assQualifiedName): implemented
19420 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
19422 2001-11-09 Miguel de Icaza <miguel@ximian.com>
19424 * assembly.c (mono_assembly_open): Implement a cache for the
19427 (mono_assembly_close): only destroy the assembly when the last
19430 2001-11-09 Dick Porter <dick@ximian.com>
19432 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
19434 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
19436 * class.c (mono_class_metadata_init): bug fix: compute the right slot
19438 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19440 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
19441 from Martin Weindel.
19442 * object.h: add mono_string_chars ().
19444 2001-11-07 Miguel de Icaza <miguel@ximian.com>
19446 * reflection.c (build_compressed_metadata): Eliminates warnings
19447 and uses 64-bit clean code.
19449 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
19450 (mono_type_equal): Change signature to eliminate warnings.
19452 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19454 * icall.c, loader.c: remove the internalcall array constructors.
19455 Changes to match the new MonoArray structure.
19456 * object.h, object.c: an array object doesn't allocate an extra
19457 vector. Add mono_array_new_full () to create jagged arrays easily.
19459 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19461 * metadata.h, metadata.c: add mono_metadata_field_info () to
19462 retreive all the info about a field from vairous tables.
19463 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19464 * class.h, class.c: augment MonoClassField with more info.
19465 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19466 policy and load a field's RVA if needed.
19468 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
19470 * class.c (mono_class_metadata_init): create a trampoline for all
19471 virtual functions instead of actually compiling them.
19473 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19475 * class.h, class.c: include name in MonoClassField.
19476 * class.c: fix fundamental type of System.Object and System.String.
19477 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19479 * icall.c: remove internalcalls for the Reflection stuff that is now
19481 * loader.c: mono_field_from_memberref () implementation.
19482 * mono-endian.c: thinko (s/struct/union/g).
19483 * object.c, object.h: make the mono_string_* prototypes actually use
19484 MonoString instead of MonoObject.
19485 * reflection.c, reflection.h: updates for changes in the reflection
19486 code in corlib: we use C structures that map to the actual C# classes.
19487 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19488 fat method header if needed and use the info from the ILGenerator for
19489 methods. Handle fields in types. Misc fixes.
19491 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
19493 * class.c (mono_class_metadata_init): bug fix: always allocate
19494 space for static class data
19496 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
19498 * class.c (mono_compute_relative_numbering): use relative
19499 numbering to support fast runtime type checks.
19501 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
19503 * class.c (mono_class_create_from_typeref): added debugging output
19504 to print class name when MonoDummy is returned instead of real class
19506 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
19508 * class.c (mono_class_metadata_init): interface offset table now
19509 contains pointers into the vtable - this is more efficient for the jit
19511 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
19513 * class.c (mono_class_metadata_init): use a temporary vtable (the
19514 old algorithm only worked for the interpreter, but not for the jit)
19516 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
19518 * loader.c (method_from_memberref): use mono_class_get to get the
19519 class of an array instead of using System.Array directly.
19520 (mono_get_method): also add MEMBERREF methods to the method cache
19521 which usefull for arrays.
19523 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
19525 * pedump.c (arch_compile_method): added to compute vtable entry
19527 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19528 number of interfaces.
19530 * class.h: merged MonoArrayClass into MonoClass
19532 * class.c (mono_class_create_from_typedef): compute the vtable size and
19533 allocate space to include the vtable inside MonoClass
19534 (mono_class_metadata_init): initialize the vtable
19536 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19538 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19539 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19540 * image.c: endian fixes by Laurent Rioux.
19541 * object.h, object.c: rename MonoStringObject to MonoString and
19542 MonoArrayObject to MonoArray. Change some function names to conform to
19543 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19544 guint16* as first argument, so don't use char*.
19545 Provide macros to do the interesting things on arrays in a portable way.
19546 * threads-pthread.c: updates for the API changes and #include <sched.h>
19547 (required for sched_yield()).
19548 * icall.c: updates for the API changes above.
19549 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19550 platforms that need them.
19552 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19554 * class.c: set the correct type for all the fundamental
19555 type when loading the class.
19557 2001-10-05 Dick Porter <dick@ximian.com>
19559 * threads-pthread.c (pthread_mutex_timedlock): Simple
19560 compatibility version for C libraries that lack this call.
19562 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19564 * class.c: MonoTypes stored in MonoClass are stored as
19565 fundamental MonoTypes when the class represents a
19566 fundamental type (System.Int32, ...).
19567 The TypeHandle return by ldtoken is a MonoType*.
19568 * icall.c: ves_icall_get_data_chunk () write out all the
19569 PE/COFF stuff. Implement ves_icall_define_method (),
19570 ves_icall_set_method_body (), ves_icall_type_from_handle ().
19571 * image.c: properly skip unknown streams.
19572 * loader.h, loader.c: add type_class to mono_defaults.
19573 * metadata.c, metadata.h: export compute_size () as
19574 mono_metadata_compute_size () with a better interface.
19575 Typo and C&P fixes.
19576 * pedump.c: don't try to print the entry point RVA if there is no entry point.
19577 * reflection.c, reflection.h: many cleanups, fixes, output method
19578 signatures and headers, typedef and typeref info, compress the metadata
19579 tables, output all the heap streams, cli header etc.
19580 * row-indexes.h: typo fixes.
19582 2001-10-04 Dick Porter <dick@ximian.com>
19584 * object.h: Add a synchronisation mutex struct to MonoObject
19586 * object.c (mono_new_object): Initialise the object
19587 synchronisation mutexes
19589 * icall.c: System.Threading.Monitor internal calls
19591 * threads-pthread.h:
19592 * threads-pthread.c: System.Threading.Monitor internal calls
19594 * threads-types.h: New file, includes the system-specific thread
19597 * threads-pthread-types.h:
19598 * threads-pthread-types.c: New files, handle pthread-specific
19599 synchronisation types
19601 * threads-dummy-types.h:
19602 * threads-dummy-types.c: New files of dummy support for
19603 thread-specific types
19607 * pedump.c: include mono-endian.h not endian.h
19609 * Makefile.am: More threads files.
19610 Name mono-endian.h not endian.h
19612 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19614 * Makefile.am, reflection.h, reflection.c: move here the reflection related
19615 stuff and implement a few more bits.
19616 * icall.c: a field needs to be dereferenced twice. Do not use the same
19617 name for two variables in the same scope.
19618 * image.c, image.h: cleanups.
19620 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
19622 * class.c (mono_class_metadata_init): bug fix: compute the right size
19624 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19626 * icall.c: implemented some of the Reflection internalcalls.
19627 * image.c, image.h: start writing out the PE/COFF image.
19628 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19629 that does the reverse than decode_blob_size ().
19630 * object.c: use mono_metadata_encode_value (). Move here
19631 temporary implementation of mono_string_to_utf8 ().
19632 * rawbuffer.c: make malloc_map static.
19634 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19636 * metadata.c: fix type comparison for arrays.
19637 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19638 Added a couple of new classes to monodefaults.
19639 * icall.c: added a couple of Reflection-related internalcalls.
19640 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19641 Added a byval_arg MonoType to MonoClass.
19643 2001-09-28 Dick Porter <dick@ximian.com>
19646 * threads-pthread.h:
19647 * threads-pthread.c: Implemented internal calls for
19648 LocalDataStoreSlot operations. Applied mutexes around all shared
19649 data. Reworked the thread creation and Start() operations to
19650 avoid a race condition.
19653 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19655 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19657 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19659 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19661 * class.c, loader.c: warn and return NULL instead of erroring out.
19662 * icall.c: added System.AppDomain::getCurDomain().
19663 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19665 2001-09-25 Dick Porter <dick@ximian.com>
19667 * threads-pthread.h:
19668 * threads-pthread.c: Implemented timed thread joining and added
19669 System.Threading.Thread::Join_internal internal call
19671 * icall.c: Added System.Threading.Thread::Join_internal internal call
19674 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19676 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19678 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19679 mono_string_intern () to implement the semantics of the ldstr opcode
19680 and the interning of System.Strings.
19681 * icall.c: provide hooks to make String::IsIntern and String::Intern
19684 2001-09-23 Dick Porter <dick@ximian.com>
19687 * threads-dummy.h: New files of dummy threading routines
19689 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19690 support code based on system specifics
19692 Rename PTHREAD_LIBS to THREAD_LIBS
19694 2001-09-23 Dick Porter <dick@ximian.com>
19696 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19697 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19699 (mono_thread_init): Set up a Thread object instance to return when
19700 the main thread calls Thread.CurrentThread
19701 (mono_thread_cleanup): Wait for all subthreads to exit
19703 * icall.c: New internal calls for System.Threading.Thread::Sleep
19704 (including Schedule) and CurrentThread
19706 * threads.h: New file, to insulate thread-specific stuff from the
19709 2001-09-21 Dick Porter <dick@ximian.com>
19711 * threads-pthread.h:
19712 * threads-pthread.c: New file, for handling pthreads-style
19713 threading support. Start() now starts a new thread and executes
19714 the ThreadStart delegate instance.
19716 * icall.c: Added the internalcall for
19717 System.Threading.Thread::Start_internal
19719 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19721 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19723 * loader.c: work around the different signatures for delegates
19724 constructors csc generates in compiled code vs the ones compiled in mscorlib.
19726 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19728 * class.h, class.c: add mono_class_get_field_from_name ().
19729 * *: Fix C comments and other ANSI C issues.
19731 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19733 * endian.h, assembly.c: fix some endianness issues.
19735 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19737 * loader.h, load.c: add delegate_class to mono_defaults.
19738 Handle runtime provided methods in mono_get_method ().
19740 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
19742 * loader.c (mono_get_method): use pinvoke for internal call
19744 * icall.c: use pinvoke for internal call
19746 * loader.c (method_from_memberref): set the method name
19748 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19750 * metadata.c: help the compiler generate better code for
19751 mono_class_from_mono_type ().
19753 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
19755 * class.c (mono_class_metadata_init): delayed computing of the
19756 class size to mono_class_metadata_init ()
19758 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19760 * class.c, class.h: add an interfaces member to MonoClass.
19761 * image.c, image.h: add assembly_name field to MonoImage
19762 from the assembly table.
19763 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19765 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19767 * class.c: Handle Array in mono_class_from_mono_type ().
19768 * metadata.c, pedump.c: some endian fixes.
19770 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19772 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19773 * metadata.c: fix small problem introduced with the latest commit.
19775 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19777 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19778 We don't need a MonoMetadata pointer anymore to compare signatures in
19779 mono_metadata_signature_equal (), update callers.
19780 Reduced memory usage an number of allocations for MonoMethodHeader and
19781 MonoMethodSignature.
19783 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19785 * metadata.c: added compare for szarray.
19787 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19789 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19790 and add a couple more types to it and mono_defaults. Give an hint on
19791 classes that need implementing in our corlib and are referenced
19794 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19796 * class.h, class.c: keep track if a class is also an Enum.
19797 * loader.c: Implement a couple more types for use in libffi
19798 marshalling. Gives better diagnostics when failing to dlopen
19799 a library. Set method->klass for P/Invoke methods, too.
19801 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19803 * class.c, class.h: add a MonoType this_arg to MonoClass that
19804 represents a pointer to an object of the class' type that
19805 can be used by the interpreter and later the type cache.
19806 Add best guess alignment info for valuetype objects.
19808 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19810 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19811 into MonoType: one less level of indirection and allocation and
19812 simplifies quite a bit of code. Added cache for MonoTypes that are
19813 used frequently, so that we don't need to allocate them all the time.
19815 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
19817 * class.c (mono_class_create_from_typedef): System.Enum is also a
19818 value type, although it does not derive from System.ValueType
19819 (maybe a bug in the ms compiler?)
19821 * metadata.c (mono_type_size): return the right size for value types
19823 * loader.c (mono_get_method): only initialize method header if not abstract
19825 * class.c (mono_class_from_mono_type): use mono_default values.
19827 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
19829 * *: use MonoClass pointers instead of <type_tokens>
19831 * class.h: new flag: metadata_inited.
19833 * class.c (mono_class_metadata_init): impl.
19834 (mono_class_instance_size): impl.
19835 (mono_class_data_size): impl.
19837 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19839 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19840 MonoClass now has the name and name_space fields.
19841 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19842 mono_get_method () takes and optional MonoClass as argument.
19843 Removed mono_typedef_from_name() and added mono_class_token_from_name()
19844 instead that takes advantage of a map from class names to typedef
19845 tokens in MonoImage.
19847 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19849 * metadata.c: zero is not a valid alignment boundary.
19850 Merge MONO_TYPE_VOID in default decoding code.
19852 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
19854 * image.h: merged MonoMetadata into MonoImage
19856 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19857 identify the type of elements.
19859 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19861 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19862 * cil-coff.h: split MonoMSDOSHeader and add size info.
19863 * image.c: add some consistency checks.
19864 * metadata.c: fix row size computation: one programmer
19865 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19866 add explanation for the locator routine.
19867 Fix decoding of size in method header.
19869 2001-08-20 Miguel de Icaza <miguel@ximian.com>
19871 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
19872 (g_concat_dir_and_file): Bring g_concat_dir_and_file
19873 function from gnome-libs. This uses the right path separator
19874 based on the OS, and also works around a bug in some systems where
19875 a double slash is not allowed.
19876 (default_assembly_name_resolver): Use g_concat_dir_and_file
19877 (mono_assembly_open): ditto.
19879 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
19881 * metadata.c (mono_metadata_signature_equal): impl.
19883 * *: void is now a realy MonoType (instead of using NULL)
19885 * metadata.c (do_mono_metadata_parse_type): use
19886 mono_metadata_parse_type to parse void value.
19888 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19890 * metadata.c, metadata.h: in the signature and method header store
19891 only the space required for holding the loca vars and incoming arguments.
19893 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
19895 * metadata.c (do_mono_metadata_parse_type): treat void like any
19896 other type (instead of assigning NULL);
19898 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
19900 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19902 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
19904 * image.c (do_mono_image_open): added a cache for arrays.
19906 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19908 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19909 decode a single column from a row in a metadata table and changes
19910 to take advantage of it in the typedef locator (gives a nice speed up).
19911 Store offset info for function params.
19913 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
19915 * image.h (MONO_IMAGE_IS_CORLIB): removed
19917 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19919 * assembly.c: how could mono_assembly_close () had ever worked?
19920 * metadata.c, metadata.h: provide offset info for local vars.
19921 Implement mono_type_size () to take care of alignment as well
19922 as size (it was mono_field_type_size in cli/class.c before).
19924 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
19926 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19928 * assembly.h (CORLIB_NAME): set to corlib.dll
19930 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19932 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19934 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19935 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19936 tokentype.h: massive namespace cleanup.
19938 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19940 * metadata.h, metadata.c: decode exception clauses when parsing method header.
19942 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
19944 * metadata.c (mono_metadata_free_type): added check for type !=
19945 NULL (void) before calling mono_metadata_free_type()
19947 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19949 * metadata.h, row_indexes.h: added header with enumerations to use
19950 to index in the columns from tables in metadata and to decode coded
19951 tokens: we should start using this instead of embedding magic numbers
19954 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19956 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19957 Move metadata_t info from cli_image_info_t to MonoImage, where
19958 it's easily accessible. Changed all the uses accordingly.
19959 Added the method and class caches to MonoImage.
19960 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19961 and mono_metadata_decode_value () signature to be more consistent
19962 with the other parse functions (and simplify code). Taken advantage
19963 of zero-length array allocation with GCC. Removed reduntant (and
19964 wrong) MonoFieldType struct and use MonoParam instead. Changed
19965 mono_metadata_parse_field_type () to use common code for parsing.
19966 Added mono_metadata_typedef_from_field () and
19967 mono_metadata_typedef_from_method () to lookup a typedef index from a
19968 field or method token.
19969 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19971 2001-07-23 Miguel de Icaza <miguel@ximian.com>
19973 * metadata.c (mono_metadata_parse_field_type): Implement.
19974 (do_mono_metadata_parse_type): Split engine from
19975 mono_metadata_parse_type, so that we can create smaller structures
19976 for things that just have one pointer to the MonoType (look at
19979 2001-07-20 Miguel de Icaza <miguel@ximian.com>
19981 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19982 as Jan Gray found out, it is incorrect.
19984 2001-07-18 Miguel de Icaza <miguel@ximian.com>
19986 * assembly.c: Implement asssembly loading. This loads an image
19987 and loads all the referenced assemblies. Come to think of it, we
19988 could always do lazy loading of the assemblies.
19990 * image.c (mono_image_open): Keep loaded images in a hashtable.
19992 * image.h (MonoImage): Add reference count.
19994 2001-07-17 Miguel de Icaza <miguel@ximian.com>
19996 * assembly.c (mono_assembly_open): Keep track of the file name in
19997 case the assembly has no ASSEMBLY table.
19999 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
20002 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
20004 * metadata.c, metadata.h: decode local vars in method header
20005 parse function. Change callers accordingly.
20007 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
20009 * metadata.h, cil-coff.h: protect against multiple inclusion.
20010 Added some new structures to hold information decoded from metadata:
20011 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
20012 and relevant decoding/free functions.
20013 * metadata.c: implement decoding functions. Add warning for out of bounds
20014 index in mono_metadata_locate(). Implement mono_get_method () to retreive
20015 all the info about a method signature and invocation. Remove check on
20016 uninitialized local var in parse_mh() and fix memory leak.
20018 2001-07-12 Miguel de Icaza <miguel@ximian.com>
20020 * metadata.h: More macros.
20022 * tokentype.h: New file.
20024 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
20026 * assembly.c: added a consistency check and initialize
20027 some structures with g_new0().
20028 * metadata.c: fixed a couple more bugs in table size computation
20029 and add other checks for out-of bound access to metadata.
20031 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
20033 * metatada.c: fix bugs computing table sizes. Spew a
20034 warning when index in string heap is out of bounds.
20036 2001-07-04 Miguel de Icaza <miguel@ximian.com>
20038 * metadata.h: Add a couple of macros to manipulate tokens.
20040 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
20042 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
20043 cli_section_tables).
20045 2001-07-01 Miguel de Icaza <miguel@ximian.com>
20047 * metadata.c (mono_metadata_user_string): New function, provides
20048 access to the UserString heap.
20050 2001-06-27 Miguel de Icaza <miguel@ximian.com>
20052 * metadata.c: Add inline documentation.
20054 2001-06-26 Miguel de Icaza <miguel@ximian.com>
20056 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
20059 2001-06-22 Miguel de Icaza <miguel@ximian.com>
20061 * typeattr.h: New file, TypeAttribute flags.
20063 2001-06-21 Miguel de Icaza <miguel@ximian.com>
20065 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
20066 mono_assembly_ensure_section): Section loading code.
20067 (load_section_tables): Load the sections.
20069 * mono/metadata/metadata.c (mono_metadata_locate_token,
20070 mono_metadata_locate): Functions to locate the information
20071 definition given a token or a table and an index.
20072 (mono_metadata_compute_table_bases): New.
20073 (compute_size): New function to compute the sizes of the various
20076 * mono/metadata/metadata.h: Finish listing the different index
20079 * mono/metadata/pedump.c: Improve to dump new information.
20081 2001-06-19 Miguel de Icaza <miguel@ximian.com>
20083 * mono/metadata/metadata.c: Entered all the tables matching
20086 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2