2 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
4 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
5 the wrapper type enum and reduce relocations.
7 2007-01-12 Raja R Harinath <rharinath@novell.com>
9 * reflection.c (inflate_mono_method): Reuse method instantiation
10 from the generic method, if available.
12 2007-01-11 Jonathan Chambers <joncham@gmail.com>
14 * marshal.c (emit_marshal_variant): Fix conv_arg
15 type in last commit, based on whether parameter is byref.
17 2007-01-11 Jonathan Chambers <joncham@gmail.com>
19 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
21 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
22 MONO_TYPE_OBJECT back for VARIANT support.
24 2007-01-11 Jonathan Chambers <joncham@gmail.com>
26 * marshal.c, marshal.h, icall-def.h: Implement
27 Marshal.ReAllocCoTaskMem.
29 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
31 * marshal.c: memory retention fixes: use the proper
32 image cache for runtime_invoke method lookups.
34 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
36 * mempool.c: added code to help debug mempool allocations.
38 2007-01-11 Dick Porter <dick@ximian.com>
40 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
41 support (experimenting with faking it with IP_MTU_DISCOVER for
42 systems that don't have IP_DONTFRAGMENT.)
43 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
46 * icall-def.h: new System.Net.Sockets.Disconnect icall.
48 * socket-io.h: Add new fields to MonoSocketAsyncResult
49 corresponding to the new ones in Socket.cs.
51 2007-01-11 Raja R Harinath <rharinath@novell.com>
53 Fix IronPython regression mentioned in #80249
54 * metadata.c (do_mono_metadata_parse_generic_class): Clear
55 'cached_context' field, since it may have been initialized as a
56 side-effect of metadata parsing.
58 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
59 (_MonoGenericClass.cached_class): Move here and rename from lone
60 remaining field of ...
61 (_MonoInflatedGenericClass): ... this. Remove.
62 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
65 Fix mcs/tests/test-128.cs regression.
66 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
67 2007-01-10 change below.
68 [MONO_TYPE_OBJECT]: Recurse into array case.
70 2007-01-11 Raja R Harinath <harinath@gmail.com>
72 * class-internals.h (mono_get_inflated_generic_class): Remove.
73 * class.c (mono_get_inflated_generic_class): Remove.
74 (mono_generic_class_get_class): Rename from
75 mono_class_create_generic.
76 (mono_class_from_mono_type) [GENERICINST]: Use it.
77 * reflection.c, metadata.c: Update to changes. Use
78 'mono_class_from_mono_type'.
80 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
82 * reflection.c: use passed type when encoding an array element
83 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
85 2007-01-09 Robert Jordan <robertj@gmx.net>
87 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
88 result arguments (someDelegate.EndInvoke (unrelatedAres)).
91 2007-01-09 Raja R Harinath <rharinath@novell.com>
93 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
95 * object.c (set_value): Avoid aliasing between type->data.klass
96 and type->data.generic_class.
98 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
100 2007-01-08 Raja R Harinath <rharinath@novell.com>
102 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
103 between type->data.klass and type->data.generic_class.
105 2007-01-08 Lluis Sanchez <lluis@ximian.com>
107 * marshal.c: In MS.NET, StringBuilder objects are not copied by
108 value in out parameters.
110 2007-01-08 Raja R Harinath <rharinath@novell.com>
112 Simplify invariant for MonoGenericClass::klass field.
113 * class.c (mono_class_create_generic): Verify 'klass' is null.
114 * metadata.c (do_mono_metadata_parse_generic_class): Don't
115 initialize 'klass' field.
117 2007-01-05 Raja R Harinath <rharinath@novell.com>
119 Ongoing work to avoid redundant data and simplify invariants.
120 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
121 'generic_class', and change type to a GenericInst.
122 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
123 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
125 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
127 * class.c : skip io-layer under PLATFORM_WIN32.
129 2007-01-03 Tor Lillqvist <tml@novell.com>
131 Fix #80305: In a bundled executable, look in the bundled exe
132 assembly to determine the runtime version. Add the possibility to
133 bundle also the machine.config file.
135 * assembly.c (mono_assembly_open_from_bundle): Make
136 non-static. Allow being called even if we have no bundled
137 assemblies, and return NULL right away in that case.
139 * domain-internals.h: Declare mono_assembly_open_from_bundle()
142 * domain.c (app_config_parse): Take an assembly exe file name as
143 parameter instead of a config file name. Check for a bundled
144 config file for that assembly by calling
145 mono_config_string_for_assembly_file() (see below) before looking
146 for one in the file system.
147 (get_runtimes_from_exe): Corrsponding change to call of
149 (get_runtimes_from_exe): Check for bundled assembly exe file first
150 by calling mono_assembly_open_from_bundle(). If no bundled
151 assembly exe file is found, call mono_image_open() as before to
152 look it up in the file system.
154 * mono-config.c: Add variable bundled_machinec_onfig.
155 (mono_config_string_for_assembly_file): New function.
156 (mono_config_for_assembly): Move code snippet that looks for a
157 bundled assembly .config file into the above new function. Call
159 (mono_register_machine_config, mono_get_machine_config): New
160 functions to set and retrieve
162 * assembly.h: Declare mono_register_machine_config().
164 * mono-config.h: Declare mono_get_machine_config() and
165 mono_config_string_for_assembly_file().
167 * icall.c: No declaration of environ necessary on Win32. It is
168 declared (as a macro expanding to a function call) in stdlib.h.
169 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
170 New internal mono function. Returns the value of
171 mono_get_machine_config() as a Mono string.
173 * icall-def.h: Add get_bundled_machine_config().
175 2007-01-04 Raja R Harinath <rharinath@novell.com>
177 Remove redundant field
178 * class-internals.h (_MonoGenericContext.container): Remove field.
179 * loader.c (mono_method_get_signature_full): Don't parse a
180 "container" for a signature parse when the signature is inflated
182 (method_from_methodspec): Likewise, for a generic_inst.
183 * class.c, metadata.c, reflection.c: Update to changes.
185 2006-01-04 Raja R Harinath <rharinath@novell.com>
187 * class-internals.h (_MonoGenericClass): Rename 'context' field to
188 'cached_context', and change semantics -- it starts off NULL, and
189 is initialized on demand.
190 * class.c (mono_generic_class_get_context): New accessor to
191 replace 'context' field accesses.
192 (mono_class_get_context): New helper.
193 (*): Update to changes.
194 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
196 2007-01-03 Miguel de Icaza <miguel@novell.com>
198 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
199 before the memcpy. Fixes Marshal2 regression.
201 2007-01-02 Jb Evain <jbevain@gmail.com>
203 * blob.h: add a MONO_TYPE_ENUM definition
204 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
205 fix the encoding of arrays of enums in custom attributes.
209 2007-01-01 Miguel de Icaza <miguel@novell.com>
211 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
212 string is null terminated, but only cut the string short if it
213 overflows the buffer.
215 (mono_string_to_byvalstr): Also fix this routine. The code here
216 was not properly terminating a string (it was only terminated
217 because of the previous catch-all memset).
219 I left the memset, because I do not know if applications expect
220 the runtime to clear this region.
224 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
225 Clear the error before returning to unmanaged code to prevent the
226 runtime from being confused later on (fixes 80420).
227 (ves_icall_type_from_name): Always call mono_loader_clear_error
228 after parsing a type that could have failed.
229 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
231 * loader.c (mono_loader_clear_error): Fix indentation.
233 2006-12-28 Martin Baulig <martin@ximian.com>
235 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
237 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
239 * reflection.c: patch from Rolf Bjarne Kvinge to fix
240 getting a token for an EnumBuilder.
242 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
244 * reflection.c: be more careful in case resource generation
245 fails to create the data array.
247 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
249 * sgen-gc.c: write barrier for clone and fix unregister handles.
251 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
253 * reflection.c: some fixes needed in the generics code for the moving GC.
255 2006-12-22 Robert Jordan <robertj@gmx.net>
257 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
258 account. Fixes bug #80299.
260 2006-12-21 Raja R Harinath <rharinath@novell.com>
262 Fix WaitHandle usage in delegates.
263 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
264 * object.c (mono_wait_handle_new): Use the property set method to
265 initialize the handle.
266 (mono_wait_handle_get_handle): New.
267 * threadpool.c (mono_async_invoke): Use it.
268 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
270 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
272 2006-12-21 Jonathan Chambers <joncham@gmail.com>
274 * marshal.c (emit_marshal): Call emit_marshal_variant and
275 emit_marshal_com_interface when applicable.
276 (emit_marshal_variant, emit_marshal_com_interface): Add
277 methods for this case and remove if's from emit_marshal_object.
279 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
281 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
283 2006-12-19 Jonathan Chambers <joncham@gmail.com>
285 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
286 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
287 and GlobalFree on Windows. Remove FIXME.
289 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
291 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
292 implementation for managed objects.
294 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
296 * object.c: implemented code to be used for checking
297 that no reference field overlaps with non-references.
299 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
301 * threadpool.c: fix queue code to be compatible with the
304 2006-12-18 Miguel de Icaza <miguel@novell.com>
306 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
307 in structures by throwing ArgumentNullException.
309 (emit_marshal_safehandle): Also when they are null parameters.
311 (emit_marshal_safehandle): Add support for ref
312 SafeHandles parameters
314 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
316 * profiler.c: updated to use the mono-dl API instead of
319 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
321 * profiler.c: updated to use the mono-dl dynamic loading
322 API instead of gmodule.
324 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
326 * profiler.c: use readlink, older versions of glib don't have
329 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
331 * profiler.c: try to detect the path to mono if libc fails to provide
332 a useful name (bug #80286).
334 2006-12-16 Raja R Harinath <rharinath@novell.com>
337 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
338 instance, use the generic type definition instead.
339 (ves_icall_Type_GetNestedTypes): Likewise.
340 * class.c (mono_class_create_generic): Always set the
341 nested_classes of a generic instance to NULL, even if the generic
342 type definition has nested types.
344 2006-12-15 Jonathan Chambers <joncham@gmail.com>
346 * marshal.c (mono_string_from_bstr): Revert previous Windows change
349 2006-12-15 Miguel de Icaza <miguel@novell.com>
351 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
352 my arguments were in the wrong order. I also fixed the Windows
353 version which seems to have had the same issue.
355 (mono_free_bstr): On Unix, this is g_free.
356 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
357 conversions (for the tests in corlib to pass).
359 2006-12-14 Miguel de Icaza <miguel@novell.com>
361 * marshal.c (emit_ptr_to_object_conv): For now, ignore
362 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
363 exception if a ref SafeHandle in a struct has changed).
365 (emit_struct_conv): Do not perform layout checks for classes
366 derived from SafeHandle, as those are specially handled.
368 (emit_object_to_ptr_conv): Add support for
369 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
371 (emit_marshal_safehandle): Implement conversion of return values
372 of safehandles (MARSHAL_ACTION_CONV_RESULT).
374 * threads.c: WaitHandle now is compiled with two different handles
375 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
378 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
379 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
380 these routines to cope with both kinds of fields.
382 2006-12-12 Miguel de Icaza <miguel@novell.com>
384 * metadata.c (mono_type_to_unmanaged): Handle the case where
385 type->data.klass is a SafeHandle, and in that case, return the
386 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
387 MONO_MARSHAL_CONV_SAFEHANDLE.
389 2006-12-11 Miguel de Icaza <miguel@novell.com>
391 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
392 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
393 calling emit_marshal_object.
395 (emit_marshal_safehandle): Implement marshalling of
396 SafeHandle parameters (no ref support yet).
398 (MarshalAction): Document the defines as I implement
401 (emit_marshal_object): indentation police.
403 * class-internals.h: Define MonoSafeHandle.
404 Add safehandle_class to MonoDefaults type.
406 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
407 list of classes to check for fields.
409 * domain.c (mono_init_internal): Add SafeHandle to the list of
410 mono_defaults loaded.
412 2006-12-15 Raja R Harinath <rharinath@novell.com>
415 * reflection.c (mono_reflection_bind_generic_parameters): If the
416 generic type definition is a type builder, ensure that it is fully
417 initialized before instantiating it. Kill some dead code.
419 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
421 * object.c: clear the loader_error () before loading
422 more metadata stuff (bug #80258).
424 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
426 * icall.c, icall-defs.h: type modifiers icalls for
427 parameters and properties.
429 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
431 * object.c, icall.c: fixed warnings.
433 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
435 * marshal.c: fixed a couple of leaks and coding style in a few places.
437 2006-12-08 Dick Porter <dick@ximian.com>
439 * process.c: Cope with NULL ProcessStartInfo arguments on windows
440 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
443 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
445 * process.c: ProcessStartInfo may have only filename set and
446 arguments can be NULL.
448 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
450 * icall.c: fix leak found by Robert Jordan.
452 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
454 * marshal.c, marshal.h: generate managed method to access an element
455 of a multi-dimensional array.
457 2006-11-30 Paolo Molaro (lupus@ximian.com)
459 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
461 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
463 * icall.c: back out GetFields () fix until the serialization code is
464 fixed to not depend on the incorrect behaviour.
466 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
468 * profiler.c: provide defaults if none are set.
470 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
472 * Makefile.am, attrdefs.h: new public header file with
473 constants for attributes for use by embedders.
475 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
477 * icall.c: GetFields () fix for bug #80064.
479 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
481 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
482 removed long unused icalls.
484 2006-11-27 Jonathan Chambers <joncham@gmail.com>
487 (mono_marshal_emit_managed_wrapper): Level of indirection for
488 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
489 can be generated without a delegate class.
490 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
492 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
494 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
496 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
499 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
501 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
502 icall-def.h: added icalls needed by System.GC.
504 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
506 * loader.c: ensure the class in catch clauses is handled
507 correctly for generics methods (fixes bug#79980).
509 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
511 * monitor.h, monitor.c: added mono_locks_dump () function
512 to help debug deadlocks involving managed locks.
514 2006-11-13 Dick Porter <dick@ximian.com>
516 * file-io.c (get_file_attributes): If the file is a symlink try
517 and get the stat data for the target, but also add the
518 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
519 the specs for the windows symlink support, but will probably have
520 to be reworked when I have test data from a vista machine. Fixes
523 2006-11-13 Dick Porter <dick@ximian.com>
525 * gc.c (mono_domain_finalize):
526 * marshal.c (mono_delegate_begin_invoke):
527 * threadpool.c (socket_io_init, mono_thread_pool_init)
528 (mono_thread_pool_finish):
529 * monitor.c (mono_monitor_try_enter_internal):
530 * threads.c (mono_thread_resume, mono_thread_init)
531 (mono_thread_suspend_all_other_threads)
532 (mono_thread_execute_interruption):
533 * appdomain.c (mono_domain_unload): Check for NULL error returns
534 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
537 2006-11-11 Miguel de Icaza <miguel@novell.com>
540 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
541 Only close the handle if the value of the handle is not
542 INVALID_HANDLE_VALUE. This just makes the process a bit more
545 Improvement for #75733, so that we do not run into this problem.
548 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
549 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
550 internal variables. Fixes #79462
553 2006-11-09 Dick Porter <dick@ximian.com>
555 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
556 Use poll() not select(). Fixes bug 79397.
558 2006-11-09 Raja R Harinath <rharinath@novell.com>
561 * assembly.c (mono_assembly_load_from_full): Check that the given
562 image has an assembly manifest.
564 2006-11-09 Ankit Jain <jankit@novell.com>
566 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
567 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
568 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
570 2006-11-07 Dick Porter <dick@ximian.com>
572 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
573 Put the old resolver behaviour back for pre-2.0 profiles.
575 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
577 * threadpool.c: precise GC and locking fixes.
579 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
581 * class.c: don't load types that have an explicit unaligned
582 managed reference. Provide better info in the TypeLoad exception.
583 Part of the fix for bug #79744.
584 * object.c: use the correct check for class type load issues.
586 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
588 * class.c: enforce alignment of fields with managed references
589 even when Pack=1 is forced by the user (bug #77788).
591 2006-11-03 Dick Porter <dick@ximian.com>
593 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
594 If the address reverse lookup fails, return it as the hostname
595 anyway. Fixes bug 79721.
597 2006-11-03 Dick Porter <dick@ximian.com>
599 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
600 Fix build on Windows.
602 2006-11-02 Dick Porter <dick@ximian.com>
605 * object-internals.h:
606 * exception.c (mono_get_exception_thread_interrupted):
607 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
610 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
611 Check for pending Thread.Interrupt.
613 2006-10-27 Massimiliano Mantione <massi@ximian.com>
614 * loader.c: Fixed bug 79684.
616 2006-10-27 Dick Porter <dick@ximian.com>
618 * file-io.c (get_file_attributes): Force symlinks to directories
619 to be returned as a regular file. Fixes bug 79733.
620 2006-10-26 Dick Porter <dick@ximian.com>
622 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
623 CreateFile to open a directory then we need to set the
624 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
626 2006-10-23 Zoltan Varga <vargaz@gmail.com>
628 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
631 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
633 * sgengc.c: small cleanup of timer code.
635 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
637 * sgen-gc.c: fix some warnings and start adding support for
638 complete object removal on domain unload.
640 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
642 * assembly.c: build_assembly_name should not consider a version
643 number without build or revision number invalid. Fixes bug #79715.
645 2006-10-18 Jonathan Chambers <joncham@gmail.com>
647 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
648 call kernel32 function OutputDebugString directly.
650 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
652 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
654 * reflection.c: small cleanup, using a function to insert a MonoString
657 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
659 * reflection.c: moving GC fixes.
661 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
663 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
664 all the objects with finalizers belonging to an unloading appdomain.
666 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
668 * sgen-gc.c: added ability to allocate even when the nursery is fully
669 pinned and fixed a couple of bugs.
671 2006-10-15 Zoltan Varga <vargaz@gmail.com>
673 * threads.h: Revert the last change for now.
675 * threads.h (mono_thread_get_pending_exception): Rename this to
676 mono_thread_get_undeniable_exception ().
678 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
680 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
681 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
682 when fname does not refer to valid assembly. This result in a more
683 meaningful error message.
684 * exception.c: added mono_get_exception_bad_image_format2 which
685 constructs a BadImageFormatException using the ctor taking a custom
686 message and the file name. Passing in a NULL msg results in a default
688 * exception.h: define mono_get_exception_bad_image_format2 function.
689 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
690 when file name pointed to an invalid IL image. Use
691 mono_get_exception_file_not_found2 to construct FileNotFoundException,
692 as this results in a more meaningful error message.
694 2006-10-15 Zoltan Varga <vargaz@gmail.com>
696 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
699 2006-10-12 Zoltan Varga <vargaz@gmail.com>
701 * metadata.c (mono_type_size): Change the align parameter to guint32 for
702 consistency with the other _size functions.
703 (mono_type_stack_size): Ditto.
705 * class.c object.c icall.c: Fix warnings caused by the above change.
707 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
709 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
711 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
713 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
715 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
716 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
717 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
718 threadpool.h, threads-types.h: mark more internal functions.
720 2006-10-11 Dick Porter <dick@ximian.com>
722 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
723 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
724 reproduce the bug even before applying the fix.)
726 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
728 * reflection.c: allow retrieving attributes for arguments in generic
729 methods (bug #79241).
731 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
733 * debug-mono-symfile.c: properly check fopen () result (found by
736 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
738 * reflection.c: make error message clearer and fixed two
739 issuelets found by Coverity.
741 2006-10-10 Zoltan Varga <vargaz@gmail.com>
743 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
745 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
747 * object-internals.h, gc-internal.h, profiler-private.h:
748 mark internal functions.
750 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
752 * reflection.c: put data in the text section.
753 * icall.c: recognize more types in type_from_typename ().
754 * process.c, marshal.c: added some GC FIXMEs.
756 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
758 * loader.c: check for NULL before initializing.
760 2006-10-09 Zoltan Varga <vargaz@gmail.com>
762 * gc.c (finalizer_thread): Use a non-alertable wait here.
764 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
765 until the correct solution is found.
767 2006-10-06 Zoltan Varga <vargaz@gmail.com>
769 * reflection.c (mono_module_get_object): Avoid an assert when operating on
770 modules with no metadata. Fixes #79596.
772 * image.c (load_metadata_ptrs): Put back the error message when
773 the #- heap is encountered since the support is not complete yet.
775 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
777 * gc.c: do not allow the user to SuppressFinalize () a
778 delegate because it would leak the trampoline if present.
780 2006-10-06 Zoltan Varga <vargaz@gmail.com>
782 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
785 2006-10-05 Zoltan Varga <vargaz@gmail.com>
787 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
789 * metadata.c (mono_metadata_get_param_attrs): Ditto.
791 * row-indexes.h: Add definitions for *Ptr tables.
793 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
795 * metadata.c (mono_metadata_translate_token_index): New helper function to
796 translate table indexes used in uncompressed metadata.
797 (mono_metadata_decode_table_row): Ditto.
798 (mono_metadata_decode_table_row_col): Ditto.
800 * metadata.c: Add table schema for *Ptr tables.
802 * class.c loader.c: Use the new helper function to access the affected metadata
805 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
808 2006-10-04 Zoltan Varga <vargaz@gmail.com>
810 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
811 sequences which can be unbounded in size. Fixes #79583.
813 2006-10-02 Zoltan Varga <vargaz@gmail.com>
815 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
816 static initialization.
818 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
820 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
822 * domain.c (mono_domain_free): Free up type_init_exception_hash.
824 * object.c (mono_runtime_class_init): Implement correct semantics when a static
825 ctor fails, i.e. throw the same exception on subsequent accesses.
827 2006-09-0 Jonathan Chambers <joncham@gmail.com>
829 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
830 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
831 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
832 Handle marshalling of interfaces and VARIANTs contained in structs.
834 Code is contributed under MIT/X11 license.
836 2006-09-30 Zoltan Varga <vargaz@gmail.com>
838 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
840 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
843 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
845 * console-io.c: ignore previous SIGINT handler.
847 2006-09-27 Zoltan Varga <vargaz@gmail.com>
849 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
850 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
851 #79460, #79461, #79485.
853 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
855 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
858 2006-09-26 Zoltan Varga <vargaz@gmail.com>
860 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
861 could be generated from it.
863 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
865 * rand.c: fix read loop to correctly handle EINTR.
867 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
869 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
870 internal calls are defined to keep methods closer to the declaring
871 type and allow a significant reduction in runtime relocations and
874 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
876 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
877 exception message to have FileNotFoundException use the default
878 assembly load error message. Fixes bug #79426.
879 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
881 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
883 * threadpool.c: (start_thread_or_queue) use the root domain when
884 creating the thread instead of the async object one.
886 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
888 * class.c, object.c, class-internals.h, reflection.c:
889 for arrays, store element_size inside MonoClass (speedup
890 for array object creation).
892 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
894 * icall.c: fixed CodeBase to use the file name and not the module
897 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
899 * mono-debug.c, mono-debug.h: export find_method as
900 mono_debug_find_method ().
902 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
904 * debug-helpers.c, class-internals.h: added a few functions useful
905 when debugging under gdb.
907 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
909 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
910 characters that need special handling.
912 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
914 * mono-config.c: make the os/cpu specification more flexible,
915 allowing lists and negation.
917 2006-09-18 Jonathan Chambers <joncham@gmail.com>
919 * marshal.c: COM Interop fixes. Handle case where method->klass.
920 is interface. Handle BSTR/MonoString when null. Use CDECL as
921 calling convention on non-windows platforms. This is for
922 compatibility with XPCOM and MainWin COM.
924 Code is contributed under MIT/X11 license.
927 2006-09-18 Zoltan Varga <vargaz@gmail.com>
929 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
930 correctly. Fixes #79217.
932 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
934 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
936 * mono-config.c: allow both an os and cpu attribute for dllmap
937 and dllentry elemnets to enable a single config file to be used
938 for multiple architectures.
940 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
942 * loader.c: MonoLoaderError was cleared too soon on load failure.
945 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
947 * icall.c: use the defining class vtable when accessing a
948 static field, not a pobblibly derived class.
950 2006-09-17 Zoltan Varga <vargaz@gmail.com>
952 * icall.c string-icalls.c: Remove references to unicode.h.
954 * unicode.h unicode.c Makefile.am: Remove these unused source files.
956 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
958 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
959 indicating the image where custom marshaller types should be looked up.
960 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
961 custom marshallers, instead of corlib. Fixes #79425.
963 2006-09-14 Zoltan Varga <vargaz@gmail.com>
965 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
967 2006-09-14 Jonathan Chambers <joncham@gmail.com>
969 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
970 Implement Environment.ProcessorCount.
972 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
973 Implement Environment.ProcessorCount.
976 Add Environment.ProcessorCount icall.
978 Patch by Jason McFall.
980 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
982 * assembly.c: don't append .exe/.dll when the filename already contains
983 one of those extensions.
985 2006-09-12 Martin Baulig <martin@ximian.com>
987 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
990 2006-09-11 Martin Baulig <martin@ximian.com>
992 * reflection.c (mono_image_build_metadata): Create the
993 MethodImpl's after emitting all types and methods, so we don't
994 need another fixup pass for them.
996 2006-09-11 Zoltan Varga <vargaz@gmail.com>
998 * class.c (mono_class_from_name_case): Fix regression introduced by the last
1001 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
1003 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
1006 2006-09-10 Zoltan Varga <vargaz@gmail.com>
1008 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
1009 args is not set. Fixes #78926.
1011 2006-09-08 Zoltan Varga <vargaz@gmail.com>
1013 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
1015 * image.c (load_class_names): Move this to class.c, and rename it to
1016 'mono_image_init_name_cache'.
1017 (load_modules): Fix a warning.
1019 * class.c icall.c image.c: Initialize image->name_cache lazily.
1021 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
1022 on its name using information in the AOT file.
1024 * class.c (mono_class_from_name): Use the new hook function.
1026 2006-09-06 Zoltan Varga <vargaz@gmail.com>
1028 * reflection.c (mono_param_get_objects): Handle enum default parameter values
1031 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
1034 2006-09-06 Martin Baulig <martin@ximian.com>
1036 * icall.c (mono_lookup_internal_call): Small fix.
1038 2006-09-05 Raja R Harinath <rharinath@novell.com>
1040 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
1043 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
1045 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
1046 when --debug is specified.
1048 2006-09-04 Zoltan Varga <vargaz@gmail.com>
1050 * class.c (setup_generic_array_ifaces): Fix a warning.
1052 2006-09-04 Miguel de Icaza <miguel@novell.com>
1054 * Temporarily remove the patch to assemly.c that checks the
1055 assembly versions as it breaks our gacutil.
1057 2006-09-03 Zoltan Varga <vargaz@gmail.com>
1059 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
1061 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
1064 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
1065 created using the default ctor. Fixes #79152.
1066 (mono_string_builder_to_utf16): Ditto.
1068 2006-09-01 Martin Baulig <martin@ximian.com>
1070 Fix handling of the generic array interfaces.
1073 (MonoDefaults): Removed `generic_array_class' and added
1074 `generic_ilist' class.
1077 (mono_bounded_array_class_get): Add the new generic array interfaces.
1078 (setup_generic_array_ifaces): New static method; create vtable
1079 entries for each method in the generic array interfaces.
1082 (select_container): Allow "parent-less" generic methods.
1085 (mono_marshal_get_generic_array_helper): New public method.
1088 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
1089 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
1090 moved the interncall into System.Array.
1092 2006-09-01 Raja R Harinath <rharinath@novell.com>
1094 A few more cases of avoiding work on types with ->byref set.
1095 Has the real fix for #79238
1096 * icall.c (is_generic_parameter): New helper.
1097 (ves_icall_Type_GetGenericParameterPosition): Use it.
1098 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
1099 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1100 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1101 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
1103 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
1105 (ves_icall_Type_get_IsGenericInstance): Likewise.
1106 (ves_icall_Type_get_IsGenericType): Likewise.
1108 2006-09-01 Zoltan Varga <vargaz@gmail.com>
1110 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
1113 * mempool.h (mono_mempool_get_allocated): New helper function.
1115 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
1118 * mempool.c: Fix warnings and the calculation of stats.
1120 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
1122 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
1124 * loader.c (mono_get_method_from_token): Update method_count stat.
1126 * class-internals.h (MonoStats): Add some stats.
1128 2006-08-31 Robert Jordan <robertj@gmx.net>
1130 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
1131 with managed variants.
1132 All code is contributed under the MIT/X11 license.
1134 2006-08-31 Zoltan Varga <vargaz@gmail.com>
1136 * reflection.c (reflection_methodbuilder_to_mono_method): Set
1137 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
1139 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
1141 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
1142 with cycles in classes.
1144 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
1146 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
1147 missing a [MarshalAs] directive. Fixes #79203.
1149 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
1150 klass->marshal_info. Fixes #79217.
1152 2006-08-30 Martin Baulig <martin@ximian.com>
1154 Committing a patch from Joachim Ante <joe@otee.dk>:
1155 Add support for binary data symbol stores.
1157 * debug-mono-symfile.c
1158 (mono_debug_open_mono_symbol_file): Renamed into
1159 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
1163 (mono_debug_open_image): Added `raw_contents' and `size' args.
1164 (mono_debug_init_2_memory): New public function.
1166 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
1168 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
1170 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1172 * appdomain.c: implement support for ShadowCopyFiles.
1174 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
1176 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
1177 when value is NULL (and should remove CID #51).
1179 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1181 * image.c: moved 2 functions to ../utils.
1183 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
1185 * gc.c: cope with the target object of a GC handle being NULL
1188 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
1190 * class.c: recursively check parent's explicit implementations
1191 of interface methods (fixes bug #79125).
1193 2006-08-19 Miguel de Icaza <miguel@novell.com>
1195 * filewatcher.c: Avoid warnings when building, do not redefine
1196 constants that are defined.
1200 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1202 * image.c: don't fail when the link points to an absolute path.
1204 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
1206 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
1209 2006-08-17 Miguel de Icaza <miguel@novell.com>
1211 * image.c (full_path): A new method used to obtain the actual path
1212 of an assembly even in the presence of symbolic links.
1214 This is necessary for the case where we are running a binary that
1215 has been GACed, but we are using the "published" path name
1216 ($prefix/mono/1.0/blah.exe) which happens to point to the real
1219 This was the source of the failure for the `xsp' command with the
1220 recent AppDomain changes, as far as the runtime was concerned,
1221 there were two different assemblies: $prefix/mono/1.0/blah.exe and
1222 $prefix/mono/gac/blah/version/blah.exe.
1224 (do_mono_image_open): use full path
1226 2006-08-17 Zoltan Varga <vargaz@gmail.com>
1228 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
1230 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
1232 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
1233 domain_id is supplied. Fix CID #241 and corlib's unit tests.
1235 2006-08-17 Zoltan Varga <vargaz@gmail.com>
1237 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
1238 small structures. Fixes #78990.
1240 2006-08-17 Zoltan Varga <vargaz@gmail.com>
1242 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
1244 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
1246 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1249 * marshal.c: don't load all the assemblies from a domain into newly
1250 created ones. The new domains might have different rules and load
1251 assemblies from different locations. Fixes bug #76757.
1253 Patch by Lluis. Conflicts resolved by Brian Crowell.
1255 2006-08-16 Alp Toker <alp@atoker.com>
1257 * socket-io.c: First half of the fix for #79084.
1258 Set sa_size to the length of the content, not that of the struct.
1259 Don't add NULL suffix to the content, this should be done in
1260 managed code if needed.
1262 2006-08-14 Raja R Harinath <rharinath@novell.com>
1265 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
1266 mono_metadata_parse_type returns NULL.
1268 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
1270 * normalization-tables.h : new file for string normalization data.
1271 * locales.c, locales.h, icall.c :
1272 added load_normalization_resource() for string normalization,
1274 * Makefile.am : added normalization-tables.h to the sources.
1276 2006-08-13 Zoltan Varga <vargaz@gmail.com>
1278 * marshal.c: Add more helper functions to reduce code duplication and use them
1281 2006-08-12 Zoltan Varga <vargaz@gmail.com>
1283 * marshal.c: Fix non-x86 stdcall warnings.
1285 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
1288 2006-08-11 Jonathan Chambers <joncham@gmail.com>
1290 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
1291 type check on multi-dimensional arrays. Fixes #79000.
1293 2006-08-10 Jonathan Chambers <joncham@gmail.com>
1295 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
1296 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
1297 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
1298 * class-internals.h: add is_com_object to class structure.
1299 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
1300 null checks to COM object marshalling. Fix .ctor call on RCW.
1301 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
1303 All code is contributed under the MIT/X11 license.
1305 2006-08-09 Dick Porter <dick@ximian.com>
1307 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
1308 racing mono_monitor_allocator_lock() somewhere, so don't delete
1309 the critical section for now. Found by running and exiting
1312 2006-08-10 Zoltan Varga <vargaz@gmail.com>
1314 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
1315 (ves_icall_System_ComObject_FindInterface): Ditto.
1316 (ves_icall_System_ComObject_CacheInterface): Ditto.
1318 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
1319 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
1321 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1323 * threadpool.c: treat pipes from process asynchronous reads as sockets
1324 when reading from them, so we get select/poll or epoll to wait for
1327 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
1329 * loader.c: Fix a typo (CID #233) in the null check.
1331 2006-08-07 Zoltan Varga <vargaz@gmail.com>
1333 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
1334 Hopefully fixes #78949.
1336 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
1337 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
1338 bytes. Fixes #78972.
1340 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1342 * filewatcher.c: we need to set errno here.
1344 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1346 * filewatcher.c: let Win32Exception get the error value.
1348 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1350 * filewatcher.c: translate errno into win32 errors for Win32Exception
1351 to know what happened.
1353 2006-08-01 Zoltan Varga <vargaz@gmail.com>
1355 * threadpool.c: Fix more warnings.
1357 * assembly.c (search_loaded): Fix warnings.
1359 * threadpool.c (mono_thread_pool_finish): Fix warnings.
1360 (mono_async_invoke): Ditto.
1362 2006-07-28 Jonathan Chambers <joncham@gmail.com>
1364 * object.c (mono_remote_class_vtable): Need to create proxy vtable
1365 entries for __ComObject type in addition to ComImport types.
1366 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
1369 All code is contributed under the MIT/X11 license.
1371 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
1373 * image.c: avoid tentative loading of modulerefs that contain
1374 no metadata (P/Invoke library names).
1376 2006-07-28 Dick Porter <dick@ximian.com>
1378 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
1379 mono_loader_lock() somewhere, so don't delete the critical section
1380 for now. Found by running and exiting monodevelop.
1382 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1384 * filewatcher.c: define the inotify syscalls when we're building on
1385 linux and have sys/syscall.h. The build system might not have support
1386 for inotify but the target system might have it.
1388 2006-07-26 Miguel de Icaza <miguel@novell.com>
1390 * domain.c: Documentation updates.
1392 * loader.c (mono_free_method): Do not release the method
1393 information if we are being profiled, as profilers will use this
1394 information at shut down to present some data to the user.
1396 This is needed so that the profiler does not crash, as the
1397 profiler tends to keep MonoMethods around, and they might become
1398 invalid if we free these.
1400 (mono_get_method_constrained): Return the original CIL stream
1401 method as well, so verification can be performed against it.
1403 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1405 * filewatcher.[ch]: support for inotify file system watcher.
1406 * icall.c: add new internal calls for the inotify file system watcher.
1408 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1410 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
1413 2006-07-20 Dick Porter <dick@ximian.com>
1415 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
1418 2006-07-20 Dick Porter <dick@ximian.com>
1420 * threads.c (start_wrapper): Do the thread cleanup while we still
1421 hold a reference to its object. Fixes bug 78123.
1423 2006-07-18 Kornél Pál <kornelpal@gmail.com>
1425 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
1426 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
1427 "managed-to-managed".
1428 * icall.c: Redirect string constructors that take sbyte* to
1429 ves_icall_System_String_ctor_RedirectToCreateString.
1430 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
1431 to CreateString () methods with matching signature.
1432 * reflection.c: Use original security informations for
1433 MONO_WRAPPER_MANAGED_TO_MANAGED.
1434 * security-manager.c: Use original security informations for
1435 MONO_WRAPPER_MANAGED_TO_MANAGED.
1436 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
1437 that is a placeholder and only its address should be used.
1438 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
1439 that is a placeholder and only its address should be used.
1441 2006-07-15 Jonathan Chambers <joncham@gmail.com>
1443 Begin implementing COM Interop.
1444 * appdomain.c: Increment corlib version.
1445 * class.c: Set ComImport classes' parent to __ComObject.
1446 * loader.c: Mark cominterop methods as such.
1447 * domain.c: Add __ComObject class to MonoDefaults structure.
1448 * image.c: Add 2 hashtables to the image for COM Interop related methods
1449 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
1450 using the mempool allocator
1452 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
1453 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
1454 declaration for mono_metadata_type_dup_mp.
1456 * debug-helpers.c: Added strings for two additional wrapper types
1457 * object.c: Create proxy objects for ComImport classes
1458 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
1459 and added __ComObject class to MonoDefaults structure.
1461 * object-internals.h: Finish MonoRealProxy definition, and add definition of
1462 MonoComInteropProxy and MonoComObject.
1464 * marshal.c: Added support for COM Interop
1465 (signature_cominterop): Converts managed signature to corresponding
1466 unmanaged COM signature.
1467 (cominterop_get_function_pointer): gets unmanaged function pointer via
1469 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
1470 (cominterop_get_method_interface): returns interface type that method is defined on
1471 (mono_mb_emit_cominterop_call): emits native call to function pointer
1473 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
1474 that matches signature of unmanaged function.
1475 (cominterop_get_native_wrapper): wrapper around adjusted method call.
1476 (cominterop_get_invoke): forwards call from proxy to __ComObject
1477 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
1478 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
1479 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
1481 * marshal.h: Added Marshal icall declarations.
1482 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
1483 so we can access them in finalizer
1485 2006-07-14 Dick Porter <dick@ximian.com>
1487 * object.c (mono_type_initialization_cleanup): Fix a race
1488 condition by temporarily commenting out the critical section
1491 2006-07-14 Zoltan Varga <vargaz@gmail.com>
1493 * reflection.c (create_custom_attr): Fix some warnings.
1494 (create_custom_attr_data): Ditto.
1495 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
1496 types. Fixes #78855.
1498 2006-07-11 Zoltan Varga <vargaz@gmail.com>
1500 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
1502 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
1504 2006-07-08 Zoltan Varga <vargaz@gmail.com>
1506 * reflection.c (resolve_object): Add support for DynamicMethod.
1508 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
1509 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
1511 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
1513 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
1514 don't leak GPtrArray's pdata has we have no use (nor free) for it.
1516 2006-07-01 Zoltan Varga <vargaz@gmail.com>
1518 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
1521 2006-06-30 Raja R Harinath <rharinath@novell.com>
1523 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
1524 slightly: remove a shadow local variable.
1526 2006-06-29 Raja R Harinath <rharinath@novell.com>
1528 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
1529 definition that introduces the virtual function slot.
1530 Also fix Coverity #105.
1532 2006-06-29 Zoltan Varga <vargaz@gmail.com>
1534 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
1535 for dynamic assemblies. Fixes #78724.
1537 2006-06-28 Zoltan Varga <vargaz@gmail.com>
1539 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
1542 2006-06-21 Martin Baulig <martin@ximian.com>
1545 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
1548 2006-06-21 Zoltan Varga <vargaz@gmail.com>
1550 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
1552 2006-06-20 Raja R Harinath <rharinath@novell.com>
1554 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
1556 * class.c (mono_class_create_from_typespec): Add 'context' argument.
1557 Inflate result if necessary.
1558 (mono_class_get_full): Remove old version. Rename from
1559 'mono_class_get' and add 'context' argument. Pass it to
1560 ..._create_from_typespec.
1561 (mono_class_get): New. Simple wrapper to mono_class_get_full.
1562 (mono_ldtoken): Revert change below.
1564 2006-06-20 Martin Baulig <martin@ximian.com>
1566 * class.c (mono_ldtoken): Don't pass the generic context to
1567 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
1569 2006-06-15 Zoltan Varga <vargaz@gmail.com>
1571 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
1572 and later freeing it. Fixes #78638.
1574 2006-06-15 Miguel de Icaza <miguel@novell.com>
1576 * icall.c (mono_class_get_throw): Revert over-zealous error
1577 throwing, the caller for mono_class_get_throw will cope with
1578 errors when classes are not properly initialized already.
1580 The code still copes with loader exceptions though.
1582 Fixes the regression in reftype1 and reftype3 from the CAS tests.
1584 2006-06-14 Miguel de Icaza <miguel@novell.com>
1586 Fixes the `make run1' version of RuntimeAbort (to be commited,
1587 source is in Bugzilla).
1589 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
1590 FALSE on class loading failure instead of returning true.
1592 * class.c (mono_class_create_from_typedef): It is possible for
1593 mono_metadata_interfaces_from_typedef_full to fail if a class is
1594 not found, cope with this.
1597 2006-06-14 Dick Porter <dick@ximian.com>
1600 * process.c: Fix a bunch of signed/unsigned warnings from gcc
1603 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
1605 * culture-info-table.h : oops, forgot to make it nsync with r61548.
1607 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
1609 * icall.c: Another fix for building mono in Visual Studio.
1611 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
1613 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
1615 2006-06-09 Martin Baulig <martin@ximian.com>
1617 * debug-mono-symfile.c: Put this back and really fix it this
1618 time. Sorry for all the trouble.
1620 2006-06-08 Zoltan Varga <vargaz@gmail.com>
1622 * icall.c (mono_class_get_throw): Fix a warning.
1623 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
1624 ReflectionTypeLoadException if needed. Fixes #78606.
1626 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
1627 (mono_class_init): Ditto.
1629 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
1630 ref_only exceptions.
1631 (mono_loader_clear_error): Make this work even if there is no error.
1633 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
1635 * object-internals.h marshal.c marshal.h icall.c: Implement method
1636 Marshal.GetComSlotForMethodInfo using internal call.
1638 2006-06-07 Zoltan Varga <vargaz@gmail.com>
1640 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
1641 a function for signalling it.
1643 * class.c (mono_class_from_typeref): Use the new kind of loader error when
1644 a referenced assembly is not found.
1646 * loader.c (mono_loader_error_prepare_exception): Add support for
1647 LOADER_ERROR_ASSEMBLY. Fix formatting.
1649 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
1651 * domain.c appdomain.c class-internals.h marshal.c: Add support
1652 for VARIANT marshalling on windows and increment corlib version
1653 since Variant struct was added.
1655 2006-06-03 Miguel de Icaza <miguel@novell.com>
1657 * debug-mono-symfile.c: Revert Martin's previous patch which broke
1658 stack trace line information:
1660 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
1661 (Martin) when looking up B which is between A and C, return A not C.
1665 Thanks to Alexander Olk for tracking this down.
1667 2006-06-02 Zoltan Varga <vargaz@gmail.com>
1669 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
1671 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
1672 avoid clobbering its value.
1673 (mono_string_to_lpstr): Fix a warning on windows.
1675 2006-05-31 Zoltan Varga <vargaz@gmail.com>
1677 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
1679 * reflection.c loader.c: Removed references to 'dummy' flag.
1681 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
1683 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
1684 it gets GC tracking.
1686 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
1689 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
1691 * marshal.c threadpool.c: Update callers of mono_async_result_new.
1693 * appdomain.c: Bump corlib version.
1695 2006-05-30 Zoltan Varga <vargaz@gmail.com>
1697 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1698 CEE_STIND_REF when working with object references.
1700 2006-05-31 Zoltan Varga <vargaz@gmail.com>
1702 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
1705 2006-05-30 Miguel de Icaza <miguel@novell.com>
1707 * loader.c (method_from_memberref): Fix argument value for
1708 mono_loader_set_error_method_load (I was passing the MonoClass
1709 instead of the class name char *).
1711 2006-05-30 Zoltan Varga <vargaz@gmail.com>
1713 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1714 CEE_STIND_REF when working with object references.
1716 2006-05-30 Martin Baulig <martin@ximian.com>
1718 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
1719 mono_method_full_name() change and replace the ':' with a '.'
1722 2006-05-30 Martin Baulig <martin@ximian.com>
1724 * debug-mono-symfile.c
1725 (mono_debug_symfile_lookup_location): Fix the algorithm:
1726 when looking up B which is between A and C, return A not C.
1728 2006-05-29 Martin Baulig <martin@ximian.com>
1731 (MonoDebugMethodInfo): Make the typedef public.
1732 (MonoDebugSourceLocation): New public struct.
1735 (mono_debug_source_location_from_address): Removed.
1736 (mono_debug_source_location_from_il_offset): Removed.
1737 (mono_debug_il_offset_from_address): Removed.
1738 (mono_debug_address_from_il_offset): Removed.
1739 (mono_debug_lookup_method): New public function.
1740 (mono_debug_lookup_source_location): New public function; replaces
1741 the old mono_debug_source_location_from_*() functions; see the
1742 inline documentation.
1743 (mono_debug_free_source_location): New public function.
1744 (mono_debug_print_stack_frame): New public function; see the
1745 inline documentation.
1747 * debug-mono-symfile.c
1748 (mono_debug_find_source_location): Renamed into
1749 mono_debug_symfile_lookup_location(); only take a
1750 `MonoDebugMethodInfo *' and an `offset' argument; added inline
1752 (mono_debug_find_method): Renamed into
1753 mono_debug_symfile_lookup_method().
1755 2006-05-27 Zoltan Varga <vargaz@gmail.com>
1757 * assembly.c (mono_assembly_open_full): Dont overwrite the status
1758 returned by mono_image_open_full ().
1760 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
1761 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
1764 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
1767 2006-05-27 Miguel de Icaza <miguel@novell.com>
1769 * class.c (mono_class_from_typeref): handle missing images
1770 earlier, deals with bug #78418. Refactor code;
1772 Fix a warning introduced in my previous commit (some stale code
1773 from before I revisited my patch).
1775 * class.c (mono_class_create_from_typedef): On failure, remove the
1776 class from the MonoImage->class_cache as the class is not
1777 initialized; Fixes the leak pointed out by Paolo.
1779 2006-05-25 Dick Porter <dick@ximian.com>
1781 * threads.c (mono_thread_cleanup): Build fix. Comment out the
1782 DeleteCriticalSections until I figure out which one may still be
1783 sometimes locked when mono_thread_cleanup is called.
1785 2006-05-24 Dick Porter <dick@ximian.com>
1787 * threads.c (mono_thread_cleanup): Move the threading cleanup out
1788 of mono_thread_manage and back into its own function, so it can be
1789 called after the finalizer thread has finished.
1791 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
1793 2006-05-24 Zoltan Varga <vargaz@gmail.com>
1795 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
1798 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
1799 with non-blittable elements.
1800 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
1802 2006-05-24 Martin Baulig <martin@ximian.com>
1804 * mono-debug-debugger.h (MonoDebuggerEvent): Added
1805 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
1807 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
1808 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
1809 `mono_debugger_event_handler' to NULL.
1811 2006-05-24 Martin Baulig <martin@ximian.com>
1813 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
1815 2006-05-24 Martin Baulig <martin@ximian.com>
1817 * mono-debug-debugger.h
1818 (mono_debugger_create_notification_function): Added
1819 `MonoCodeManager *' argument.
1821 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
1823 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
1825 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
1827 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
1828 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
1831 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
1833 * icall.c: precise GC support: objects can't be stored in unmanaged
1834 memory anymore, even if they are kept alive by other references: since
1835 they can move the GC needs to be able to always find them.
1837 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1839 * object.c: precise GC support for static fields. Support
1840 for moving GCs: write barriers and pinned allocation for interned
1843 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1845 * domain.c, domain-internals.h: precise GC support for the MonoDomain
1848 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1850 * class.c, gc.c: sgen and precise GC updates.
1852 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
1854 * marshal.h, marshal.c: added write barrier wrapper and precise type
1857 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
1859 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
1862 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
1864 * reflection.c: precise and sgen GC updates.
1866 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
1868 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
1870 2006-05-22 Zoltan Varga <vargaz@gmail.com>
1872 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
1874 2006-05-20 Zoltan Varga <vargaz@gmail.com>
1876 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
1877 MONO_TYPE_OBJECT. Fixes #78462.
1879 2006-05-18 Zoltan Varga <vargaz@gmail.com>
1881 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
1882 and blittable types.
1884 2006-05-17 Miguel de Icaza <miguel@novell.com>
1886 * class.c (mono_class_get_exception_for_failure): Implement parts
1887 of a TODO: if the loader error is set (instead of the class
1888 error), we return a Loader exception that can be properly thrown
1891 This was exposed by some Winforms 2.0 code that I tried to run
1892 (Atsushi pointed me to it).
1894 2006-05-17 Zoltan Varga <vargaz@gmail.com>
1896 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
1897 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
1899 * marshal.c (emit_marshal_vtype): Add limited support for
1900 UnmanagedType.LPStruct. Fixes #78427.
1902 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
1903 Applied a patch from kangaroo to fix #77523.
1905 2006-05-17 Martin Baulig <martin@ximian.com>
1908 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
1909 (debugger_thread_created): Removed.
1910 (debugger_thread_exited): Removed.
1912 2006-05-15 Zoltan Varga <vargaz@gmail.com>
1914 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1916 * object-internals.h (MonoReflectionResource): Sync with managed version.
1918 2006-05-12 Wade Berrier <wberrier@novell.com>
1920 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
1922 2006-05-12 Zoltan Varga <vargaz@gmail.com>
1924 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
1925 functions try to allocate from the image mempool.
1927 2006-05-12 Dick Porter <dick@ximian.com>
1929 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
1931 2006-05-12 Lluis Sanchez <lluis@ximian.com>
1933 * object.c: The FieldGetter and FieldSetter methods require the full
1934 name of the class, not only the name. Fixes bug #78277.
1936 2006-05-11 Miguel de Icaza <miguel@novell.com>
1938 * loader.c (method_from_memberref): Do not pass the NULL klass to
1939 mono_loader_set_error_() methods. Pass the non-NULL value
1942 2006-05-11 Zoltan Varga <vargaz@gmail.com>
1944 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1945 (mono_assembly_close): Null out assembly->image->references after freeing it.
1947 * image.c (mono_image_close): Free image->references.
1949 * reflection.c (mono_image_basic_init): Fix a small memory leak.
1951 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1953 * marshal.c: In function mono_mb_add_local don't use the mb pointer
1954 before checking if it's NULL (g_assert).
1956 2006-05-10 Martin Baulig <martin@ximian.com>
1958 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1959 I thought I already killed that two months ago, but now it somehow reappeared.
1961 2006-05-10 Martin Baulig <martin@ximian.com>
1963 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1965 2006-05-10 Zoltan Varga <vargaz@gmail.com>
1967 * reflection.c: Allocate memory for dynamically created methods in the image
1970 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
1972 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
1973 don't use the ad pointer before checking if it's NULL (g_assert).
1975 2006-05-09 Zoltan Varga <vargaz@gmail.com>
1977 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1978 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1980 * marshal.c: Allocate all signatures from mempools.
1982 * marshal.c: Allocate some more signatures from mempools.
1984 2006-05-09 Miguel de Icaza <miguel@novell.com>
1986 * object.c (mono_load_remote_field): The code used to provide a
1987 temporary variable for returning results if the user did not
1988 provide a result pointer. But our temporary variable was allocted
1991 Fix calling code to always pass a result area. Coverity ID 103.
1993 2006-05-06 Zoltan Varga <vargaz@gmail.com>
1995 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1996 value, not the old. Fixes #78312.
1997 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1999 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
2000 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
2003 * assembly.c (mono_assembly_close): Free image->references.
2005 * assembly.c (mono_assembly_names_equal): Fix a warning.
2006 (mono_assemblies_cleanup): Cleanup more global data.
2008 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
2010 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
2011 ptr_cache and image->modules.
2013 * image.c (mono_image_init): Allocate array_cache lazily.
2015 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2017 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
2018 behavior was changed recently and has bad side effects.
2020 2006-05-05 Zoltan Varga <vargaz@gmail.com>
2022 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
2024 * assembly.c (mono_assembly_close): Remove a debug printf.
2026 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
2028 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
2029 to also allow for temporary references between mono_image_open ()/close ().
2031 * domain.c (get_runtimes_from_exe): Add a FIXME.
2033 2006-05-04 Zoltan Varga <vargaz@gmail.com>
2035 * marshal.c: Fix support for dynamic methods.
2037 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
2039 * marshal.c (mono_marshal_cleanup): New cleanup function.
2041 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
2044 * class.c (mono_class_init): Fix leaking class->nested_classes.
2046 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
2048 * image.c (mono_image_init): Initialize the new cashes.
2050 * image.c (mono_image_close): Destroy the new cashes.
2052 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
2054 * mempool.c (mono_mempool_strdup): New helper function.
2056 * class-internals.h: Add prototype for mono_loader_unlock ().
2058 * domain.c (mono_jit_info_table_find): Fix a warning.
2059 (mono_debugger_check_runtime_version): Ditto.
2061 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
2062 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
2063 functions to these modules.
2065 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
2068 * marshal.c (mono_free_bstr): Fix a warning.
2070 * assembly.c (mono_assembly_open_full): Fix another small leak.
2072 * object.c: Fix some unload leaks in the remoting code.
2074 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
2077 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
2079 * reflection.c: Fix some unload leaks in dynamic assemblies.
2081 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
2083 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
2084 * marshal.h: Add BSTR support on Win32
2085 * icall.c: Add BSTR icalls
2086 * metadata.h: Add BSTR enums
2088 2006-04-28 Miguel de Icaza <miguel@novell.com>
2090 Work to catch the crash from #76795 and turn it into an
2091 exception. As I stubbed out pieces of the VisualBasic support,
2092 I found a number of places where the code was failing and I added
2093 checks to those places.
2095 * metadata.c (do_mono_metadata_parse_generic_class): Make this
2096 function return a status code. If we fail to parse the signature
2097 from mono_metadata_parse_generic_inst, return FALSE.
2099 * loader.c (mono_get_method_from_token): If we fail to load the
2100 method (mono_class_get) return NULL.
2102 * (method_from_memberref): Return NULL if we are unable to parse
2103 the method signature
2105 (mono_loader_error_prepare_exception): Since we now use the
2106 loader_error flag internally to stop processing, and obtaining
2107 exceptions that might be thrown will walk this code path the
2108 proper way of going from a MonoLoaderError into a
2109 MonoException was convoluted. This new routine encapsulates the
2110 process of turning the error into an exception and *clearing* the
2113 2006-04-27 Miguel de Icaza <miguel@novell.com>
2115 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
2116 with missing assemblies), and to cope with:
2118 * Missing fieldref from a non-existing assembly.
2119 * Missing methodref from a non-existing assembly.
2121 The first batch of work to address *some* of the issues from 76661.
2123 * object.c (mono_class_create_runtime_vtable): If we fail to
2124 initialize the class raise the exception here.
2126 * metadata.c (mono_class_get_overrides_full): If any methods fail
2127 to load return the failure to the caller.
2129 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
2130 flagging assemblies that failed to load.
2132 Do not crash if we are unable to load the assembly.
2134 (mono_assembly_close): Do nothing with REFERENCE_MISSING
2137 * loader.c (mono_loader_set_error_type_load): Change the
2138 convention to always pass unallocated strings, so we make our own
2139 copies (I know our own code had duplicated strings before, but
2140 this keeps the normal conventions).
2141 (method_from_memberref): Call mono_loader_set_error_method_load
2142 for all possible failures of loading the class.
2143 Remove assert, turn into a loader error.
2145 (mono_loader_error_to_exception): Move this routine from mini
2146 (mini_loader_error_to_exception) there was no need to have that in
2149 * class.c (mono_class_from_typeref): If we were not able to load
2150 the assembly with mono_assembly_load_reference, call the
2151 mono_loader_set_error_type_load to register the problem.
2153 (mono_class_setup_fields): If we fail to load the type from
2154 mono_metadata_parse_type_full, call mono_class_set_failure and
2155 break from the loop.
2157 If class->exception_type is set, we do not layout the fields as
2158 that might crash the runtime, and instead return (from breaking
2159 from the previous loop).
2161 (mono_class_setup_vtable): This now returns a boolean indicating
2162 whether the table was properly setup. The decision is driven by
2163 mono_class_get_overrides_full which might run into non-existing
2166 (mono_class_init): Returns TRUE on success or FALSE if there was a
2167 problem in loading the type (incorrect assemblies, missing
2168 assemblies, methods, etc).
2170 When we call mono_class_setup_fields we also check for a potential
2171 error inside this call (either a class exception or a general
2174 (mono_class_create_from_typedef): If the parent fails to load
2175 (calling mono_class_get_full) return NULL.
2179 calls to mono_metadata_parse_type_full should be checked
2180 everywhere and set the mono_class_set_failure
2181 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
2183 The current patch checks the places where my manually constructed
2184 tests show the errors are showing up, but we should do it
2189 mono_class_init return values should be tested everywhere, like
2190 the previous case this is something that we should audit
2191 everywhere and not only on the cases exposed by the tests I
2194 2006-04-26 Miguel de Icaza <miguel@novell.com>
2196 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
2197 boolean parameter and instead pass the information on `options'
2198 parameter (FileOptions).
2200 * icall.c: Register the new signature for MonoIO.Open.
2202 * debug-helpers.c (dis_one): Trying to understand how coverity
2203 works. Fix Run 5, item 78.
2205 2006-04-26 Dick Porter <dick@ximian.com>
2207 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
2210 2006-04-25 Martin Baulig <martin@ximian.com>
2212 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
2214 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
2215 debugger_thread_created().
2216 (debugger_gc_push_all_stacks): Don't handle the main thread in any
2218 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
2219 (mono_debugger_finalize_threads): New function; undo the effects
2220 of mono_debugger_init_threads().
2221 (mono_debugger_create_all_threads): Removed.
2223 2006-04-24 Zoltan Varga <vargaz@gmail.com>
2225 * image.c (mono_image_close): Tidy up trace messages.
2227 * assembly.c (mono_assembly_close): Ditto.
2229 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
2230 no longer references an already freed assembly. Fixes #78168.
2232 2006-04-21 Dick Porter <dick@ximian.com>
2234 * threads.c (mono_thread_detach): Fix reference counting when
2237 2006-04-21 Zoltan Varga <vargaz@gmail.com>
2239 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
2242 2006-04-19 Zoltan Varga <vargaz@gmail.com>
2244 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
2245 (mono_type_to_stind): Ditto.
2247 * marshal.c: Use the new helper functions to simplify code.
2249 * image.c (mono_image_close): Add some code for help debug assembly unloading
2252 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
2255 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
2256 assembly was already loaded in another appdomain. Fixes #78083.
2258 2006-04-13 Zoltan Varga <vargaz@gmail.com>
2260 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
2261 referenced assemblies.
2262 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
2264 * domain.c (mono_domain_free): Add a trace message.
2266 * appdomain.c (add_assemblies_to_domain): Ditto.
2268 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
2271 2006-04-12 Zoltan Varga <vargaz@gmail.com>
2273 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
2275 2006-04-12 Martin Baulig <martin@ximian.com>
2277 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
2278 `USE_INCLUDED_LIBGC'.
2280 2006-04-12 Zoltan Varga <vargaz@gmail.com>
2282 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
2283 the patch contains ../ and a small directory name later. Hopefully fixes
2286 2006-04-10 Martin Baulig <martin@ximian.com>
2288 Clean up the debugger's thread-handling code.
2290 The debugger's thread-handling code has been moved from
2291 ../mini/debug-debugger.c to threads.c. We now iterate directly
2292 over the `threads' hash, keep track of exiting threads and also
2295 We can now debug XSP and XSP based applications with the debugger.
2297 * object-internals.h (MonoThread): Added `gpointer end_stack'.
2300 (MonoThreadCallbacks): Removed; this was only used by the debugger.
2301 (mono_install_thread_callbacks): Likewise.
2303 * threads.c (mono_thread_callbacks): Removed.
2304 (debugger_thread_created, debugger_thread_exited): New static functions.
2305 (start_wrapper): Call debugger_thread_created().
2306 (thread_cleanup): Call debugger_thread_exited().
2307 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
2308 (mono_debugger_init_threads): New public function.
2309 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
2310 iterate directly over the `threads' hash and also use proper locking.
2312 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
2314 * mono-debug-debugger.h
2315 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
2317 2006-04-10 Zoltan Varga <vargaz@gmail.com>
2319 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
2320 argument type=array. Fixes #78057.
2322 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
2324 * culture-info-table.h : regenerated. Fixed bug #69652.
2326 2006-04-07 Zoltan Varga <vargaz@gmail.com>
2328 * loader.c metadata.c: Reapply a variant r59116.
2330 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
2332 * class.c (mono_class_setup_interface_offsets): New internal function.
2334 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
2335 interfaces too. Fixes #77398.
2337 * reflection.c (encode_cattr_value): Add support for
2338 parameter type=object, argument type=array.
2339 (load_cattr_value): Ditto. Fixes #77916.
2341 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
2342 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
2344 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
2345 a byval char array and CharSet is Ansi.
2347 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
2349 2006-04-06 Zoltan Varga <vargaz@gmail.com>
2351 * metadata.c: Add some locking comments.
2353 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
2355 (mono_metadata_free_method_signature): Don't free the signature itself.
2357 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
2359 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
2360 reference the same MonoImage.
2361 (mono_assembly_load_from_full): Add an assert.
2363 2006-04-05 Zoltan Varga <vargaz@gmail.com>
2365 * image.c (mono_image_close): Don't put the image we are about to free into the
2366 loaded_images_guid_hash.
2368 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
2369 to reduce code duplication.
2371 * marshal.c: Register the native functions called by this module as icalls, to
2372 somewhat centralize the creation of MonoMethodSignature's.
2374 * loader.c (mono_method_signature): Add a cache for method signatures.
2376 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
2377 the parameter attributes of a method.
2378 (mono_metadata_parse_method_signature_full): Refactored the computation of
2379 parameter attributes into a separate function. Also avoid one allocation in
2382 * assembly.c (mono_assembly_close): Ditto.
2384 * image.c (mono_image_close): Log trace messages with INFO level.
2386 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
2388 * image.c reflection.c: Correct reference counting of image modules.
2390 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
2391 of this function from the image mempool.
2393 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
2394 to allow more cached types to be used.
2396 * mono-debug.c (mono_debug_add_method): Appled patch from
2397 David S. Miller <davem@sunset.davemloft.net>: Access
2398 minfo->lexical_blocks[] entry elements using read32().
2400 2006-04-04 Zoltan Varga <vargaz@gmail.com>
2402 * loader.c (mono_free_method): No longer free the method header for non-dynamic
2403 methods as it is allocated from the mempool.
2405 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
2408 * metadata-internals.h: Add comments describing the reference counting scheme
2409 used for MonoImage and MonoAssembly.
2411 * image.c assembly.c reflection.c: Rework reference counting of images and
2412 assemblies so they are freed when the runtime is shut down. Free some
2413 additional memory structures when an image is unloaded.
2415 2006-04-03 Zoltan Varga <vargaz@gmail.com>
2417 * class.c loader.c reflection.c: Allocate more data structures in
2420 2006-03-31 Miguel de Icaza <miguel@novell.com>
2423 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
2424 build on pre glib 2.4 systems.
2426 2006-03-31 Zoltan Varga <vargaz@gmail.com>
2428 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
2430 * icall.c: Fix some warnings.
2432 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
2434 * culture-info-table.h : regenerated.
2436 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
2438 * threads.c, object-internals.h, verify.c: changed the culture caching
2439 code to use a normal MonoArray for storage so the GC can keep track of
2440 them easily. Fixed bits of the cache logic, too and simplified the
2443 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
2445 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
2446 thread for non-Boehm GCs.
2448 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
2450 * domain.c, object.c, domain-internals.h: reduce the amount of memory
2451 needed to keep track of the data for static fields.
2453 2006-03-29 Raja R Harinath <rharinath@novell.com>
2456 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
2457 for interface classes. Use 'num_methods' instead.
2458 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
2459 before using '->vtable_size' field.
2461 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
2463 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
2464 doesn't contain managed pointers, so use a normal hashtable.
2466 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
2468 * reflection.c, class-internals.h, domain.c: fixed handling of types
2469 used as values for objects in custom attributes (bug #77915):
2471 2006-03-24 Martin Baulig <martin@ximian.com>
2473 * class.c (mono_class_setup_fields): Added support for generic
2474 instances; fixes #77580.
2476 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2478 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
2480 2006-03-24 Dick Porter <dick@ximian.com>
2482 * file-io.c (get_file_attributes): More stat macro breakage.
2485 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
2487 * profiler.c: added the file=filename option in the default profiler
2488 to output the profile data to filename.
2490 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2492 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
2495 2006-03-22 Martin Baulig <martin@ximian.com>
2497 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
2498 allocated `MonoClassField *' in `fb->handle'.
2500 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2502 * class.c, image.c, metadata-internals.h: implemented new mechanism to
2503 allocate interface ID to save memory and allow better ID reuse on
2504 appdomain unload. setup_generic_vtable () removal from Martin.
2506 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2508 * object.h, appdomain.c, domain.c, exception.c, icall.c,
2509 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
2510 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
2511 write barriers for reference stores with managed objects accessed with
2512 C structures in the runtime and in embedding programs.
2514 2006-03-20 Raja R Harinath <rharinath@novell.com>
2516 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
2517 'interface_id' and 'max_interface_id' fields of MonoClasses
2518 representing open generic types.
2520 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
2522 * object.h, object.c, icall.c: added functions to deal with
2523 storing valuetypes that contain references in managed objects.
2524 * reflection.c, string-icalls.c, threads.c, marshal.c: small
2525 fixes and comments around uses of mono_array_addr ().
2527 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
2529 * object.h, icall.c, monitor.c: object.GetHashCode ()
2530 implementation that supports the moving garbage collector.
2532 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
2534 * icall.c, threads-types.h, threads.c: implemented finalizer for
2537 2006-03-15 Zoltan Varga <vargaz@gmail.com>
2539 * metadata.c (mono_type_size): Add a fixme.
2540 (mono_type_stack_size): Ditto.
2542 * object-internals.h (MonoReflectionAssemblyBuilder): Added
2543 'type_forwarders' field.
2545 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
2546 attribute from net 2.0.
2548 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
2551 * class.c (mono_class_setup_fields): Fix a warning.
2553 * class.c (mono_class_from_name): Add support for assemblyref entries
2554 in the EXPORTEDTYPE table.
2556 * reflection.c: Add support for handling type forwarders under net 2.0.
2558 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2560 2006-03-14 Zoltan Varga <vargaz@gmail.com>
2562 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
2563 overwriting entries in ModuleBuild->types, also clean up the code
2564 a little. Fixes #77774.
2566 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
2568 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
2569 load friend assembly info when present.
2571 2006-03-14 Raja R Harinath <rharinath@novell.com>
2573 Fix crasher on gtest-158.cs.
2574 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
2575 the return value if the MonoClass we want is yet in an
2577 * class.c (mono_class_create_from_typedef): Add an comment
2578 explaining an order dependency between mono_class_setup_parent and
2579 mono_class_setup_mono_type.
2581 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
2583 * class.c: documentation updates and events bug fix.
2585 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
2587 * class.c: some cleanup, locking fixes.
2589 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2591 * class.c: fix the generics code to setup nested
2592 type info to the instantiated type (bug #77770).
2594 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
2596 * marshal.c: fixed a few type correctness issues.
2598 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2600 * loader.c: the Set/Get/Addrtess array methods should be public.
2602 2006-03-11 Zoltan Varga <vargaz@gmail.com>
2604 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
2606 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
2609 2006-03-10 Zoltan Varga <vargaz@gmail.com>
2611 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
2613 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
2615 * mempool.c (mono_mempool_alloc): Speed this up a bit.
2616 (mono_mempool_alloc0): Ditto.
2618 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2621 (create_object_from_sockaddr): it was allocating 4 extra bytes
2622 for the AF_UNIX data. Fixes bug #77747.
2624 2006-03-09 Zoltan Varga <vargaz@gmail.com>
2626 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
2628 2006-03-09 Dick Porter <dick@ximian.com>
2630 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
2631 Fixes bug 76966 again.
2633 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
2635 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
2637 * appdomain.c: Bumped corlib version to 48 (due to r57532)
2639 2006-03-07 Martin Baulig <martin@ximian.com>
2642 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
2644 2006-03-07 Martin Baulig <martin@ximian.com>
2647 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
2648 regression introduced in r56970; see gtest-252.cs.
2650 * loader.c (mono_get_method_constrained): Correctly handle generic
2651 methods; see gtest-253.cs.
2653 2006-03-04 Zoltan Varga <vargaz@gmail.com>
2655 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
2657 2006-03-04 Martin Baulig <martin@ximian.com>
2659 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
2660 compute the parent type at runtime, just like we're already doing
2664 (mono_reflection_bind_generic_parameters): Don't compute the
2665 parent type anymore.
2667 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
2669 2006-03-04 Martin Baulig <martin@ximian.com>
2671 * mono-debug-debugger.h
2672 (mono_debugger_create_notification_function): Allocate memory at
2673 runtime and return a pointer to it.
2675 2006-03-03 Zoltan Varga <vargaz@gmail.com>
2677 * assembly.c: Fix windows build.
2679 * assembly.c: Fix build.
2681 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
2683 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
2685 2006-03-03 Dick Porter <dick@ximian.com>
2688 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2689 Check parameters before dereferencing them. Fixes Aaron's part of
2692 2006-03-03 Raja R Harinath <rharinath@novell.com>
2694 Fix performance regression.
2695 * loader.c (find_method_in_class): Add 'from_class' argument.
2696 Rename 'klass' argument to 'in_class'. The signature is compared
2697 against the method in 'in_class', and the corresponding method is
2698 returned from 'from_class'.
2699 (find_method): Walk both 'in_class' and 'from_class' in parallel.
2700 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
2701 type definition and generic instantiation in parallel.
2702 (mono_get_method_constrained): Update to changes.
2704 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
2706 * threads.c: make sure the domain is correct, too when doing
2707 mono_thread_attach ().
2709 2006-03-01 Zoltan Varga <vargaz@gmail.com>
2711 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
2712 windows. Fixes #77683.
2714 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
2716 * object.h, *: introduced specific way to set elements of an array
2717 of references to be used as write barrier. Still need to audit the
2718 uses of mono_array_addr.
2720 2006-03-01 Miguel de Icaza <miguel@novell.com>
2722 * object-internals.h: New field to cache the assmebly name, patch
2723 from Tambet Ingo (tambet@ximian.com)
2725 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2727 * decimal.h, class-internals.h, metadata-internals.h,
2728 file-io.h: mark a few function declarations as internal, to
2729 reduce the number of PLT entries.
2731 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2733 * file-io.c: fix typo in warning message.
2735 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
2737 * loader.c: on unix, lookup the "*A" version of a function
2738 if charset is auto as a second option before failing.
2740 2006-02-28 Raja R Harinath <rharinath@novell.com>
2742 * class.h (mono_class_inflate_generic_method): Revert to two
2744 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
2745 (mono_class_inflate_generic_method_full): Add.
2746 * class.c (mono_class_inflate_generic_method_full): Rename from
2747 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
2748 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
2749 * loader.c, reflection.c: Update to changes.
2751 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
2753 * icall.c: const fixes and small improvements.
2755 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2757 * threadpool.c: for asynchronous connect(), enable the same workaround
2758 for BSD 6 as for the Mac. Fixes bug #77637.
2760 2006-02-24 Zoltan Varga <vargaz@gmail.com>
2762 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
2763 formatted classes. Fixes #77524.
2765 2006-02-24 Raja R Harinath <rharinath@novell.com>
2767 * class.c (inflate_generic_type): Add a couple more
2768 micro-optimizations.
2769 (inflate_generic_context): Don't use the 'gmethod' from
2771 (mono_class_inflate_generic_method): If the method has generic
2772 parameters, but the passed-in context doesn't have a 'gmethod',
2773 create one. Use the possibly simplified generic instantiation
2774 from the declaring class instead of the one passed in.
2776 2006-02-24 Raja R Harinath <harinath@gmail.com>
2778 Make generic method signature and method header handling lazy.
2779 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
2780 (inflate_generic_header): Likewise.
2781 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
2782 parameter to avoid inflating types.
2783 (mono_get_inflated_method): Empty out.
2784 * class.h (mono_class_inflate_generic_method): Update to changes.
2785 * loader.c (mono_get_method_from_token): Don't parse signature for
2786 generic methods, nor methods of generic classes.
2787 (mono_method_signature): Rename from 'mono_method_signature'.
2788 Inflate signature on demand.
2789 (mono_method_get_header): Inflate method header on demand.
2790 * reflection.c: Update to changes.
2792 2006-02-23 Raja R Harinath <rharinath@novell.com>
2794 * metadata.c (mono_metadata_inflate_generic_inst): If the
2795 instantiation is closed, don't bother expanding it in the new
2797 * class.c (inflate_generic_class): If the generic instantiation
2798 doesn't change after inflation, return the argument itself.
2799 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
2801 (inflate_generic_context): If neither the generic class nor the
2802 generic method instantiations change, return the original context.
2803 * reflection.c (mono_method_get_object): Do
2804 'mono_get_inflated_method' before accessing the ->klass field.
2805 (inflate_mono_method): Don't create a MonoGenericMethod unless
2807 (inflate_method): Don't pass a constructed type as the declaring
2808 type of a methodbuilder.
2810 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
2812 * object.c: fix memory overwrite.
2814 2006-02-22 Dick Porter <dick@ximian.com>
2816 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
2817 it doesn't work any more.
2818 (mono_threads_request_thread_dump): Fix unused variable warnings.
2820 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2822 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
2823 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
2824 the public header file.
2826 2006-02-21 Zoltan Varga <vargaz@gmail.com>
2828 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
2830 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2832 * class-internals.h, object.c: reduce the size of MonoVTable
2833 and store the interface_offsets array at negative offsets.
2835 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
2837 * metadata.c: tweak table descriptors data structures to reduce
2838 size and runtime relocations.
2840 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2842 * marshal.c: fix some types and opcodes to be type-safe
2843 in marshaling wrappers.
2845 2006-02-21 Ankit Jain <jankit@novell.com>
2847 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
2849 2006-02-21 Raja R Harinath <rharinath@novell.com>
2851 * metadata.c (get_constraints): Relax debugging checks for monodis.
2853 2006-02-21 Ankit Jain <jankit@novell.com>
2855 * metadata.c (mono_metadata_load_generic_params): Move the code
2856 checking for ambiguous generic params from here to mono/dis/get.c
2857 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
2859 2006-02-21 Raja R Harinath <harinath@gmail.com>
2861 Fix assertion triggered when compiling nemerle.
2862 * class.c (mono_get_shared_generic_inst): Rename from
2863 get_shared_inst and make non-static.
2864 * loader.c (mono_get_shared_generic_method): New. Used to create
2865 the MonoGenericContext-equivalent of a MonoGenericContainer.
2866 (mono_get_method_from_token): Initialize the 'context' field of
2867 the created MonoGenericContainer.
2868 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
2869 * metadata.c (get_constraints): Add sanity check.
2870 * class-internals.h: Add new internal methods.
2872 * reflection.c (verify_safe_for_managed_space): New sanity check.
2873 Currently checks that owner-less generic parameters aren't allowed
2875 (mono_type_get_object): Use it.
2876 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
2877 that are now in mono_type_get_object.
2878 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
2880 2006-02-19 Raja R Harinath <harinath@gmail.com>
2882 * metadata.c (mono_type_create_from_typespec): Rename from
2883 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
2884 argument and caching of types in the generic container.
2885 (unwrap_arrays, find_generic_param): Remove.
2886 * metadata-internals.h: Update.
2887 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
2889 2006-02-18 Zoltan Varga <vargaz@gmail.com>
2891 * class.c (mono_class_get_exception_for_failure): Fix a warning.
2893 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
2894 return values. Fixes #77581.
2896 * class.c (mono_fnptr_class_get): Switch name and name_space.
2898 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
2899 classes and add support for [In, Out] attributes.
2900 (mono_marshal_free_asany): Ditto. Fixes #77524.
2902 2006-02-18 Raja R Harinath <harinath@gmail.com>
2904 * class.c (mono_class_from_generic_parameter): Make more robust to
2905 incomplete MonoGenericContainers from monodis.
2907 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2909 * class-internals.h: added some more exception types.
2910 * class.c, metadata.c: added a few checks to handle missing
2913 2006-02-17 Raja R Harinath <rharinath@novell.com>
2915 Use owner-less generic-params some more.
2916 * class.c (my_mono_class_from_generic_parameter): Remove.
2917 (mono_class_from_generic_parameter): Handle null image,
2918 param->name and param->owner.
2919 (mono_class_from_mono_type): Update.
2920 (mono_class_create_from_typespec): Remove 'container' parameter.
2921 If that parameter is non-null, the result is always inflated by
2922 'mono_class_get_full' anyway.
2923 (mono_class_get): Rename from _mono_class_get. Remove 'container'
2925 (mono_class_get_full): Update.
2927 * class.c (inflate_generic_type) [GENERICINST]: If the generic
2928 instance is not open, don't bother inflating.
2929 (mono_class_setup_fields): Hoist some loop-invariants. Don't
2930 parse metadata for inflated classes.
2931 (_mono_class_get): Change GenericContext* parameter to
2933 (mono_class_create_from_typespec): Likewise. Simplify, and
2934 implement trivially. All the cases are handled in
2935 mono_class_from_mono_type. Don't inflate returned class.
2936 (mono_class_get_full): Delegate GENERICINST optimization to
2937 inflate_generic_type.
2938 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
2940 2006-02-16 Dick Porter <dick@ximian.com>
2942 * socket-io.c (create_object_from_sockaddr): Fix typo.
2943 (create_sockaddr_from_object): Check array lengths before
2944 potentially accessing items off the end.
2945 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2946 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2947 (ves_icall_System_Net_Sockets_Socket_Send_internal)
2948 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2949 length checks to avoid wraparound overflows.
2950 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2951 contents of the array of sockets
2952 (hostent_to_IPHostEntry2)
2953 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2954 Check return value of inet_ntop ().
2955 (addrinfo_to_IPHostEntry): Fix typo
2957 2006-02-16 Raja R Harinath <rharinath@novell.com>
2959 Type metadata parsing doesn't use generic-instantiation information.
2960 * metadata.c (mono_metadata_parse_array_full): Change
2961 MonoGenericContext* parameter to MonoGenericContainer*.
2962 (mono_metadata_parse_type_full): Likewise.
2963 (mono_type_create_from_typespec_full): Likewise.
2964 (mono_metadata_parse_mh_full): Likewise.
2965 (mono_metadata_parse_generic_inst): Likewise.
2966 (do_mono_metadata_parse_generic_class): Likewise.
2967 (do_mono_metadata_parse_type): Likewise.
2968 * metadata-internals.h: Update to changes.
2969 * class.c (mono_class_find_enum_basetype): Likewise.
2970 (mono_class_setup_fields): Likewise.
2971 (mono_class_create_from_typespec): Likewise.
2972 * loader.c (method_from_methodspec): Likewise.
2973 (mono_get_method_from_token): Likewise.
2974 (mono_method_get_header): Likewise.
2976 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2978 * marshal.c: handle additional GENERICINST case (patch from
2979 Thong Nguyen <tum@veridicus.com>).
2980 Fix a few cases where LDIND_I/STIND_I was used for references.
2982 2006-02-16 Raja R Harinath <rharinath@novell.com>
2984 * reflection.c (mono_reflection_get_token): Remove unused variable.
2986 2006-02-16 Martin Baulig <martin@ximian.com>
2988 * reflection.c (mono_reflection_get_token): Add support for fields
2989 in instantiated generic types.
2992 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2994 2006-02-15 Martin Baulig <martin@ximian.com>
2997 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2998 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2999 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
3000 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
3002 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
3004 * class.c, metadata.c, metadata.h, object.c, icall.c,
3005 marshal.c: changed mono_type_get_underlying_type () to do
3006 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
3007 Fixed handling of instantiated generic valuetypes (bug #75479).
3009 2006-02-15 Raja R Harinath <rharinath@novell.com>
3011 * metadata.c (mono_metadata_decode_signed_value): Simplify.
3012 Delegate to mono_metadata_decode_value, and work on the returned value.
3014 * icall.c (ves_icall_MonoType_GetGenericArguments):
3015 Add consistency check here too.
3017 2006-02-15 Ankit Jain <jankit@novell.com>
3019 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
3022 2006-02-15 Ankit Jain <jankit@novell.com>
3024 * metadata.c (mono_metadata_decode_signed_value): New function to decode
3025 signed values, used only for representing lower bounds of arrays.
3026 (mono_metadata_parse_array_full): Use new
3027 mono_metadata_decode_signed_value to decode lower bounds.
3029 2006-02-14 Martin Baulig <martin@ximian.com>
3032 (mono_reflection_get_token): Support "MonoGenericMethod" and
3033 "MonoGenericCMethod" and allow generic instances / methods.
3035 2006-02-11 Zoltan Varga <vargaz@gmail.com>
3037 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
3038 to obtain the terminal size using an ioctl.
3040 * object.c (mono_nullable_init): Revert this as nullable reference
3041 types are not valid.
3042 (mono_nullable_box): Ditto.
3044 2006-02-09 Dick Porter <dick@ximian.com>
3046 * threads.c (mono_thread_detach): Drop a reference to the thread
3049 2006-02-09 Zoltan Varga <vargaz@gmail.com>
3051 * object.c (mono_nullable_init): Handle nullable reference types.
3052 (mono_nullable_box): Ditto. Fixes #77446.
3054 2006-02-07 Martin Baulig <martin@ximian.com>
3056 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
3058 2006-02-07 Ankit Jain <jankit@novell.com>
3060 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
3061 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
3062 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
3063 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
3064 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
3065 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
3067 2006-02-02 Zoltan Varga <vargaz@gmail.com>
3069 * class.c (mono_class_create_generic): Set type_token as well.
3071 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
3074 2006-02-02 Martin Baulig <martin@ximian.com>
3076 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
3077 has never been used so far.
3079 2006-02-02 Martin Baulig <martin@ximian.com>
3081 * mono-debug-debugger.h: Changed comment at the top of this file;
3082 the header is not installed, but it's safe to #include it from
3085 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
3086 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
3088 2006-02-02 Martin Baulig <martin@ximian.com>
3091 (MonoSymbolTable): Removed the `metadata_info' field.
3094 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
3096 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
3097 (mono_debugger_add_builtin_types): Removed.
3098 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
3099 (mono_debugger_create_notification_function): We now operate on a
3100 pre-allocated area; take a `gpointer' and return `void'.
3102 * mono-debug-debugger.c
3103 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
3104 (mono_debugger_add_builtin_types): Removed.
3106 2006-02-02 Martin Baulig <martin@ximian.com>
3108 * threads.c (mono_debugger_create_all_threads): New public method.
3110 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3112 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
3113 breaks on several platforms.
3115 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
3117 * assembly.c: the VS.NET build doesn't supply default values for
3118 MONO_ASSEMBLIES and MONO_CFG_DIR.
3120 2006-02-01 Zoltan Varga <vargaz@gmail.com>
3122 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
3125 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
3127 * loader.c (method_from_memberref): Fix a warning.
3129 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
3131 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
3132 with explicit layout. Fixes #77433.
3134 2006-01-31 Zoltan Varga <vargaz@gmail.com>
3136 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
3137 max_interface_id is initialized before using it. Fixes #77398.
3138 (ves_icall_Type_GetInterfaces): Ditto.
3140 2006-01-30 Raja R Harinath <rharinath@novell.com>
3142 * metadata.c (mono_metadata_parse_method_signature_full): Don't
3143 allocate memory for parameter attributes when parsing memberref
3145 * loader.c (mono_loader_set_error_method_load): Don't warn.
3146 (method_from_memberref): Ensure MissingMethodException gets thrown
3147 if method is not found. Make warning more informative.
3149 2006-01-29 Raja R Harinath <harinath@gmail.com>
3152 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
3153 return true if is byref.
3154 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
3155 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
3156 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
3158 2006-01-27 Raja R Harinath <rharinath@novell.com>
3160 Fix tests/find-method.2.il
3161 * loader.c (find_method, find_method_in_class): Remove is_inflated
3162 argument. Revert 2006-01-18 change.
3163 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
3164 is generic, search for method in its generic definition.
3165 * class.c (mono_class_setup_vtable_general): Print generic
3166 arguments of generic types in debugging printf.
3168 2006-01-26 Zoltan Varga <vargaz@gmail.com>
3170 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
3172 * threads.c (mono_threads_request_thread_dump): New helper function.
3174 2006-01-25 Raja R Harinath <rharinath@novell.com>
3176 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
3178 2006-01-25 Ankit Jain <jankit@novell.com>
3180 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
3181 move definition to ..
3182 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
3184 2006-01-25 Ankit Jain <jankit@novell.com>
3185 Raja R Harinath <rharinath@novell.com>
3187 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
3188 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
3191 2006-01-25 Martin Baulig <martin@ximian.com>
3193 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
3194 `MonoDebuggerThread' into debug-debugger.c.
3196 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
3198 * profiler.c: fix printing of data.
3200 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
3202 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
3203 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
3205 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
3207 * object.c: fix deadlock related to string interning.
3209 2006-01-23 Martin Baulig <martin@ximian.com>
3211 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
3213 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
3215 2006-01-23 Martin Baulig <martin@ximian.com>
3217 * mono-debug.h: Moved the prototypes of some functions which are
3218 used by the JIT here from mono-debug-debugger.h.
3220 2006-01-21 Martin Baulig <martin@ximian.com>
3222 * Makefile.am: Don't install mono-debug-debugger.h.
3224 2006-01-21 Martin Baulig <martin@ximian.com>
3226 * mono-debug-debugger.h: Enforce the private status of this header
3227 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
3228 Moved some stuff from mono-debugger-jit-wrapper.h here.
3230 2006-01-20 Raja R Harinath <rharinath@novell.com>
3232 * class.c (mono_class_from_typeref): Add a sanity test to help
3233 catch lack of assembly load/search hooks.
3235 2006-01-19 Zoltan Varga <vargaz@gmail.com>
3237 * marshal.c (emit_struct_conv): Relax the fields with same offset
3238 check even more. Fixes #77230.
3240 2006-01-18 Martin Baulig <martin@ximian.com>
3242 * loader.c (find_method_in_class): Added `gboolean is_inflated'
3243 argument; if false, we compare the uninstantiated signatures.
3244 (method_from_memberref): Compare the uninstantiated signatures;
3247 2006-01-18 Robert Jordan <robertj@gmx.net>
3249 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
3250 Clear the weak link. Fixes bug #77170.
3252 * gc.c (mono_gchandle_free):
3253 Reflect *-gc.c changes (tiny optimization).
3255 2006-01-18 Zoltan Varga <vargaz@gmail.com>
3257 * metadata.c (mono_metadata_signature_dup): Applied patch from
3258 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
3261 2006-01-17 Zoltan Varga <vargaz@gmail.com>
3263 * marshal.c (emit_struct_conv): Allow fields with the same offset when
3264 marshalling from native to managed code. Fixes #77230.
3266 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3268 * threadpool.c: fix problem (Mac only) when more than one asynchronous
3269 connect. Fixes bug #77020.
3271 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
3273 * class.c: fixed id assignement for nested interfaces (bug #77275).
3274 Added also better info for --print-vtable debugging.
3276 2006-01-12 Martin Baulig <martin@ximian.com>
3278 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
3279 interfaces on-the-fly; fixes #76625.
3282 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
3283 don't need that anymore.
3285 2006-01-12 Miguel de Icaza <miguel@novell.com>
3288 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3289 To avoid initing the nested_classes when not needed I turned the
3290 PeerCredData as a toplevel internal class, as it has to be shared
3293 Fixes the CASA issue.
3295 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
3297 * domain.c: Accessors for MonoJitInfo
3299 * profiler-private.h: Add jitinfo to the end jit hook
3301 * profiler.[ch]: Define new hooks, called after jitting which give
3302 the MonoJitInfo that was compiled
3304 2006-01-10 Martin Baulig <martin@ximian.com>
3306 * class.c (mono_class_setup_events): Add support for generic
3307 classes; fixes #76440.
3309 2006-01-06 Raja R Harinath <rharinath@novell.com>
3312 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
3313 on passed-in method.
3315 2006-01-03 Zoltan Varga <vargaz@gmail.com>
3317 * object.c (mono_runtime_invoke_array): Add Nullable support.
3319 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
3321 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
3323 * file-io.c: Don't consider sockets as directory and avoid an endless
3324 loop. Fix bug #76966.
3326 2006-01-03 Zoltan Varga <vargaz@gmail.com>
3328 * object.c (mono_nullable_init): New helper function.
3329 (mono_nullable_box): Ditto.
3331 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
3333 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
3335 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
3337 2006-01-02 Zoltan Varga <vargaz@gmail.com>
3339 * class.c (mono_class_is_assignable_from): Make T assignable to
3342 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
3344 * appdomain.c: Bump corlib version to 46.
3345 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
3346 serialization purpose) and changed ves_icall_System_Reflection_
3347 Assembly_get_code_base signature to accept a boolean (to escape, or
3348 not, the assembly code base).
3350 2005-12-23 Dick Porter <dick@ximian.com>
3354 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
3355 CreateEvent icall now returns "created" boolean parameter.
3357 2005-12-22 Zoltan Varga <vargaz@gmail.com>
3359 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
3362 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
3363 when attr_klass is an interface. Fixes #77045.
3365 2005-12-20 Zoltan Varga <vargaz@gmail.com>
3367 * marshal.c (emit_struct_conv): Fix previous patch.
3369 * marshal.c (emit_struct_conv): Add a check for fields with the same
3372 2005-12-20 Raja R Harinath <rharinath@novell.com>
3374 Fix regression in Mono.C5.
3375 * class.c (mono_class_create_generic): If 'klass' is an interface
3376 set up the interface offsets.
3377 (mono_class_is_assignable_from): Don't throw away generic arguments.
3379 2005-12-19 Raja R Harinath <rharinath@novell.com>
3381 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
3384 2005-12-15 Raja R Harinath <rharinath@novell.com>
3386 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
3388 (do_mono_metadata_parse_generic_class): Don't pass the current
3389 generic context when parsing the type being instantiated: it
3390 cannot use it, anyway.
3392 * loader.c (method_from_memberref): Don't inflate a signature if
3393 it doesn't contain any type parameters.
3395 2005-12-15 Zoltan Varga <vargaz@gmail.com>
3397 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
3399 2005-12-14 Martin Baulig <martin@ximian.com>
3402 (mono_type_get_name_recurse): Don't return null for type
3403 parameters and open generic classes.
3404 (mono_class_setup_methods): Don't exclude generic instances.
3405 (mono_get_unique_iid): Use different IDs for different
3406 instantiations of the same generic type.
3407 (mono_class_setup_vtable): Only use setup_generic_vtable() for
3408 open generic instances; create a normal vtable for closed generic
3410 (mono_class_setup_vtable_general): We're now also called for
3411 closed generic instances.
3414 (mono_reflection_bind_generic_parameters): Correctly use
3415 mono_metadata_lookup_generic_inst() everywhere.
3417 2005-12-14 Zoltan Varga <vargaz@gmail.com>
3419 * object.c (mono_class_create_runtime_vtable): Call
3420 mono_class_setup_vtable ().
3422 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
3424 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
3427 * loader.c (mono_loader_set_error_type_load): Print the type load
3428 warnings to the console so they are more visible to the user.
3429 (mono_loader_set_error_method_load): Ditto.
3431 * reflection.c (ensure_runtime_vtable): Revert the last change as it
3434 * reflection.c (ensure_runtime_vtable): Fix build.
3436 * reflection.c (ensure_runtime_vtable): Disable an optimization which
3437 doesn't work in all cases.
3439 2005-12-13 Zoltan Varga <vargaz@gmail.com>
3441 * object.c (mono_array_new_full): Treat a single dimensional array
3442 with 0 lower bounds as an szarray. Fixes #76973.
3444 * reflection.c (custom_attr_visible): Really fix this.
3446 2005-12-12 Zoltan Varga <vargaz@gmail.com>
3448 * reflection.c (custom_attr_visible): Allow nested public attributes
3451 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
3454 2005-12-12 Raja R Harinath <harinath@gmail.com>
3456 * class.c (set_generic_param_owner): Delete.
3457 (mono_class_create_from_typedef): Don't set ->owner field of
3458 generic parameters to "param containers" of enclosing classes.
3459 * reflection.c (mono_reflection_initialize_generic_parameter):
3462 2005-12-11 Zoltan Varga <vargaz@gmail.com>
3464 * reflection.c (custom_attr_visible): Fix build.
3466 2005-12-10 Zoltan Varga <vargaz@gmail.com>
3468 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
3471 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
3472 handling of null parameter defaults.
3474 2005-12-09 Raja R Harinath <rharinath@novell.com>
3476 * class.c (mono_class_from_generic_parameter): Don't set
3477 klass->generic_container.
3478 (my_mono_class_from_generic_parameter): Likewise.
3480 2005-12-07 Zoltan Varga <vargaz@gmail.com>
3482 * reflection.c (load_public_key): Fix a warning.
3483 (method_encode_code): Fix unaligned accesses.
3485 2005-12-07 Martin Baulig <martin@ximian.com>
3487 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
3490 (write_generic_param_entry): Encode our custom attrs.
3492 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
3494 2005-12-07 Martin Baulig <martin@ximian.com>
3496 * reflection.c (encode_new_constraint): Removed; we don't use the
3497 `NewConstraintAttribute' anymore.
3499 2005-12-06 Zoltan Varga <vargaz@gmail.com>
3501 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
3502 not fire a TypeResolve event when Assembly.GetType () is called.
3504 2005-12-05 Ben Maurer <bmaurer@ximian.com>
3506 Beginning of support for nullable types in the runtime. Parts of
3507 this patch are from Martin.
3509 * appdomain.c (MONO_CORLIB_VERSION): Bump
3511 * domain.c (mono_init_internal): get the nullable type
3513 * class.c (mono_class_is_nullable): New method
3514 (mono_class_get_nullable_param): New mehod
3515 (mono_class_create_generic): In types T? set cast_class to T
3517 * class-internals.h (MonoDefaults): new nullable default class
3518 (mono_class_get_nullable_param, mono_class_get_nullable_param):
3521 2005-12-05 Raja R Harinath <rharinath@novell.com>
3523 * metadata.c (select_container): New. Refactor code to select the
3524 appropriate GenericContainer given the type of generic parameter
3526 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
3527 not a MonoGenericContext. Use select_container. Update parameters.
3528 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
3530 (unwrap_arrays): Remove duplicate tests.
3531 (find_generic_param): Rename from 'has_same_context'. Now walks a
3532 generic instantiated class to find any arguments that are generic
3534 (mono_type_create_from_typespec_full): Use find_generic_param to
3535 avoid evicting some generic instantiations from the typespec
3538 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
3540 * reflection.c: fixed writing of doubles on ARM FPA.
3542 2005-12-02 Robert Jordan <robertj@gmx.net>
3544 * icall.c: Fixed EventInfo.ReflectedType (#76829).
3546 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3548 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
3549 least on SUSE 10 they are not the same (on debian, they are just the
3552 2005-12-01 Raja R Harinath <rharinath@novell.com>
3554 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
3555 DeclaringType for VARs and MVARs.
3556 * class.c (set_generic_param_owner): Fix initialization of owner
3559 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3561 * icall.c: fixed Enum.ToObject() to correctly convert the values.
3563 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3565 * threadpool.c: workaround for a bug that shows up on the Mac:
3566 select()+connect() on a blocking socket is not like it should
3567 be, so we proceed to connect() in that case, wasting the I/O
3568 threadpool thread until connect succeedes. Fixes bug #75436.
3570 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3572 * threadpool.c: fix typo when setting file descriptor states.
3574 2005-11-28 Raja R Harinath <rharinath@novell.com>
3576 * class-internals.h (MonoGenericContainer.is_signature): Remove.
3577 * metadata.c (mono_metadata_parse_method_signature_full): Don't
3578 create a temporary signature container.
3579 (mono_metadata_parse_generic_param): Update to changes.
3580 (mono_type_create_from_typespec_full): Update to changes.
3581 * loader.c (method_from_memberref): Don't use a
3582 MonoGenericContainer while parsing a memberref signature.
3583 (method_from_methodspec): Remove dead-store of the 'container'
3584 variable. It's overwritten before use.
3586 * metadata.c (mono_type_create_from_typespec_full): Make debugging
3588 (mono_metadata_parse_generic_param): Likewise.
3589 * loader.c (find_method_in_class): Does not need a
3590 MonoGenericContainer. Use 'mono_method_signature' rather than
3591 'mono_method_signature_full'.
3592 (find_method, mono_get_method_constrained, method_from_memberref):
3595 * metadata.c (mono_type_create_from_typespec_full): Ensure that
3596 owner-less generic-parameters are never evicted from the typespec
3599 * loader.c (method_from_memberref): Don't use the current context
3600 when parsing signatures.
3601 (method_from_methodspec, mono_get_method_from_token): Update to changes.
3603 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
3604 side-effects in g_assert.
3605 * loader.c (mono_get_method_from_token): Resolve klass earlier so
3606 that we don't potentially lose information.
3608 2005-11-26 Dick Porter <dick@ximian.com>
3611 * threads.c: icalls to implement basic (ie, not named)
3612 System.Threading.Semaphore.
3614 2005-11-24 Dick Porter <dick@ximian.com>
3617 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3618 Use GetProcessId() if it's available.
3620 2005-11-23 Zoltan Varga <vargaz@gmail.com>
3622 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
3624 2005-11-23 Raja R Harinath <rharinath@novell.com>
3625 Ankit Jain <jankit@novell.com>
3627 * loader.c (mono_get_method_from_token): Initialize 'method' field
3628 of all generic parameters before parsing the signature. Remove
3629 code that "fixed"-up MVAR references.
3631 2005-11-23 Ankit Jain <jankit@novell.com>
3633 * metadata.c (mono_metadata_has_generic_params):
3634 (mono_metadata_load_generic_param_constraints):
3635 (mono_metadata_load_generic_params): Move duplicate code ...
3636 (mono_metadata_get_generic_param_row): ... here. Returns the
3637 first row-id in GenericParam table for a given owner (token).
3638 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
3641 2005-11-23 Raja R Harinath <rharinath@novell.com>
3642 Ankit Jain <jankit@novell.com>
3644 * metadata.c (mono_metadata_class_equal): Pass signature_only when
3646 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
3647 type->data.generic_param only if the type is an MVAR.
3648 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
3649 leak owner-less VARs and MVARs into managed space.
3651 2005-11-21 Martin Baulig <martin@ximian.com>
3654 (MonoMethod): Moved the `generic_container' here from
3655 `MonoMethodNormal' since we now also need it for
3656 `MonoMethodPInvoke';
3657 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
3658 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
3659 an union containing both `MonoMethodNormal' and
3660 `MonoMethodPInvoke'.
3663 (mono_get_method_from_token): Allow implementing generic methods
3667 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
3670 2005-11-17 Dick Porter <dick@ximian.com>
3674 * process.c: Split the Process Start_internal icall into
3675 ShellExecuteEx_internal and CreateProcess_internal, which are
3676 called depending on whether UseShellExecute is true. Fixes bug
3679 * appdomain.c (MONO_CORLIB_VERSION): Incremented
3681 2005-11-17 Zoltan Varga <vargaz@gmail.com>
3683 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
3684 'msize' parameters, use the information in 'mspec' instead.
3685 (emit_object_to_ptr_conv): Ditto.
3687 * marshal.c (emit_struct_conv): Handle explicit layout structs with
3688 fields out of order. Fixes #76733.
3690 2005-11-17 Ankit Jain <jankit@novell.com>
3692 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
3694 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
3696 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
3699 2005-11-16 Zoltan Varga <vargaz@gmail.com>
3701 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
3702 for types with non-auto layout. Fixes #76717.
3704 2005-11-16 Ankit Jain <jankit@novell.com>
3706 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
3707 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
3708 if generic_context is null.
3709 (mono_metadata_generic_param_equal): param->owner can be null.
3710 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
3713 2005-11-16 Zoltan Varga <vargaz@gmail.com>
3715 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
3718 2005-11-15 Martin Baulig <martin@ximian.com>
3720 * object.c (set_value): Use mono_class_from_mono_type() instead of
3721 the hack for generic instances; fixes #76136.
3723 2005-11-15 Zoltan Varga <vargaz@gmail.com>
3725 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
3728 * image.c (load_metadata_ptrs): Initialize the new fields.
3730 * reflection.c (create_dynamic_mono_image): Ditto.
3732 * reflection.c (build_compressed_metadata): Use the new fields.
3734 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
3737 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
3740 2005-11-15 Ankit Jain <jankit@novell.com>
3741 Raja R Harinath <harinath@gmail.com>
3743 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
3744 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
3745 new per-generic_container cache if the cached MonoType's context matches
3746 the current context.
3747 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
3748 to the expected context.
3749 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
3751 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3753 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
3754 we changed the signature of an icall.
3755 * icall.c: Modify to mono_double_ParseImpl return true/false
3756 depending on the success, instead of throwing the exception. This will
3757 help us in Double.TryParse methods.
3759 2005-11-14 Zoltan Varga <vargaz@gmail.com>
3761 * marshal.c (emit_marshal_object): Throw an exception when
3762 marshalling 'object' instead of crashing. Fixes #76696.
3764 2005-11-11 Zoltan Varga <vargaz@gmail.com>
3766 * class-internals.h: Add prototype for mono_type_get_full_name ().
3768 2005-11-11 Dick Porter <dick@ximian.com>
3770 * threads.c (mono_thread_manage): Make sure the main thread has
3771 abandoned all its mutexes when cleaning up. Fixes bug 74680.
3773 2005-11-11 Zoltan Varga <vargaz@gmail.com>
3775 * loader.c (mono_loader_set_error_type_load): Log a warning to the
3776 console about the missing type.
3777 (mono_loader_set_error_method_load): Ditto.
3779 2005-11-09 Miguel de Icaza <miguel@novell.com>
3781 * mono-config.c (mono_get_config_dir): Set the system defaults if
3784 * assembly.c (mono_set_dirs): New API entry point to set the
3785 assembly and the config directory in one call
3787 2005-11-09 Zoltan Varga <vargaz@gmail.com>
3789 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
3790 the ftnptr was created from a delegate in a domain other than the
3791 current domain. Fixes #75377.
3793 * exception.h exception.c: Add mono_get_exception_not_supported ().
3795 2005-11-08 Martin Baulig <martin@ximian.com>
3797 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
3799 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
3801 * security-manager.h: Added definitions to deal with strongname key
3802 pairs bigger (and smaller) than 1024 bits.
3803 * reflection.c: Remove hardcoded strongname size (128 bytes) and
3804 adjust wrt the public key length being used.
3806 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
3808 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
3809 Windows build (r51396-51397).
3811 2005-11-03 Martin Baulig <martin@ximian.com>
3813 * class.c (mono_class_setup_vtable_general): Also add generic
3814 methods to the vtable; fixes #76581.
3816 2005-11-01 Miguel de Icaza <miguel@novell.com>
3818 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
3819 sure that we lookup GetString method from the System.Text.Encoding
3820 class, not the derived class or we get an empty method.
3824 2005-10-25 Miguel de Icaza <miguel@novell.com>
3826 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
3827 if it has been previously set (embedders).
3829 Make mono_set_rootdir available also on Unix.
3831 005-10-24 Robert Jordan <robertj@gmx.net>
3833 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
3835 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
3837 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
3838 only calls which are made to native code use this flag.
3840 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
3842 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
3844 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
3845 Add support for FieldBuilders.
3847 2005-10-29 Martin Baulig <martin@ximian.com>
3850 (mono_debug_using_mono_debugger): New public method; returns
3851 whether we're running inside the debugger.
3853 2005-10-27 Zoltan Varga <vargaz@gmail.com>
3855 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
3856 for Method/Constructor/FieldBuilders.
3858 2005-10-26 Zoltan Varga <vargaz@gmail.com>
3860 * reflection.c (module_add_cattrs): Save custom attributes for global methods
3863 2005-10-26 Martin Baulig <martin@ximian.com>
3865 * mono-debug-debugger.c
3866 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
3868 2005-10-24 Raja R Harinath <harinath@gmail.com>
3870 * icall.c (base64_to_byte_array): Don't pass an out-of-range
3873 2005-10-21 Zoltan Varga <vargaz@gmail.com>
3875 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
3876 when passing valuetypes byref. Fixes #76502.
3878 2005-10-19 Jackson Harper <jackson@ximian.com>
3880 * profiler.c: Don't put a . in front of types that are not in a
3883 2005-10-18 Zoltan Varga <vargaz@gmail.com>
3885 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
3887 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
3889 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
3891 (mono_marshal_get_ldflda_wrapper): Fix a warning.
3893 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3895 * assembly.c metadata-internals.h icall.c: Define an additional
3896 parameter for mono_assembly_name_parse_full, so we can avoid creating
3897 S.R.AssemblyName.Version when no version info wasn't passed.
3899 2005-10-09 Miguel de Icaza <miguel@novell.com>
3901 * class.c (mono_type_get_full_name): Reimplement method that was
3904 * image.c: Some docs
3906 2005-10-10 Zoltan Varga <vargaz@gmail.com>
3908 * profiler.c (output_newobj_profile): Fix printing of Total memory
3911 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
3913 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
3915 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
3917 * threads.c: remove debug output.
3919 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
3921 * threads.c (mono_thread_manage): Fix crashes if more than 64
3922 threads need to be aborted. Hopefully fixes #75899.
3924 * assembly.c (mono_stringify_assembly_name): New helper function.
3926 * class.c: Use mono_stringify_assembly_name instead of the similar
3929 * assembly.h assembly.c: Add support for calling a postload search
3930 hook if an assembly cannot be loaded.
3932 * appdomain.c: Register new search hooks which call the AssemblyResolve
3933 events in AppDomain. Fixes #75231
3935 2005-10-07 Martin Baulig <martin@ximian.com>
3937 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
3938 methods without debug info.
3940 2005-10-07 Zoltan Varga <vargaz@gmail.com>
3942 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3945 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3947 * file-io.c: now that we return symlinks, use lstat and, when the file
3948 is a symbolic link, stat, to get the file attributes. Also avoid the
3949 conversion to/from utf16/external.
3951 2005-10-06 Zoltan Varga <vargaz@gmail.com>
3953 * class.c (mono_class_layout_fields): Compute klass->has_references
3954 correctly if an embedded valuetype is not yet initialized. Fixes
3957 2005-10-04 Martin Baulig <martin@ximian.com>
3960 (mono_metadata_load_generic_param_constraints): New public
3961 function; splitted the constraints loading out from
3962 mono_metadata_load_generic_params().
3964 * class.c (mono_class_create_from_typedef): Call
3965 mono_metadata_load_generic_param_constraints() after setting up
3966 the type and creating our parent; fixes #75329.
3968 2005-10-04 Martin Baulig <martin@ximian.com>
3970 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3971 non-dynamic parent classes.
3973 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
3975 * file-io.c : win32 build fix (ETXTBSY seems not found).
3977 2005-10-04 Martin Baulig <martin@ximian.com>
3980 (mono_image_get_methodspec_token): Make the cache actually work;
3983 2005-10-04 Martin Baulig <martin@ximian.com>
3985 * class.c (mono_class_name_from_token): Removed the unneccessary
3986 `MonoGenericContext *' argument.
3988 2005-10-04 Martin Baulig <martin@ximian.com>
3991 (method_from_methodspec): Make the caching work again; fixes the
3992 performance regression from #76262.
3994 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3998 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3999 GetFileSystemEntries that performs the same work but without going
4000 into io-layer, locking, etc.
4002 2005-09-30 Zoltan Varga <vargaz@gmail.com>
4004 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
4005 ThreadState_Stopped as well. Fixes #76047.
4007 2005-09-29 Martin Baulig <martin@ximian.com>
4010 (inflate_generic_context): If the new context has a `gmethod', set
4011 its `container' that that gmethod's `container'.
4014 (mono_metadata_parse_generic_param): Simplify things;
4015 `generic_container = generic_context->container;' is just fine.
4017 * loader.c (method_from_methodspec): Code cleanups.
4019 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
4021 * decimal.c: fix warning (and let gcc generate correct
4022 code on ARM with optimizations).
4024 2005-09-28 Martin Baulig <martin@ximian.com>
4027 (method_from_memberref): Added `MonoGenericContext *class_context'
4028 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
4029 (method_from_methodspec): If we're a memberref, use the enclosing
4030 context when parsing its parent. Fixes #76262; see gtest-206.cs.
4032 2005-09-28 Martin Baulig <martin@ximian.com>
4034 * object.c (mono_runtime_invoke_array): Added support for
4035 MONO_TYPE_GENERICINST; fixes #75917.
4037 2005-09-27 Martin Baulig <martin@ximian.com>
4039 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
4040 `k->byval_arg.type' to determine the actual type.
4042 * loader.c (method_from_methodspec): Removed some hacks.
4044 2005-09-27 Ben Maurer <bmaurer@ximian.com>
4046 * class-internals.h (mono_field_is_deleted): Do the test for
4047 rtspecialname before we check the actual name of the field. This
4048 prevents us from dereferencing a pointer into the string table,
4049 saving us from accessing a few pages
4051 * *.c: Replace the use of {Enter,Leave}CriticalSection with
4052 macros. This will allow a deadlock debugger to easily be plugged
4055 2005-09-27 Martin Baulig <martin@ximian.com>
4057 * loader.c (method_from_methodspec): Create a "signature"
4058 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
4060 2005-09-27 Martin Baulig <martin@ximian.com>
4063 (inflate_generic_class): Correctly set the new context's
4067 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
4068 instead of a `MonoGenericContext *'.
4069 (mono_method_signature_full): Take a `MonoGenericContainer *'
4070 instead of a `MonoGenericContext *'.
4073 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
4074 instead of a `MonoGenericContext *'.
4075 (mono_metadata_parse_method_signature_full): Likewise.
4077 2005-09-26 Martin Baulig <martin@ximian.com>
4080 (mono_class_from_generic_parameter): Set `klass->generic_container'
4081 (mono_class_from_generic_parameter): Likewise.
4082 (mono_bounded_array_class_get): We inherit the generic container
4083 from the element class.
4086 (find_method, find_method_in_class): Take a `MonoGenericContext *'
4087 argument rather than computing it here.
4088 (method_from_memberref): Correctly set the generic context before
4089 parsing the signature. Fixes #75681.
4091 2005-09-26 Zoltan Varga <vargaz@gmail.com>
4093 * object.c (mono_class_has_special_static_fields): Fix warnings.
4095 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4097 * assembly.c: Add parse_public_key function, to
4098 par the public keys. Also added mono_assembly_name_parse_full,
4099 to define it the parsed key should be freed or not.
4100 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
4101 to parse a long format assembly name.
4102 * metadata-internals.h: Keep mono_assembly_name_parse_full as
4103 private, since calling it to preserve the key requires
4104 freeing it manually.
4106 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
4108 * locales.c : removed HAVE_ICU part.
4110 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
4112 * object.c (mono_class_create_runtime_vtable): Avoid calling
4113 field_is_special_static if the klass has no special static fields.
4115 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
4116 (MonoCachedClassInfo): Likewise.
4118 * object.c (mono_class_has_special_static_fields): New helper function.
4120 2005-09-23 Zoltan Varga <vargaz@gmail.com>
4122 * class.c (mono_class_create_from_typedef): Don't call
4123 interfaces_from_typedef_full for enums.
4124 (mono_class_create_from_typedef): Compute the base types of enums directly
4125 without calling mono_class_setup_fields ().
4126 (mono_class_find_enum_basetype): New helper function.
4128 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
4129 one place inside the string heap.
4131 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
4133 * class.c: locking fixes, code cleanups, some docs added.
4134 Allocate some data structures in the image mempool.
4136 2005-09-23 Zoltan Varga <vargaz@gmail.com>
4138 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
4141 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
4143 * class-internals.h, class.c, reflection.c: reduce memory taken by
4146 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
4148 * metadata.c, metadata.h, loader.h: documentation updates, code and
4151 2005-09-23 Zoltan Varga <vargaz@gmail.com>
4153 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
4156 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
4157 page faults caused by the runtime while reading metadata.
4159 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4161 * socket-io.c: the field names were changed 3 months ago and no one
4162 realized until bug #76077 got filed!
4164 2005-09-20 Martin Baulig <martin@ximian.com>
4166 * icall.c (assembly_icalls): Removed some unused debugger icalls.
4168 2005-09-20 Martin Baulig <martin@ximian.com>
4170 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
4171 write the rank into the class entry.
4173 2005-09-20 Martin Baulig <martin@ximian.com>
4175 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
4177 2005-09-19 Zoltan Varga <vargaz@gmail.com>
4179 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4181 * icall.c (custom_attrs_defined_internal): New icall.
4183 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
4185 (mono_custom_attrs_construct_by_type): New helper function.
4187 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
4189 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
4190 terminate the resulting string. Fixes #76123.
4192 2005-09-16 Martin Baulig <martin@ximian.com>
4195 (mono_debug_add_method): Ignore inflated methods for the moment.
4197 2005-09-14 Martin Baulig <martin@ximian.com>
4199 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
4201 2005-09-13 Zoltan Varga <vargaz@gmail.com>
4203 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
4204 return a success/failure indication.
4205 (mono_metadata_interfaces_from_typedef_full): Ditto.
4206 (get_constraints): Ditto.
4208 2005-09-12 Zoltan Varga <vargaz@gmail.com>
4210 * marshal.c (emit_marshal_array): Fix handling of null arrays.
4212 * marshal.c (emit_marshal_array): Add support for returning string
4213 arrays from delegates. Fixes #76063.
4215 * marshal.c: Use the emit_ldloc/stloc macros where possible.
4217 2005-09-11 Zoltan Varga <vargaz@gmail.com>
4219 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
4222 2005-09-09 Zoltan Varga <vargaz@gmail.com>
4224 * reflection.c icall.c: Fix after mono_get_exception_type_load
4227 * assembly.c (mono_assembly_get_assemblyref): New helper function.
4228 (mono_assembly_load_reference): Use the new helper.
4230 * class-internals.h (MonoLoaderError): New structure containing
4231 information about type loading errors.
4233 * class-internals.h loader.c: Add APIs to store per-thread loader
4236 * loader.c class.c: Set the loader error if needed.
4238 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
4240 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
4242 * decimal.c: fixed to handle the broken ARM fp format.
4244 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
4246 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
4249 2005-09-06 Martin Baulig <martin@ximian.com>
4251 * domain.c (supported_runtimes): Added v2.0.50727.
4253 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
4255 * culture-info.h: reduce the size of some structures.
4257 2005-09-05 Martin Baulig <martin@ximian.com>
4259 Reflect latest API changes in the August CTP.
4262 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
4263 ("MonoType.HasGenericArguments"): Removed.
4264 ("MonoMethod.BindGenericParameters"): Renamed to
4265 "MakeGenericMethod".
4266 ("MethodBuilder.BindGenericParameters"): Renamed to
4267 "MakeGenericMethod".
4269 2005-09-05 Martin Baulig <martin@ximian.com>
4271 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
4273 2005-09-05 Martin Baulig <martin@ximian.com>
4275 Applying a patch from Michal Moskal <malekith@nemerle.org>.
4277 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
4278 generic_container is non-NULL.
4280 2005-09-05 Martin Baulig <martin@ximian.com>
4282 Applying a patch from Michal Moskal <malekith@nemerle.org>.
4284 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
4286 2005-08-29 Michal Moskal <malekith@nemerle.org>
4288 * reflection.c (encode_locals,
4289 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
4290 for large generic types.
4292 2005-09-05 Martin Baulig <martin@ximian.com>
4294 Applying a patch from Michal Moskal <malekith@nemerle.org>.
4296 * class.c (mono_dup_array_type): New public method.
4297 (mono_metadata_signature_deep_dup): New public method.
4298 (dup_type): Correctly duplicate array and function types.
4300 2005-09-05 Martin Baulig <martin@ximian.com>
4302 Applying a patch from Michal Moskal <malekith@nemerle.org>.
4304 * reflection.c (get_default_param_value_blobs): Handle generic types
4305 and generic methods.
4307 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
4309 * class.c: Fixed error reporting (method/class were inversed) for
4310 inheritance demands.
4311 * security-manager.c|h: Added the AppDomain when calling the managed
4312 System.Security.SecurityManager.InheritanceDemand method.
4314 2005-09-01 Raja R Harinath <rharinath@novell.com>
4316 * reflection.c (encode_marshal_blob): 'marshaltype' and
4317 'marshaltyperef' are alternate sources for the custom marshaler
4320 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
4322 * class.c: fix creation of array classes with rank == 1
4323 (patch by Ankit Jain <jankit@novell.com>).
4325 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
4327 * object.c: fix check for creating the bound data for arrays vs
4330 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4332 * object.c: configuration file name is now based on the executable name,
4333 not the image name. Fixes bug #75931.
4335 2005-08-29 Zoltan Varga <vargaz@gmail.com>
4337 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
4338 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
4340 2005-08-25 Zoltan Varga <vargaz@gmail.com>
4342 * rand.c: Use wincrypt.h instead of WinCrypt.h.
4344 2005-08-24 Ankit Jain <jankit@novell.com>
4345 Raja R Harinath <rharinath@novell.com>
4347 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
4348 called by it recursively.
4349 (mono_class_init): Remove special case in pending_init handling, since it's
4350 superseded by the fix to mono_class_from_typeref.
4352 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
4354 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
4355 BROKEN_THREAD_START stuff.
4357 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
4359 * class-internals.h object.c: Add a new kind of trampoline called a delegate
4362 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
4364 * object.c (mono_delegate_ctor): Replace the original function address with
4365 a delegate trampoline.
4367 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
4369 * icall.c: add boolean argument to base64_to_byte_array and
4370 InternalFromBase64String to control whether a whitespace-only string
4371 is allowed (or should casue a FormatException to be thrown). We need
4372 this as the behavior has changed between MS.NET 1.x and 2.0, and we
4373 to match the MS behaviour in both profiles.
4374 * appdomain.c: Bump corlib version.
4376 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4378 This patch implements a big portion of publisher policy
4379 support, used to bind assembly versions and redirect
4380 one assembly from version A to version B.
4383 New GSList loaded_assembly_bindings, for storing the cached
4385 (assembly_binding_maps_name): New static function for checking if a
4386 assembly binding information maps an assembly name.
4387 (mono_assembly_binding_info_free): New function for freeing
4388 assembly binding information resources.
4389 (get_publisher_policy_info): New static function for retrieving
4390 assembly binding information from a MonoImage.
4391 (compare_versions): New static function for comparing an assembly
4392 binding information data and the version of an assembly name.
4393 (check_policy_versions): New static function for checking if an
4394 assembly binding info mapping an assembly name is valid for it.
4395 (mono_assembly_load_publisher_policy): New static function for
4396 loading the 'policy.major.minor.MyAssembly' image for an assembly
4397 with an assembly name 'aname'.
4398 (mono_assembly_bind_version): New static function for updating
4399 assembly redirection.
4400 (mono_assembly_apply_binding): New static function for applying
4402 (search_binding_loaded): New static function for searching
4403 loaded assembly binding infos in the cache domain.
4404 (mono_assembly_load_full): Don't apply assembly binding for
4405 reflection only assemblies.
4407 * metadata-internals.h: Add MonoAssemblyBindingInfo,
4408 which contains information about assembly binding. Also
4409 declare signature for mono_config_parse_publisher_policy ()
4410 function, used to retrieve pub policy info.
4413 (publisher_policy_start): New static function used to parse publisher
4414 policy config files.
4415 (publisher_policy_parser): New static MonoParseHandler containing
4416 the functions used when parsing config files.
4417 (mono_config_parse_publisher_policy): New function for parsing
4418 publisher policy files.
4420 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
4422 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
4424 * marshal.c (mono_delegate_free_ftnptr): Ditto.
4426 * object.c (mono_get_addr_from_ftnptr): New helper function.
4428 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
4430 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4432 2005-08-19 Dick Porter <dick@ximian.com>
4434 * threads.c, threads.h, appdomain.c, appdomain.h,
4435 profiler-private.h, monitor.c, object.c, object-internals.h,
4436 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
4437 store the thread ID, so it can hold a 64 bit value if needed.
4439 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
4441 * reflection.c (mono_reflection_create_dynamic_method): Store the
4442 handle class into the method references as well so ldtoken works in
4445 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
4448 2005-08-19 Ankit Jain <jankit@novell.com>
4451 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
4452 here rather than using the method signature of a arbitrary function
4453 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
4455 Hack done with Harinath.
4457 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4459 * threadpool.c: disable printing stack traces when we get a exception
4460 in a threadpool thread. I need to do more testing to figure out which
4461 cases actually print this. Fixes bug #75828.
4463 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4465 * icall.c: there might be ignored whitespace after the last '='. This
4466 fixes length computation and bug #75840.
4468 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
4470 * assembly.c (mono_assembly_load_full): Consider .exe extension as
4473 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
4476 * reflection.c (create_custom_attr_data): Ditto.
4478 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
4480 * locales.c, culture-info.h : removed RegionLCIDMap.
4481 * culture-info-tables.h : regenerated.
4483 2005-08-16 Martin Baulig <martin@ximian.com>
4485 * class.c (mono_type_get_name_recurse): Small fix.
4487 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
4489 * locales.c : indentation fixie.
4491 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
4493 * object-internals.h,
4497 icall.c : added RegionInfo table support.
4498 * culture-info-table.h : regenerated for region support.
4500 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
4502 * reflection.c (resolve_object): handle all kinds of MonoMethod
4503 including generic ones
4505 2005-08-12 Ankit Jain <jankit@novell.com>
4507 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
4508 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
4510 2005-09-12 Lluis Sanchez <lluis@ximian.com>
4512 * process.c: Don't close a thread handle when it's NULL. This is a
4513 workaround for bug #75733.
4515 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
4517 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
4519 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
4521 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
4523 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4525 * threadpool.c: if a work item in the thread pool has a callback that
4526 catches a exception, don't propagate it after invoking the callback.
4529 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
4531 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
4533 * class-internals.h (MonoCachedClassInfo): Add some new fields.
4535 * class.c (mono_class_init): Load field info lazily in the AOT case.
4537 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
4539 2005-08-03 Ankit Jain <jankit@novell.com>
4542 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
4543 PInvoke calling convention is 0.
4545 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
4547 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
4548 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
4550 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
4552 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
4553 to handle threads not started by the GC (patch by Michael Meeks
4554 <michael.meeks@novell.com>).
4556 2005-07-31 Kamil Skalski <nazgul@omega.pl>
4558 * reflection.c: Make buffer used in emitting types larger for some
4559 big generic types (patch by Michal Moskal).
4561 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
4563 * mono-debug.c: Fix some (not all) alignment problems.
4565 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4567 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
4568 Invoke mono_image_load_from_data_full passing the refonly
4572 (mono_assembly_open_from_bundle): Add the refonly argument,
4573 in order to pass it to other methods it calls to.
4574 (do_mono_assembly_open): Add the refonly argument, in order
4575 to pass it to other methods it calls to.
4576 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
4577 the refonly parameter to it.
4579 * image.c: Add loaded_images_refonly_hash and
4580 loaded_images_refonly_guid_hash to cache the reflection
4582 (mono_images_init): Initialize the hash tables used for
4583 caching the reflection only images.
4584 (load_modules): Invoke mono_image_open_full passing the refonly
4585 parameter to load the modules the correct way.
4586 (build_guid_table): Add the refonly argument, to re-build the
4588 (do_mono_image_open): Added the refonly argument, in order to
4589 define it for the loaded image.
4590 (mono_image_loaded_full): New function, which receives an
4591 additional parameter to look for the image in the refonly or
4592 non-refonly section.
4593 (mono_image_loaded): Updated, using mono_image_loaded_full.
4594 (mono_image_loaded_by_guid_full): The same case that happens
4595 with mono_image_loaded_full.
4596 (mono_image_loaded_by_guid): Likewise.
4597 (register_image): Use the ref_only variable inside MonoImage
4598 to decide in which hash table store the current image.
4599 (mono_image_open_from_data_full): Rename
4600 mono_image_open_from_data to mono_image_open_from_data_full,
4601 adding the refonly argument, to define the ref_only variable
4603 (mono_image_open_from_data): Return
4604 mono_image_open_from_data_full.
4605 (mono_image_open_full): Rename mono_image_open to
4606 mono_image_open_full, receiving the new refonly argument,
4607 to pass it to inner methods.
4608 (mono_pe_file_open): Update this function, to open
4609 a MonoImage as a non-refonly image.
4610 (mono_image_close): Use the refonly variable inside
4611 MonoImage to remove the image from the correct caches.
4613 * image.h: Add the signatures of mono_image_open_full,
4614 mono_image_open_from_data_full, mono_image_loaded_full,
4615 mono_image_loaded_by_guid_full.
4617 * metadata-internals.h: Add the ref_only field to
4620 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4622 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
4623 Fix the last behavior, which used to load the assemblies and
4624 extract MonoReflectionAssemblyName information, instead of
4625 extract it from the metadata tables. Needed for Reflection
4628 2005-07-29 Martin Baulig <martin@ximian.com>
4630 * mono-debug-debugger.c
4631 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
4635 (mono_debug_address_from_il_offset): Check whether we have
4636 debugging support before attempting to take the lock.
4637 (mono_debug_source_location_from_address): Likewise.
4638 (mono_debug_source_location_from_il_offset): Likewise.
4639 (mono_debug_il_offset_from_address): Likewise.
4640 (mono_debug_address_from_il_offset): Likewise.
4642 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
4644 * class.c (mono_class_from_name_case): Add support for dynamic images.
4647 * object.c (mono_class_compute_gc_descriptor): Add a workaround
4650 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
4652 * reflection.c (mono_method_get_object): Fix warning.
4654 2005-07-28 Martin Baulig <martin@ximian.com>
4657 (mono_debug_add_wrapper): Also write the wrapper type.
4659 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
4661 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
4663 * class.c (mono_class_init): Avoid reading nested classes if the AOT
4664 data indicates the class has none.
4666 2005-07-26 Ben Maurer <bmaurer@ximian.com>
4668 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
4669 loader lock with the debugger lock. Prevents deadlocks for beagle.
4671 Beagle can now run on an smp box for a weekend without any
4674 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
4676 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
4677 in a module. Fixes #75629.
4679 2005-07-26 Martin Baulig <martin@ximian.com>
4681 * mono-debug.c (mono_debug_add_wrapper): New static method.
4682 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
4683 interncall or a wrapper.
4685 * mono-debug.h (MonoDebugWrapperData): New public typedef.
4686 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
4687 (MONO_DEBUGGER_VERSION): Bump to 51.
4689 * mono-debug-debugger.c
4690 (mono_debugger_add_type): Removed this empty function.
4691 (mono_debugger_add_method): Likewise.
4693 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
4695 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
4696 before accessing method->slot.
4698 2005-07-21 Jb Evain <jbevain@gmail.com>
4700 * reflection.c (method_encode_clauses/class): Handle filters clauses.
4703 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
4705 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
4708 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
4710 * image.h image.c: Add mono_image_get_guid () API function.
4712 2005-07-19 Ben Maurer <bmaurer@ximian.com>
4714 There were issues when multiple threads tried to load
4715 assemblies. A deadlock was created between assemblies_mutex and
4716 mono_domain_assemblies_lock. This fixes the issue by making the
4717 assembly ref counting be lock free. See bug 75586.
4719 * image.c (mono_image_close): The add ref function here was using
4720 Interlocked operations while the unref was using a mutex and a
4721 --. I don't think this was ever a bug that would be exposed in a
4722 non-pendantic way (ie, by an embedder doing a ref on one thread
4723 and an unref on another), but for the sake of correctness, this is
4726 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
4727 (mono_assembly_load_reference): Call mono_assembly_addref rather
4728 than touching the refcount ourselves.
4729 (mono_assembly_close): Use InterlockedDecrement to unref the
4730 assembly. Don't acquire the lock unless it is actually needed.
4732 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
4734 * class.c (mono_class_layout_fields): Fix calculation of has_references
4737 2005-07-12 Martin Baulig <martin@ximian.com>
4739 Applying a patch from Michal Moskal <malekith@nemerle.org>.
4742 (mono_type_hash): Provide better hashing for generic instances.
4743 (mono_generic_inst_hash): Improve hashing.
4744 (mono_generic_class_hash): Likewise.
4746 * reflection.c (mymono_metadata_type_hash): Improve hashing for
4749 2005-07-12 Martin Baulig <martin@ximian.com>
4751 * reflection.c (mono_reflection_create_runtime_class): Remove the
4752 hack for generic type definitions and non-`Run' assemblies.
4753 (mono_reflection_bind_generic_parameters): Also use
4754 `klass->wastypebuilder' to check for TypeBuilders.
4756 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
4758 * class.c (mono_class_layout_fields): Fix calculation of has_references
4761 * class.c (inflate_generic_class): Fix a leak.
4762 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
4765 2005-07-11 Martin Baulig <martin@ximian.com>
4767 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
4770 2005-07-11 Martin Baulig <martin@ximian.com>
4772 * loader.c (find_method): Also lookup in
4773 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
4775 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
4777 * appdomain.c (mono_domain_unload): Don't free the error message
4778 before passing it to mono_get_exception_...
4780 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
4782 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
4784 * threads.c: try to better guess an available RT signal (bug #75387).
4786 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
4788 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
4791 2005-07-07 Martin Baulig <martin@ximian.com>
4793 * class.c (mono_type_get_name_full): Return NULL for
4794 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
4797 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
4799 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
4800 exit the appdomain as well being aborted.
4802 * threadpool.c: Create all threadpool threads inside the root appdomain, and
4803 change back to the root domain after calling managed code. This enables
4804 appdomains using threadpools to be unloaded.
4806 2005-07-07 Martin Baulig <martin@ximian.com>
4809 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
4810 into `MonoDynamicGenericClass' since we only need it for dynamic
4813 * reflection.c (mono_class_bind_generic_parameters): We don't need
4814 to compute the `parent' here.
4816 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
4818 * culture-info-table.h : regenerated.
4820 2005-07-06 Martin Baulig <martin@ximian.com>
4823 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
4825 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
4827 2005-07-06 Martin Baulig <martin@ximian.com>
4829 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
4830 we're doing a signature-only comparision; fixes #74945.
4832 2005-07-06 Martin Baulig <martin@ximian.com>
4834 * class-internals.h (MonoGenericClass): Moved some things out into
4835 a new `MonoInflatedGenericClass' type.
4836 (MonoInflatedGenericClass): New type; the `klass' of a
4837 `MonoGenericClass' is now computed lazyly in
4838 mono_get_inflated_generic_class().
4840 * class.c (mono_get_inflated_generic_class): New public function.
4841 (mono_class_inflate_generic_method): Removed the unused
4842 `MonoClass *' argument.
4843 (setup_generic_vtable): Don't call mono_get_inflated_method() on
4845 (mono_class_create_generic): Make this static and merge it with
4846 mono_class_create_generic_2(); we're now called automatically from
4847 mono_get_inflated_generic_class().
4849 * loader.c (mono_method_signature): Call
4850 mono_get_inflated_method() here.
4852 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
4854 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
4855 type of fields with RVA.
4857 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
4858 for this pseudo class.
4859 (my_mono_class_from_generic_parameter): Likewise.
4860 (mono_class_init): Allow interfaces to have cctors.
4862 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
4864 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
4865 lazily for AOT methods.
4867 2005-07-05 Martin Baulig <martin@ximian.com>
4869 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
4870 returns FALSE for a successful match, not TRUE.
4872 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
4874 * loader.c (mono_method_get_index): Optimize this a bit.
4876 2005-07-04 Martin Baulig <martin@ximian.com>
4879 (class_compute_field_layout): Move the check for generic type
4880 definitions into mono_class_layout_fields(). Fixes #74684.
4881 (mono_class_from_generic_parameter): Correctly compute
4882 `klass->parent'; fixes #75457.
4884 * reflection.c (register_assembly, register_module): Make sure
4885 `domain->rejobject_hash' is already created.
4887 2005-07-02 Martin Baulig <martin@ximian.com>
4890 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
4891 `MonoDynamicGenericClass'.
4893 2005-07-01 Lluis Sanchez <lluis@ximian.com>
4895 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
4896 returned by a field getter is null, since null is a valid value.
4898 2005-07-01 Martin Baulig <martin@ximian.com>
4900 * reflection.c (mono_reflection_generic_class_initialize): Update
4901 the `dgclass->fields [i].parent' to the correct class.
4902 (mono_image_get_fieldref_token): Use the declaring type, not the
4905 2005-07-01 Martin Baulig <martin@ximian.com>
4907 * loader.c (find_method): Also look in the interfaces; fixes #75429.
4909 2005-06-30 Ben Maurer <bmaurer@ximian.com>
4911 * threads.c (thread_cleanup): assert that thread != NULL
4912 (wait_for_tids_or_state_change): We were using the wrong variable
4913 when accessing wait->threads. `i' was always out of the bounds of
4916 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4918 * loader.c: map user32 and kernel32 to libMonoSupportW
4920 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
4922 * appdomain.c (unload_thread_main): Mark this as WINAPI.
4924 2005-06-28 Martin Baulig <martin@ximian.com>
4926 * loader.c (method_from_methodspec): Fix #75334.
4928 2005-06-28 Martin Baulig <martin@ximian.com>
4930 Fix #74953 - Arrays now implement the generic IList<T> interface
4931 on the 2.0 platform.
4933 * class-internals.h (MonoDefaults): Added `generic_array_class'.
4935 * reflection.c (mono_class_bind_generic_parameters): New public
4936 function; similar to mono_reflection_bind_generic_parameters(),
4937 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
4939 * domain.c (mono_init_internal): Try to initialize.
4940 `mono_defaults.generic_array_class' here; this'll only succeed if
4941 we're using the 2.0 corlib.
4944 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4945 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4946 (mono_lookup_internal_call): Added support for nested classes.
4949 (mono_get_method_from_token): Set `result->signature->pinvoke' if
4950 we're an interncall and have generic arguments.
4953 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4954 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4955 instance of System.Array.InternalArray<T> for arrays, so they
4956 implement the generic IList<T> interface.
4958 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
4960 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4961 (chastamar@yahoo.com). Fixes #75374.
4963 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
4965 * culture-info-table.h: regenerated.
4967 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4969 * icall.c: handle spaces correctly for base64 strings.
4971 2005-06-26 Ben Maurer <bmaurer@ximian.com>
4973 * *.c: Kill some warnings.
4975 2005-06-23 Duncan Mak <duncan@novell.com>
4977 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4978 that this builds on Solaris 10 (x86).
4980 2005-06-23 Martin Baulig <martin@ximian.com>
4983 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4984 generic type definitions.
4986 2005-06-23 Martin Baulig <martin@ximian.com>
4990 * metadata.c (mono_class_get_overrides): Renamed to
4991 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4992 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4993 pass it to mono_get_method_full().
4995 2005-06-22 Ben Maurer <bmaurer@ximian.com>
4997 * reflection.c (mono_reflection_create_runtime_class): take the
4998 mono_domain_lock in this method. Prevents deadlocks
5000 2005-06-22 Martin Baulig <martin@ximian.com>
5002 * loader.c (method_from_methodspec): Fix #75330.
5004 2005-06-22 Martin Baulig <martin@ximian.com>
5006 * reflection.c (type_get_qualified_name): Use
5007 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
5008 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
5009 argument; use it if we don't have an assembly name.
5011 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
5013 * object.c: In mono_message_init, set "copy out" flag for in
5014 parameters with the [Out] flag.
5016 2005-06-21 Martin Baulig <martin@ximian.com>
5019 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
5022 2005-06-21 Martin Baulig <martin@ximian.com>
5024 * class.c (mono_class_init): Don't initialize `class->fields' for
5025 generic instances since they're initialized again in
5026 compute_field_layout().
5027 (compute_field_layout): Set the field's `generic_info' here; fix
5030 2005-06-21 Martin Baulig <martin@ximian.com>
5033 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
5035 * metadata.c (mono_metadata_generic_method_equal): Also
5036 distinguish the `generic_class'; fixes #75334.
5038 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5042 * domain-internals.h:
5043 * reflection.c: 'domain_assemblies' field is now protected by its own
5044 lock. Don't call into managed code to run the AssemblyLoad event if we
5045 now there are no registered delegates for it.
5047 2005-06-20 Martin Baulig <martin@ximian.com>
5049 * class.c (mono_class_is_assignable_from): Use a custom version of
5050 mono_class_has_parent() to make things work for generic instances;
5053 2005-06-20 Martin Baulig <martin@ximian.com>
5055 * loader.c (method_from_methodspec): Apply a patch from
5056 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
5058 2005-06-20 Martin Baulig <martin@ximian.com>
5060 * class.c (mono_class_init): Reverted Zoltan's last change; it
5063 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
5065 * threads.c (wait_for_tids_or_state_change): Add missing locking.
5067 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5069 * socket-io.c: fix the index in the socket array for writable/error
5070 sockets. Fixes bug #75306.
5072 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
5074 * class.c (mono_class_init): Allow interfaces to have static ctors.
5076 2005-06-17 Martin Baulig <martin@ximian.com>
5078 * loader.c (method_from_methodspec): Use `context->container' when
5079 parsing the `gmethod->inst'.
5081 2005-06-17 Martin Baulig <martin@ximian.com>
5083 * class.c (mono_type_get_name_recurse): Don't add the assembly
5084 name for type arguments.
5086 2005-06-15 Martin Baulig <martin@ximian.com>
5088 * reflection.c (mono_image_get_inflated_method_token): Encode
5089 correct klass; fixes #75260.
5091 2005-06-13 Michal Moskal <malekith@nemerle.org>
5093 * icall.c: Make GetCorrespondingMethod/Constructor take
5094 MonoReflectionMethod method not MonoMethod. Removed
5095 MonoType.GetCorrespondingField, and make
5096 MonoGenericType.GetCorrespondingField take name not
5099 2005-06-13 Michal Moskal <malekith@nemerle.org>
5101 * reflection.c (field_encode_signature, encode_locals):
5102 Make sizes of buffers for types larger (for big generic types).
5103 (create_generic_typespec,
5104 mono_reflection_sighelper_get_signature_local,
5105 mono_reflection_sighelper_get_signature_field):
5106 Add asserts for too small buffers.
5108 2005-06-15 Martin Baulig <martin@ximian.com>
5110 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
5111 if our parent is not a dynamic type.
5113 2005-06-15 Martin Baulig <martin@ximian.com>
5115 * class-internals.h (MonoTypeNameFormat): New enum.
5118 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
5119 (mono_type_get_full_name): Removed.
5120 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
5121 argument instead of the boolean's.
5123 * icall.c (ves_icall_System_MonoType_getFullName):
5124 Added `gboolean assembly_qualified'.
5127 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
5129 * reflection.c (mono_reflection_parse_type): Parse the new type
5132 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5134 * icall.c: no need to convert from utf16 to utf8 and then back again
5135 after the call to GetLogicalDrives.
5137 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5139 * icall.c: frombase64. Fix problems exposed by new tests.
5141 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5143 * icall.c: added internal calls for converting char [] and strings in
5144 base64 into byte [].
5146 2005-06-10 Martin Baulig <martin@ximian.com>
5148 * class.c (mono_class_create_generic_2): Read the nested classes
5149 from the metadata rather than from `gklass->nested_classes' since
5150 `gklass' might not be initialized yet.
5152 2005-06-09 Duncan Mak <duncan@novell.com>
5154 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
5155 all public headers. Fixes #74919.
5157 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
5159 * domain.c: The key for proxy_vtable_hash is now a pointer
5160 array. Added new GHashFunc and GCompareFunc functions for this.
5162 * class.h: The list of interfaces in MonoRemoteClass is known in
5163 advance and can't grow (we create a new MonoRemoteClass if needed),
5164 so now the interface array can be allocated together with
5167 * object.c: Added a new method create_remote_class_key.
5168 Fixed mono_remote_class so it does not depend on
5169 mono_upgrade_remote_class.
5170 Removed extend_interface_array.
5171 Added new method clone_remote_class(), which makes a copy of a remote
5172 class and adds a new interface or class to it.
5173 mono_upgrade_remote_class() now creates a new remote class (or gets
5174 it from the cache) if an vtable upgrade is needed. In this way
5175 we make sure that other objects sharing the same remote class
5176 don't get the new vtable with unwanted interfaces.
5178 * object-internals.h:
5179 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
5181 * marshal.c: Track changes in mono_upgrade_remote_class().
5183 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
5184 * icall.c: Add runtime methods for obtaining members of inflated
5185 class, which were created from supplied non-inflated members. It
5186 is used in internal Get{Method,Constructor,Field} methods in
5189 2005-06-09 Martin Baulig <martin@ximian.com>
5192 (mono_reflection_bind_generic_method_parameters): Fix #75169.
5194 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5195 * reflection.c (mono_image_basic_init): Define
5196 Version in MonoDynamicAssembly.
5198 2005-06-08 Martin Baulig <martin@ximian.com>
5203 (mono_method_signature_full): New public method; takes a
5204 `MonoGenericContext *'.
5205 (find_method): Use mono_method_signature_full() and pass the
5206 klass'es context to it.
5208 * class.c (mono_class_is_inflated_method): Use
5209 mono_method_signature_full() and pass the context to it.
5211 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
5213 * object.c: add proper locking in mono_remote_class_vtable(),
5214 fixes possible memory corruption.
5216 2005-06-08 Michael Meeks <michael.meeks@novell.com>
5218 * marshal.c (mono_remoting_marshal_init): set
5219 initialized after initialization.
5221 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
5225 2005-06-06 Michael Meeks <michael.meeks@novell.com>
5227 * object.c (extend_interface_array): fix really silly
5228 memory corrupting / comparison bug.
5230 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5232 * reflection.c: Functions added to support the creation
5233 of CustomAttributeData, which includes Attribute data
5234 used by ReflectionOnly methods.
5236 * reflection.h: mono_reflection_get_custom_attrs_data and
5237 mono_custom_attrs_data_construct added (functions exposed).
5239 * icall.c: Added mono_reflection_get_custom_attrs_data
5242 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
5244 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
5247 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
5249 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
5251 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
5252 dynamic DllImportAttribute.
5254 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
5255 dynamic DllImportAttribute.
5257 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
5260 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5262 * threads.c: avoid segfault when an unstarted thread is aborted.
5264 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
5266 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
5267 Returns the name and version of the runtime for reporting.
5269 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5271 * appdomain.c: bump corlib version.
5272 * object-internals.h: new field in MonoReflectionAssembly.
5274 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5276 * object-internals.h: Carlos forgot to add this field.
5278 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5280 * icall.c: Added create_version to create instances
5281 of Version of MonoReflectionAssemblyName. This change helps
5282 the AssemblyName tests to keep running fine.
5284 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
5286 * object.c (mono_method_return_message_restore): A somehow less
5287 intrusive fix for #75138.
5289 2005-06-03 Raja R Harinath <rharinath@novell.com>
5291 * object.c (mono_method_return_message_restore): Fix computation
5292 of expected number of out args.
5294 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
5296 * reflection.c (mono_image_get_method_info): Fix the case when the
5299 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
5301 * object.c: Added missing null check in
5302 mono_method_return_message_restore.
5304 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
5306 * reflection.c (mono_image_get_method_info): Handle the case when
5309 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
5311 * object.c: When creating the vtable for a proxy, take into account
5312 all inherited interfaces, not only the ones registered in
5313 iclass->interfaces. This fixs bug #74996.
5314 Also, in mono_method_return_message_restore, verify that the array
5315 of out args has the expected lengh.
5317 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5319 * socket-io.c: update the timeout in Poll when the call is interrupte.
5321 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5323 * socket-io.c: support abort/suspend in Select_internal after last
5326 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5328 * threadpool.c: remove warning.
5330 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5333 * socket-io.[ch]: Select_internal uses poll() now when available, thus
5334 removing the 1024 limit from select(). Runtime part of the fix for
5337 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5339 * socket-io.c: when resolving the addresses for the same
5340 host returned by gethostname(), get the local IPs from the interface
5341 list. Loopback addresses are discarded if the are interfaces up with
5342 non-loopback ones. Fixes bug #63265.
5344 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
5346 * appdomain.c, verify.c, object-internals.h, reflection.c:
5347 bumped corlib number to 36, and added new extra_flags field
5348 to ReflectionMethodBuilder and friends. Fixes #75060.
5350 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
5352 * gc.c: register a new weak link only if the object is non-null
5355 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
5357 * culture-info.h : short time pattern too.
5359 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
5361 * culture-info.h : expand long time pattern string length.
5363 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
5365 * culture-info-table.h : update (more French date format; #72788).
5367 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
5369 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
5370 the method is static. Fixes #75029.
5372 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
5374 * reflection.c: Update the table_idx field of method builders after
5375 saving the module, since it can change. This is a workaround for
5378 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
5380 * culture-info-table.h : update (additional French date format).
5382 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
5384 * icall.c (ves_icall_type_Equals): Revert last change.
5386 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
5388 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
5390 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
5392 * class-internals.h: Added executioncontext_class field to
5393 MonoDefaults structure.
5394 * domain.c: Cache System.Threading.ExecutionContext class in
5396 * object.c: Capture the ExecutionContext for asynchroneous calls in
5397 mono_async_result_new.
5398 * object-internals.h: Added execution_context and original_context
5399 fields to MonoAsyncResult. Added execution_context to MonoThread.
5400 * security-manager.c|.h: Added mono_get_context_capture_method to
5401 return the capture method (if required by the security manager or by
5402 the framework version used).
5403 * threadpool.c: Apply capture (if present) ExecutionContext in
5404 mono_async_invoke and revert to original context after it completes.
5406 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
5408 * culture-info-table.h : updated (real hacky solution for zh-CHT).
5410 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
5412 * culture-info-table.h : zh-CHT related workaround.
5414 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
5416 * marshal.c (emit_marshal_custom): Add some error checking and call the
5417 methods in the ICustomMarshaler interface. Fixes #74875.
5419 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
5420 native->managed wrappers.
5422 2005-05-12 Martin Baulig <martin@ximian.com>
5424 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
5425 here and use the loader lock.
5427 * mono-debug.c: Properly lock when the debugger is not attached.
5428 (mono_debug_init): Release the initial lock if we're not running
5431 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
5433 * marshal.c (emit_marshal_custom): Pass through NULL values without
5434 calling the custom marshalling routines.
5436 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
5437 conversion in structures. Fixes #74882.
5439 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
5441 * culture-info-table.h : zh-* cultures were missing.
5443 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
5445 * threads.c: Added a new event background_change_event which is signaled
5446 when a thread changes its background mode.
5447 Moved here several checks previously done in managed code. The checks
5448 require the thread lock, and using the thread lock in managed code
5449 can result in deadlocks.
5450 Merged Start_internal and Thread_internal into a single method. Now
5451 Thread_internal does all work of creating and starting a thread.
5452 Added icalls for setting and getting the state of the object. Moved from
5453 managed code to avoid locking there.
5454 Added wait_for_tids_or_state_change() which is called instad of
5455 wait_for_tids when waiting for non-backround threads to end. This method
5456 will return if one of the threads ends or the background_change_event
5458 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
5459 the background mode. This method signals the background_change_event
5462 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
5463 removed Start_internal.
5465 2005-05-11 Martin Baulig <martin@ximian.com>
5467 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
5468 to order of some fields to get proper alignment on 64-bit machines.
5470 2005-05-11 Martin Baulig <martin@ximian.com>
5472 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
5473 changes as they're broken and completely fuck up the debugger.
5475 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
5477 2005-05-10 Martin Baulig <martin@ximian.com>
5479 * reflection.c (mono_reflection_generic_class_initialize): Don't
5480 call mono_class_setup_parent() here.
5482 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5484 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
5485 send/receive timeout use an integer in milliseconds. We were using a
5488 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5491 (internal_get_cultures): reserve the first slot of the array for the
5492 InvariantCulture, which will be filled in managed code.
5494 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
5496 * reflection.c (mono_image_fill_module_table): Initialize the
5497 GENERATION field as well.
5499 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5501 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
5502 Monitor.Enter on the object.
5504 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
5506 * threads.c: Enable the wait for running threads when exiting.
5507 * icall.c: Suspend all threads before exiting.
5509 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
5511 * assembly.c (mono_assembly_load_reference): Fix warning.
5513 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5515 * threadpool.c: changed the default number of threads per cpu. From now
5516 on, the default will be 20 + (5 * number of cpus) instead of 50.
5518 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
5520 * loader.c (mono_method_get_signature_full): Add locking here.
5522 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
5524 * appdomain.c: Moved methods for parsing and freeing assembly
5525 names to assembly.c.
5526 * assembly.c, domain-internals.h: Created public methods for parsing
5527 assembly names. Fixed mono_assembly_load_with_partial_name:
5528 it now finds the best match, taking into account the version,
5529 token and culture specified in the partial name. Also return
5530 the latest version if no version information is specified.
5532 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
5534 * threadpool.c: replace check for SocketAsyncCall class.
5536 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5538 * threadpool-internals.h:
5539 * Makefile.am: added threadpool-internals.h
5541 * threadpool.c: call mono_unhandled_exception on exceptions not handled
5542 that happen in threadpool threads (tested on MS).
5543 (mono_thread_pool_remove_socket): new function that dispatch any pending
5544 AIO call on a socket that is closing. By now only epoll really needs it,
5545 as select/poll wake up when the socket closes.
5548 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
5550 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
5552 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
5554 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
5556 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
5558 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
5560 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
5561 has an abort request, convert it into a suspend request.
5563 2005-04-30 Ben Maurer <bmaurer@ximian.com>
5565 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
5566 warning for the usage of `UnmanagedFunctionPointerAttribute' which
5567 is not supported yet.
5569 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5571 * image.c: register assemblies loaded from data (bundles) in the loaded
5572 assemblies hash. Fixes bug #74772.
5574 2005-04-29 Martin Baulig <martin@ximian.com>
5576 * class.c (mono_type_get_name_recurse): Update to the new naming
5577 schema from the latest .NET 2.x beta2.
5578 (mono_class_setup_vtable_general): If we're a generic instance,
5579 copy the vtable from our generic type definition and inflate all
5582 * loader.c (find_method): Update to the new naming schema from the
5583 latest .NET 2.x beta2.
5585 2005-04-29 Raja R Harinath <harinath@gmail.com>
5587 * class.c (mono_class_init): Add a mono_loader_unlock to the
5590 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
5592 * icall.c (ves_icall_System_Environment_Exit): Remove the
5593 suspend_all_other_threads () call for the time being, since it can hang.
5595 * threads.c (mono_thread_manage): Similarly, disable the waiting for
5596 the background threads to exit, since it can also hang.
5598 * class.c (mono_class_init): Applied patch from Ankit Jain
5599 (radical@gmail.com). Avoid pending init errors when a field refers
5600 to a nested class using a typeref. Fixes #74734.
5602 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
5603 this for dynamic modules.
5605 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5607 * threads.c: don't wait for threads that are in the process of aborting
5608 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
5609 and waiting for background threads to finish. This makes xsp and
5610 mod-mono-server exit without random length delays and/or hangs.
5612 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5614 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
5616 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
5618 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
5619 dynamic types to prevent infinite loops. Fixes #74727.
5621 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
5622 ..._is_assignable_to.
5624 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
5626 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
5628 2005-04-25 Martin Baulig <martin@ximian.com>
5630 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
5633 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
5635 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
5637 * reflection.c (build_compressed_metadata): Set metadata header
5640 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
5642 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
5643 number into an integral and a decimal part. Fixes #70473.
5645 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
5647 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
5649 * culture-info-table.h : reflected the latest locale-builder output.
5651 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5653 * threadpool.c: check for SuspendRequested too when deciding if
5654 mono_thread_interruption_checkpoint should be called.
5656 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5658 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
5659 * threads.c: remove interruption_mutex and use Interlocked instead. When
5660 suspending all the threads, wait for all the suspended events at once.
5661 If we're shutting down and get an APC that is going to be queued,
5662 call mono_thread_execute_interruption immediately, as the thread might
5663 be sleeping on a pthread condition or mutex.
5665 * icall.c: call mono_runtime_set_shutting_down before suspending the
5668 Fixes bug #74693. And now xsp is happier when exiting.
5670 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
5672 * loader.c (mono_stack_walk): Fix #74690.
5674 2005-04-22 Martin Baulig <martin@ximian.com>
5676 * mono-debug.h (MonoDebugMethodJitInfo): Added
5677 `MonoDebugMethodJitInfo *jit'.
5679 * mono-debug.c (mono_debug_read_method): Cache the
5680 MonoDebugMethodJitInfo in `address->jit'.
5681 (mono_debug_free_method_jit_info): New public method.
5683 2005-04-22 Martin Baulig <martin@ximian.com>
5685 * class.c (mono_class_is_assignable_from): Disallow
5686 type parameter -> interface.
5688 2005-04-21 Dick Porter <dick@ximian.com>
5690 * threads.c (mono_thread_create): Turn an assertion into an error.
5692 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
5694 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
5696 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
5697 Fix some gcc 4.0 warnings.
5699 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
5701 * file-io.c: fix alt dir separator char on unix systems
5702 and cleanup (fixes bug #71214).
5704 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
5706 * marshal.c: Use CALLVIRT instead of CALL when dispatching
5707 a call to a remote domain, since the method may be an
5708 interface method in the client domain. This fixes bug #74192.
5710 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5712 * threadpool.c: recv/send are now performed before going back to managed
5713 code to save one transition.
5715 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5717 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
5719 * metadata/threadpool.c: removed hack to workaround the bug above.
5723 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
5725 * reflection.c reflection.h: Fix handling of parameter defaults in
5726 dynamic methods. Also fixes handling of parameter attributes.
5729 * mono-debug.c (mono_debug_close_image): Fix warning.
5731 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5733 * socket-io.h: replaced old unused field with new 'blocking'.
5734 * threadpool.c: restore socket blocking state on windows(tm).
5736 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
5738 * icall.c: don't return the codebase in the AssemblyName[] returned by
5739 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
5740 * object-internals.h: Removed FIXME (fields were presents) and fixed
5741 versioncompat declaration.
5743 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5745 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
5746 not closed, so don't cleanup when it happens.
5748 2005-04-13 Chris Toshok <toshok@ximian.com>
5750 * mono-debug-debugger.h: change prototype for
5751 mono_debugger_lookup_type.
5753 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
5754 this function, although it should probably be named
5755 mono_debugger_init_type.
5757 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5759 * threadpool.c: fix non-AIO case.
5761 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
5763 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
5764 the built-in profiler to measure just JIT compilation times.
5766 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5768 * threadpool.c: the epollfd might be closed by another thread at
5769 any time, so ignore EBADF at treat it as a "we're closing" sign.
5771 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5773 * threadpool.c: release the semaphores with a count equals to the number
5774 of working threads in both IO and regular pools. Fixed typo that messed
5775 up the count of IO pool threads. Don't initialize the pipe handles if
5778 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5780 * threadpool.c: some systems don't like a NULL when deleting the socket
5783 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5785 * threadpool.c: fix semaphore allocation.
5787 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5789 * threadpool.c: added epoll() based implementation for asynchronous IO
5790 that is used instead of the default poll() when available.
5791 It can be disabled by setting MONO_DISABLE_AIO.
5793 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5795 * threadpool.c: windows needs 'closesocket' and instead of returning
5796 0 when the stream is closed while in select, it returns -1. Fixes bug
5799 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
5801 * class.c (class_compute_field_layout): Fix the regression caused by
5804 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5806 * threadpool.c: separate pool for socket async. IO.
5807 * threadpool.h: mono_max_worker_threads is not a global any more.
5809 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
5811 * class.c (class_compute_field_layout): Fix #74549.
5813 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5815 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
5816 use 2 connected sockets instead.
5818 2005-04-08 Miguel de Icaza <miguel@novell.com>
5820 * mono-config.c: Add new entry point for mkbundle
5821 mono_config_parse_memory.
5823 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5825 * threadpool.c: removed another unused function.
5827 2005-04-08 Ankit Jain <radical@corewars.org>
5829 * reflection.c (get_default_param_value_blobs): Add 'types'
5830 parameter to get the types encoded in the constant table.
5831 (mono_param_get_objects): Use the type from the constant table,
5832 not the type of the parameter, when creating default values.
5833 Handle null default values correctly.
5835 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5842 * socket-io.c: removed dead code for async IO.
5844 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5846 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
5848 * threadpool.c: intercept socket async. calls and pass them to a thread
5849 that is polling and dispatching the job items to the threadpool as
5850 socket become ready. Fixes bugs #71217, #71933.
5852 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
5853 between char and short/ushort arrays.
5855 * socket-io.c: remove dead code.
5857 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
5860 icall.c : removed InternalToUpper_Comp() and
5861 InternalToLower_Comp().
5863 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
5865 * char-conversions.h : The tables were incorrectly generated. Should
5866 be generated against invariant culture.
5868 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
5870 * object.c (mono_runtime_invoke_array): Fix return value when
5871 passing pre-created valuetype objects to ctors.
5873 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
5874 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
5877 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
5879 * domain.c: removed g_assert for runtimesecurityframe_class. This is
5880 only used with --security and hides the wrong corlib version error.
5882 2005-03-30 Joshua Tauberer <tauberer@for.net>
5884 * class.c: Changed mono_class_name_from_token so that types
5885 outside of a namespace don't have an initial period. Improved
5886 the g_warning message used in _mono_class_get when loading
5888 * assembly.c: In mono_assembly_load_reference, when an assembly
5889 can't be found, "No such file or directory" is misleading and
5890 unhelpful because a few paths were checked for the presence of
5891 the assembly. When that happens (ENOENT), display a nicer
5892 message indicating the directories that were searched. In all
5893 cases, the warning is made easier to read for non-hackers.
5895 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
5897 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
5899 * appdomain.h|domain.c: Removed inline from functions.
5900 * appdomain.c: Reduced warnings when compiling on windows.
5901 * icall.c: Fixed output_debug declaration to gunichar2*.
5902 * mono-config.c: Reduced warnings when compiling on windows.
5903 * rand.c: Added missing "windows.h". Added missing return value.
5904 * rawbuffer.c: Added missing winsock2.h for windows.
5905 * sysmath.h: Added mono-compiler.h header to allow/ease
5906 compilation with non-GCC compilers.
5907 * threads.c: Fixed declarations to compile with VS.NET C compiler.
5908 Removed cast warnings.
5910 Adapted from the work of J Lothian (for VC6).
5912 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
5914 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
5917 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
5919 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
5922 2005-03-27 Raja R Harinath <harinath@gmail.com>
5924 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
5925 has to be in $(exec_prefix). $(prefix) is for arch-independent
5926 stuff, and it would probably use $(prefix)/share rather than
5929 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5931 * console-io.c: added 2 includes that might be missing.
5933 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
5935 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
5938 * reflection.c (create_custom_attr): Allocate the params array using
5939 alloca so it gets GC tracking.
5941 2005-03-23 Chris Toshok <toshok@ximian.com>
5943 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5946 2005-03-24 Raja R Harinath <rharinath@novell.com>
5948 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5949 changes to pick up any changes in prefix, etc.
5951 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5953 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5955 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5956 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5958 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
5960 * class-internals.h object-internals.h class.c reflection.c: Extend the
5961 mono_lookup_dynamic_token () function to return the class of the
5964 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5967 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
5969 * security-manager.c: Skip inheritance checks for intra-corlib
5970 class inheritance and method overrides. This skips a lot of checks
5971 and (anyway) permissions cannot work until corlib is loaded.
5973 2005-03-23 Martin Baulig <martin@ximian.com>
5975 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5976 MONO_TYPE_GENERICINST.
5978 2005-03-23 Martin Baulig <martin@ximian.com>
5980 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5982 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5984 * class.c: added locking comments to some functions.
5985 Cache the interface offsets arrays (saves about 20 KB
5986 of runtime memory in a typical app).
5987 Reduce the time overhead in mono_class_setup_supertypes ().
5989 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5991 * icall.c: speedup and fix leaks in GetMethodsByName and
5992 GetPropertiesByName.
5994 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5996 * reflection.c: some locking fixes.
5998 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6000 * metadata.c: added missing break in case statement.
6002 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
6004 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
6005 typedbyref return values. Fixes #73941.
6007 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
6009 * security-manager.c|h: Added demandunmanaged method and
6010 suppressunmanagedcodesecurity class to MonoSecurityManager.
6011 Renamed aptc class to allowpartiallytrustedcallers.
6013 2005-03-17 Martin Baulig <martin@ximian.com>
6015 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
6017 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6019 * file-io.c: disabled file async. IO using aio_*. It uses the
6020 threadpool now. Workaround for bug #73718.
6022 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6024 * assembly.h, mono-config.c: added code to deal with bundled configs
6025 for bundled assemblies.
6027 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
6029 * *.c, private.h: cleanup, removing old private.h header file.
6031 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
6033 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
6034 and throw_on_unmappable_char attributes.
6036 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
6038 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
6039 _ProcessName_internal.
6041 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
6043 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
6046 * icall.c threads.c threads-types.h: Remove slothash icalls as they
6049 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
6051 * object.c (compute_class_bitmap): Add support for generics. Fixes
6054 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
6056 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
6058 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6060 * filewatcher.c: commented out the code for windows watcher, as we don't
6061 use it (we use the managed implementation instead).
6063 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
6065 * object-internals.h (MonoThread): Remove 'unused1' field.
6067 * appdomain.c: Bump corlib version.
6069 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
6071 * reflection.c (mono_reflection_create_runtime_class): Remove the
6072 AssemblyBuilder.Save optimization since it causes too many problems.
6074 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
6076 * exception.c|h: Added mono_get_exception_reflection_type_load to
6077 create a ReflectionTypeLoadException object.
6078 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
6079 to return NULL is a InheritanceDemand fails during reflection. Updated
6080 ves_icall_System_Reflection_Assembly_GetTypes to throw a
6081 ReflectionTypeLoadException if an InheritanceDemand fails during
6082 reflection. Added icall mapping for GetLinkDemandSecurity.
6083 * security-manager.c|h: Added ves_icall_System_Security_
6084 SecurityManager_GetLinkDemandSecurity internal call to return the
6085 class and methods permissions set for a LinkDemand. Removed unused
6086 fields in MonoSecurityManager.
6088 2005-03-10 Martin Baulig <martin@ximian.com>
6090 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
6091 it's a generic instance.
6093 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
6095 * reflection.c (mono_get_object_from_blob): Applied patch from
6096 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
6098 * class.c (mono_class_is_assignable_from): Another try at fixing
6099 #73469 without breaking anything.
6101 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
6103 * class.c: (mono_class_is_assignable_from): Revert the last changes
6104 since they don't work with generics.
6106 * class.c (mono_class_is_assignable_from): Fix build bustage.
6108 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
6109 the managed IsAssignableFrom method. Fixes #73469.
6111 * reflection.c (mono_reflection_call_is_assignable_from): New helper
6114 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
6116 * object.c (mono_load_remote_field_new): Fix returning uninitialized
6117 memory when the remoting callback does not sets the out arguments.
6120 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
6123 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
6125 * object-internals.h (MonoStackFrame): Sync with managed object layout.
6127 * appdomain.c: Bump corlib version.
6129 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
6131 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
6134 * threads.c (mono_thread_attach): Detect threads which are not started
6135 by the GC pthread wrappers.
6137 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
6139 * icall.c: Added new icall for RNG.
6140 * rand.c|h: Added new icall to open the RNG. This allows to share a
6141 single handle on Linux to access /dev/urandom and fix #73183.
6143 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
6145 * object.c: setting the new vtable in a transparent proxy object must
6146 not change the GC descriptor.
6148 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6150 * object.c: fixed compilation without GCJ support.
6151 * reflection.c: for runtime-created types ensure klass->has_references
6152 is correct (bug #73215).
6154 2005-03-02 Martin Baulig <martin@ximian.com>
6156 * class.c (mono_class_is_assignable_from): Make this work if
6157 `oklass' is a generic instance; fixes #72831.
6159 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
6161 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
6164 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
6166 * marshal.c: Reorganize native->managed marshalling code to also use
6167 the emit_marshal_... functions.
6169 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
6171 * object.c: typed allocs have issues with bitmap sizes > 30,
6172 so check for max_set >= 30.
6174 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
6176 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
6177 managed code. Fixes #73012.
6179 * metadata.h (MonoMarshalSpec): Add elem_mult field.
6181 * metadata.c reflection.c: Load/Emit elem_mult as well.
6183 * metadata.h (MonoMarshalSpec): Add comment.
6185 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
6187 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
6188 num_elem to -1 if not given.
6190 * object-internals.h (MonoReflectionMarshal): Add has_size field.
6192 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
6195 2005-03-01 Marek Safar <marek.safar@seznam.cz>
6197 * null-gc.c (mono_gc_free_fixed): Was not compilable.
6199 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
6201 * reflection.c (encode_marshal_blob): Encode param_num field as well.
6203 * object-internals.h (MonoReflectionMarshal): Add param_num field.
6205 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
6207 * object.c: generalized the reference bitmap creation
6208 and added hooks for the new GC.
6209 * class-internals.c: removed the gc_bitmap field from MonoClass.
6211 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6213 * domain.c: help the compiler to produce better code
6214 in mono_jit_info_table_find ().
6216 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
6218 * object.c: make all allocations look typed.
6220 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6222 * socket-io.c: load Mono.Posix if it's not loaded already
6225 2005-02-24 Martin Baulig <martin@ximian.com>
6227 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
6228 * reflection.c (dup_type): Likewise.
6230 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
6232 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
6233 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
6235 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6237 * domain.c, threads.c, object-internals.h: make the critical thread
6238 local vars use the fast access mode (even when we're compiled in
6239 a lib). Provide accessors to be used by the jit during codegen.
6241 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6243 * appdomain.c: Changed hook functios behavior to include
6244 support for the reflection only assemblies. Some icalls were changed
6245 to support the mentioned assemblies too. Signatures of static methods
6246 try_assembly_resolve and real_load now have an additional parameter:
6249 * assembly.c: General changes to mono_assembly_ methods to support
6250 reflection only api. Functions mono_assembly_open, mono_assembly_load,
6251 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
6252 suffix, to support an additional gbool parameter to specify whether
6253 the assembli is reflection only or not. Created some new hook functions
6254 to add support for reflection only assemblies. Signatures of static
6255 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
6256 have now an additional parameter: refonly.
6258 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
6259 indicating whether the assembly is reflection only or not.
6261 * exception.c: Add mono_get_exception_invalid_operation.
6263 * icall.c: Throw an InvalidOperationException when trying to invoke
6264 a property/method/event, or trying to set/get the value of a field.
6265 Also add an icall to retrieve the ref_only flag to the
6266 MonoReflectionAssembly.
6268 2005-02-23 Chris Toshok <toshok@ximian.com>
6270 Part of fix for #72827.
6271 * mono-debug.c (mono_debug_add_method): add lexical block data to
6272 the info we write. Kind of a hack at the moment - we copy the
6273 lexical block info from the MonoDebugMethodInfo to the
6274 MonoDebugMethodJitInfo here, before writing it.
6275 (mono_debug_read_method): read the lexical block info.
6277 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
6279 * debug-mono-symfile.h: add lexical block support.
6281 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
6284 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
6286 * loader.c (mono_lookup_pinvoke_call): Fix warning.
6288 * object.c (mono_runtime_free_method): Call mono_free_method () and
6289 put the TODOs there.
6291 * loader.c (mono_free_method): Free up most memory allocated for
6294 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6296 * reflection.c: properly flag a Type argument to a
6297 named custom attr value (bug #72248).
6299 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6301 * reflection.c: reduce code duplication in named custom
6304 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
6306 * reflection.c: properly encode custom attrs of type object
6309 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
6311 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
6313 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
6315 * socket-io.c: load System.dll if it's not loaded already
6316 (bug #72850 and #70477).
6318 2005-02-21 Martin Baulig <martin@ximian.com>
6320 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
6323 2005-02-21 Martin Baulig <martin@ximian.com>
6325 * reflection.c (mono_image_build_metadata): We also need to
6326 "fixup" the MethodImpl table after we computed the final method
6327 indices. Call fixup_methodimpl() to do that.
6328 (fixup_methodimpl): New private method.
6330 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
6332 * assembly.c: special case mscorlib.dll (bug#72536),
6333 patch from Carlos Alberto Cortez.
6335 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
6337 * threads-types.h threads.c: Fix build bustage.
6339 * threads.c: Use a union for long<->double conversions.
6341 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
6342 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
6344 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
6345 containing the checkpoint call with NOT_TAKEN.
6347 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
6348 checkpoint before pushing the arguments, so they won't have to be
6351 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6353 * domain.c, assembly.c, domain-internals.h: make some data
6354 const and relocation-free.
6356 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
6358 * object.c, appdomain.c, class-internals.h: introduce the
6359 MonoClassRuntimeInfo structure to hold the info needed to
6360 use a class at runtime. Made mono_class_vtable() lock-free
6361 for all the appdomains.
6363 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
6365 * metadata-internals.h, image.c: introduce a per-image mempool to
6366 be used for memory that has the same lifetime as the image.
6368 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
6370 * domain.c: In mono_init_internal(), instead of selecting the first
6371 runtime version supported by an executable, get a list of all
6372 supported versions and select the one for which an mscorlib exists
6373 (since even if the runtime supports a given version, it doesn't mean
6374 that the framework for that version is installed).
6375 Modified get_runtimes_from_exe to support this behavior.
6376 In supported_runtimes, added information about additional system
6379 * assembly.c: Added support for more than one system assembly version
6380 per runtime version. Updated the assembly list.
6381 In mono_assembly_remap_version, removed the initial version check,
6382 since we don't know to which version we need to compare until we
6383 get the version set on which the assembly is based.
6384 Moved the code for loading corlib into the new method
6385 mono_assembly_load_corlib(), so it can be used by the initialization
6388 * domain-internals.h: Updated data structures and added declaration
6389 for mono_assembly_load_corlib.
6391 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
6393 * reflection.c (resolve_object): Fix the creation of the signature in
6394 the SignatureHelper case.
6396 * assembly.c (mono_assembly_remap_version): Fix binary search.
6398 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
6400 * class.c: Added inheritance check when a method is overloaded (from a
6401 virtual method or when implementing an interface) and when a class is
6402 inherited. Added functions to set a failure for a class and to
6403 retreive the exception from a failure.
6404 * class-internals.h: Added fields to MonoClass to keep the exception
6405 information status for inheritance (or other exceptions) to be thrown
6406 later (i.e. not at load time).
6407 * object.c: Throw the inheritance SecurityException when a type is to
6408 be created with either class or method inheritance violations.
6409 * reflection.c|h: Fix when getting declsec from a class. Removed
6410 unrequired code for class. Improved sanity in parameter naming.
6411 * security-manager.c|h: Added functions to check for class and method
6414 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
6416 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
6417 and has_finalize in dynamic types as well.
6419 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
6421 * culture-info-table.h : fixed currency format for en-GB (and so on).
6423 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
6425 * gc.c: ensure the GC handles never have 0 as a value.
6427 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
6429 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
6430 a pointer to a struct to unmanaged code. Fixes #72625.
6432 2005-02-16 Martin Baulig <martin@ximian.com>
6434 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
6436 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
6438 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
6440 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
6442 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
6444 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
6445 UnmanagedFunctionPointerAttribute, use it for determining calling convention
6448 * reflection.c (mono_custom_attrs_get_attr): New helper function.
6450 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
6452 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
6454 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
6455 changes to make the current context a field in MonoThread.
6457 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
6459 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
6462 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
6463 extracted from mono_marshal_get_native_wrapper.
6465 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
6466 to create wrappers around native functions.
6468 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
6469 delegates for arbitrary function pointers. Fixes #71472.
6471 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6473 * threads.c: cleaned up the code a little.
6475 2005-02-15 Martin Baulig <martin@ximian.com>
6477 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
6480 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
6481 allocate larger chunks if needed.
6483 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
6485 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
6488 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
6490 * domain.c: keep the domains in an array and ensure the domain ids
6491 are kept small, so they can be used as indexes to domain-specific data
6492 with a small memory overhead.
6494 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
6496 * icall.c: Handle byref types in Type icalls. Fixes #72544.
6498 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
6500 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
6502 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
6504 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
6506 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
6509 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
6511 2005-02-12 Ben Maurer <bmaurer@ximian.com>
6513 * domain-internals.h: add the hashtable here.
6515 * class-internals.h: Remove `info' from MonoMethod
6517 * domain.c: Add a new hashtable, jit_trampoline_hash
6519 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6521 * object.c: don't set the value of static fields
6524 2005-02-11 Martin Baulig <martin@ximian.com>
6526 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
6527 (mono_debug_add_method): Silently ignore the method if it's too big.
6528 (mono_debug_add_type): Likewise.
6530 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
6532 * threads.c, appdomain.c: remove #ifdefs from the code.
6534 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
6536 * metadata-internals.h: Added flags to MonoAssembly to cache the most
6537 common security informations. This allows us to stay in unmanaged code
6538 when doing LinkDemand and it's special cases (except for the first
6539 time for initialization). The flags a very much used with --security.
6540 * reflection.c|h: Added code to get declarative security attributes
6541 for LinkDemand and InheritanceDemand. This required to refactor the
6542 existing code for Demand.
6543 * security-manager.c|h: Added new method fields for the special cases
6546 2005-02-10 Martin Baulig <martin@ximian.com>
6548 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
6549 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
6551 2005-02-10 Martin Baulig <martin@ximian.com>
6553 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
6554 debugging code; this is almost a complete rewrite.
6556 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
6558 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6560 * domain.c, object.h: expose mono_string_equal () and
6561 mono_string_hash ().
6562 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
6563 it's implemented in managed code.
6565 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6567 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
6568 lo leak objects between appdomains.
6570 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6572 * assembly.c: old compilers compilation fix from
6573 robertj@gmx.net (Robert Jordan).
6575 2005-02-09 Ben Maurer <bmaurer@ximian.com>
6577 * class-internals.h: Little reminder for the future.
6579 * debug-helpers.c: Fix up wrapper_type_names
6581 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6583 * image.c, metadata-internals.h: when loading an image from a file,
6584 mmap all of it and use the same codepaths as when using a
6585 in-memory image: the code is simpler and we use less memory
6586 (both writable and readonly).
6588 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6590 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
6591 API to alloc runtime data structures that need to be tracked by the
6592 GC and contain pointers.
6593 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
6594 make the code more readable and eventually use a different GC.
6596 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
6598 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
6601 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
6603 * object.c: In release_type_locks(), don't release the cctor lock
6604 if it has already been released. This fixes a crash in the
6607 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6609 * gc.c, marshal.c, icall.c: register a delegate for finalization
6610 only when the native function pointer has been allocated for it.
6612 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6614 * object.c: cleaned up some code, allocate objects that are
6615 pointer free with the atomic malloc variant. Allocate memory
6616 for static data from the mempool if it's pointer-free.
6617 Allocate the bounds array at the end of the array data, when needed.
6618 * object-internals.h, object.h: move a private function in a private
6620 * class.c: handle missing case in tracking references in fields.
6622 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6624 * class.c, class-internals.h: keep track if a type has
6625 reference fields in either the instance or static fields.
6627 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
6629 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
6630 and renamed to MonoRuntimeInfo. Added fields to store the expected
6631 framework assembly version. Changed mono_get_framework_version and
6632 mono_get_runtime_version for a single mono_get_runtime_info method.
6634 * assembly.c: Added method to remap system assembly versions to the
6635 current executing runtime version. Removed old mapping code.
6636 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
6638 * icall.c, reflection.c: Track api changes.
6640 2005-02-06 Miguel de Icaza <miguel@novell.com>
6642 * loader.c (method_from_memberref): Improve error reporting,
6643 produce the class name instead of the typeref/typedef index.
6645 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
6647 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
6649 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
6651 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
6652 stdcall and charset name mangling. Reorganize the code and add
6655 2005-02-05 Ben Maurer <bmaurer@ximian.com>
6657 * monodiet.c: More iters!
6659 * marshal.c: Iter usage.
6661 * icall.c: Iter usage.
6663 * object.c: Use iters.
6665 * debug-helpers.c: More iters
6667 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
6669 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
6672 2005-02-05 Ben Maurer <bmaurer@ximian.com>
6674 * mono-debug-debugger.c: use iters
6676 * class.c, class-internals.h: mono_class_setup_events is static
6679 * All callers: use iters
6681 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
6683 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
6684 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
6686 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
6688 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
6690 * marshal.h: Add prototypes for ldfld/stfld_remote.
6692 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
6693 this is called during startup.
6695 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
6697 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
6698 MonoThreadsSync struct private in monitor.c. Changed the way
6699 MonoThreadsSync is allocated so it's faster and there is no
6700 need to keep track of it with a finalizer and it uses less memory.
6701 This also finally allows us to allocate mono objects as ptrfree when
6702 there are no reference fields.
6704 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
6706 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
6707 disappearing link to the GC interface and use them to simplify
6710 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
6712 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
6713 stfld_remote which call mono_load/store_field_new. This allows methods
6714 calling ldfld/stfld wrappers to be AOTed.
6716 * console-io.c: Include sys/filio.h under solaris.
6718 * console-io.c: Include curses.h if needed correctly.
6720 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
6722 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
6723 method->klass as well.
6725 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
6727 * class.c (mono_class_init): Switch on lazy initialization of
6730 * class.c (mono_class_get_finalizer): Handle the case when the
6731 finalizer is inherited.
6733 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6735 * console-io.c: <curses.h> is needed by term.h on solaris.
6737 2005-02-03 Ben Maurer <bmaurer@ximian.com>
6739 * icall.c, class-internals.h, monodiet.c, class.c: Remove
6740 mono_class_setup_properties where possible. Remove this ftn from
6741 the header file, and make it static.
6743 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
6745 * loader.c: Add missing setup_... call.
6747 * class.c: Add missing setup_... calls.
6749 * class.c (mono_class_init): Switch on lazy initialization of
6752 * class.c (mono_class_init): Fix generics broken by the recent changes.
6754 * monodiet.c (handle_type): Add missing setup_... calls.
6756 * class.c: Back out garbage in previous patch.
6758 * class.c: Add missing setup_... calls.
6760 * class.c (mono_class_get_method_from_name_flags): Avoid calling
6761 mono_class_setup_methods () if possible.
6763 * class-internals.h (MonoClass): Add 'has_cctor' flag.
6765 * class-internals.h (MonoCachedClassInfo): New structure.
6767 * class.c: Initialize properties and events fields of MonoClass lazily.
6769 * class.c: Add infrastructure for lazily initializing the methods and
6770 vtable fields of MonoClass. Not yet used.
6772 * class.c (mono_class_get_finalizer): New helper function.
6774 * class.c: Add infrastructure for loading some class related data from
6777 * object.c: Add infrastructure for initializing the vtable from data
6780 * gc.c (run_finalize): Use mono_class_get_finalizer ().
6782 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
6783 appropriate initialization function before accessing parts of the
6784 MonoClass structure.
6786 * marshal.c: Fix warnings.
6788 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
6790 * mono-debug-debugger.c (get_exception_message): Use
6791 mono_class_get_method_from_name_flags ().
6793 2005-02-02 Ben Maurer <bmaurer@ximian.com>
6795 * reflection.c, appdomain.c: Replace a few manual searches that
6796 Zoltan missed. (Paolo approved this part of my initial patch).
6798 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
6800 * profiler.c: disable recording statistical events at report time.
6802 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6804 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
6805 to byteswap arrays of enum values, too (bug #72080).
6807 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
6809 * appdomain.c (set_domain_search_path): Allow this to be called if
6810 domain->setup is not yet set.
6812 * loader.c (mono_method_get_index): New helper function.
6814 * loader.c reflection.c: Use mono_method_get_index ().
6816 * class.c (mono_class_get_method_from_name_flags): New helper method.
6818 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
6821 * class.c (mono_class_get_cctor): New helper method.
6823 * string-icalls.c object.c class.c marshal.c reflection.c: Use
6824 mono_class_get_method () to look up methods.
6826 2005-02-01 Miguel de Icaza <miguel@novell.com>
6828 * console-io.c: Fix the build, this should work on Windows.
6830 2005-01-31 Ben Maurer <bmaurer@ximian.com>
6832 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
6833 be set to null to keep things valid
6835 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6837 * icall.c: added Console 2.0 icalls.
6838 * Makefile.am: added console-io.[ch]
6839 * console-io.[ch]: internal calls for Console 2.0 API.
6841 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6843 * class.c: make sure we consider all the interfaces
6844 when calculating max_interface_id (bug found by
6845 Jeroen Frijters running ikvm).
6847 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
6849 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
6850 valuetype fields to null.
6852 * object.c (set_value): Ditto. Fixes #71669.
6854 2005-01-31 Martin Baulig <martin@ximian.com>
6856 * metadata.c (mono_metadata_has_generic_params): New public
6857 function; checks whether something is a generic method.
6859 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6861 * appdomain.c: fix infinite recursion when adding assemblies.
6863 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
6865 * object.c: Fix small typo to return all items for Environment.
6868 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6870 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
6871 reflection.c: more domain and assembly-unload related fixes
6872 and memory leaks plugs.
6874 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
6876 * 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.
6878 2005-01-29 Ben Maurer <bmaurer@ximian.com>
6880 * loader.c (mono_method_signature): Make this method lazy
6881 (mono_get_method_from_token): Don't computate the signature here.
6883 Doing this saves quite a bit of memory. I got 90 kb on starting up
6884 monodoc. It should also save some disk reads on startup.
6886 * *: MonoMethod->signature might be NULL now. You *MUST* use
6887 mono_method_signature.
6889 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
6891 * object.c (mono_runtime_get_main_args): Return an array from the
6892 current domain here. Fixes #71938.
6894 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
6896 * monitor.c: formatting changes to comply with the
6897 mono coding style and remove #ifdefs from the code.
6899 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6901 * metadata.c, private.h: remove some unneeded data
6902 and use a more compact representation for table schemas.
6904 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
6906 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
6907 to get a better distribution in hash tables.
6908 * *.c: use mono_aligned_addr_hash() where appropriate.
6909 * assembly.c: make var static.
6911 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
6913 * domain-internals.h: Put MonoJitInfo on a diet.
6915 * domain.c: Fix a warning.
6917 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6919 * gc.c: rework the gc handles code to reuse handles
6922 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6924 * domain.c: fixed long standing bug in mono_string_equal() which
6925 was brought to light with the ldstr changes.
6927 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
6929 * reflection.c: Remove warning by adding missing include for marshal.h
6931 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6933 * domain.c, object.c: change the ldstr_table to hold
6934 MonoString* as keys: makes the runtime isinterned lookup
6935 faster and simplifies memory management.
6937 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
6939 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
6940 possible to add imperative security checks before calling the icall.
6941 * reflection.c: Return security attributes on the original MonoMethod
6942 (and not the wrapped one). This fix permissions on icalls.
6944 2005-01-25 Dick Porter <dick@ximian.com>
6946 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6947 the check for mktime() support actually test the mktime() return
6948 value. "Fixes" bug 71682, though the output is still different to
6951 2005-01-25 Martin Baulig <martin@ximian.com>
6953 * class.c (mono_class_is_assignable_from): Make this work for
6956 2005-01-24 Ben Maurer <bmaurer@ximian.com>
6958 * marshal.c (mono_string_utf8_to_builder)
6959 (mono_string_builder_to_utf16): We might not have ownership of the
6960 string. In thise case, we need to create a new buffer.
6962 * object-internals.h (mono_stringbuilder_capacity): sb->str might
6963 be null, in which case, use the default capacity.
6965 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6967 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6968 GC events to the profiler.
6970 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6972 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6973 if you don't want the GC to run.
6975 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6977 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6978 start providing a GC API and keeping different implementations in
6980 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6982 2005-01-22 Ben Maurer <bmaurer@ximian.com>
6984 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6985 mmap rather than allocating a huge buffer.
6986 (mono_debug_close_mono_symbol_file): Free the buffer allocated
6989 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
6991 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6992 and CheckExecutionRights.
6993 * reflection.c|h: Keep the index of the declarative security to be
6994 used, instead of the pointer, when AOT compiler is used. Also add
6995 class initialization when requesting demands.
6996 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6997 CheckExecutionRights. Both properties are now FALSE by default, and
6998 unmodifiable, unless the --security option is used.
7000 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7002 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
7003 reflection.c: properly refcount images and assemblies, many leaks fixed.
7005 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7007 * threadpool.c: increase the timeout for threads in the thread pool to
7008 10s. Fixes bug #67159.
7010 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
7012 * class-internals.h: Sun's compiler insists on explicit
7013 signed on bit fields to handle then correctly.
7015 2005-01-19 Miguel de Icaza <miguel@ximian.com>
7017 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
7018 Make the size of the array fit only the number of invalid path
7021 * class.c (_mono_class_get): Improve the error reporting when a
7022 class referenced is not found, to assist debugging.
7024 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
7026 * threads.c: fix off-by-one error.
7027 * domain.c: free data allocated in the domain.
7029 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
7031 * reflection.c (mono_method_body_get_object): Fill out exception info
7034 * object-internals.h: Add MonoReflectionExceptionHandlingClause
7037 2005-01-19 Martin Baulig <martin@ximian.com>
7039 * loader.c (mono_get_method_constrained): Make this work again.
7041 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
7043 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
7044 guint16 to match the managed side.
7046 * reflection.c (mono_reflection_body_get_object): Fill out local
7049 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
7052 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
7053 'local_var_sig_token'.
7055 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
7057 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
7060 * reflection.c (mono_method_body_get_object): Handle abstract and
7063 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
7065 * marshal.c, loader.c, class-internals.h, reflection.c:
7066 store the emthod data for a wrapper in an array instead of a list.
7068 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
7070 * marshal.c: change the code to allocate memory more
7071 conservatively for method wrappers.
7073 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7075 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
7076 fields from MonoClass to the marshal info structure where they belong.
7078 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7080 * class.c, object.c, class-internals.h, marshal.c: rearrange
7081 some fields and tweak some types to lower memory usage.
7083 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
7085 * threads.c (signal_thread_state_change): Handle the case when the
7086 target thread is the current thread.
7088 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
7090 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
7091 emit_ptr_to_object_conv.
7093 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
7094 marshalling. Fixes #71352.
7096 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7098 * metadata.h, blob.h: move table enum to blob.h so it can be included
7100 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
7101 cut the size of MonoImage/MonoDynamicImage.
7103 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
7105 * profiler.c (mono_profiler_install_simple): Fix default arguments.
7107 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7109 * reflection.c, reflection.h, icall.c: add a function to check
7110 if an attribute type is defined for a metadata object.
7112 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
7114 * object-internals.h: Added some needed fields from StringBuilder class.
7115 * marshal.c: Set the maxCapacity when creating a StringBuilder.
7117 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
7119 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
7120 threads before shutting down the runtime.
7122 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
7124 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7126 * object-internal.h, threads.c: implement stacksize and
7127 parameterized thread start functionality (requires
7128 matching corlib). Marked broken code for later removal.
7130 2005-01-12 Martin Baulig <martin@ximian.com>
7132 * class-internals.h (MonoGenericClass): Moved the `initialized'
7133 flag to MonoDynamicGenericClass, removed `init_pending'.
7134 (MonoGenericInst): Added `is_reference' flag.
7136 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
7138 * reflection.c (mono_image_create_pefile): Only set the pe_offset
7139 inside the MSDOS header. Fixes #71201.
7141 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
7143 (mono_domain_finalize): Ditto.
7145 2005-01-12 Martin Baulig <martin@ximian.com>
7147 * class.c (mono_get_shared_generic_class): Use the cache for
7148 non-dynamic generic classes.
7150 * class-internals.h (mono_class_create_generic_2): Removed
7151 function prototype, this function is now static inside class.c.
7153 * class.c (mono_class_create_generic_2): Made this static, only
7154 call it from mono_class_init() and mono_class_setup_parent().
7155 (collect_implemented_interfaces_aux): Call mono_class_init() on
7156 the interfaces we collect.
7157 (mono_class_setup_vtable): Call mono_class_init (class->parent).
7159 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
7161 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
7162 it a real thread handle.
7164 * domain-internals.h: Move exvar_offset from MonoJitInfo to
7165 MonoJitExceptionInfo, since each catch clause needs its own variable.
7167 2005-01-11 Dick Porter <dick@ximian.com>
7169 * image.c (mono_pe_file_open): New variant on mono_image_open()
7170 that does not set up the CLI metadata; used for FileVersionInfo so
7171 it can get the data for windows binaries too.
7173 * process.c (process_read_string_block): Don't read off the end of
7174 the StringTable block.
7176 These both fix bug 70766.
7178 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
7180 * gc.c: set some fields to NULL at GC cleanup time.
7181 * threads.c: if we quit the main thread, call exit ().
7183 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
7185 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
7187 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
7189 * threads.h, threads.c, object.c: added accessor and settor for
7190 main_thread. Handle it specially when exiting from it: wait
7191 for other foreground threads to exit.
7193 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
7195 * process.c, verify.c: remove some bloat.
7197 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
7199 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
7200 the calling convention to cdecl under win32.
7202 2005-01-08 Ben Maurer <bmaurer@ximian.com>
7204 * object.c (mono_object_get_size): New function to get the size of
7207 * profiler.c (simple_allocation): Use above.
7209 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
7211 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
7212 ves_icall_System_AppDomain_getRootDomain (as it's not required to
7213 get an appdomain by it's id and we can't assume the root's id is 0).
7214 * domain-internals.h: Change the function prototype to match.
7215 * icall.c: Change the icall table for AppDomain.
7217 2005-01-08 Miguel de Icaza <miguel@ximian.com>
7219 * locales.c (string_invariant_compare_char): Only compute
7220 GUnicodeTypes in the case where we need them. Test for ordinality
7221 first and return if so.
7226 * FIXME: here we must use the information from c1type and c2type
7227 * to find out the proper collation, even on the InvariantCulture, the
7228 * sorting is not done by computing the unicode values, but their
7229 * actual sort order.
7232 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7234 * loader.c: for P/Invoke methods, allow the "Internal" shared
7235 library name to refer to the calling process symbol namespace.
7237 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
7239 * Makefile.am: Add the security manager to the build.
7240 * security-manager.c|h: New. Initialization of the security manager.
7242 2005-01-07 Dick Porter <dick@ximian.com>
7245 * monitor.c: Update thread state during Monitor and WaitHandle
7246 waits. Fixes bug 71031.
7248 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
7250 * reflection.c (property_encode_signature): Correctly handle when the
7251 property has no methods.
7253 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
7255 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
7257 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
7258 fields from mb, not rmb. Fixes #71017.
7260 * marshal.c (emit_ptr_to_str_conv): Add support for
7261 ByValTStr -> string conversion. Fixes #71015.
7263 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
7265 * mempool.c (mono_mempool_contains_addr): New helper function.
7267 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
7269 * metadata.c (mono_metadata_compute_size): Fix size calculation of
7270 HasSematics encoded fields.
7272 * metadata.c (mono_type_to_unmanaged): Improve error message for
7273 invalid string marshalling.
7275 * metadata.c: Fix warnings.
7277 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7279 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
7282 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
7284 * domain.c object.c domain-internals.h: Revert part of r38077 since the
7285 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
7288 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
7290 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
7291 so methods containing these can be AOTed.
7293 2005-01-03 Martin Baulig <martin@ximian.com>
7295 * loader.c (find_method): Removed the hack for generic instances.
7296 (method_from_memberref): If our parent is a generic instance, pass
7297 its generic type definition to find_method() and then inflate the
7299 (mono_get_method_constrained): Pass the generic type definition to
7300 find_method() and inflate the method later.
7302 * class-internals.h (MonoStats): Added `generic_class_count'.
7304 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
7305 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
7307 * reflection.c (mono_custom_attrs_from_params): Don't ignore
7308 generic type definitions.
7310 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
7312 * loader.c icall.c: Fix warnings.
7314 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
7316 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
7317 blittable types. Fixes #70864.
7319 2004-12-29 Martin Baulig <martin@ximian.com>
7322 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
7324 * reflection.c (mono_method_get_object): Create a
7325 "System.Reflection.MonoGenericMethod" for inflated methods; don't
7326 call mono_get_inflated_method().
7328 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
7330 2004-12-27 Martin Baulig <martin@ximian.com>
7332 * class-internals.h (MonoMethod): Added `is_inflated' flag.
7333 (MonoMethodInflated): Added `inflated' field.
7335 * class.c (mono_class_inflate_generic_method): Don't really
7336 inflate the method here; just set the `is_inflated' flag in the
7338 (mono_class_get_inflated_method): Actually inflate the method here
7339 if it's not already inflated; we use the MonoMethodInflated's new
7340 `inflated' field as a cache.
7342 2004-12-26 Martin Baulig <martin@ximian.com>
7345 (inflate_generic_class): Moved some code out of inflate_generic_type().
7346 (mono_class_inflate_generic_method): If we're already inflated,
7347 inflate the context and use the declaring method; ie. make sure
7348 the declaring method of an inflated method is always the generic
7350 (mono_class_create_from_typedef): Create
7351 `class->generic_container->context->gclass'.
7353 2004-12-24 Ben Maurer <bmaurer@ximian.com>
7355 * metadata-internals.h, marshal.c, reflection.c: More
7356 MonoGHashTable->GHashTable.
7358 * domain-internals.h, class.c: Change MonoGHashTable's into
7359 GHashTables for some cases where no gc stuff is used
7361 All users: update apis
7363 2004-12-23 Ben Maurer <bmaurer@ximian.com>
7365 * metadata.c (builtin_types): Make this `const'. Makes this get
7366 put into the shareable section.
7367 (mono_metadata_init): Casts to make gcc happy.
7369 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
7371 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
7373 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
7375 * icall.c: Added an internal call to retrieve the position and length
7376 of assembly-level declarative security attributes (RequestMinimum,
7377 RequestOptional and RequestRefuse). This is used by the Assembly class
7378 to re-create the corresponding permission sets.
7380 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
7382 * marshal.c: fix the stelemref wrapper to be type correct
7385 2004-12-20 Ben Maurer <bmaurer@ximian.com>
7387 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
7388 to do key & 0x7fffffff. Hashtable already does this. It just
7389 results in longer code.
7391 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
7393 * appdomain.c: Bump corlib version.
7394 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
7395 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
7396 * reflection.c|h: Add functions to get declarative security infos
7397 (blob position and length) for assemblies, classes and methods.
7399 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
7401 * reflection.c: sort the constant table (bug #70693).
7403 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
7405 * object-internals.h, threads.c, domain.c: add accessors for
7406 the MonoThread and MonoDomain tls keys.
7408 2004-12-18 Martin Baulig <martin@ximian.com>
7410 * class.c (inflate_generic_type): If we're inflating a generic
7411 instance, set `ngclass->context->container = context->container';
7412 ie. the container we inflated into.
7414 * metadata.c (mono_metadata_parse_generic_param): Reflect above
7415 inflate_generic_type() changes.
7417 2004-12-17 Martin Baulig <martin@ximian.com>
7420 (MonoGenericClass): Replaced `MonoType *generic_type' with
7421 `MonoClass *generic_class'. Removed `dynamic_info'; if
7422 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
7423 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
7425 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
7427 * exception.c (mono_exception_from_token): New helper function.
7429 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
7431 * assembly.c (mono_assembly_load_with_partial_name): Call
7432 mono_assembly_loaded before invoking the preload hooks. Fixes
7435 * object-internals.h (MonoThread): Change culture_info and
7436 ui_culture_info into an array.
7438 * threads.c: Cache culture info objects from more than one appdomain.
7440 * threads.c threads-types.h icall.c: Add icalls for manipulating the
7443 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
7445 * threads.h threads.c appdomain.c: Clear the culture_info field of
7446 all threads during unloading if they point to an object in the dying
7449 2004-12-13 Ben Maurer <bmaurer@ximian.com>
7451 * culture-info.h (TextInfoEntry): New struct
7452 * object-internals.h: sync with managed
7453 * locales.c: fill the `text_info_data' field
7454 * culture-info-tables.h: update
7456 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
7458 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
7461 2004-12-12 Ben Maurer <bmaurer@ximian.com>
7463 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
7464 (ves_icall_ModuleBuilder_getMethodToken): Ditto
7466 2004-12-12 Martin Baulig <martin@ximian.com>
7468 * mono-debug-debugger.c (write_type): If we're an enum and the
7469 builtin types have already been initialized, call mono_class_init().
7471 2004-12-11 Martin Baulig <martin@ximian.com>
7473 * metadata.c (mono_metadata_load_generic_params): Added
7474 `MonoGenericContainer *parent_container' argument; automatically
7475 compute `container->is_method'; pass the correct owner to
7478 * reflection.c (compare_genericparam): Sort the GenericParam table
7479 according to increasing owners.
7481 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
7483 * profiler.c: allow disabling the default profiler.
7485 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
7487 * decimal.c, icall.c: allow disabling System.Decimal support.
7489 2004-12-09 Marek Safar <marek.safar@seznam.cz>
7491 * reflection.c: Add support for null attribute arguments.
7493 2004-12-09 Martin Baulig <martin@ximian.com>
7495 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
7496 names to get rid of compiler warnings.
7498 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
7500 * marshal.c (mono_marshal_get_struct_to_ptr): Call
7501 mono_marshal_load_type_info (). Fixes #69625.
7502 (mono_marshal_get_ptr_to_struct): Likewise.
7504 2004-12-08 Martin Baulig <martin@ximian.com>
7506 * mono-debug.h: Bumped version number to 47.
7508 * mono-debug-debugger.c
7509 (mono_debugger_event_handler, mono_debugger_event): Take two
7510 guint64 arguments insteed of a gpointer and a guint32.
7512 2004-12-08 Martin Baulig <martin@ximian.com>
7514 * debug-mono-symfile.h
7515 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
7516 `address' to `native_offset'.
7518 2004-12-08 Martin Baulig <martin@ximian.com>
7520 * class.c (mono_class_create_from_typespec): Only inflate if we
7521 either have `context->gclass' or `context->gmethod'.
7523 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
7525 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
7527 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
7529 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
7531 * reflection.c (mono_assembly_get_object): Remove the workaround put
7534 * appdomain.c: Use the corlib_internal field from MonoAssembly.
7536 * appdomain.c: Bump corlib version.
7538 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
7539 be visible in other appdomains.
7541 2004-12-07 Ben Maurer <bmaurer@ximian.com>
7543 * threads.c: Interlocked inc and dec for longs were messed up,
7544 use a KISS based impl for this. Fixes 70234
7546 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
7548 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
7550 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7552 * icall.c: fix to follow policy not to allow struct
7553 arguments in icalls.
7555 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7557 * process.c: make the patch that handles spaces in file paths work
7558 on mono/windows too.
7560 2004-12-06 Martin Baulig <martin@ximian.com>
7562 * class.c (mono_class_create_generic): Call
7563 mono_class_setup_supertypes() if we're dynamic.
7564 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
7566 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
7568 * object-internals.h: Add new fields to MonoThread.
7570 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7572 * icall.c threads-types.h threads.c: Add new icalls.
7574 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
7576 * object-internals.h (MonoReflectionAssembly): Sync object layout with
7579 * appdomain.c: Bump corlib version.
7581 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
7582 internal assemblies. Fixes #69181.
7584 2004-12-05 Martin Baulig <martin@ximian.com>
7586 * class.c (mono_class_inflate_generic_signature): Make this a
7587 no-op if `context' is NULL or we don't have any type parameters;
7588 also copy `sentinelpos'.
7590 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
7592 * image.c: Add unbox_wrapper_cache.
7594 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
7596 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
7599 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
7602 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
7604 2004-12-04 Martin Baulig <martin@ximian.com>
7606 * loader.c (mono_method_get_signature_full): New public function;
7607 like mono_method_get_signature(), but with an additional
7608 `MonoGenericContext *' argument.
7610 * class.c (mono_class_inflate_generic_signature): Formerly known
7611 as inflate_generic_signature(); make this public.
7613 2004-12-04 Martin Baulig <martin@ximian.com>
7616 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
7617 instead of a `MonoGenericContainer *'.
7618 (mono_metadata_parse_array_full): Likewise.
7619 (mono_metadata_parse_signature_full): Likewise.
7620 (mono_metadata_parse_method_signature_full): Likewise.
7621 (mono_metadata_parse_generic_inst): Likewise.
7622 (mono_metadata_parse_generic_param): Likewise.
7623 (mono_metadata_parse_mh_full): Likewise.
7624 (mono_type_create_from_typespec_full): Likewise.
7626 2004-12-03 Martin Baulig <martin@ximian.com>
7628 * class-internals.h (MonoGenericContainer): Replaced the
7629 `MonoGenericContext * pointer with a `MonoGenericContext'
7630 structure and made it the first element.
7632 2004-12-03 Martin Baulig <martin@ximian.com>
7635 (inflate_generic_type): Set the `context->container' when creating
7636 a new MonoGenericContext.
7637 (mono_class_inflate_generic_method): Likewise.
7638 (mono_class_create_from_typespec): Just use `context->container'
7639 to get the container.
7641 * loader.c (method_from_methodspec): Set `context->parent' from
7642 `context->container' - and if that's a method container, use its
7643 parent. Also set the `context->container' when creating a new
7645 (mono_get_method_from_token): Use just `context->container' to get
7648 * metadata.c (do_mono_metadata_parse_generic_class): Also set
7649 `gclass->context->container'.
7651 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
7652 the `context->container' when creating a new MonoGenericContext.
7654 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
7656 * reflection.c (compare_genericparam): Sort params with identical
7657 owner by their number. Fixes gen-111 on sparc.
7659 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
7661 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
7662 around the domain changes.
7664 * appdomain.c (mono_domain_unload): Handle the case when the thread
7665 calling Unload is itself being aborted during unloading. Fixes #70022.
7667 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
7669 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
7670 checkpoint_func as an icall so it gets a wrapper.
7671 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
7672 in the cross-appdomain wrappers too.
7674 * threads.c (mono_thread_has_appdomain_ref): Make this public.
7676 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
7678 * reflection.c: Fix some memory leaks.
7680 2004-12-02 Martin Baulig <martin@ximian.com>
7682 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
7684 * metadata.c (generic_class_cache): New static hashtable.
7685 (mono_metadata_lookup_generic_class): New public method.
7687 2004-12-02 Martin Baulig <martin@ximian.com>
7689 * class.c (mono_class_create_from_typedef): Call
7690 mono_class_setup_parent() and mono_class_create_mono_type() before
7691 parsing the interfaces.
7693 2004-12-02 Martin Baulig <martin@ximian.com>
7695 * metadata.c (generic_inst_cache): New static hashtable.
7696 (mono_metadata_lookup_generic_inst): New public function.
7697 (mono_metadata_inflate_generic_inst): New public function.
7698 (mono_metadata_parse_generic_inst): New public function.
7699 (do_mono_metadata_parse_generic_class): Use the new
7700 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
7701 since this'll also use the cache.
7703 * reflection.c (mono_reflection_bind_generic_method_parameters):
7704 Use mono_metadata_lookup_generic_inst() to use the new cache.
7706 * class.c (inflate_mono_type): Use
7707 mono_metadata_inflate_generic_inst() to inflate a generic
7708 instance; this'll also use the new cache.
7710 * loader.c (method_from_methodspec): Use
7711 mono_metadata_parse_generic_inst() and
7712 mono_metadata_inflate_generic_inst() rather than parsing it
7713 manually, so we can use the new cache.
7715 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
7717 * threads.c (wait_for_tids): Do not incorrectly free threads when
7720 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7722 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
7723 iter->args based on whether parameters are passed in registers (i.e.
7724 MONO_ARCH_REGPARMS is defined)
7726 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
7728 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
7729 the exception message. Fixes #70070.
7730 (method_from_methodspec): Fix warnings.
7732 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7734 * process.c: (complete_path) return the path quoted
7736 2004-12-01 Martin Baulig <martin@ximian.com>
7738 * class-internals.h (MonoGenericInst): New structure.
7739 (MonoGenericClass): Replaced `type_argc', `type_argv' and
7740 `is_open' with `MonoGenericInst *inst'.
7741 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
7742 `is_open' with `MonoGenericInst *inst'.
7744 2004-11-30 Martin Baulig <martin@ximian.com>
7746 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
7748 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
7749 to `generic_class_cache'.
7752 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
7753 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
7754 (mono_generic_inst_is_valuetype): Renamed to
7755 mono_generic_class_is_valuetype().
7758 (MonoGenericInst): Renamed to MonoGenericClass.
7759 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
7760 (MonoClass): Renamed `generic_inst' to `generic_class'.
7761 (MonoGenericContext): Renamed `ginst' to `gclass'.
7763 * object-internals.h
7764 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
7766 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
7767 mono_reflection_generic_class_initialize().
7769 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
7770 now known as "System.Reflection.MonoGenericClass".
7771 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
7773 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
7775 * class-internals.h: Added a flag field to MonoClass to cache the
7776 declarative security attributes actions associated with the class.
7777 * domain-internals.h: Added booleans to MonoJitInfo to cache the
7778 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
7779 applicable to the JITted method.
7780 * reflection.c|h: Added functions to extract (as flags) which security
7781 actions are available (declaratively) for a method, class or assembly.
7782 * metadata.c|h: Added functions to search the declarative security
7783 table in the metadata.
7785 2004-11-29 Ben Maurer <bmaurer@ximian.com>
7787 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
7788 EXPORTEDTYPES are already in the class name cache, so there is no
7789 need to add extra code here to look at them. Just removes a bit of
7792 (ves_icall_System_Environment_get_TickCount): No need for #if
7793 WINDOWS. We already have the code in io-layer.
7795 2004-11-28 Martin Baulig <martin@ximian.com>
7798 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
7801 2004-11-27 Miguel de Icaza <miguel@ximian.com>
7803 * assembly.c (do_mono_assembly_open): Instead of having a
7804 conditional WITH_BUNDLE, incorporate support for bundles here, by
7805 having a global `bundles' variable holding a pointer to the actual
7808 (mono_register_bundled_assemblies): New API call used by the
7811 See mkbundle.1 for details.
7813 2004-11-27 Martin Baulig <martin@ximian.com>
7815 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
7816 the vtable for generic methods.
7818 2004-11-26 Martin Baulig <martin@ximian.com>
7821 (mono_metadata_generic_method_hash): New public function.
7822 (mono_metadata_generic_method_equal): Likewise.
7825 (MonoGenericContainer): Added `GHashTable *method_hash'.
7827 * reflection.c (ReflectionMethodBuilder): Added
7828 `MonoGenericContainer *generic_container'.
7829 (reflection_methodbuilder_to_mono_method): Don't create a new
7830 MonoGenericContainer each time we're called.
7831 (mono_reflection_bind_generic_method_parameters): Use
7832 `container->method_hash' to cache the results so we don't create a
7833 different method if we're called several times with the same
7836 * loader.c (method_from_methodspec): Use the new
7837 `container->method_hash' here, too.
7839 2004-11-26 Martin Baulig <martin@ximian.com>
7841 * class.c (inflate_generic_signature): Correctly compute
7842 `res->has_type_parameters'.
7843 (mono_class_vtable): Use the `has_type_parameters' flag to
7844 determine whether we're a generic method.
7846 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
7848 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
7850 * object.c (mono_runtime_run_main): Fix a small memory leak.
7852 2004-11-25 Martin Baulig <martin@ximian.com>
7854 * class.c (set_generic_param_owner): Fixed the loop.
7856 2004-11-25 Martin Baulig <martin@ximian.com>
7858 * object.c (mono_class_vtable): Don't create any JIT wrappers for
7861 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
7863 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
7864 names. Fixes #69787.
7866 2004-11-24 Martin Baulig <martin@ximian.com>
7868 * class.c (mono_class_create_generic_2): If we don't have a
7869 `ginst->parent', inflate `gklass->parent' to get our parent.
7871 2004-11-24 Martin Baulig <martin@ximian.com>
7873 * reflection.c (compare_genericparam): Correctly sort the
7874 GenericParam table; fixes #69779.
7876 2004-11-23 Ben Maurer <bmaurer@ximian.com>
7878 * reflection.c: When writing a PE file, don't create a huge
7879 buffer in memory. Just write the arrays we have to the file.
7880 This reduces memory usage.
7882 * metadata-internals.h: MonoDynamicStream pefile is no longer used
7885 2004-11-17 Martin Baulig <martin@ximian.com>
7887 * class.c (mono_class_init): Don't setup `class->parent' for
7888 dynamic instances; moved this to mono_class_generic_2().
7889 (mono_class_create_generic): Also set `klass->inited' for dynamic
7891 (mono_class_create_generic_2): Don't do anything for dynamic
7892 generic instances. Set `klass->parent' here and also call
7893 mono_class_setup_parent() here.
7895 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
7896 `MonoType *parent' argument; set `ginst->parent' before calling
7897 mono_class_create_generic_2(), so we set the correct parent.
7899 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
7901 * reflection.c: allow getting attributes from ModuleBuilder
7904 2004-11-17 Martin Baulig <martin@ximian.com>
7906 * class.c (mono_class_create_from_typedef): If a type parameter is
7907 inherited from an outer class, set its owner to that class.
7909 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
7911 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
7912 for (int*) written size. This fixes bug #69592.
7914 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
7916 * icall.c: Added IsAuthenticodePresnet internal call.
7917 * image.c|h: New function that check a MonoImage for an Authenticode
7918 signature in the certificate PE data directory.
7919 * security.c|h: New internal call to ask the runtime if an
7920 Authenticode signature seems referenced in the PE header.
7922 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
7924 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
7926 * reflection.c (mono_image_create_pefile): Free the assembly streams
7927 after writing out the assembly file.
7929 * object.c (mono_runtime_run_main): Fix small memory leak.
7931 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
7932 property access modifiers. Fixes #69389.
7934 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
7936 * domain.c, object.c, object-internals.h, domain-internals.h,
7937 object.h, marshal.c: keep dynamic code info per domain.
7939 2004-11-15 Martin Baulig <martin@ximian.com>
7941 * class.c (mono_type_get_name_recurse): Put type arguments in
7942 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
7945 2004-11-15 Martin Baulig <martin@ximian.com>
7947 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7948 (mono_class_setup_vtable): When computing `the_cname' for a
7949 generic instance, don't include the namespace since we'd otherwise
7952 2004-11-15 Martin Baulig <martin@ximian.com>
7954 * class.c (mono_class_create_generic): Changed return type to void.
7955 (mono_class_create_generic_2): New public function; setup
7956 `class->method', `class->field' and `class->interfaces' here
7957 instead of in mono_class_init().
7959 * class.h (mono_class_create_generic): Moved to class-internals.h.
7961 2004-11-14 Ben Maurer <bmaurer@ximian.com>
7963 * reflection.c (mono_image_create_pefile): take a file HANDLE.
7964 rather than writing to memory, write to this file. Right now,
7965 we are just writting into a buffer, and copying that. However
7966 we can avoid the buffer later.
7968 (mono_dynamic_stream_reset): new function
7970 * icall.c, object-internals.h: update for the above.
7972 2004-11-13 Ben Maurer <bmaurer@ximian.com>
7974 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7975 have been using gc'd memory. First it is slower, unlikely
7976 the comment in the source code said, secondly, it increases
7977 our footprint to do it in the gc.
7979 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7980 the method so that it does not have to copy to managed code.
7982 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
7984 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7986 2004-11-12 Martin Baulig <martin@localhost>
7988 * reflection.c (mono_image_create_token): Allow generic method
7989 definitions here, since they may appear in an `.override'; see
7990 gen-98/gen-99 for an example.
7992 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
7994 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7997 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
8000 2004-11-11 Martin Baulig <martin@ximian.com>
8002 * class.c (mono_class_setup_vtable): In an explicit interface
8003 implementation, the method name now includes the arity.
8005 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
8007 * object.c (mono_array_full_copy): Fix warning.
8009 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
8011 * appdomain.c: Removed look_for_method_by_name(). Use the new method
8012 mono_class_get_method_from_name() instead.
8014 * class-internals.h: Added two new types of wrappers.
8015 Added MonoRemotingTarget enum. Added new trampoline function type, which
8016 takes an additional MonoRemotingTarget value as parameter, so it is
8017 possible to request a trampoline for a specific target.
8019 * class.c: Added new mono_class_get_method_from_name() method.
8021 * class.h: In MonoRemoteClass, we can have now to vtables, one for
8022 general remoting sinks and one specific for cross domain calls.
8024 * debug-helpers.c: Added new wrapper names.
8026 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
8029 * image.c: Porperly delete value objects form the remoting invoke hashtable.
8031 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
8032 with several other methods (mono_marshal_get_xappdomain_dispatch,
8033 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
8034 and others) can generate a fast remoting wrapper for cross domain calls.
8035 More information can be found in docs/remoting.
8036 Other changes: Removed mono_find_method_by_name, and used
8037 mono_class_get_method_from_name instead.
8038 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
8039 is stored in the remoting invoke hashtable.
8041 * marshal.h: published the new method for getting the xdomain wrapper,
8042 and also added a method for getting the adequate wrapper for a given
8045 * object-internals.h, object.c: Added a couple of methods for capying and
8047 Modified mono_install_remoting_trampoline, which takes the new remoting
8048 trampoline that has a remoting target as parameter.
8049 mono_class_proxy_vtable now also takes a remoting target as parameter, and
8050 will return the most suitable vtable for the target.
8051 Added mono_remote_class_vtable, which returns the vtable of a remote class
8052 (which can be the normal remoting vtable or the xdomain vtable).
8054 * threads.c: the xdomain invoke and dispatch wrappers must also be
8055 protected against interruptions.
8057 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8059 * icall.c: use memmove in BlockCopyInternal when the source and
8060 destination arrays are the same.
8062 2004-11-09 Martin Baulig <martin@ximian.com>
8064 * class-internals.h (MonoGenericContainer): Removed `method' and
8065 `signature', replaced them with `is_method' and `is_signature'
8066 flags. Added `context'.
8068 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
8069 instead of a `MonoGenericContainer *'.
8071 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
8072 for dynamic type parameters.
8073 (mono_metadata_load_generic_params): Setup `container->context'.
8075 * reflection.c (mono_reflection_setup_generic_class): Setup
8076 `tb->generic_container->context'.
8077 (do_mono_reflection_bind_generic_parameters): Use
8078 mono_class_inflate_generic_type() to correctly inflate types,
8079 rather than using our own hack just for MONO_TYPE_VAR.
8081 2004-11-09 Martin Baulig <martin@ximian.com>
8083 * class.c (mono_class_inflate_generic_method): Small fix; don't
8087 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
8088 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
8089 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
8090 (ves_icall_Type_BindGenericParameters): Likewise.
8091 (ves_icall_Type_get_IsGenericInstance): Likewise.
8092 (ves_icall_Type_GetGenericParameterPosition): Likewise.
8093 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
8094 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
8095 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
8097 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
8099 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
8100 assembly versions and public key tokens. Fixes #69113.
8102 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
8104 * metadata.c: fix bug introduced with the type cache changes
8107 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
8109 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
8110 the MonoClass pointer instead of the token in exception clauses.
8111 * reflection.c: updates for the above and make the code not depend
8112 on the structure of MonoExceptionClause.
8114 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
8116 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8117 Add support for dynamic assemblies. Fixes #69114.
8119 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
8121 2004-11-07 Ben Maurer <bmaurer@ximian.com>
8123 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
8124 since most only those methods use it. the code member of
8125 MonoMethodPInvoke was dead, so that can be removed too. Also,
8126 remove inline_count (again, not used), and move slot so that it
8127 can share bits with some other flags. This saves 8 bytes in the
8128 structure and gives us about 50 kb back for mcs helloworld.cs
8130 * *.[ch]: Do naming changes for the above.
8132 * loader.c (mono_method_get_header): Lazily init the header
8134 (mono_get_method_from_token): don't init the header here
8135 (mono_free_method): the header may never be allocated
8137 Overall, this saves 150 kb of unmanaged allocations
8138 for mcs helloworld.cs. That accounts for 10% of the unmanaged
8141 * loader.c, loader.h (mono_method_get_header): new accessor.
8143 * *.[ch]: use the above method. Prepares us to lazily load
8146 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
8147 three warnings, which are actual bugs (see 69206).
8149 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
8150 unused. Saves a cool 4 bytes / method.
8152 2004-11-06 Ben Maurer <bmaurer@ximian.com>
8154 * metadata.c (builtin_types): Add types for System.Object here.
8155 (mono_metadata_parse_type_full): Cache MonoType*'s that are
8156 for a class or valuetype from klass->this_arg or klass->byval_arg.
8158 On mcs for a hello world, this gets us down from 21836 MonoType's
8161 (mono_metadata_free_type): Account for the above change.
8163 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
8165 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
8166 exception instead of asserting if name is null.
8167 (ves_icall_System_AppDomain_GetData): Ditto.
8169 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
8171 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
8174 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
8175 Return NULL when the domain does not have entry_assembly set.
8177 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
8178 Add a 'resource_modules' argument.
8179 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
8181 * reflection.c (mono_reflection_create_runtime_class): Move setting
8182 of wastypebuilder here, so mono_get_type_object () returns a MonoType
8185 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
8186 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
8187 Throw an ArgumentNullException if 'ptr' is null.
8189 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
8190 assemblies here. Fixes #69020.
8192 2004-11-05 Geoff Norton <gnorton@customerdna.com>
8194 * reflection.c (build_compressed_metadata): Fix the previous patch for
8195 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
8198 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
8200 * assembly.c (mono_assembly_names_equal): Allow a match if one of
8201 the cultures is false. Fixes #69090.
8203 * reflection.c (build_compressed_metadata): Fix invalid memory read
8204 detected by valgrind.
8206 * reflection.c (mono_reflection_get_type): Avoid triggering a
8207 TypeResolve multiple times for the same type. Fixes #65577.
8209 2004-11-04 Ben Maurer <bmaurer@ximian.com>
8211 * marshal.c: Avoid using ldftn to call managed functions. It is
8212 much slower than just a call.
8214 * reflection.c (mono_module_get_object): free the basename we
8215 allocate here from glib.
8217 * reflection.c (ensure_runtime_vtable): make sure to free
8218 overrides. Also, we were allocating an array of MonoMethod not an
8219 array of MonoMethod*.
8221 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
8223 * image.c (mono_image_close): free image->guid here.
8225 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
8227 * reflection.c: Fix some spec conformance issues with the PE file
8228 structures so mcs compiled apps run on the Net 2.0 beta.
8230 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
8232 * string-icalls.c (ves_icall_System_String_ctor_encoding):
8233 Implement this. Fixes #67264.
8235 * debug-helpers.h debug-helpers.c marshal.c: Move
8236 mono_find_method_by_name to debug-helpers.c.
8238 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
8240 * object.c (mono_release_type_locks): type_initialization_hash is
8243 * reflection.c object.c object-internals.h: Fix warnings.
8245 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
8246 without accessors. Fixes #61561.
8248 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
8249 application base from the root domain if not set. Fixes #65641.
8250 (mono_runtime_init): Fix warning.
8252 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8254 * appdomain.c: call mono_thread_pool_init.
8255 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
8256 of worker threads based on the number of CPUs and the environment
8257 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
8258 for non-windows (windows) systems.
8260 2004-10-27 Chris Toshok <toshok@ximian.com>
8262 * mono-debug-debugger.c (write_class): don't call mono_class_init
8263 here, as even with the check for (!klass->init_pending), we get
8264 into a situation where we're hitting cycles in class
8265 initialization. Fixes #68816.
8267 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
8269 * image.c: Avoid overwriting values in the loaded_images_hash when an
8270 assembly is loaded multiple times. Fixes #61152.
8272 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
8273 so multiple satellite assemblies for the same name can be loaded.
8276 * mono_domain_assembly_preload: Actually return the loaded assembly,
8279 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
8280 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
8282 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
8283 pending finalizers are not invoked after the appdomain has been
8284 unloaded. Fixes #67862.
8286 2004-10-22 Martin Baulig <martin@ximian.com>
8288 * mono-debug-debugger.c
8289 (mono_debugger_runtime_invoke): Don't box valuetypes.
8291 2004-10-22 Chris Toshok <toshok@ximian.com>
8293 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
8294 don't hide private methods.
8296 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
8298 * icall.c: Allows the runtime to "share" (when known) the public key
8299 token of an assembly. This avoid the need to recalculate the token
8300 (from the public key) in managed code.
8302 2004-10-21 Chris Toshok <toshok@ximian.com>
8304 * debug-helpers.c (append_class_name): argh, revert last patch.
8306 2004-10-21 Chris Toshok <toshok@ximian.com>
8308 * debug-helpers.c (append_class_name): use '+' as the delimiter,
8309 not '/', so that it matches what the debugger uses to look up
8312 2004-10-21 Martin Baulig <martin@ximian.com>
8314 * mono-debug-debugger.c (mono_debugger_throw_exception): New
8315 public method; this is called each time an exception is thrown and
8316 allows the debugger to use exception catch points.
8318 2004-10-21 Martin Baulig <martin@ximian.com>
8320 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
8321 the stack pointer and the exception object in some struct and pass
8322 that to the debugger.
8324 2004-10-21 Chris Toshok <toshok@ximian.com>
8326 * mono-debug-debugger.c (do_write_class): add instance/static
8327 event support. We don't expose "raise" or "other" yet.
8328 (event_is_static): new method.
8330 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
8332 * mono-debug-debugger.c
8333 (mono_debugger_handle_exception): Remove
8334 bogus return value for fussy compilers.
8336 2004-10-20 Martin Baulig <martin@ximian.com>
8338 * mono-debug-debugger.c
8339 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
8340 (mono_debugger_handled_exception): Likewise.
8342 2004-10-20 Martin Baulig <martin@ximian.com>
8344 * mono-debug-debugger.h (MonoDebuggerEvent): Added
8345 MONO_DEBUGGER_EVENT_EXCEPTION.
8347 * mono-debug-debugger.c (mono_debugger_handle_exception): New
8348 public function to send the debugger a notification for an
8349 exception and inform it about a catch/finally clause.
8351 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
8353 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
8354 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
8357 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
8359 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
8361 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
8362 marshalled as [In,Out]. Fixes #58325.
8364 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
8366 * reflection.c (mono_method_body_get_object): Implement some fields.
8368 2004-10-12 Martin Baulig <martin@ximian.com>
8370 * reflection.c (mono_reflection_bind_generic_parameters): Small
8371 fix, correctly retrieve our parent from a generic instance.
8373 2004-10-12 Martin Baulig <martin@ximian.com>
8375 * metadata.c (mono_metadata_generic_param_equal): We always have
8379 (mono_class_from_generic_parameter): We need to have an owner.
8380 (my_mono_class_from_generic_parameter): Likewise.
8382 * reflection.c (mono_reflection_setup_generic_class): Renamed to
8383 mono_reflection_create_generic_class() and added a new
8384 mono_reflection_setup_generic_class().
8385 (mono_reflection_initialize_generic_param): If we're a nested
8386 generic type and inherited from the containing class, set our
8387 owner to the outer class.
8389 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
8391 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
8393 * reflection.c (mono_method_body_get_object): New function to create
8394 a MethodBody object.
8396 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
8398 2004-10-11 Martin Baulig <martin@ximian.com>
8400 * metadata.c (_mono_metadata_type_equal): Renamed to
8401 do_mono_metadata_type_equal() and made static.
8403 2004-10-11 Martin Baulig <martin@ximian.com>
8405 * appdomain.c: Bump corlib version number to 28.
8407 2004-10-10 Martin Baulig <martin@ximian.com>
8410 (MonoGenericInst): Added `MonoGenericContainer *container'.
8411 (MonoGenericMethod): Likewise.
8412 (MonoGenericContext): Likewise.
8413 (MonoGenericParam): Added `MonoGenericContainer *owner'.
8416 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
8417 (do_mono_metadata_parse_generic_inst): Likewise.
8418 (mono_metadata_parse_type_full): New public method. This is the actual
8419 mono_metadata_parse_type() implementation - with an additional
8420 `MonoGenericContainer *' argument.
8421 (mono_metadata_parse_array_full): Likewise.
8422 (mono_metadata_parse_signature_full): Likewise.
8423 (mono_metadata_parse_method_signature_full): Likewise.
8424 (mono_metadata_parse_mh_full): Likewise.
8425 (mono_type_create_from_typespec): Likewise.
8426 (mono_metadata_interfaces_from_typedef_full): New public method;
8427 this is similar to the other _full() methods, but we take a
8428 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
8429 (mono_metadata_parse_generic_param): Take an additional
8430 `MonoGenericContainer *' argument and lookup the MonoGenericParam
8431 from that container.
8432 (mono_metadata_generic_param_equal): New static method to compare
8433 two type parameters.
8434 (_mono_metadata_type_equal): New static method; takes an
8435 additional `gboolean signature_only' argument - if true, we don't
8436 compare the owners of generic parameters.
8437 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
8438 with a TRUE argument - do a signature-only comparision.
8440 * loader.c: Use the new _full() methods and pass the
8441 MonoGenericContainer to them.
8443 * object-internals.h (MonoReflectionTypeBuilder): Added
8444 `MonoGenericContainer *generic_container' field.
8445 (MonoReflectionMethodBuilder): Likewise.
8447 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
8449 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
8450 case initial images of dynamic assemblies.
8452 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
8454 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
8456 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
8457 length of event->other array.
8458 (typebuilder_setup_events): Ditto.
8460 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
8461 'assembly_by_name' and add an 'assemblies' list.
8463 * assembly.h assembly.c: Add a new search hook for determining whenever
8464 an assembly is already loaded. Use this instead of searching in the
8465 loaded_assemblies list.
8467 * domain.c appdomain.c: Implement the new search hook so loaded
8468 assemblies are now scoped by appdomain. Fixes #67727.
8470 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
8472 * threads.c (mono_thread_attach): Initialize synch_lock field so
8473 mono_thread_detach works again.
8475 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
8476 'lib' too. Fixes #63130.
8478 2004-10-06 Jackson Harper <jackson@ximian.com>
8480 * culture-info-tables.h: regenerated.
8482 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
8484 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
8485 implemented by other interfaces in the result. Fixes #65764.
8487 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8488 Handle unloadable modules without crashing.
8490 * image.c (load_modules): Revert the previous patch since modules must
8491 have a fixed index inside the array.
8493 * image.c (load_modules): Don't include native modules in the modules
8496 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
8498 * reflection.h: Add param_defaults field.
8500 * reflection.c: Add support for parameter defaults in dynamic methods.
8503 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
8504 an empty string when a type has no namespace. Fixes #64230.
8506 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
8508 * tabledefs.h: Added "internal" security actions to support non-CAS
8509 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
8510 Note: they do not seems to be used anymore in 2.0 (new metadata format)
8512 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
8514 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
8515 constructor of abstract class. Fixes #61689.
8517 2004-10-04 Martin Baulig <martin@ximian.com>
8519 * class-internals.h (MonoGenericContainer): New type.
8520 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
8521 `MonoGenericContainer *generic_container'.
8522 (MonoClass): Replaced `gen_params' and `num_gen_params' with
8523 `MonoGenericContainer *generic_container'.
8525 * metadata.c (mono_metadata_load_generic_params): Return a
8526 `MonoGenericContainer *' instead of a `MonoGenericParam *';
8527 removed the `num' argument.
8529 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
8531 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
8534 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
8537 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
8539 * reflection.c: Save pe_kind and machine values into the generated
8542 * appdomain.c: Bump corlib version number.
8544 * object-internals.h: Reorganize layout of LocalBuilder.
8546 * class-internals.h class.c (mono_class_get_implemented_interfaces):
8547 New helper function.
8549 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
8550 created MonoType for dynamic types. Fixes #66180.
8552 2004-10-02 Ben Maurer <bmaurer@ximian.com>
8554 * threadpool.c: the ares hashtable needs a critical section around it.
8555 this prevents some nasty segfaults
8557 2004-10-02 Massimiliano Mantione <massi@ximian.com>
8559 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
8560 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
8563 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
8565 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
8567 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
8569 * image.c: Always canonicalize image file names, to avoid loading
8570 the same assembly twice when referenced using a relative path.
8572 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
8574 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
8576 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
8578 * marshal.c: Fix warnings.
8580 2004-09-29 Geoff Norton <gnorton@customerdna.com>
8582 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
8583 attempting to marshal the delegate_trampoline as the method_addr.
8584 This patch has a static hashtable of marshalled delegates so that
8585 we can map delegate_trampoline addresses back to delegates. This
8586 allows a delegate passed to managed code to be passed back into native
8589 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
8591 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
8593 * reflection.c (method_encode_code): Align method headers properly.
8596 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
8598 * marshal.c: In the runtime invoke wrapper, reset the abort
8599 exception if it is cached. This avoids the automatic rethrowal of
8600 the exception after the catch of the wrapper. Also check for pending
8601 interruptions before calling the managed method. This is done using
8602 the new method emit_thread_force_interrupt_checkpoint, since the
8603 normal checkpoint method is ignored when running the invoke wrapper.
8604 * object.c: If the abort exception is rethrown, set the abort_exc
8605 field of the thread, so it will be rethrown aftere every catch.
8606 * threadpool.c: Only run an interruption checkpoint if what has been
8607 requested is a stop of the thread (aborts will be ignored).
8608 * threads.c: By default, a thread will now never be interrumped while
8609 running the runtime invoke wrapper (this ensures that runtime_invoke
8610 will always return to the caller if an exception pointer is provided).
8611 There is a new special method mono_thread_force_interruption_checkpoint()
8612 to force an interruption checkpoint even if running a protected
8613 wrapper, which is used by the same runtime invoke wrapper to do a check
8616 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
8618 * object.c, object-internals.h: Implemented mono_release_type_locks,
8619 which releases the cctor locks held by a thread.
8620 * threads.c, threads.h: In thread_cleanup, release cctor locks held
8621 by a thread. Added mono_thread_exit() method to be used to safely stop
8624 2004-09-28 Raja R Harinath <rharinath@novell.com>
8626 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8627 Move null check before dereference. Avoid indexing beyond the end
8628 of the 'modules' array.
8630 2004-09-28 Raja R Harinath <rharinath@novell.com>
8632 * metadata-internals.h (MonoImage): Add module_count field.
8633 * image.c (load_modules): Set image->module_count.
8634 (mono_image_load_file_for_image): Use image->module_count.
8635 * reflection.c (mono_image_load_module): Append to image->modules array
8636 of dynamic assembly.
8637 (mono_module_get_object): Fix loop to actually increment index.
8638 Use image->module_count.
8639 * assembly.c (mono_assembly_load_references): Use image->module_count.
8640 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8643 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
8645 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
8646 Avoid assert on generic types.
8648 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
8650 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
8652 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
8654 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
8655 function to convert a MarshalSpec structure to its managed counterpart.
8657 * reflection.c: Fix warnings.
8659 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
8662 * icall.c (mono_create_icall_signature): Fix build.
8664 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
8666 * icall.c: Add MakePointType icall.
8668 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
8671 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8673 * threadpool.c: reuse allocated slots in the queue.
8675 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
8677 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
8679 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
8681 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
8684 * tabledefs.h: Add constants for pinvoke attributes BestFit and
8685 ThrowOnUnmappableChar.
8687 * icall.c (ves_icall_Type_GetPacking): New icall.
8689 2004-09-24 Martin Baulig <martin@ximian.com>
8691 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
8693 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8696 (mono_domain_set): allow setting a domain that is being unloaded.
8697 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
8700 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
8702 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
8703 the GetCustomAttributes icall.
8705 2004-09-23 Martin Baulig <martin@ximian.com>
8707 * object-internals.h (MonoReflectionGenericParam): Replaced
8708 'has_ctor_constraint', `has_reference_type' and `has_value_type'
8709 with `guint32 attrs'.
8711 2004-09-23 Martin Baulig <martin@ximian.com>
8713 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
8715 2004-09-23 Martin Baulig <martin@ximian.com>
8717 * object-internals.h (GenericParameterAttributes): New enum.
8719 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
8721 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
8723 * class.c (init_events): Fill out event->other field.
8725 * class.c: Fix warnings.
8727 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
8729 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
8731 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
8732 walk which doesn't supply the IL offset.
8734 2004-09-22 Martin Baulig <martin@ximian.com>
8736 * reflection.c (mono_reflection_setup_internal_class): If we're
8737 System.ValueType, System.Object or System.Enum, set
8738 `klass->instance_size' and create the vtable.
8739 (mono_reflection_create_internal_class): If we're an enum type,
8740 get the base class from our current corlib.
8742 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
8744 * reflection.h (MonoResolveTokenError): New type.
8746 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
8749 * icall.c: Add an 'error' argument to the ResolveToken icalls.
8751 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
8753 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
8754 Support also calling constructors, but only for already allocated objects.
8756 2004-09-17 Geoff Norton <gnorton@customerdna.com>
8758 * reflection.c (type_get_qualified_name): If the klass is null
8759 return the typename to avoid a NullRefEx.
8760 (encode_cattr_value): Get the qualified name of the boxed type,
8761 not the underlying enumtype. Fixes #62984.
8763 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
8765 * marshal.c: Fix problems with previous checkin.
8767 2004-09-21 <vargaz@freemail.hu>
8769 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
8770 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
8772 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
8774 2004-09-21 Geoff Norton <gnorton@customerdna.com>
8776 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
8777 should only return a type for pointers, arrays, and passbyref types.
8780 2004-09-21 Martin Baulig <martin@ximian.com>
8782 * domain.c (mono_debugger_check_runtime_version): New public
8785 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
8787 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
8789 * reflection.c: Added missing sort to the declarative security
8790 attributes table. MS implementation stops seeing the attributes if the
8791 token number regress in the table (as shown by ildasm and permview).
8793 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
8795 * object-internals.h (MonoReflectionModule): Add 'token' field.
8797 * reflection.c (mono_reflection_get_token): Add support for Module
8799 (mono_module_get_object): Set 'token' field.
8800 (mono_module_file_get_object): Set 'token' field.
8802 * icall.c: Add new Assembly and Module icalls.
8804 * appdomain.c: Bump corlib version.
8806 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
8808 * loader.h loader.c class.h class.c: Add helper functions for obtaining
8809 tokens of metadata objects.
8811 * reflection.h reflection.c (mono_reflection_get_token): New function
8812 to obtain the token of a metadata object.
8814 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
8816 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
8818 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
8820 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
8822 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
8824 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
8825 * object-internals.h: Added 3 MonoArray* members to MonoReflection
8826 AssemblyBuilder to access the permissions set in the class lib.
8827 * reflection.c: Added security attributes encoding step in
8828 mono_image_build_metadata.
8829 * tabledefs.h: Added new security actions defined in 2.0:
8830 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
8832 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
8834 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
8837 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
8839 * locales.c: nullify the ICU_collator member of CompareInfo when it is
8840 finalized. There where random SIGSEVs at program termination, when
8841 an object being finalized was trying to do a string comparison and
8842 the current culture was already finalized.
8844 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8846 * threads.c: call thread_cleanup before finishing the thread if we get
8849 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
8851 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
8852 assemblies from the parent. Fixes #65665.
8854 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
8856 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
8859 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
8861 * reflection.h: add prototype for mono_get_dbnull_object
8862 * reflection.c: add prototypes for get_default_param_value_blobs
8863 and mono_get_object_from_blob for fussier compilers
8865 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
8867 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
8868 false deadlock checks in class initialization.
8870 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
8872 * image.c (mono_image_addref): Fix comment.
8874 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
8877 2004-09-12 Jambunathan K <kjambunathan@novell.com>
8879 * reflection.c (mono_param_get_objects): Modified to return
8880 ParameterInfo.DefaultValue object.
8882 (get_default_param_value_blobs):
8883 (mono_get_object_from_blob):
8884 (mono_get_dbnull_object): New helper routines.
8886 * object.c (mono_get_constant_value_from_blob): New helper routine
8887 carved out from get_default_field_value ()
8889 * object-internals.h (mono_get_constant_value_from_blob): Added
8890 function declaration.
8892 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
8894 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
8895 referenced assemblies. Fixes #62135.
8897 * exception.h exception.c (mono_get_exception_file_not_found2): New
8900 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
8902 * class.h class.c: Add mono_type_get_underlying_type ().
8904 2004-09-09 Geoff Norton <gnorton@customerndna.com>
8906 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
8907 Fix GetTypes() to support dynamically created assemblies.
8909 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
8911 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
8913 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
8916 * reflection.h reflection.c loader.c: Allow dynamic construction of
8917 pinvoke methods. Fixes #65571.
8919 * reflection.c (mono_reflection_get_type): Revert previous change since
8920 it causes regressions.
8922 2004-09-08 Martin Baulig <martin@ximian.com>
8924 * class.c (class_compute_field_layout): Don't call
8925 mono_class_layout_fields() for open generic instances.
8927 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
8928 * threads.c appdomain.c: fix typo in GC macro
8930 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8932 * threads.c: don't call mono_thread_detach() in start_wrapper(),
8933 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
8935 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
8937 * image.c (mono_image_close): Applied patch from
8938 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
8939 assembly is loaded multiple times from data.
8941 * image.c (mono_image_open): Fix warning.
8943 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8945 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8948 * reflection.c (mono_reflection_create_runtime_class): Initialize
8949 klass->nested_classes. Fixes #61224.
8951 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8953 * threads.c: sched_yield() on exit, to allow threads to quit.
8955 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8957 * object.c (mono_unhandled_exception): Remove leftover debug code.
8959 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
8961 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8963 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
8965 * marshal.c (emit_marshal_array): Really null terminate string arrays.
8967 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8969 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8971 * marshal.c (emit_marshal_array): Null terminate string arrays.
8973 * marshal.c (raise_auto_layout_exception): Fix warning.
8975 * reflection.c (mono_param_get_objects): Initialize the default value
8976 with DBNull.Value, not null. Fixes #62123.
8978 2004-09-01 Miguel de Icaza <miguel@ximian.com>
8980 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8981 throw an exception with a cute explanation.
8983 2004-09-06 Dick Porter <dick@ximian.com>
8985 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8986 Close the new process's thread handle, as we don't use it. The
8987 handle stays around forever otherwise.
8989 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
8991 * object.c (arith_overflow): Fix warning.
8993 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8994 calling conventions in method refs. Fixes #65352.
8996 * reflection.c: Fix warnings.
8998 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
9000 * icall.c: Add a new icall for Array.Clear
9002 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
9004 * object.c: When allocating an array, we have to throw
9005 an overflow exception if any of the lengths are < 0.
9007 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
9009 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
9010 properly. Also move implementation of string array marshalling to
9011 managed code. Fixes #42316.
9013 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9015 * assembly.c: provide more information when loading an assembly fails.
9017 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9019 * filewatcher.c: don't expect the development fam package to be
9022 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
9024 * marshal.c: Make a copy of the signature cookie since it will be
9025 freed by the caller.
9027 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
9029 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
9031 * metadata.c (mono_metadata_free_marshal_spec): New function to free
9034 * marshal.c: More refactoring.
9036 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
9039 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
9041 * object.c: In mono_message_invoke, fill the output parameter array after
9042 calling the managed method (it was done before the call). This fixes
9045 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
9047 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
9050 2004-09-02 Martin Baulig <martin@ximian.com>
9052 * class.c (mono_class_instance_size): Don't allow generic type
9053 definitions or open generic instances.
9054 (mono_class_array_element_size): If we're a value type, call
9055 mono_class_instance_size() on the original class.
9057 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
9058 handle generic instances.
9060 * mono-debug-debugger.c (write_type): Handle generic instances
9063 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
9065 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
9066 the allocation request fails. Fixes #65089.
9068 * object.c (mono_runtime_free_method): Do not call mono_free_method.
9070 * object.c (mono_runtime_free_method): New function to free a dynamic
9073 * marshal.c (mono_delegate_free_ftnptr): New function to free the
9074 delegate trampoline.
9076 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
9077 with hasthis as dynamic,
9079 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
9081 * domain.c (mono_jit_info_table_remove): New function to remove an
9082 entry from the jit info table.
9084 * class-internals.h (MonoMethod): Add 'dynamic' field.
9086 * loader.c: Fix warnings.
9088 2004-09-01 Martin Baulig <martin@ximian.com>
9090 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
9091 instead of mono_debugger_lock() because the latter one is a no-op
9092 unless running in the debugger.
9094 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
9096 * class.c (class_compute_field_layout): Classes with auto-layout or
9097 reference fields are not blittable.
9099 2004-09-01 Dick Porter <dick@ximian.com>
9101 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
9102 mono_image_get_filename() to get the assembly location.
9105 * metadata.h: Fix compile warnings
9107 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
9109 * class.c (class_compute_field_layout): System.Object is blittable.
9111 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
9112 as in/out. Fixes #59909.
9114 2004-09-01 Martin Baulig <martin@ximian.com>
9116 * metadata.h (MONO_TYPE_ISREFERENCE): Call
9117 mono_metadata_generic_inst_is_valuetype() if we're a generic
9118 instance to check whether our underlying type is a reference type.
9120 2004-09-01 Martin Baulig <martin@ximian.com>
9122 * metadata.c (mono_type_size): If we're a generic instance, call
9123 mono_class_value_size() for value types.
9125 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
9127 * marshal.c: Implement more custom marshalling functionality. Fixes
9130 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9132 * mono-debug.c, debug-mono-symfile.c: add some locking love.
9134 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
9136 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
9138 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
9140 * icall.c: Fix some warnings.
9142 * threads.c (abort_appdomain_thread): Fix unref errors.
9143 (mono_thread_current): Fix THREAD_DEBUG define.
9145 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
9147 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
9149 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
9151 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
9153 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
9156 2004-08-28 Martin Baulig <martin@ximian.com>
9159 (mono_metadata_generic_inst_is_valuetype): New public function.
9161 * metadata.h (MONO_TYPE_ISSTRUCT): Call
9162 mono_metadata_generic_inst_is_valuetype() if we're a generic
9163 instance to check whether our underlying type is a valuetype.
9165 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
9167 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
9170 2004-08-25 Martin Baulig <martin@ximian.com>
9172 * loader.c (mono_get_method_from_token): Abstract methods can also
9173 be generic and thus have type parameters.
9175 * metadata-internals.h
9176 (MonoDynamicImage): Added `GPtrArray *gen_params'.
9178 * reflection.c (mono_image_get_generic_param_info): Don't create a
9179 metadata row, just add an entry to the `gen_params' array.
9180 (build_compressed_metadata): Sort the `gen_params' array and then
9181 actually create the metadata.
9183 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9185 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
9187 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
9189 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
9191 2004-08-24 Martin Baulig <martin@ximian.com>
9193 * class.cs (mono_class_is_subclass_of): Like an interface, a
9194 generic instance also derives from System.Object.
9196 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
9198 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
9199 custom modifiers to be in any order. Fixes #61990.
9201 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
9203 * object.c: Register mono_object_new_fast icall.
9205 * object.c (mono_class_get_allocation_ftn): Return to calling
9206 mono_object_new_fast, since it seems faster to compute the object
9207 size in unmanaged code than passing it as a parameter.
9209 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
9211 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
9212 this function with Boehm as the oom handler, so we don't have to check
9213 the result of GC_malloc.
9215 * object.c: Remove checks for oom.
9217 * object.h object.c (mono_class_get_allocation_ftn): New function to
9218 return the icall which can be used to allocate an instance of a given
9221 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
9223 * class-internals.h: Add 'enabled' field.
9225 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
9227 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
9229 2004-08-18 Jambunathan K <kjambunathan@novell.com>
9230 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
9233 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
9235 * appdomain.c: use the Tls function for appdomain too,
9236 at Zoltan's request. Actually return in mono_context_get
9238 * appdomain.c, profiler.c, threads.c: use __thread
9240 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
9242 * appdomain.c threads.c: Call GC_CreateThread on windows.
9244 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
9245 multiple libraries since this don't work on windows.
9247 2004-08-18 Martin Baulig <martin@ximian.com>
9250 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
9253 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
9254 MonoMethodNormal since we also need it for abstract and interface
9258 (build_compressed_metadata): Sort the GenericParam table.
9259 (mono_image_create_token): Added `gboolean create_methodspec'
9260 argument; this is false when generating a MethodImpl token.
9261 (reflection_methodbuilder_to_mono_method): Abstract and interface
9262 methods may also have generic parameters.
9264 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
9266 * appdomain.c: thread local alloc
9268 2004-08-17 Martin Baulig <martin@ximian.com>
9270 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
9273 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
9276 * class.c (mono_type_get_full_name): New public function.
9277 (mono_type_get_name): Don't include the type arguments.
9279 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
9281 * Makefile.am: Build static versions of libmetadata and libmonoruntime
9282 for inclusion into the mono executable.
9284 2004-08-16 Martin Baulig <martin@ximian.com>
9286 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
9287 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
9289 2004-08-14 Martin Baulig <martin@ximian.com>
9291 * class.c (dup_type): Also copy the `byref' field.
9293 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
9295 * reflection.c (create_dynamic_mono_image): Revert the last change
9296 since it breaks bootstrap.
9298 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
9300 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
9302 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
9303 not free them with g_free.
9305 2004-08-11 Martin Baulig <martin@ximian.com>
9307 * reflection.c (mono_reflection_setup_internal_class): Also call
9308 mono_class_setup_mono_type() if we already have a `tb->type.type'.
9310 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
9312 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
9313 called during default (first) AppDomain creation. Keep track of
9314 Evidence when loading assemblies.
9316 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9318 * opcodes.c, opcodes.h: reduce runtime relocations.
9320 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
9322 * culture-info.h, locales.c: fixes and chages to sue the new
9323 optimized format of the locale data.
9324 * culture-info-tables.h: regenerated.
9326 2004-08-06 Geoff Norton <gnorton@customerdna.com>
9328 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
9330 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
9332 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
9333 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
9334 * domain-internals.h: icall declaration.
9335 * icall.c: icall registration.
9336 * object-internals.h: New fields in MonoAssembly for CAS.
9338 2004-08-05 Duncan Mak <duncan@ximian.com>
9340 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
9343 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9345 * reflection.c: fix to deal with object[] arrays in custom ctors
9348 2004-08-05 Martin Baulig <martin@ximian.com>
9350 * class.c (mono_class_array_element_size): Added support for
9351 generic instances and correctly handle "recursive" types.
9353 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
9355 * assembly.c: Fix warnings.
9357 2004-08-04 Martin Baulig <martin@ximian.com>
9360 (mono_type_get_name_recurse): Added `gboolean include_arity'
9361 argument specifying whether or not we should include the generic
9362 arity in the type name.
9363 (_mono_type_get_name): New static function.
9364 (mono_class_setup_vtable): If we're a generic instance, don't
9365 include the generic arity in the names of explicit method
9368 2004-08-03 Martin Baulig <martin@ximian.com>
9370 * class.c (mono_type_get_name_recurse): Enclose the generic type
9371 arguments in `<', '>'.
9373 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9375 * gc.c: make GC warning messages use the trace API, they are just
9376 noise to most of the users.
9378 2004-08-03 Martin Baulig <martin@ximian.com>
9380 * debug-mono-symfile.c (read_string): Correctly read the string.
9382 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
9384 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
9386 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
9388 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
9390 2004-07-30 Martin Baulig <martin@ximian.com>
9392 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
9393 Reflect latest symbol writer changes.
9395 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
9397 * object.c: always create an object if null is passed
9398 to Invoke() where a valuetype is expected.
9400 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
9402 * marshal.c (mono_marshal_init): make managed
9403 signatures match native ones better for 64bits.
9405 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9407 * appdomain.c: hack to build correctly the private bin path on windows.
9410 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
9412 * assembly.c: Load mscorlib from the correct framework directory
9413 (mono/<version>/mscorlib.dll).
9414 * appdomain.h: Added prototypes for new functions.
9415 * internals.h: Added some prototypes.
9416 * domain.c: When initializing the runtime, get from the executable and
9417 the configuration files the runtime version that the app supports.
9418 Added support methods for reading app.exe.config. Added list of versions
9419 supported by the JIT. Added two new methods: mono_init_from_assembly,
9420 which initializes the runtime and determines the required version from
9421 the provided exe file, and mono_init_version, which initializes
9422 the runtime using the provided version.
9423 * icall.c: Get machine.config from version-specific directory.
9424 * reflection.c: When generating an image, embed the version number
9425 of the current runtime.
9427 2004-07-28 Dick Porter <dick@ximian.com>
9430 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
9431 returned sockaddr size before creating the remote address object.
9432 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
9435 2004-07-28 Dick Porter <dick@ximian.com>
9437 * locales.c (string_invariant_compare_char): Fix invariant char
9438 compares between upper and lower cases. Fixes bug 61458.
9440 2004-07-27 Ben Maurer <bmaurer@ximain.com>
9442 * marshal.c: actually cache stelem.ref wrappers.
9444 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9446 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
9447 sections and remove the mono_cli_rva_map () function.
9449 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9451 * debug-mono-symfile.c: fix one more endianess issue, from a patch
9452 by Geoff Norton (<gnorton@customerdna.com>).
9454 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9456 * class.c: fix class loads for pointer types (typeof(int) !=
9459 2004-07-27 Martin Baulig <martin@ximian.com>
9461 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
9462 reading the debugging information from an external ".mdb" file.
9464 2004-07-24 Martin Baulig <martin@ximian.com>
9466 * reflection.c (mono_image_get_type_info): Only write a class
9467 layout entry if we actually have a size or a packing size.
9469 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
9471 * reflection.c (type_get_fully_qualified_name):
9472 insert cast to get type checking of ?: with non-gcc compilers
9474 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
9476 * rand.c: use g_getenv for both lookups of
9479 2004-07-17 Martin Baulig <martin@ximian.com>
9481 * reflection.c (mono_reflection_bind_generic_method_parameters):
9482 Set `gmethod->reflection_info'.
9484 2004-07-17 Martin Baulig <martin@ximian.com>
9486 * class.c (mono_class_create_from_typedef): Insert the newly
9487 created class into the hash table before computing the interfaces
9488 since we could be called recursively.
9490 2004-07-16 Ben Maurer <bmaurer@ximain.com>
9492 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
9493 function to implement stelem.ref in managed code
9494 * class-internals.h, debug-helpers.c: a new wrapper type
9497 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
9499 * gc.c: allow GC handles to work even when no GC is compiled in.
9500 Fix part of bug #61134 (GetAddrOfPinnedObject).
9502 2004-07-13 Peter Williams <peter@newton.cx>
9504 * process.c (complete_path): Make sure we don't attempt to execute
9507 2004-07-12 Geoff Norton <gnorton@customerdna.com>
9509 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
9510 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
9511 and will add/subtract the hour if needed
9513 2004-07-12 Martin Baulig <martin@ximian.com>
9515 * reflection.c (mono_field_get_object): If we have
9516 `field->generic_info', take the attributes from
9517 `field->generic_info->generic_type'.
9519 2004-07-12 Martin Baulig <martin@ximian.com>
9521 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
9522 This function must be called before initializing the runtime.
9523 (mono_debug_init_1): New function; call this after initializing
9524 the runtime, but before loading the assembly. It tells the
9525 debugger to load corlib and the builtin types.
9527 * mono-debug-debugger.c: Did some larger changes in the debugging
9528 code; support recursive class declarations, make sure we actually
9531 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9533 * debug-helpers.c: undo my previous patch and fixed the real issue in
9534 ../mini/exceptions-x86.c
9536 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9538 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
9539 when no HOME env. variable was set and a NullRef was thrown in a .cctor
9540 called from other .cctors.
9542 2004-07-09 Miguel de Icaza <miguel@ximian.com>
9544 * loader.c: Removed the mono_loader_wine_init hack now that we are
9545 doing a managed version of Windows.Forms.
9547 2004-07-09 Ben Maurer <bmaurer@ximian.com>
9549 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
9550 threadpool.c, threads.c: remove static data from rootset.
9552 2004-07-09 Dick Porter <dick@ximian.com>
9554 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
9555 Don't do any more processing if the matched length was 0. It was
9556 increasing the size of the string before. Fixes bug 61167.
9558 2004-07-09 Dick Porter <dick@ximian.com>
9562 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9563 Add support for SO_PEERCRED if its available.
9565 2004-07-09 Peter Bartok <pbartok@novell.com>
9566 * loader.c: winelib.exe.so error message is now only displayed if
9567 MONO_DEBUG is set. To help us avoid questions when people are trying
9568 out the new Managed.Windows.Forms.
9570 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
9572 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
9573 for isinst and castclass wrappers.
9575 * class-internals.h icall.c: Move registration and lookup of JIT icalls
9576 to libmetadata from the JIT, so they could be used by the marshalling
9577 code and the interpreter.
9579 * marshal.c: Register marshalling related JIT icalls here instead of
9580 in mini.c. Use CEE_MONO_ICALL instead of the family of
9581 CEE_MONO_PROC<x> opcodes to call marshalling functions.
9583 * metadata.h: Remove unneeded marshalling conversions.
9585 * opcodes.c: Update for new opcodes.
9587 2004-07-08 Martin Baulig <martin@ximian.com>
9589 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
9590 (mono_debug_get_domain_data): Make this function static.
9592 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9594 * gc.c, object.h: add nice GC handle API for embedders.
9596 2004-07-06 Ben Maurer <bmaurer@ximian.com>
9598 * reflection.c: more changes for the new api
9600 * object.c: When we reflect on a field w/ a constant value, it
9601 will not have a memory location, so we must access metadata. Also,
9602 allow easier reading of strings so that we can read them from
9605 * class.c (mono_class_layout_fields): no need for literal fields here.
9607 * class-internals.h: api changes for const fields
9609 * icall.c (ves_icall_get_enum_info): use new apis for const fields
9611 2004-07-06 Martin Baulig <martin@ximian.com>
9613 * mono-debug.h: Increment version number to 44.
9615 * mono-debug.c (mono_debug_add_wrapper): The second argument is
9616 now a gpointer, rewrote this whole method.
9618 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
9619 function. Add information about the wrapper in a new "misc table".
9621 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
9622 for the new misc table.
9624 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
9626 * metadata-internals.h image.c: Add a cache for helper signatures.
9628 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
9630 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
9632 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
9633 delegates from a delegate. Fixes #61033.
9635 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
9636 marshalling of stringbuilder arrays. Fixes #59900.
9638 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
9640 * icall.c: Add EnumBuilder:setup_enum_type icall.
9642 2004-06-30 Ben Maurer <bmaurer@ximian.com>
9644 * icall.c: Added a new icall for the property version of
9647 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
9649 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
9650 it has a constant size across platforms.
9652 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
9655 2004-06-29 Martin Baulig <martin@ximian.com>
9657 * mono-debug.c (mono_debug_add_method): Protect the whole function
9658 in mono_debugger_lock(), not just parts of it.
9660 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9662 * reflection.c: make sure padding bytes in heaps are zeroed.
9664 2004-06-24 David Waite <mass@akuma.org>
9666 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
9667 image.c, loader.c, locales.c, marshal.c, metadata.c,
9668 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
9669 string-icalls.c, threads.c: change to C90-style comments from C99 /
9672 2004-06-24 Dick Porter <dick@ximian.com>
9675 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
9676 return createdNew. Fixes bug 60412.
9679 * icall.c: Add createdNew parameter to CreateMutex icall
9681 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9683 * reflection.c, object-internals.h: save default value in params.
9685 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9687 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
9688 no need to build a new path combining that with the application base.
9691 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
9693 * reflection.c: fixed minor standard compliance issues.
9695 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9697 * reflection.c: fixed issue with encoding some custom attributes
9698 (arrays in properties and fields, bug #60411).
9700 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9702 * reflection.c: fix start address when copying the public key token.
9704 2004-06-23 Martin Baulig <martin@ximian.com>
9706 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
9707 the `exc' object in a static object to put it into the GC's root set.
9709 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
9711 * reflection.c: make mono_reflection_setup_internal_class ()
9712 callable a second time to setup a new parent class.
9714 2004-06-23 Dick Porter <dick@ximian.com>
9716 * threads.c: Check for WAIT_IO_COMPLETION return values.
9718 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
9720 * appdomain.c: Removed the g_free on the public key token. Now copy
9721 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
9722 * assembly.c: Added public key token string value when loading
9723 assemblies. Fix bug #60439.
9724 * icall.c: Added missing informations (like public key) in
9725 GetReferencedAssemblies. Fix #60519.
9726 * image.h: Changed definition for public key token from const char*
9727 public_tok_value to guchar public_key_token [17];
9728 * reflection.c: Updated for changes to public key token.
9730 2004-06-22 Lluis Sanchez Gual
9732 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
9733 for the field in base classes.
9735 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9737 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
9738 mark headers as not supported, they are installed only for use by the
9741 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
9743 * *.c, *.h: avoid namespace pollution in public headers.
9745 2004-06-21 Martin Baulig <martin@ximian.com>
9747 * exception.c (mono_get_exception_security): It's in
9748 "System.Security", not in "System".
9750 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
9751 the exception classes.
9753 2004-06-21 Martin Baulig <martin@ximian.com>
9755 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
9756 Protect the exception object from being finalized.
9758 2004-06-21 Martin Baulig <martin@ximian.com>
9760 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
9763 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
9765 * reflection.c: Load the assembly in mono_reflection_type_from_name,
9766 if it was not loaded before. Fix parts of #60439.
9768 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
9770 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
9771 code that was broken since Ben's change: wrappers are now
9772 dependent on the method signature only again.
9774 2004-06-21 Martin Baulig <martin@ximian.com>
9776 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
9777 added interface support.
9779 2004-06-21 Martin Baulig <martin@ximian.com>
9781 * class.c (mono_vtable_get_static_field_data): New public method.
9783 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
9785 * filewatcher.c : Windows build fix to be compliant with API changes.
9787 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9789 * class.h, class.c: more accessors.
9790 * metadata.h, metadata.c: prepare for hiding MonoType and
9791 MonoMethodSignature: people should use the accessors from now on
9792 outside of the tree.
9794 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9796 * *.c, *.h: more API cleanups.
9798 2004-06-18 Jackson Harper <jackson@ximian.com>
9800 * assembly.c: Trace loading assemblies.
9801 * loader.c: Trace loading native libraries.
9802 * mono-config.c: Trace loading config files.
9804 2004-06-18 Dick Porter <dick@ximian.com>
9806 * locales.c: Tell ICU the lengths of strings, it can cope with
9807 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
9809 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9811 * image.c: swapped name/filename;
9813 2004-06-18 Martin Baulig <martin@ximian.com>
9815 * mono-debug-debugger.c (write_class): Write the parent class at
9816 the end of the header.
9818 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9820 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
9822 2004-06-17 Raja R Harinath <rharinath@novell.com>
9824 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
9825 (bundle_obj): New conditional define.
9826 (BUILT_SOURCES): Remove.
9827 ($(bundle_srcs)): Make parallel-make safe.
9828 (libmonoruntime_la_LIBADD): Make unconditional.
9829 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
9830 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
9832 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
9834 * culture-info-tables.h: It was inconsistent with the latest
9837 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
9839 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
9842 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
9845 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9847 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
9848 cleaned up public header threads.h.
9850 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9852 * Makefile.am, *.c, *.h: more API cleanups.
9854 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9856 * Makefile.am: removed monosn from compilation.
9857 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
9858 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
9859 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
9860 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
9861 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
9862 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
9864 2004-06-15 Jackson Harper <jackson@ximian.com>
9866 * assembly.c: Make locales lower case when searching the GAC for
9867 assemblies. gacutil will always make locales lowercase when
9868 installing so this effectively makes them case insensitive.
9870 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
9872 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
9873 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
9874 parameter which allows to choose whether the wait can be interrupted or
9875 not. Also added the method mono_monitor_enter(), which locks the monitor
9876 using an infinite wait and without allowing interruption.
9877 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
9879 * object.h: Added new fields in MonoThread. suspend_event holds the event
9880 used to susped/resume the thread. synch_lock is the lock object to use for
9881 modifying the thread state.
9882 * threads.c: Use the new synch_lock object for locking, instead of "this",
9883 which can generate deadlocks.
9884 Moved thread state change in Thread.Sleep and Thread.Join from managed
9885 to unmanaged code. This avoids a deadlock when the thread was suspended
9886 just after acquiring the thread lock.
9887 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
9888 Implemented Thread.Suspend using an event instead of ThreadSuspend,
9889 which is not fully implemented in the io-layer.
9890 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
9892 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
9894 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
9895 threads-types.h: more API cleanups.
9897 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9899 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
9900 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
9901 threadpool.c, threads.c: first pass at the exported API cleanup.
9903 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9905 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
9907 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9909 * icall.c: added internalGetHome.
9911 2004-06-14 Dick Porter <dick@ximian.com>
9913 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
9914 possible to return successfully when '.' or '..' were the only
9915 entries in a directory, but were skipped. The MonoIOStat was not
9916 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
9919 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9921 * reflection.c: make binaries run on .Net 1.1 by default.
9923 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9925 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
9927 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
9929 * marshal.c: keep track of struct size with explicit layout
9932 2004-06-12 Martin Baulig <martin@ximian.com>
9934 * mono-debug-debugger.c: Comment out a debugging g_message().
9936 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9938 * reflection.c, reflection.h: do not free custom attrs that are cached.
9939 * icall.c: use braces to make code clearer.
9941 2004-06-11 Martin Baulig <martin@ximian.com>
9943 * class.h (MonoInflatedField): New type.
9944 (MonoClassField): Replaced `MonoType *generic_type' with
9945 `MonoInflatedField *generic_info'.
9948 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9950 2004-06-11 Martin Baulig <martin@ximian.com>
9952 * reflection.c (mono_image_create_method_token): Correctly encode
9955 2004-06-11 Martin Baulig <martin@ximian.com>
9957 * metadata.c (mono_metadata_parse_method_signature): When parsing
9958 a MethodDef which has VarArgs, also set sentinelpos if we don't
9959 have any parameters.
9961 2004-06-11 Martin Baulig <martin@ximian.com>
9963 * verify.c (mono_method_verify): In CEE_CALL, use
9964 mono_method_get_signature() to get the method's signature, unless
9965 we're a PInvoke method.
9967 2004-06-10 Jackson Harper <jackson@ximian.com>
9969 * assembly.c: Use <path>/lib/mono/gac for the extra paths
9970 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9971 logical name as the supplied path is just a prefix to the gac not
9972 the direct path to it.
9974 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9976 * reflection.c: make the token for a created method match
9977 the token of the MethodBuilder it was created from
9978 (IKVM requires this behaviour now).
9980 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9982 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9983 reflection.c, socket-io.c: leak fixes.
9985 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9987 * icall.c: handle sentinel pos in vararg methods in position different
9990 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9992 * culture-info-tables.h: freshly generated.
9994 2004-06-09 Martin Baulig <martin@ximian.com>
9996 * loader.c (mono_get_method_constrained): Call `mono_class_init
9997 (constrained_class)'.
9999 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
10001 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
10002 any methods. Fixes #59629.
10004 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
10006 * culture-info-tables.h: reflecting locale-builder updates.
10008 2004-06-08 Dick Porter <dick@ximian.com>
10011 * locales.c: Fixed compile warnings, including a real bug in
10012 CompareInfo_internal_compare.
10014 2004-06-08 Dick Porter <dick@ximian.com>
10017 (ves_icall_System_Globalization_CompareInfo_internal_index):
10018 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10019 Double-check the resuls of usearches, because ICU currently
10020 ignores most of the collator settings here. Fixes bug 59720.
10022 2004-06-08 Dick Porter <dick@ximian.com>
10025 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10026 Fix memory leak and segfault-causing typo. No idea how this one
10027 lasted so long without being noticed.
10029 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
10031 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
10032 any methods. Fixes #59629.
10034 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10037 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
10038 own the critical section before). Removed dead code (that's done
10039 in the preload hook).
10041 (mono_assembly_load_with_partial_name): call the preload hook.
10043 2004-06-08 Martin Baulig <martin@ximian.com>
10045 * metadata.c (mono_metadata_signature_alloc): Default
10046 `sentinelpos' to -1.
10048 * reflection.c (mono_image_get_array_token): Likewise.
10050 2004-06-08 Martin Baulig <martin@ximian.com>
10052 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
10054 * metadata.c (mono_metadata_parse_method_signature): When parsing
10055 a MethodDef which has VarArgs, set sentinelpos.
10057 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
10058 `gint16' since we're using -1 for non-varargs methods.
10061 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
10062 (method_encode_signature): Added varargs support.
10063 (method_builder_encode_signature): Likewise.
10064 (mono_image_get_varargs_method_token): New static method.
10065 (mono_image_create_method_token): New public method; this is
10066 called via an icall instead of mono_image_create_token() when
10067 calling a varargs method.
10069 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
10071 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
10073 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
10075 * culture-info-tables.h : Reflecting the latest locale-builder that
10076 fixed empty array representation ({} to {0}).
10078 2004-06-07 Jackson Harper <jackson@ximian.com>
10080 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
10081 looking up extra gac paths. This allows MONO_GAC_PATH to act
10082 exactly like a prefix.
10084 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
10086 * reflection.c (mono_reflection_type_from_name): Make a copy of the
10087 type name before modifying it. Fixes #59405.
10089 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
10091 * culture-info.h: added fields for "all datetime patterns".
10092 * locales.c: ( ves_icall_System_Globalization_CultureInfo
10093 _construct_datetime_format ()): fill xxx_patterns fields.
10094 * object.h: added fields for "all datetime patterns" to
10095 MonoDateTimeFormatInfo.
10096 * culture-info-tables.h: reflecting locale-builder updates.
10098 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
10100 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
10101 the event has no add and remove methods. Fixes #59629.
10103 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
10105 * object.c: Fixed possible integer overflow when allocating large
10108 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
10110 * culture-info-tables.h: reflecting locale-builder updates.
10112 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
10114 * culture-info-tables.h: reflecting locale-builder updates.
10116 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
10118 * culture-info-tables.h: reflecting locale-builder updates.
10120 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
10122 * threads.c: Made Thread.Sleep abortable.
10124 2004-06-02 Martin Baulig <martin@ximian.com>
10126 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
10128 * debug-mono-symfile.h: Bumped symbol file version number to 37.
10130 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
10132 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
10134 2004-05-30 Jackson Harper <jackson@ximian.com>
10136 * reflection.c: Do not hardcode assembly versions or public key
10137 tokens anymore. All of this except the corlib section was dead
10140 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
10142 * object.c (mono_runtime_invoke_array): Automatically create boxed
10143 objects for byref valuetypes if needed. Fixes #59300.
10145 * object.c (mono_method_return_message_restore): Handle
10146 MONO_TYPE_OBJECT as well.
10148 2004-05-28 Jackson Harper <jackson@ximian.com>
10150 * reflection.c: The modified type encoding was causing build
10151 problems. Reverted for now.
10153 2004-05-28 Jackson Harper <jackson@ximian.com>
10155 * reflection.c/h: Take an assembly ref so that we dont create
10156 fully qualified names when encoding types in the same assembly as
10157 the custom attribute being emitted.
10158 * appdomain.c: Increment version number.
10160 2004-05-26 Duncan Mak <duncan@ximian.com>
10163 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
10164 Set the full version number (major, minor, build, revision).
10166 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
10168 * marshal.c (emit_struct_conv): increment src/dst after blit
10169 (mono_marshal_get_managed_wrapper,
10170 mono_marshal_get_native_wrapper): make sure we have marshalling
10171 info before marshalling params (info computation affects
10174 * class.c (class_compute_field_layout): correctly deal with
10176 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
10177 value types (as per what windows dows by default)
10178 (mono_class_setup_mono_type): System.ValueType is blittable
10179 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
10182 * marshal.c (mono_marshal_load_type_info): flag types as
10183 non-blittable if the native layout doesn't match the managed
10186 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10188 * appdomain.c: don't add stuff in the private search path that is
10189 above the application base. If application base is not set, there's
10190 no private search path.
10192 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
10194 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
10195 byref struct arguments in native->managed marshalling.
10197 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
10199 * marshal.c (mono_marshal_get_runtime_invoke): correctly
10200 cache methods using signature (special case for methods
10201 that are value type or string class)
10203 * image.c (mono_image_close): clean up allocated GSList's
10204 in runtime_invoke_cache.
10206 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10208 * mono-config.c: set the correct path for mono_cfg_dir on windows when
10209 there's no MONO_CFG_DIR environment variable defined.
10211 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10213 * threads.c: windows version must be >= 0x0500 to include OpenThread.
10215 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
10217 * threadpool.c: Really wait for 500ms after the async call, even if the wait
10219 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
10220 before waiting for it, and call CloseHandle after the wait to unref it.
10221 This will make sure that handles are not disposed too early.
10223 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10228 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
10231 * object.c: se the application_base only for the domain that runs
10232 Main. Fixes bug #59216,
10234 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10237 * object.c: only the domain in which Main is run have
10238 SetupInformation.ConfigurationFile set, so moved a few lines from
10239 appdomain.c to object.c.
10241 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10243 * appdomain.c: we tried to load [name].(dll|exe), but according
10244 to bug #57710, we must also try [culture]/[name].(dll|exe) and
10245 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
10246 There's a test case attached to bug #58922.
10248 2004-05-27 Dick Porter <dick@ximian.com>
10251 * file-io.c: Implemented icalls for locking and unlocking regions
10253 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
10254 FALSE on error (fixes both compiler warning and real bug.)
10256 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
10258 * culture-info-tables.h: reflecting locale-builder updates.
10260 (Added missing ChangeLog entry for 05/26)
10262 2004-05-27 Jackson Harper <jackson@ximian.com>
10264 * locales.c: Fix some cut and paste errors.
10266 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10268 * mono-config.c: set the correct path for config. directory on windows.
10270 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
10272 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
10275 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
10277 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
10278 from pinvoke functions.
10280 * marshal.c (mono_ftnptr_to_delegate): Implement this.
10282 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
10284 * culture-info-tables.h: reflecting locale-builder updates.
10286 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
10288 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
10291 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
10293 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
10294 * icall.c: Modified icalls for RNG.
10295 * rand.c|h: Changed RNG interface to allow thread-safe usage under
10296 Windows (CryptoAPI).
10298 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
10300 * locales.c: Fix build.
10302 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
10304 * culture-info-tables.h: reflecting locale-builder updates.
10306 2004-05-25 Jackson Harper <jackson@ximian.com>
10308 * locales.c: When creating the current culture use the $LANGs
10309 specific culture. So DateTimeFormat and NumberFormat entries are created.
10311 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
10313 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
10314 a char array as parameter.
10316 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
10318 * image.c: In mono_image_open(), always use an absolute path name to
10319 look for already loaded images.
10321 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
10323 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
10324 missing in the windows build (like older cygwin include files).
10326 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
10328 * icall.c: Fixed check for possible integer overflow in Buffer_
10329 BlockCopy icall. Replaced comments style // by /* */.
10331 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
10333 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
10335 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
10336 check after MONO_VTADDR. Fixes pinvoke2.exe.
10338 * marshal.h marshal.c metadata.h: Add beginnings of support for
10339 ftnptr -> delegate marshalling.
10341 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
10343 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
10344 * threads.c: Fix warnings.
10346 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
10348 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
10349 * icall.c: Registered icalls for Suspend and Resume.
10350 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
10352 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
10353 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
10354 * process.c: Use WaitForSingleObjectEx.
10355 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
10357 * threads.c, threads.h: Make use of new Ex wait methods. Improved
10358 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
10359 for Suspend and Resume. Added new mono_thread_stop, used for stoping
10360 background threads. Added basic support for Abort in Windows.
10361 Start new threads using a managed delegate invoke wrapper. This wrapper
10362 has an interruption checkpoint that is needed since an interruption
10363 can be requested before the thread leaves the unmanaged code that starts
10365 * marshal.c: Added interruption checkpoint after every native call, and
10366 also before managed calls for wrappers called from unmanaged code to
10367 go into managed code.
10368 * object.h: Added new field in MonoThread to keep track of interruption
10371 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
10373 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
10376 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10383 * rand.c: getenv -> g_getenv (windows!)
10385 * process.c: complete_path is also used on non-windows platforms.
10387 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10389 * icall.c: new signature for Process_Start.
10391 * process.[ch]: new signature for Process_Start. If we're on windows
10392 and UseShellExecute is false, we have to search for the program by
10393 ourselves if we don't get a full path.
10395 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
10397 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
10398 marshalling and call CleanUpNativeData if needed. Fixes #58646.
10400 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10402 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
10405 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10407 * process.c: use double quotes to quote program name and arguments on
10408 windows. Fixes bug #58575.
10410 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10412 * file-io.c: don't return "." and ".." when using windows Find*File.
10414 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
10416 * marshal.c: Don't pass wrappers to message init because method
10417 addressed used to lookup metadata. part of remoting[2|3] fix.
10419 2004-05-15 Jackson Harper <jackson@ximian.com>
10421 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
10422 path is essentially the same as MONO_PATH except that it points to
10423 GACs instead of lib directories.
10424 * loader.h: The user gac is gone so we dont need function to
10426 * mono-config.c: user gac option is now gone.
10428 2004-05-15 Jackson Harper <jackson@ximian.com>
10430 * culture-info.h: Make defines more consistent, add calendar data
10431 to the culture info table.
10432 * culture-info-tables.h: Add basic calendar data. Basically
10433 everyone gets default gregorian until all the data is
10435 * locales.c: Use the new consistent defines. Set calendar data for
10436 culture info objects.
10437 * object.h: add a field for calendar data to CultureInfo
10439 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
10441 * image.c: image->runtime_invoke_cache is keyed on signatures now.
10442 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
10444 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
10445 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
10446 an extra param that is the pointer of the method to invoke. The IL for
10447 the invoke method is no longer specific to the method, but to the
10448 signature of the method. Thus, we can share the same code for multiple
10449 methods. This reduces the number of methods that have to be compiled.
10451 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
10453 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
10455 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10457 * icall.c: Optimize Buffer.BlockCopy.
10459 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10461 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
10462 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
10463 quote). Changed them to "MMMM yyyy".
10465 2004-05-12 Miguel de Icaza <miguel@ximian.com>
10468 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
10470 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
10472 * reflection.h: Updated after changes to managed structures.
10474 * appdomain.c: Bump corlib version.
10476 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10478 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
10481 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10483 * Makefile.am: link to ../os/libmonoos.la on windows.
10486 -If MONO_DEBUG, warn about non-existing directories in
10488 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
10489 compile time variable.
10490 -Removed init_default_path and call mono_set_rootdir from
10491 libmonoos.a instead (windows only).
10493 * assembly.h: declare mono_assembly_getrootdir().
10496 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
10498 * loader.c: s/getenv/g_getenv/
10500 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
10502 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
10504 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
10506 * metadata.h: Add new marshalling conversions.
10508 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
10511 * reflection.c (mono_reflection_get_type): Lookup the type in all
10512 modules of a multi-module assembly. Fixes #58291.
10514 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
10516 * threads.c: Before aborting a background, set the StopRequested
10517 state. This avoids throwing the Abort exception.
10518 In mono_thread_manage, don't continue with the shutdown until all
10519 aborted threads have actually stopped.
10521 2004-05-10 Jackson Harper <jackson@ximian.com>
10523 * locales.c: Remove the modifier from culture names.
10525 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10527 * Makefile.am: monosn is not installed any more. It has been deprecated
10530 2004-05-07 Jackson Harper <jackson@ximian.com>
10533 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
10534 Fix array construction, add bailout if the length is 0.
10536 2004-05-07 Dick Porter <dick@ximian.com>
10538 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
10539 machine doesn't have a DNS entry. Patch by Urs Muff
10540 (umuff@quark.com), fixes bug 57928.
10542 2004-05-06 Jackson Harper <jackson@ximian.com>
10544 * reflection.c: Handle null PublicTokens properly. alloc mem for
10545 assembly names culture so we dont crash when freeing it.
10547 2004-05-06 Jackson Harper <jackson@ximian.com>
10549 * assembly.c: Check the usergac when loading with partial names.
10551 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
10553 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
10554 does nothing for now (not required for Linux/Windows) but the class
10555 library can call it (and a newer or modified runtime could need it).
10556 * icall.c: Registred icall.
10558 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10560 * loader.c: prints a message on module loading error we set MONO_DEBUG
10561 environment variable.
10563 2004-05-05 Jackson Harper <jackson@ximian.com>
10565 * appdomain.c: Handle PublicKeyToken=null properly.
10567 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
10569 * environment.c|h: Added icall ves_icall_System_Environment_
10570 GetOSVersionString to get the current OS version as a string.
10571 * icall.c: Registred icall.
10573 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
10575 * object.c: in mono_object_get_virtual_method(), take into account that
10576 non-virtual methods don't have a slot in the vtable. Check needed when
10577 the object is a proxy.
10579 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
10581 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
10582 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
10584 * object.c (mono_class_compute_gc_descriptor): Fix warning.
10586 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
10587 passed when a valuetype is expected.
10589 * object.c (mono_unhandled_exception): Only set the exit code if the
10590 exception happens in the main thread. Fixes thread5.exe.
10592 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
10593 invalid names. Fixes #58047.
10595 2004-05-03 Jackson Harper <jackson@ximian.com>
10597 * assembly.c: This line was committed accidently and is unneeded.
10599 2004-05-03 Jackson Harper <jackson@ximian.com>
10601 * icall.c: Add new icall for Assembly::LoadWithPartialName
10602 * assembly.c/.h: new function that probes the GAC to load partial
10603 assembly names by Paolo Molaro.
10605 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10607 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
10608 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
10609 (type_get_fully_qualified_name): Added PublicKeyToken when building a
10612 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10614 * appdomain.c: fixed check for 'neutral' culture and removed warning.
10615 * reflection.c: fix bug when parsing a full type name and Version is not
10616 the last thing in the string.
10618 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
10620 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
10621 crashes when it is freed.
10623 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10625 * assembly.c: print the compat warning to stderr.
10627 2004-05-01 Miguel de Icaza <miguel@ximian.com>
10629 * assembly.c (mono_assembly_load_references): Add a compatibility
10630 hack to run old applications that might be still referencing the
10631 3300-based assemblies, only do this for System.xxx.
10633 2004-05-01 Jackson Harper <jackson@ximian.com>
10635 * appdomain.c: If the culture is neutral we set it to "".
10637 2004-04-29 Jackson Harper <jackson@ximian.com>
10639 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
10641 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
10643 * string-icalls.c: added low overhead function for copying chars
10644 * icall.c: added needed icall for the above function
10646 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10648 * icall.c: fix return value of get_global_assembly_cache. Implemented
10649 Environment.GetLogicalDrives.
10651 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
10653 * rand.c: try and talk to egd or prngd
10654 for random bytes if opening devices fail.
10656 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
10658 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
10659 alignment for the type using the native alignment of its members
10660 instead of using klass->min_align.
10662 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
10664 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10667 * socket-io.c: added check for sys/aio.h.
10669 2004-04-28 Dick Porter <dick@ximian.com>
10671 * threads.c: Don't abort a thread thats already aborting, when
10672 terminating everything.
10674 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10676 * icall.c: added 2 new async calls for Socket.
10678 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
10679 IO on *nix systems.
10681 * threadpool.c: removed unused variable.
10683 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
10685 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
10687 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10689 * locales.c: put back string_invariant_tolower () and
10690 string_invariant_toupper ().
10692 2004-04-26 David Waite <mass@akuma.org>
10697 * unicode.h: remove comma from end of enumeration declarations
10699 2004-04-26 David Waite <mass@akuma.org>
10701 * debug-mono-symfile.h:
10704 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
10707 2004-04-26 Jackson Harper <jackson@ximian.com>
10709 * appdomain.c: Increment version number.
10711 2004-04-26 Jackson Harper <jackson@ximian.com>
10713 * appdomain.c: Set assembly references public token value when
10714 PublicKeyToken is specified, not the hash_value. Free public token
10715 values when free assembly name data. Previously the public key
10716 token was hex decoded, however we are using hex encoded public key
10717 tokens, so this is not neccasary.
10718 * assembly.c: Lookup assemblies in the gac if their public token
10719 value is set. Add function to allow enabling user gac
10720 lookups. Specify whether or not the assembly was loaded from the
10721 GAC. Compare full assembly names when checking the cache for
10722 assemblies (Temporarily disabled see comment in code). Remove
10723 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
10724 specifies trace-loader they get extra info to stdout on the
10725 loading of assemblies.
10726 * image.h: Add a field for an assembly references public token
10727 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
10728 whether an assembly has been loaded from the GAC.
10729 * image.c: Remove a corlib -> mscorlib name mapping.
10730 * loader.h: Add function to enable/disable the user gac.
10731 * mono-config.c: Check if the usergac is enabled in the config
10733 * icall.c: New icall to determine whether or not an assembly has
10734 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
10735 * tabldefs.h: Add constant for assemblyref flag that specifies a
10736 full public key is used instead of a public token.
10737 * reflection.c: Remove mscorlib -> corlib mappings. Set
10738 PublicTokenValue instead of hash value. This value is a hex
10739 string so it does not need to be expanded.
10741 2004-04-26 Martin Baulig <martin@ximian.com>
10743 * mono-debug-debugger.c (mono_debugger_initialize): Set
10744 `mono_debugger_initialized' before calling mono_debug_lock().
10746 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
10748 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
10749 InternalToUpper/InternalToLower.
10750 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
10751 removed invariant culture shortcut. This is now done in managed code.
10752 * locales.c: (string_invariant_toupper/tolower) removed.
10754 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10756 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
10757 Added Poll internal call.
10759 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
10760 call for Poll. Select was too heavy for polling a single socket.
10762 * threadpool.[ch]: added mono_threadpool_cleanup.
10763 * threads.c: use it. Don't use Thread_Abort on windows.
10765 2004-04-23 Martin Baulig <martin@ximian.com>
10767 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
10769 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
10771 * icall.c: Registred new icalls for key pair protection and added an
10772 icall for Environment.GetFolderPath on Windows.
10773 * security.c|h: Added new icalls for key pair protection.
10775 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10777 * socket-io.c: don't display the non-supported family warning for known
10778 families. Now this is not displayed on windows when checking support
10781 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10783 * class.c: don't display the layout warning for static fields.
10785 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
10787 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
10788 * locales.c, locales.h: Added new icalls for culture-specific
10789 Char.ToLower and Char.ToUpper.
10791 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10793 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
10796 2004-04-20 Martin Baulig <martin@ximian.com>
10798 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
10799 of the type name before passing it to mono_reflection_type_from_name().
10801 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
10803 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
10804 encodings here. Fixes #56965.
10806 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
10808 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10809 fix test on strstr result not that I can see anything that
10810 relies on the result.
10812 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
10814 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
10817 * marshal.c (mono_marshal_get_string_encoding): New helper function.
10819 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
10820 function to determine which marshalling to use for strings. Fixes
10823 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
10825 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
10827 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
10829 * icall.c: #include mono-config.h
10831 2004-04-15 Jackson Harper <jackson@ximian.com>
10833 * culture-info-tables.h: Fix date formats for en-US culture.
10835 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
10837 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
10838 ThreadPool.SetMinThreads.
10839 * threadpool.c: Implemented ThreadPool.GetMinThreads and
10840 ThreadPool.SetMinThreads.
10842 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10844 * mono-config.c: also load the .config file in the directory
10845 where the assembly was found.
10847 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10849 * assembly.c: load per-assembly config files.
10850 * icall.c: decrapified code to get the config dir and moved to
10852 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
10853 per-assembly config files. When doing a dll map lookup give precedence
10854 to the per-assembly data.
10856 2004-04-14 Martin Baulig <martin@ximian.com>
10858 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
10859 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
10860 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
10862 * mono-debugger-debugger.c: While the debugger is locked, remember
10863 whether the symbol tables have changes and send one single
10864 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
10866 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
10868 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
10870 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
10873 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
10874 account when marshalling string arrays. Fixes #56965.
10876 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
10878 * icall.c: Add new icalls mapping for security.
10879 * security.c|h: Add internal calls for WindowsIdentity,
10880 WindowsImpersonationContext and WindowsPrincipal.
10882 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
10884 * class.c: Added comment to ensure the System.MonoDummy class
10885 is removed when no longer necessary
10887 2004-04-13 Miguel de Icaza <miguel@ximian.com>
10889 * appdomain.c: Pass arguments to the bootstraping exceptions to
10890 minimize JITed methods at boot
10892 * metadata.c (mono_exception_from_name_two_strings): Allow for the
10893 second string to be null.
10895 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10896 Change the protocol to minimize the JIT methods at startup. Now
10897 it Returns the internal codepage, if the value of "int_code_page"
10898 is 1 at entry, and we can not compute a suitable code page
10899 number, returns the code page as a string.
10901 2004-04-13 Jackson Harper <jackson@ximian.com>
10903 * culture-info-tables.h: Fix number of decimal digits for all
10906 2004-04-13 Jackson Harper <jackson@ximian.com>
10908 * icall.c: Clairfy out of sync error message. It is not always
10909 your corlib that is out of sync.
10911 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
10913 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
10914 properties when only the set accessor is overriden. Fixes #55874.
10916 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
10918 * assembly.c (mono_assembly_load_references): Make this thread safe.
10921 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
10923 * monosn.c: Add missing initialization calls.
10925 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
10928 ves_icall_System_Globalization_CultureInfo_construct_number_format
10929 Fix g_assert so it compiles on fussier compilers re int/ptr
10932 2004-04-08 Dick Porter <dick@ximian.com>
10935 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
10936 53992. Also rearrange the code so that the internal calls return
10937 an error value and exceptions are thrown from managed code.
10939 * icall.c: Add type info to the socket icalls.
10941 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10943 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10946 2004-04-07 Martin Baulig <martin@ximian.com>
10948 * class.c (mono_class_from_generic_parameter): Don't default
10949 `klass->parent' to `mono_defaults.object_type'.
10951 2004-04-07 Martin Baulig <martin@ximian.com>
10953 * reflection.c (mono_reflection_initialize_generic_parameter): Set
10954 `param->pklass->reflection_info'.
10956 2004-04-07 Jackson Harper <jackson@ximian.com>
10958 * culture-info-tables.h: Fix date separator symbol.
10960 2004-04-07 Martin Baulig <martin@ximian.com>
10962 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10963 from System.Type to System.MonoType.
10965 2004-04-07 Martin Baulig <martin@ximian.com>
10968 (MonoReflectionGenericParam): Added `has_reference_type' and
10969 `has_value_type' fields.
10971 * reflection.c (mono_image_get_generic_param_info): Encode the
10972 correct flags if we have the `class' or `struct' constraint.
10974 2004-04-07 Martin Baulig <martin@ximian.com>
10977 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10979 2004-04-07 Jackson Harper <jackson@ximian.com>
10981 * appdomain.c: Revert extra patches, just wanted to bump the
10984 2004-04-07 Jackson Harper <jackson@ximian.com>
10986 * Makefile.am: Add culture-info private headers.
10987 * icall.c: Add new icalls for contructing locales.
10988 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10989 * locales.h: Declare new culture info construction methods.
10990 * object.h: Add new fields used to avoid the CultureMap to
10992 * culture-info.h: Definition of structs used in the culture info
10994 * culture-info-tables.h: Autogenerated tables that contain culture
10995 info data. This file was generated with the locale-builder tool.
10996 * appdomain.c: Incement corlib version number.
10998 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
11000 * appdomain.c: (mono_runtime_init) move mono_thread_init
11001 to before mono_object_new calls so critical sections
11002 are initialized before use.
11004 2004-04-07 Martin Baulig <martin@ximian.com>
11007 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
11008 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
11009 (ves_icall_MonoGenericParam_initialize): Removed.
11010 (monogenericparam_icalls): Removed.
11011 (generictypeparambuilder_icalls): Added new table for
11012 System.Reflection.Emit.GenericTypeParameterBuilder.
11015 (mono_reflection_define_generic_parameter): Removed.
11016 (mono_reflection_initialize_generic_parameter): This is now called
11017 from GenericTypeParameterBuilder's .ctor.
11019 2004-04-06 Martin Baulig <martin@ximian.com>
11021 * class.c (mono_class_init): Don't inflate nested classes in a
11023 (mono_type_get_name_recurse): Include the generic arguments for
11024 generic instances and generic type declarations.
11025 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
11026 (_mono_class_get_instantiation_name): Removed.
11027 (mono_class_create_generic): Always use `gklass->name' as our name.
11029 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
11031 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
11032 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
11033 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
11034 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
11035 closed generic methods here.
11038 (mono_reflection_generic_inst_get_nested_types): Removed.
11039 (inflate_mono_method): Copy the generic parameters from the
11040 MonoMethodHeader into out MonoGenericMethod.
11042 2004-04-06 Martin Baulig <martin@ximian.com>
11045 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
11047 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
11049 * reflection.c (build_compressed_metadata): If we have any entries
11050 in the GenericParam, MethodSpec or GenericParamConstraint tables,
11051 set the header version to 1.1.
11053 2004-04-06 Martin Baulig <martin@ximian.com>
11055 * class.c (mono_class_init): If we're a generic instance,
11056 initialize our nested classes, too.
11057 (_mono_class_get_instantiation_name): Deal with the new `!%d'
11060 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11062 * process.c: quote the argument passed to the shell on windows.
11064 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
11066 * threads.c (mono_alloc_special_static_data): Allow this to be
11067 called during startup.
11069 2004-04-02 Martin Baulig <martin@ximian.com>
11072 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
11074 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
11076 * icall.c: Fix build.
11078 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
11080 * Makefile.am: Added security.c|h.
11081 * icall.c: Added icall for get_UserName;
11082 * security.c: New file for security related icalls. Added function
11083 get_UserName for System.Environment (fix #56144).
11084 * security.h: New. Header file for security.c
11086 2004-04-02 Dick Porter <dick@ximian.com>
11088 * icall.c: Deleted the icalls that were obsoleted some time ago
11089 by the ICU string code, and which were mixed into the icall
11090 rearranging. Fixes bug 55969.
11093 * string-icalls.c: Deleted the code that those icalls reference.
11095 2004-04-01 Martin Baulig <martin@ximian.com>
11097 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
11099 * class.c (mono_class_from_generic_parameter): Don't set
11100 TYPE_ATTRIBUTE_INTERFACE.
11101 (my_mono_class_from_generic_parameter): Likewise.
11103 2004-04-01 Martin Baulig <martin@ximian.com>
11105 * loader.c (find_method): Added an optional `MonoClass *ic'
11106 argument to search in a specific interface.
11107 (mono_get_method_constrained): New public function.
11109 2004-04-01 Martin Baulig <martin@ximian.com>
11111 * reflection.c (mono_image_get_generic_field_token): Use the
11112 `handleref' cache here.
11114 2004-04-01 Martin Baulig <martin@ximian.com>
11116 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
11118 * reflection.c (create_generic_typespec): Use the `typespec' hash
11119 here, not the `typeref' one.
11121 2004-04-01 Martin Baulig <martin@ximian.com>
11123 * class.c (mono_class_inflate_generic_type): Moved the
11124 functionality into a new static inflate_generic_type() which
11125 returns NULL if it didn't do anything. Only increment the
11126 `mono_stats.inflated_type_count' if we actually inflated
11128 (mono_class_get_full): Check the classes type to see whether we
11129 need to inflate it; also inflate MONO_TYPE_(M)VAR.
11131 2004-04-01 Jackson Harper <jackson@ximian.com>
11133 * reflection.c: Set culture for assembly references.
11135 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
11137 * reflection.[ch], icall.[ch], Fix support for pinning variables.
11139 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11142 (do_mono_assembly_open): the critical section also covers
11143 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
11145 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11148 (mono_manage_threads): abort the background threads when finishing.
11151 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11153 * gc.c: only close the done_event handle if there was no timeout.
11156 2004-03-30 Martin Baulig <martin@ximian.com>
11158 * icall.c (icall_entries): It's called "System.Activator", not
11159 "System.Activation".
11161 2004-03-30 Martin Baulig <martin@ximian.com>
11163 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
11164 (mono_class_create_from_typespec): Likewise.
11166 2004-03-30 Martin Baulig <martin@ximian.com>
11168 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
11169 `has_ctor_constraint' and `initialized'.
11171 2004-03-30 Martin Baulig <martin@ximian.com>
11173 * reflection.c (encode_new_constraint): New static function to add
11174 the constructor constraint attribute to a type parameter.
11175 (encode_constraints): Call encode_new_constraint() if necessary.
11178 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
11180 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
11182 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
11184 * reflection.c, icall.c: add support for pinning variables.
11186 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
11188 * marshal.c (mono_marshal_get_managed_wrapper):
11189 init bool local with zero rather than null.
11191 2004-03-29 Martin Baulig <martin@ximian.com>
11193 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
11194 the "official" behavior here.
11195 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
11197 2004-03-29 Martin Baulig <martin@ximian.com>
11199 * icall.c: Reflect latest API changes.
11201 2004-03-29 Martin Baulig <martin@ximian.com>
11203 * loader.c (mono_get_method_from_token): Also call
11204 mono_metadata_load_generic_params () for abstract and interface
11205 methods; replace the type arguments in the method signature with
11206 the ones which are loaded from the metadata.
11208 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
11210 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
11211 of the lock is not the current thread. MS.NET don't do it, in spite of
11212 what the documentation says. See bug #56157.
11214 2004-03-28 Martin Baulig <martin@ximian.com>
11216 * class.c (mono_class_init): Don't call init_properties() and
11217 init_events() for generic instances; set `prop->parent' when
11218 inflating properties.
11220 * reflection.c (mono_generic_inst_get_object): Call
11221 `mono_class_init (ginst->klass)'.
11222 (mono_type_get_object): Only create a MonoGenericInst if your
11223 generic type is a TypeBuilder.
11224 (do_mono_reflection_bind_generic_parameters): Only set
11225 `ginst->is_dynamic' if our generic type is a TypeBuilder.
11227 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
11229 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
11232 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11234 * icall.c: added Kill_internal icall.
11235 * process.[ch]: added Kill_internal icall.
11237 2004-03-25 Martin Baulig <martin@ximian.com>
11239 * class.h (MonoStats): Added `generic_instance_count',
11240 `inflated_method_count', `inflated_type_count' and
11241 `generics_metadata_size'.
11243 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11245 * reflection.c: no warnings now.
11247 2004-03-25 Martin Baulig <martin@ximian.com>
11249 * class.c (mono_class_get_full): New public function; does a
11250 mono_class_get(), but also takes a `MonoGenericContext *'.
11252 * loader.c (mono_field_from_memberref): Renamed to
11253 `field_from_memberref', made static and added `MonoGenericContext *'
11255 (mono_field_from_token): Added `MonoGenericInst *' argument.
11256 (method_from_memberef): Likewise.
11257 (mono_get_method_from_token): Likewise.
11258 (mono_get_method_full): New public function; does a
11259 mono_get_method(), but also takes a `MonoGenericContext *'.
11261 * verify.c (mono_method_verify): Get the method's generic context
11262 and pass it to mono_field_from_token(), mono_get_method_full() and
11263 mono_class_get_full().
11265 2004-03-25 Martin Baulig <martin@ximian.com>
11267 * class.c (mono_class_inflate_generic_type): Take a
11268 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
11269 `MonoGenericMethod *'.
11271 2004-03-25 Martin Baulig <martin@ximian.com>
11273 * loader.h (MonoMethodInflated): Store the MonoGenericContext
11274 instead of the MonoGenericMethod here.
11276 2004-03-25 Martin Baulig <martin@ximian.com>
11278 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
11279 each time we create a new MonoGenericInst, we also create a new
11280 context which points back to us.
11282 * class.c (inflate_method): Use `ginst->context' instead of
11283 creating a new context.
11285 * loader.c (method_from_memberref): Use
11286 `klass->generic_inst->context' instead of creating a new context.
11288 2004-03-25 Martin Baulig <martin@ximian.com>
11290 * class.h (MonoGenericContext): New struct.
11291 (MonoGenericMethod): Removed `generic_inst'.
11293 * class.c (mono_class_inflate_generic_method): Take a
11294 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
11296 2004-03-25 Martin Baulig <martin@ximian.com>
11298 * loader.h (MonoMethodInflated): New typedef.
11300 * metadata.h (MonoMethodSignature): Removed `gen_method', make
11301 `generic_param_count' consume just 30 bits, added `is_inflated'
11302 and `has_type_parameters' flags (one bit each).
11304 * class.c (mono_class_inflate_generic_method): Create a
11305 MonoMethodInflated instead of a MonoMethodNormal and set
11306 `is_inflated' in the method signature.
11308 * class.h (MonoGenericMethod): Removed `generic_method'.
11310 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
11312 * image.c: Make sure the name of a MonoImage is always an absolute path.
11313 This fixes bug #54415.
11315 2004-03-24 Martin Baulig <martin@ximian.com>
11317 * class.c (mono_class_setup_vtable): If we're a generic instance,
11318 use our generic type's vtable size.
11320 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
11322 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
11323 MONO_NO_UNLOAD env var as a temporary workaround for unloading
11326 2004-03-23 Martin Baulig <martin@ximian.com>
11328 * class.h (MonoDynamicGenericInst): Added `int count_events' and
11329 `MonoEvent *events'.
11331 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
11332 (typebuilder_icalls): Added "get_event_info"; calls
11333 mono_reflection_event_builder_get_event_info().
11335 * reflection.c (mono_reflection_generic_inst_initialize): Added
11336 `MonoArray *events'.
11337 (mono_reflection_event_builder_get_event_info): New function.
11339 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
11341 * object.h: add mono_type_initialization_init
11343 * object.c (mono_runtime_class_init):
11344 implement class constructor synchronization rules
11345 to cope with threading issues.
11346 add mono_type_initialization_init
11348 * appdomain.c (mono_runtime_init): call
11349 mono_type_initialization_init
11351 * class.h: removing initializing field from MonoVTable
11353 2004-03-23 Martin Baulig <martin@ximian.com>
11355 * class.c (my_mono_class_from_generic_parameter): Use
11356 `param->name' if it's not NULL.
11358 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
11360 * class.c: do not insert non-virtual methods in the vtable.
11361 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
11362 that means the method is non-virtual. This never would have
11365 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
11367 * profiler.c: Added lock for accessing coverage_hash.
11369 2004-03-22 Martin Baulig <martin@ximian.com>
11371 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
11372 `method->method->signature->generic_param_count != 0' to make it
11373 work for interface methods.
11375 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11377 * process.c: quote the string passed to the shell using g_shell_quote.
11379 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11382 (mono_threads_manage): don't remove the finalizer thread and self
11383 from the threads hash table so that mono_thread_manage can be called
11386 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11388 * process.c: quote the arguments when UseShellExecute is true. Fixes
11391 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11393 * threads.c: set mono_thread_detach as a cleanup routine for every
11394 thread. This way it's always executed upon thread termination, either
11395 aborted or finished normally. No more xsp hangs!
11397 2004-03-17 Martin Baulig <martin@ximian.com>
11399 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
11400 `int count_nested' and a `MonoType **nested'.
11402 * reflection.c (mono_reflection_bind_generic_parameters): Moved
11403 most of the functionality into a new static
11404 do_mono_reflection_bind_generic_parameters() and don't take a
11405 `MonoType *nested_in' argument any more. Don't compute nested
11407 (mono_reflection_generic_inst_get_nested_types): New public method
11408 to get nested types.
11410 * class.c (mono_class_create_generic): Set `klass->nested_in' if
11411 we're a nested class.
11413 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
11414 mono_reflection_generic_inst_get_nested_types() to compute the
11417 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
11419 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
11420 descriptive error message under windows.
11422 2004-03-17 Martin Baulig <martin@ximian.com>
11424 * class.c (dup_type): Added `const MonoType *original' argument;
11425 copy the attrs from the original type.
11427 2004-03-17 Martin Baulig <martin@ximian.com>
11429 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
11430 `m->generic_inst_cache' here.
11432 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
11434 * exception.h exception.c: Add stack_overflow_exception.
11436 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11439 (overlapped_callback): call SetEvent *after* invoking the callback.
11440 No need to call CloseHandle.
11442 2004-03-16 Martin Baulig <martin@ximian.com>
11444 * reflection.c (mono_image_get_fieldref_token): Take a
11445 `MonoReflectionField *' instead of a `MonoClassField *' and a
11446 `MonoClass *'; store the `MonoReflectionField *' in the hash.
11448 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11450 * appdomain.c: don't add the culture to the filename we're looking for
11451 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
11453 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11455 * locales.c: don't ignore symbols when doing case insensitive compares.
11456 Thanks Dick! Fixes bug #54046.
11458 * threads.c: surround 'threads' usage with enter/leave in
11459 mono_thread_manage.
11461 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
11463 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
11464 implicitly marshalled as [Out]. Fixes #55450.
11466 (mono_marshal_get_runtime_invoke): Zero out the result if there is
11469 2004-03-16 Martin Baulig <martin@ximian.com>
11471 * class.c (mono_class_from_generic_parameter): Use the actual
11474 2004-03-16 Martin Baulig <martin@ximian.com>
11476 * reflection.c (type_get_signature_size): New static function.
11477 Compues the size of the type in a method signature.
11478 (method_get_signature_size): New static function; calls
11479 type_get_signature_size() to compute the actual size of the
11480 method's signature.
11481 (method_encode_signature): Use method_get_signature_size() to get
11482 the signature's size rather than using `nparams * 10'.
11484 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11486 * file-io.h: define here WapiOverlapped on windows. I don't want the
11487 regular OVERLAPPED one.
11490 * threadpool.c: somehow, BindIoCompletionCallback is not found.
11491 Disabling AIO on windows.
11493 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11495 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
11498 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11500 * appdomain.c: upgraded corlib version.
11502 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
11503 and BeginWrite. Allow opening files for asynchrnous operations.
11505 * file-io.h: new struct that maps FileStreamAsyncResult.
11506 * icall.c: added new icalls.
11507 * process.[ch]: support setting child process environment variables
11508 and use the SHELL or COMSPEC when UseShellExecute is true.
11510 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
11511 callback for async. IO is here and also BindHandle.
11513 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
11516 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
11518 * reflection.c (create_custom_attr): Allow len == 0.
11520 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
11521 computation on big-endian machines.
11523 2004-03-13 Martin Baulig <martin@ximian.com>
11525 * class.h (MonoGenericInst): Added `int count_ifaces'.
11527 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
11528 `ginst->count_ifaces' instead `klass->interface_count' since we
11529 may get called before the vtable is created.
11531 * loader.c (mono_method_get_param_names): If we're a generic
11532 instance, return and don't initialize the class.
11534 * reflection.c (mono_reflection_setup_generic_class): Don't call
11535 ensure_runtime_vtable().
11536 (mono_reflection_bind_generic_parameters): Set
11537 `ginst->count_ifaces'.
11539 2004-03-11 Jackson Harper <jackson@ximian.com>
11543 * unicode.h: Remove unused System.Char icalls.
11545 2004-03-11 Miguel de Icaza <miguel@ximian.com>
11547 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
11548 code when we P/Invoke the first library in Windows.Forms, instead
11549 of when we first open the assembly.
11551 * assembly.c: Drop the lookup from here.
11553 2004-03-10 Martin Baulig <martin@ximian.com>
11555 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
11556 class for properties, fields and events. Finally fixes #54945.
11558 2004-03-10 Martin Baulig <martin@ximian.com>
11560 * metadata.c (mono_metadata_class_equal): New static function;
11561 checks whether two generic instances or two generic parameters are
11563 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
11566 2004-03-10 Martin Baulig <martin@ximian.com>
11568 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
11570 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
11571 argument and write it into the `reflection_info' field.
11574 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
11575 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
11577 2004-03-09 Jackson Harper <jackson@ximian.com>
11579 * char-conversions.h: use 8 bits for numeric data its all we need
11580 * icall.c: numeric data is only 8 bits now.
11582 2004-03-09 Martin Baulig <martin@ximian.com>
11584 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
11586 * class.c (init_properties, init_events): Initialize the new
11589 * reflection.c (typebuilder_setup_properties): Likewise.
11590 (typebuilder_setup_events): Likewise.
11592 * reflection.h (MonoEventInfo): Replaced `parent with
11593 `declaring_type' and `reflected_type'.
11595 * icall.c (ves_icall_get_property_info): Distinguish between
11596 declaring and reflected type.
11597 (ves_icall_get_event_info): Likewise.
11599 2004-03-09 Martin Baulig <martin@ximian.com>
11601 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
11602 (ves_icall_Type_GetField): Correctly set field->klass.
11604 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
11606 * loader.h: Fix warning.
11608 2004-03-08 Miguel de Icaza <miguel@ximian.com>
11610 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
11611 library routine if present. Notice that it will still continue
11612 executing even if its missing, for those working on the Gtk#
11613 edition of Windows.Forms.
11615 * assembly.c (do_mono_assembly_open): If loading the
11616 System.Windows.Forms call mono_loader_wini_init.
11618 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
11620 * class.h: Added MonoRemoteClass struct.
11621 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
11622 function for MonoStrings.
11623 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
11624 Added internal call for getting the proxy type.
11625 * marshal.c: Get the type of transparent proxies from its remote_class.
11626 Added methods that generate the IL for type checks and casts:
11627 mono_marshal_get_isinst, mono_marshal_get_castclass,
11628 mono_marshal_get_proxy_cancast.
11629 * marshal.h: Declaration of the previous new methods.
11630 * object.c: Added new moethods for creating and updating MonoRemoteClass
11631 instances: mono_remote_class, mono_upgrade_remote_class,
11632 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
11633 * verify.c: FIx transparent_proxy_fields layout.
11634 * appdomain.c: Bump corlib version.
11636 2004-03-04 Jackson Harper <jackson@ximian.com>
11638 * icall.c: Add icall to access char conversion tables.
11639 * char-conversions.h: Character conversion tables.
11640 * Makefile.am: Add char-conversions.h private header file.
11642 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
11644 * appdomain.c (unload_thread_main): Increase unloading timeout to
11645 10 sec as a temporary workaround for Nant problems.
11647 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
11649 * gc.c: Add checks for GC_enable and GC_disable.
11651 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
11652 (jaak@zd.com.pl). Fix memory corruption in String.Replace
11655 2004-02-27 Martin Baulig <martin@ximian.com>
11657 * reflection.c (mono_reflection_bind_generic_parameters): Take a
11658 `MonoReflectionType *' instead of a `MonoType *'.
11660 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
11662 * gc.c (run_finalize): Avoid finalizing the object representing the
11664 (finalizer_thread): Fix warning.
11666 2004-02-25 Martin Baulig <martin@ximian.com>
11668 * class.c (_mono_class_get_instantiation_name): Added `int offset'
11669 argument for nested types.
11670 (mono_class_create_generic): Added support for nested generictypes.
11672 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
11675 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
11677 * reflection.c (method_encode_signature): Increase the minimum
11678 value of `size' from 10 to 11.
11679 (mono_reflection_bind_generic_parameters): Take `int type_argc'
11680 and `MonoType **types' arguments instead of the `MonoArray
11681 *types'; added `MonoType *nested_in'. Recursively instantiate
11684 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
11686 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
11687 stack_overflow_ex members which are used by exception handling.
11689 * appdomain.c (mono_runtime_init): Initialize the new members.
11691 * gc.c (mono_gc_enable): New helper function.
11692 * gc.c (mono_gc_disable): New helper function.
11694 2004-02-23 Martin Baulig <martin@ximian.com>
11696 * icall.c: I must have been really stupid - make it actually work
11699 2004-02-23 Martin Baulig <martin@ximian.com>
11701 * loader.c (method_from_memberref): Only inflate the method if
11702 it's in another klass.
11704 2004-02-23 Martin Baulig <martin@ximian.com>
11706 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
11707 (mono_class_init): If we're a generic instance and an interface,
11708 compute `class->interface_id'; also create `class->interfaces'
11709 here and inflate them.
11711 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
11713 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
11715 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
11717 2004-02-15 Miguel de Icaza <miguel@ximian.com>
11719 * reflection.c (method_encode_code): Improved the error message
11720 generated by the exception.
11722 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11724 * icall.c: Martin did not do what he said in the ChangeLog for
11725 2004-02-18, but put back the changes for properties and events.
11726 Commenting those changes out again and adding comment to bug #54518.
11728 * process.c: removed warning.
11730 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
11732 * marshal.c (emit_struct_conv): Print an error message instead of
11733 asserting when a type does not have the StructLayout attribute.
11735 2004-02-20 Martin Baulig <martin@ximian.com>
11737 * reflection.c (mono_type_get_object): Also use the cache for
11739 (mono_reflection_bind_generic_parameters): Always compute
11742 2004-02-20 Martin Baulig <martin@ximian.com>
11744 * class.h (MonoGenericMethod): Removed `klass'.
11746 * class.c (mono_class_inflate_generic_method): Added `MonoClass
11749 2004-02-20 Martin Baulig <martin@ximian.com>
11751 * reflection.c (method_encode_methodspec): Actually use the
11752 uninflated signature for the memberref.
11754 2004-02-20 Martin Baulig <martin@ximian.com>
11756 * class.h (MonoGenericMethod): Removed `declaring'.
11758 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
11759 is NULL, compute it here.
11761 2004-02-20 Martin Baulig <martin@ximian.com>
11763 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
11765 * metadata.c (mono_metadata_generic_inst_hash): New method.
11766 (mono_metadata_generic_inst_equal): New method.
11768 * reflection.c (mono_reflection_bind_generic_parameters): Use the
11769 `klass->image->generic_inst_cache' cache to avoid creating
11770 duplicate MonoGenericInst's.
11772 * class.c (mono_class_inflate_generic_type): Use the cache.
11774 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11776 * object.c: fixed gc descriptor calculation for embedded valuetypes.
11778 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11780 * icall.c: added Socket.WSAIoctl icall.
11782 * socket-io.[ch]: implemented
11783 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
11785 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
11787 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
11789 2004-02-18 Urs C Muff <umuff@quark.com>
11791 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
11792 this work on PPC and other big-endian architectures.
11794 * debug-mono-symfile.h: Prepended the names of all the `guint32'
11795 fields with an underscore to make sure they're only accessed by
11796 the read32() macro.
11798 2004-02-18 Martin Baulig <martin@ximian.com>
11800 * icall.c: Put the klass->refclass changes back for methods and
11801 fields, but not for properties and events. We're currently not
11802 distinguishing between DeclaringType and ReflectedType for
11803 properties and events, that's what caused the regressions.
11805 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11808 (mono_async_result_new): the handle can be NULL.
11810 * threadpool.c: Use an event instead of a semaphore, don't initialize
11811 it until needed. This saves quite a few semaphores from being created
11812 when using the threadpool.
11814 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
11816 * object.c (mono_string_is_interned_lookup): Fix interning of long
11817 strings. Fixes #54473.
11819 * domain.c (ldstr_equal): Optimize if the two strings are equal.
11821 * icall.c: Revert the klass->refclass changes since they introduce
11822 regressions (bug #54518).
11824 2004-02-18 Martin Baulig <martin@ximian.com>
11826 * class.c (mono_class_init): If we're a generic instance and don't
11827 come from a TypeBuilder, inflate our members here.
11828 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
11829 (mono_class_create_generic): New public method.
11830 (mono_class_initialize_generic): Removed.
11831 (get_instantiation_name): Renamed to
11832 _mono_class_get_instantiation_name() and made it public.
11834 2004-02-18 Martin Baulig <martin@ximian.com>
11836 * class.c (mono_class_inflate_generic_type): Clear the new
11837 instance's `nginst->klass' when inflating a generic instance.
11838 (mono_class_is_subclass_of): Added (basic) support for generic
11841 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
11843 * appdomain.h, domain.c: use a MonoCodeManager instead of a
11844 MonoMempool to hold compiled native code.
11846 2004-02-17 Martin Baulig <martin@ximian.com>
11848 * class.h (MonoDynamicGenericInst): Added `count_properties' and
11851 * reflection.c (mono_reflection_generic_inst_initialize): Added
11852 `MonoArray *properties' argument.
11854 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
11856 2004-02-17 Martin Baulig <martin@ximian.com>
11858 * icall.c (ves_icall_Type_GetFields): Renamed to
11859 ves_icall_Type_GetFields_internal() and added a
11860 `MonoReflectionType *rtype' argument; pass it to
11861 mono_field_get_object() to set the field's "reflected" type.
11862 (ves_icall_Type_GetConstructors): Likewise.
11863 (ves_icall_Type_GetEvents): Likewise.
11864 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
11865 argument; pass it to mono_method_get_object() to set the method's
11868 2004-02-17 Martin Baulig <martin@ximian.com>
11870 * class.h (MonoDynamicGenericInst): New type.
11871 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
11873 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
11874 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
11875 (ves_icall_MonoGenericInst_GetFields): New interncall.
11877 * class.c (mono_class_from_generic): Don't call
11878 mono_class_initialize_generic() if this is a dynamic instance;
11879 ie. it's being created from a TypeBuilder.
11880 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
11881 `class->byval_arg.type'.
11883 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
11884 to `inflate_method' and made static.
11885 (mono_reflection_inflate_field): Removed.
11886 (mono_reflection_generic_inst_initialize): New public method.
11888 * reflection.h (MonoReflectionGenericInst): Removed `methods',
11889 `ctors' and `fields'; added `initialized'.
11891 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
11893 * debug-helpers.c (mono_method_full_name): Fix output for empty
11896 2004-02-12 Martin Baulig <martin@ximian.com>
11898 * class.h (MonoClassField): Added `MonoType *generic_type'.
11900 * reflection.c (mono_image_get_fieldref_token): Added support for
11901 instantiated generic types.
11902 (field_encode_inflated_field): Removed.
11903 (mono_image_get_inflated_field_token): Removed.
11904 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
11906 * reflection.h (MonoReflectionInflatedField): Removed.
11908 2004-02-12 Martin Baulig <martin@ximian.com>
11910 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
11911 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
11913 * reflection.c (mono_image_get_methodspec_token): Take a
11914 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
11915 (mono_image_create_token): Check whether we have a
11916 `method->signature->gen_method' and call
11917 mono_image_get_methodspec_token() if appropriate.
11918 (inflated_method_get_object): Removed.
11919 (mono_reflection_bind_generic_method_parameters): Return a
11920 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
11921 (mono_reflection_inflate_method_or_ctor): Likewise.
11923 * reflection.h (MonoReflectionInflatedMethod): Removed.
11925 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
11927 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
11928 for custom valuetype marshalling.
11930 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
11932 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11934 * icall.c: fixed WSAGetLastError_internal name.
11936 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
11938 * threads.c (mono_thread_attach): Allow this to be called multiple
11939 times for a thread.
11941 * threads.c (build_wait_tids): Do not wait for ourselves.
11943 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
11944 appdomain list is empty.
11946 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11947 memory returned by mono_string_builder_to_utf16, since it points into
11948 managed memory. Thanks to Bernie Solomon for noticing this.
11950 * icall.c: Add AppDomainSetup icalls.
11952 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11954 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11957 * reflection.c (reflection_methodbuilder_to_mono_method): Save
11958 custom attributes to the method_aux struct. Also fix array indexes etc.
11960 * loader.c (mono_method_get_param_names): Make dynamic case work again.
11962 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11964 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11965 (both static and runtime) and reduce startup time.
11967 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
11969 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11970 AsAny marshalling conversion instead of crashing.
11972 * marshal.c: Fix warnings.
11974 2004-02-09 Martin Baulig <martin@ximian.com>
11976 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11978 * reflection.h (MonoReflectionInflatedMethod): Removed the
11979 `declaring' field, it's now in the unmanaged MonoGenericMethod.
11981 * reflection.c (method_encode_methodspec): Removed the `method'
11982 argument; we get it from `gmethod->declaring'.
11983 (inflated_method_get_object): Removed the `declaring' argument.
11985 2004-02-09 Martin Baulig <martin@ximian.com>
11987 * class.h (MonoGenericMethod): New type.
11988 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11991 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11992 a `MonoGenericMethod *gen_method' one.
11994 * class.c (mono_class_inflate_generic_type): Take an additional
11995 `MonoGenericMethod * argument. This is only non-NULL if we're
11996 inflating types for a generic method.
11997 (mono_class_inflate_generic_signature): Renamed to
11998 inflate_generic_signature() and made static; take a
11999 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12000 (inflate_generic_header): Take a `MonoGenericMethod *' argument
12001 instead of a `MonoGenericInst *' one.
12002 (mono_class_inflate_generic_method): Likewise.
12004 * reflection.c (encode_generic_method_sig): Take a
12005 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12006 (method_encode_methodspec): Likewise.
12007 (inflated_method_get_object): Likewise.
12009 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
12010 field with a `MonoGenericMethod *gmethod' one.
12012 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
12014 * class.h (mono_class_has_parent): add parens to expansion
12017 2004-02-08 Martin Baulig <martin@ximian.com>
12019 * image.h (MonoImage): Removed `generics_cache'.
12021 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
12022 instead of a `MonoType *' argument; removed the `inflate_methods'
12023 argument. Don't inflate methods here.
12025 * loader.c (find_method): If it's a generic instance, call
12026 mono_class_init() on the `sclass->generic_inst->generic_type'.
12028 * metadata.c (mono_type_size): Make this work on uninitialized
12029 generic instances; call it on the `ginst->generic_type's class.
12031 * reflection.c (mono_reflection_bind_generic_parameters): Call
12032 mono_class_from_generic() to create the `ginst->klass'.
12034 2004-02-08 Martin Baulig <martin@ximian.com>
12036 * class.h (MonoClass): Changed type of `generic_inst' from
12037 `MonoType *' to `MonoGenericInst *'.
12039 2004-02-08 Martin Baulig <martin@ximian.com>
12041 * icall.c (ves_icall_Type_BindGenericParameters): Just call
12042 mono_type_get_object(), this is now creating a `MonoGenericInst'
12043 for MONO_TYPE_GENERICINST.
12044 (ves_icall_MonoGenericInst_GetParentType): Likewise.
12045 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
12047 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
12048 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
12049 (inflated_method_get_object): Added `MonoClass *refclass' argument.
12050 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
12051 and reflected type.
12053 * reflection.h (MonoReflectionInflatedMethod): Removed
12054 `declaring_type' and `reflected_type'.
12056 2004-02-08 Martin Baulig <martin@ximian.com>
12058 * class.h (MonoGenericInst): Added `MonoType *parent' and
12059 `MonoType **ifaces'.
12061 * reflection.h (MonoReflectionGenericInst): Removed `klass',
12062 `parent' and `interfaces'.
12064 * reflection.c (mono_reflection_bind_generic_parameters): Take a
12065 `MonoType *' argument and return a `MonoType *'.
12068 (ves_icall_MonoGenericInst_GetParentType): New interncall.
12069 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
12071 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
12073 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
12074 valuetype marshalling.
12076 2004-02-06 Martin Baulig <martin@ximian.com>
12079 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
12080 (my_mono_class_from_generic_parameter): Likewise.
12082 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
12084 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
12085 contents of the symbol files lazily.
12087 * object.h (MonoThread): Add 'name' and 'name_len' fields.
12089 * threads.h threads.c icall.c: New icalls for getting and setting the
12092 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
12094 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
12095 Raise an exception when the domain is not found.
12097 2004-02-03 Martin Baulig <martin@ximian.com>
12099 * reflection.c (mono_image_get_methodspec_token): Use the
12100 uninflated signature; fixes gen-33.
12102 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
12104 * gc.c threads.c: Make the finalizer thread a normal managed thread so
12105 the finalizer code can use thread functionality.
12107 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
12108 the finalizer thread.
12110 * threads.c: Make some functions more robust.
12112 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
12114 * metadata.h: Add new marshalling conventions.
12116 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
12117 stringbuilder marshalling. Fixes #53700.
12119 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
12121 * reflection.c (mono_image_get_type_info): Save declarative security
12124 * reflection.c (mono_image_get_field_info): Handle uninitialized
12125 unmanaged fields as well.
12127 * appdomain.c: Bump corlib version.
12129 2004-02-01 Martin Baulig <martin@ximian.com>
12131 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
12132 method type arguments.
12134 2004-01-30 Duncan Mak <duncan@ximian.com>
12136 * marshal.h: Add prototype for
12137 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
12139 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
12142 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
12144 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
12145 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
12147 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
12149 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12150 custom marshalling of valuetypes.
12152 * marshal.c: Fix some warnings.
12154 2004-01-29 Martin Baulig <martin@ximian.com>
12156 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
12157 for generic method parameters.
12159 * reflection.c (method_encode_methodspec): Write the uninflated
12160 signature into the methodspec table.
12161 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
12162 is always the uninflated method.
12163 (reflection_methodbuilder_to_mono_method): Copy the generic
12164 parameters from the MethodBuilder into `header->gen_params'.
12166 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
12168 * class.c (mono_class_from_generic_parameter): Fix warning.
12170 2004-01-27 Martin Baulig <martin@ximian.com>
12172 * class.c (mono_class_from_generic_parameter): Don't create
12173 `klass->methods' here.
12175 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
12177 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
12178 extension since it does not work with libraries named lib<FOO>.dll.so.
12180 2004-01-25 Martin Baulig <martin@ximian.com>
12182 * class.c (mono_class_inflate_generic_type): Added support for
12183 MONO_TYPE_GENERICINST.
12185 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
12186 inflate methods on open constructed types.
12188 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12190 * object.c: fire ProcessExit event in the root AppDomain after running
12191 Main. Fixes bug #53299.
12193 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
12195 * socket-io.c: include the new socket-wrappers.h header.
12196 Use the wrappers instead of the unix socket functions to make the code
12199 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
12201 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
12203 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
12206 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
12208 * reflection.c (mono_image_create_pefile): Handle the case when the
12209 entry point is not a MethodBuilder.
12211 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
12212 field to ReflectionMethod since it is not allways a builder.
12214 * reflection.c (type_get_fully_qualified_name): New helper function to
12215 return the fully qualified name of a type.
12217 * reflection.c (encode_marshal_blob): Always emit the fully qualified
12218 type name for custom marshallers.
12220 * reflection.c (mono_marshal_spec_from_builder): Ditto.
12222 * class.c (mono_class_setup_vtable): If a parent class already
12223 implements an interface, use the implementing methods from that class.
12226 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12228 * threadpool.c: just return instead of ExitThread to allow for thread
12231 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
12233 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
12234 when closing resource modules.
12236 * reflection.c (mono_image_create_pefile): Handle the case when the
12237 entry point is not a MethodBuilder.
12239 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
12240 field to ReflectionMethod since it is not allways a builder.
12242 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
12244 * marshal.c (mono_marshal_get_managed_wrapper):
12245 mono_marshal_alloc takes native int so CONV_I
12246 the arg for 64bits.
12248 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
12250 * reflection.c (fixup_cattrs): New function to fixup the methoddef
12251 tokens in the cattr table. Fixes #53108.
12253 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12255 * loader.c: don't trim ".dll" before looking up in the config file.
12256 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
12258 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
12260 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12261 Return the module which contains the resource as well.
12262 (ves_icall_System_Reflection_Module_Close): New icall.
12264 * appdomain.c: Bump corlib version number.
12266 * image.c (mono_image_addref): New public function.
12268 * assembly.c: Call mono_image_addref.
12270 * reflection.c (mono_module_get_object): Increase reference count of
12273 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
12276 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
12277 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
12278 proper exceptions on DllImport problems.
12280 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
12282 * class.c, metadata.c: eliminate CSIZE macro.
12284 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
12286 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
12287 * object.h: Added async_callback field in MonoAsyncResult.
12288 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
12289 * verify.c: Added async_callback in MonoAsyncResult layout.
12291 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
12293 * reflection.c (mono_reflection_get_custom_attrs): Add support
12296 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
12298 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
12300 (mono_marshal_method_from_wrapper): Add null pointer check.
12302 2004-01-16 Martin Baulig <martin@ximian.com>
12304 * debug-mono-symfile.h: Set version number to 36 and reflect
12305 latest symbol writer changes.
12307 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
12309 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
12310 multi-dimensional arrays.
12311 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
12312 (mono_class_from_mono_type): Use bounded_array_class_get.
12314 * class.c (mono_bounded_array_class_get): New function which takes
12315 a 'bounded' bool argument to distinguish vectors from one dimensional
12318 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
12319 bounded_array_class_get if the array has bounds.
12321 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12322 Search modules loaded using AssemblyBuilder:AddModule as well.
12324 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12326 * appdomain.c: increased corlib version.
12327 * filewatcher.c: removed g_print.
12329 (get_property_info): only allocate what is actually requested.
12330 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
12332 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12334 * Makefile.am: added filewatcher.[ch]
12335 * filewatcher.[ch]: FileSystemWatcher runtime support.
12336 * icall.c: added new FSW icalls.
12338 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12340 * string-icalls.c: fix stringbuilder regression as suggested by
12341 Iain McCoy <iain@mccoy.id.au>.
12343 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
12345 * process.c (process_read_stringtable_block): Recognize '007f' as
12346 a language neutral stringtable block.
12348 2004-01-12 Patrik Torstensson
12350 * object.h (MonoStringBuilder) : Changed layout to support our
12351 new stringbuilder class.
12352 * marshal.c: Change marshalling to support the new layout of
12354 * appdomain.c: increased version number because new layout of
12357 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
12359 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
12360 assembly name as an string instead of an AssemblyName, since it is
12361 easier to extract info from it.
12363 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
12364 the culture subdirectories too. Fixes #52231.
12366 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12368 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
12369 It takes 2 new parameters with an optional name for the method to look
12370 for and case ignoring info.
12372 * threadpool.c: removed unused variable.
12374 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12376 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
12377 It takes 2 new parameters with an optional name for the property to look
12378 for and case ignoring info.
12381 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
12383 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
12386 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12389 * assembly.c: escape the uri before passing it to g_filename_from_uri.
12392 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
12394 * reflection.c: Add support for more than one unmanaged resource.
12396 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
12397 in field->def_value, as done in all other cases.
12399 * reflection.c (mono_reflection_get_custom_attrs): Add support for
12402 * reflection.c (mono_reflection_create_runtime_class): Remove
12403 errorneous assignment to klass->element_class, since it is already
12404 done in mono_reflection_setup_internal_class.
12406 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12408 * gc.c: added missing LeaveCriticalSection.
12409 * icall.c: indented a couple of lines.
12410 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
12411 if we call EndInvoke inside a callback. Fixes bug #52601.
12413 2004-01-07 Martin Baulig <martin@ximian.com>
12415 * mono-debug-debugger.h
12416 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
12418 2004-01-06 Miguel de Icaza <miguel@ximian.com>
12420 * appdomain.c: Use messages in NotImplementedException.
12422 * exception.c (mono_get_exception_not_implemented): Now this takes
12423 a message argument.
12425 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
12426 exception instead of g_asserting an aborting when something is not
12429 Add some inline docs.
12431 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
12433 * reflection.h: Update after changes to object layout.
12435 * reflection.c: Implement saving of unmanaged aka win32 resources.
12437 * appdomain.c: Bump version number.
12439 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
12440 Handle missing domains gracefully.
12442 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
12444 * file-io.c : On Windows, there are much more invalid_path_chars.
12446 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
12448 * class.h, object.c: prepare for GetType () speedup.
12450 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
12452 * profiler.c: workaround for --profile null reference exception on
12453 cygwin. Patch by Patrik Torstensson.
12455 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
12457 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
12458 make work for unaligned access.
12460 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
12462 * class.c: small cleanup (class->fields [i] -> field).
12463 * image.c: check address of metadata is valid.
12465 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
12467 * assembly.h assembly.c (mono_assembly_loaded): New public function to
12468 search the list of loaded assemblies.
12470 * reflection.c (mono_reflection_type_from_name): Use
12471 mono_assembly_loaded instead of mono_image_loaded.
12473 * reflection.c: Fix warnings.
12475 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
12477 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
12478 is dynamic. This is needed since an assembly can contain both dynamic and
12479 non-dynamic images.
12481 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
12484 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
12486 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
12487 to store modules loaded using AddModule.
12489 * reflection.c (mono_image_fill_file_table): Generalize this so it works
12492 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
12494 * reflection.c (mono_image_fill_export_table_from_module): New function to
12495 fill out the EXPORTEDTYPES table from a module.
12497 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
12498 into a separate function. Also handle loaded non-dynamic modules.
12500 * reflection.c (mono_image_basic_init): Fix memory allocation.
12502 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12504 * assembly.c (mono_assembly_load_references): Make this public.
12506 2003-12-19 Martin Baulig <martin@ximian.com>
12508 * class.c (mono_class_initialize_generic): Made this static, take
12509 a `MonoGenericInst *' instead of a `MonoClass *'.
12510 (mono_class_from_generic): Call mono_class_initialize_generic()
12511 unless we're already initialized or being called from
12512 do_mono_metadata_parse_generic_inst().
12514 * class.h (MonoGenericInst): Added `initialized' and
12515 `init_pending' flags.
12517 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
12518 `mono_class_init (gklass)' or mono_class_initialize_generic()
12519 here; set `generic_inst->init_pending' while parsing the
12522 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
12524 * locales.c: include string.h for memxxx prototypes
12526 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
12528 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
12529 constructor when accessing literal fields.
12531 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
12533 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12535 * reflection.c (assembly_add_resource_manifest): New function to fill
12536 the MANIFESTRESOURCE table.
12538 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
12540 * reflection.h: Update to changes in class layout.
12542 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
12543 Reenable call to mono_runtime_is_shutting_down ().
12545 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
12546 determine if the runtime is shutting down.
12548 2003-12-16 Jackson Harper <jackson@ximian.com>
12550 * icall.c: comment out call to mono_runtime_is_shutting_down to
12553 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
12555 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
12556 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
12558 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
12560 * reflection.c: move definition of swap_with_size
12561 to before its first call
12563 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
12565 * appdomain.c (mono_runtime_is_shutting_down): New public function.
12567 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
12570 * object.c: Fix warnings.
12572 * icall.c (ves_icall_Type_Get...): Only consider inherited static
12573 members if FlattenHierarchy is set.
12575 * reflection.c (mono_image_add_decl_security): New function to emit
12576 declarative security.
12578 * reflection.h reflection.c: Add support for declarative security.
12580 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12582 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
12584 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12586 * appdomain.c verify.c: Moved corlib version checking into its own
12587 function in appdomain.c since it needs to create vtables etc.
12589 2003-12-13 Patrik Torstensson <p@rxc.se>
12591 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
12592 instead of unwrapped server.
12594 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
12596 * verify.c (check_corlib): Fix field index.
12598 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
12600 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
12603 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
12605 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
12606 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
12607 cope with sizeof(size_t) != sizeof(guint32).
12609 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12611 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
12612 in case of failure.
12614 2003-12-10 Mark Crichton <crichton@gimp.org>
12616 * icall.c: removed the GetNonZeroBytes. We now handle this case
12619 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
12621 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
12623 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
12626 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
12628 * verify.c (check_corlib): Handle the case when the version field is
12629 initialized by a static constructor.
12631 2003-12-08 Patrik Torstensson <p@rxc.se>
12633 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
12635 2003-12-08 Martin Baulig <martin@ximian.com>
12637 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
12638 a MonoReflectionGenericParameter, also take the parameter index
12639 and name as arguments.
12640 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12641 (ves_icall_MonoGenericParam_initialize): New interncall.
12642 (ves_icall_Type_make_byref_type): New interncall.
12644 * reflection.h (MonoReflectionGenericParam): Derive from
12645 MonoReflectionType, not just from MonoObject. Added `refobj' and
12648 * reflection.c (mono_reflection_define_generic_parameter): Create
12649 and return a new MonoReflectionGenericParam; don't initialize the
12651 (mono_reflection_initialize_generic_parameter): New public method;
12652 initializes the constraints and creates the `param->pklass'.
12654 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
12656 * reflection.h reflection.c: Use the new fields 'num_types',
12657 'num_fields' and 'num_methods' to track the number of types etc.
12659 * verify.c (check_corlib): Check corlib version number.
12661 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
12663 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
12664 function works on all methods.
12666 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
12668 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
12669 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
12670 the custom_type_info flag of the transparent proxy.
12671 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
12672 objects that supports IRemotingTypeInfo.
12673 * object.h: Added custom_type_info field in transparent proxy.
12675 2003-12-06 Martin Baulig <martin@ximian.com>
12677 * class.c (mono_class_create_from_generic): Removed.
12678 (mono_class_from_generic): Check `ginst->klass' before doing
12679 anything else. This is important to fully support "recursive"
12682 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
12683 empty `generic_inst->klass' before doing anything else.
12685 2003-12-06 Dick Porter <dick@ximian.com>
12690 * locales.c: Use C structs to access class fields. Don't do a
12691 conversion between MonoString and UChar because both are
12692 platform-endian UTF-16. Compare now takes startindex and count
12693 parameters. Add a char overload for IndexOf. Speed up the
12694 invariant string IndexOf.
12696 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
12698 * Makefile.am (monosn_LDADD): Fix parallel build.
12700 2003-12-04 Martin Baulig <martin@ximian.com>
12703 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12704 (ves_icall_Type_make_array_type): New interncall.
12706 2003-12-04 Martin Baulig <martin@ximian.com>
12708 * locales.c: also change it in the !HAVE_ICU case.
12710 2003-12-04 Dick Porter <dick@ximian.com>
12713 * locales.c: construct_compareinfo is now in CompareInfo, not
12716 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
12718 * image.c (mono_image_load_file_for_image): Cache loaded images in the
12719 image->files array.
12721 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
12724 * assembly.c (mono_assembly_load_references): Only load references
12727 * class.c (mono_class_from_name): Avoid linear search of the
12728 EXPORTEDTYPE table.
12730 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
12732 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
12734 * image.h (MonoImage): Add 'field_cache' field.
12736 * loader.c (mono_field_from_token): Cache field lookups.
12738 * reflection.c (mono_module_get_object): Fix name property.
12740 * icall.c (ves_icall_get_enum_info): Update after changes to
12741 mono_metadata_get_constant_index ().
12743 * icall.c: Get rid of get_type_info icall, use a separate icall for
12744 each type property to avoid needless memory allocations. Fixes #51514.
12746 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
12747 to avoid needless binary searches.
12749 * class.c (class_compute_field_layout): Move the initialization of
12750 field->def_value to mono_class_vtable ().
12752 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
12755 * object.c (mono_object_allocate): Make it inline.
12757 * object.c (mono_object_allocate_spec): Make it inline.
12759 2003-12-02 Dick Porter <dick@ximian.com>
12761 * locales.c (create_NumberFormat): NumberFormatInfo construction.
12762 Patch by Mohammad DAMT (mdamt@cdl2000.com).
12764 2003-12-01 Dick Porter <dick@ximian.com>
12766 * threads.c: Fix signature and call in CreateMutex and
12769 2003-12-01 Dick Porter <dick@ximian.com>
12772 * locales.c: Implement string compares and searching
12774 * object.h: Add extra Thread field
12776 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
12778 * reflection.c (fixup_method): Add support for MonoCMethod.
12780 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
12782 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
12784 * reflection.c (assembly_name_to_aname): Allow extra characters in
12785 assembly names. Fixes #51468.
12787 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
12789 * exception.c (mono_exception_from_name_domain): New helper function.
12791 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
12792 exception object in the correct domain.
12794 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
12795 formatting + make a copy a the input data.
12797 * loader.c (mono_get_method_from_token): Methods which contain
12798 native code do not have entries in the ImplMap.
12800 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
12801 Thanks to Gonzalo for spotting this.
12803 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
12804 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
12806 * assembly.h (mono_assembly_load_from): Split the second part of
12807 assembly loading into a new public function.
12809 * exception.h (mono_get_exception_bad_image_format): New function.
12811 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
12813 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
12814 Enumerate all modules inside a dynamic assembly. Fixes #51293.
12816 * icall.c: Add new icall for creating dynamic methods.
12818 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
12820 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
12822 * reflection.c (mono_reflection_create_dynamic_method): New icall to
12823 create a dynamic method.
12825 * reflection.c (resolve_object): New helper function.
12827 * reflection.c: Generalize ReflectionMethodBuilder and the functions
12828 which manipulate it so they can also work on dynamic methods.
12830 * reflection.c (reflection_method_builder_to_mono_method): Avoid
12831 creating the MonoReflectionMethodAux structure if it is not needed.
12833 * reflection.h verify.c: Update after changes to object layout.
12835 * reflection.c (method_builder_encode_signature): Fix compilation on
12838 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
12840 * appdomain.h: Added support for context static fields. Added static_data
12841 field to MonoAppContext and renamed thread_static_fields to a more
12842 generic special_static_fields in MonoAppDomain, since it can now contain
12843 context static fields.
12844 * domain.c: Updated hashtable name.
12845 * object.c: Replaced field_is_thread_static() for a more generic
12846 field_is_special_static() which also checks for context static attribute.
12847 In mono_class_vtable(), added support for static context fields.
12848 * threads.c: Changed methods that manage thread static fields to more
12849 generic methods so they can be reused both for thread and context static
12851 * threads.h: Declared some new methods.
12853 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
12855 * reflection.h: Update after changes to the managed types.
12857 * reflection.c (encode_custom_modifiers): New helper function.
12859 * reflection.c (method_encode_signature): Emit custom modifiers.
12861 * reflection.c (field_encode_signature): Emit custom modifiers.
12863 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
12865 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
12867 * icall.c (ves_icall_System_ValueType_Equals): New optimized
12870 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
12873 * object.c (mono_field_get_value_object): New function.
12875 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
12878 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
12880 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
12881 return a preallocated out-of-memory exception instance.
12883 * object.c (out_of_memory): Use the new function.
12885 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
12886 flag is before the custom modifiers. Fixes #49802.
12888 2003-11-16 Martin Baulig <martin@ximian.com>
12890 * class.c (mono_class_is_open_constructed_type): Implemented the
12891 MONO_TYPE_GENERICINST case.
12893 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
12895 * assembly.c (mono_assembly_fill_assembly_name): New function to
12896 fill out the MonoAssemblyName structure.
12897 (mono_assembly_open): Use the new function.
12899 * icall.c (fill_reflection_assembly_name): New helper function.
12901 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
12904 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
12906 2003-11-15 Martin Baulig <martin@ximian.com>
12908 * class.c (mono_class_is_open_constructed_type): New public
12909 function; checks whether a type is an open constructed type,
12910 ie. whether it still contains type parameters.
12911 (mono_class_inflate_generic_type): If we're a type parameter and
12912 the inflated type is also a MONO_TYPE_(M)VAR, return the original
12915 * class.h (MonoGenericInst): Added `guint32 is_open'.
12917 * loader.c (method_from_methodspec): Check whether we're an open
12918 or closed constructed type and set `ginst->is_open'.
12920 * reflection.c (mono_reflection_bind_generic_parameters): Check
12921 whether we're an open or closed constructed type and set
12923 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
12924 from open constructed types.
12926 2003-11-15 Martin Baulig <martin@ximian.com>
12928 * reflection.c (mono_reflection_bind_generic_parameters): If we're
12929 a generic instance (instead of a generic type declaration) with
12930 unbound generic parameters, bind them to our actual types.
12932 2003-11-14 Martin Baulig <martin@ximian.com>
12934 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
12936 * reflection.c (mono_reflection_bind_generic_parameters): If we're
12937 an interface type, populate `res->interfaces' with instantiated
12938 versions of all the interfaces we inherit.
12940 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
12942 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12943 when MONO_PATH is set but doesn't contain the install dir.
12945 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12948 (ves_icall_Type_GetInterfaces): don't return an interface twice when
12949 it's also implemented in base classes. Fixes bug #50927.
12951 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
12953 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12954 if this method is called from a finalizer. Fixes #50913.
12956 2003-11-12 Miguel de Icaza <miguel@ximian.com>
12958 * threads.c: Implement VolatileRead/VolatileWrite
12960 * icall.c: Add new icalls for VolatileRead/VolatileWrite
12962 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12964 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
12965 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12968 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
12969 from Peter Ross (pro@missioncriticalit.com).
12971 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
12973 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12975 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12977 * assembly.c (mono_assembly_load_references): Disable check because it
12978 triggers on older corlibs which lots of people have.
12980 2003-11-12 Jackson Harper <jackson@ximian.com>
12982 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12983 load corlib.dll if mscorlib.dll is not found.
12984 * assembly.h: Remove corlib name define.
12987 * image.c: Change corlib name to mscorlib.
12989 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
12991 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12993 2003-11-11 Miguel de Icaza <miguel@ximian.com>
12995 * appdomain.h: Added loader_optimization here to sync with the C#
12996 code, and add disallow_binding_redirects field.
12998 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
13000 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
13002 * reflection.c (mono_image_build_metadata): Fix crash on modules
13005 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
13007 * icall.c (ves_icall_get_method_info): Return callingConvention as
13010 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
13011 namespaces from the EXPORTEDTYPE table as well.
13013 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
13014 from all modules inside the assembly.
13016 2003-11-11 Martin Baulig <martin@ximian.com>
13018 * reflection.c (mono_reflection_bind_generic_parameters): Make
13019 this work for interfaces.
13021 2003-11-11 Martin Baulig <martin@ximian.com>
13023 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
13025 2003-11-11 Martin Baulig <martin@ximian.com>
13027 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
13028 "MonoInflatedMethod" and "MonoInflatedCtor".
13030 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
13032 * reflection.c (resolution_scope_from_image): Use the assembly table
13033 from the manifest module, since other modules don't have it.
13035 * debug-helpers.c (mono_type_full_name): New helper function.
13037 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
13039 * image.c (mono_image_load_file_for_image): New public function which
13040 is a replacement for the load_file_for_image in class.c.
13042 * assembly.c (mono_assembly_load_module): A wrapper for the function
13043 above which does assembly association and reference loading too.
13045 * class.c (mono_class_from_name): Call mono_assembly_load_module.
13047 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13049 * appdomain.c: not all of the attributes for the full assembly name
13050 are required and the order doesn't matter. Fixes bug #50787.
13052 2003-11-10 Dick Porter <dick@ximian.com>
13054 * locales.c: Use platform-endian UTF16
13056 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
13058 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13060 2003-11-10 Martin Baulig <martin@ximian.com>
13063 (mono_metadata_load_generic_params): Make this actually work.
13065 * reflection.c (mono_reflection_bind_generic_parameters): If our
13066 parent is a generic instance, pass all the `types' to it, no
13067 matter whether it has the same number of type parameters or not.
13069 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
13071 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13073 * assembly.c (mono_assembly_load_references): Move the image<->assembly
13074 assignment code to this function so it gets called recursively for all
13077 * image.c (load_modules): Remove the assembly assignment since it is
13078 now done by mono_assembly_load_references.
13080 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13081 Add 'module' argument.
13082 (mono_module_get_types): New helper function.
13083 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
13085 2003-11-08 Martin Baulig <martin@ximian.com>
13087 * class.c (mono_class_inflate_generic_method): Interface method
13088 don't have a header.
13090 * reflection.c (mono_image_get_methodspec_token): Take an
13091 additional `MonoGenericInst *' argument instead of reading it from
13092 the header; this is necessary to support interfaces.
13093 (mono_image_create_token): Pass the `MonoGenericInst *' from the
13094 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
13095 (inflated_method_get_object): Take an additional `MonoGenericInst *'
13098 * reflection.h (MonoReflectionInflatedMethod): Added
13099 `MonoGenericInst *ginst'.
13101 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
13103 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
13105 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
13107 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
13109 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
13112 (reflection_methodbuilder_from_method_builder):
13113 (reflection_methodbuilder_from_ctor_builder): New helper functions to
13114 initialize a ReflectionMethodBuilder structure.
13115 (mono_image_get_methodbuilder_token):
13116 (mono_image_get_ctorbuilder_token): New functions to emit memberref
13117 tokens which point to types in another module inside the same assembly.
13119 * reflection.c: Use the new helper functions.
13121 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
13123 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
13124 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
13126 * reflection.c (resolution_scope_from_image): Emit a moduleref if
13129 * reflection.c (mono_image_build_metadata): Emit metadata only for the
13130 current module. Emit the manifest only for the main module.
13132 * reflection.c (mono_image_create_token): Add assertion when a
13133 memberref needs to be created.
13135 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
13137 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
13138 larger buffer for the custom attribute blob. Fixes #50637.
13140 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13142 * threadpool.c: notify listener on async processing handles after
13143 invoking the async callback. Thanks to Zoltan.
13145 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
13147 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
13148 avoid code duplication.
13150 * reflection.h (MonoDynamicImage): New type which is currently unused,
13151 but will be used through the ref.emit code in place of
13152 MonoDynamicAssembly.
13154 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
13157 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
13158 a MonoDynamicImage instead of just a MonoImage.
13160 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
13161 icalls to ModuleBuilder but keep their semantics, so they will work
13162 with moduleb->assemblyb. This will change later.
13164 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
13166 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
13169 * reflection.c (mono_image_build_metadata): Avoid creation of a default
13170 main module, since it is now done by the managed code.
13172 2003-11-03 Martin Baulig <martin@ximian.com>
13174 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
13175 `ginst->klass' here.
13176 (method_encode_methodspec): Don't use the `ginst->generic_method's
13177 klass if it's a generic instance, use `ginst->klass' in this case.
13179 2003-11-03 Martin Baulig <martin@ximian.com>
13181 * reflection.c (mono_image_get_generic_method_param_info):
13182 Removed, use mono_image_get_generic_param_info() instead.
13183 (mono_image_get_type_info): Write the GenericParam table before
13184 the Method table. This is neccessary because in the GenericParam
13185 table, type parameters of the class (ie. '!0' etc.) must come
13186 before the ones from its generic methods (ie. '!!0' etc).
13188 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
13190 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
13192 2003-11-02 Martin Baulig <martin@ximian.com>
13194 * reflection.c (create_generic_typespec): Take a
13195 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
13196 the generic parameters from it.
13198 2003-11-02 Martin Baulig <martin@ximian.com>
13200 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
13201 instead of a `MonoClassField *' since we just need the type.
13202 (create_generic_typespec): New static function. Creates a
13203 TypeSpec token for a generic type declaration.
13204 (mono_image_get_generic_field_token): New static function.
13205 (mono_image_create_token): If we're a FieldBuilder in a generic
13206 type declaration, call mono_image_get_generic_field_token() to get
13209 2003-11-02 Martin Baulig <martin@ximian.com>
13212 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
13213 `MonoReflectionGenericInst *declaring_type' and
13214 `MonoReflectionGenericInst *reflected_type' fields.
13216 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
13217 `MonoReflectionGenericInst *declaring_type' and a
13218 `MonoReflectionGenericInst *reflected_type' argument instead of a
13219 single `MonoReflectionGenericInst *type' one. Set
13220 `res->declaring_type' and `res->reflected_type' from them.
13221 (mono_reflection_inflate_field): Likewise.
13223 2003-11-02 Martin Baulig <martin@ximian.com>
13225 * class.c (mono_class_setup_vtable): Don't store generic methods
13228 2003-11-02 Martin Baulig <martin@ximian.com>
13230 * reflection.h (MonoReflectionGenericInst): Added
13231 `MonoReflectionType *declaring_type'.
13233 * reflection.c (mono_reflection_bind_generic_parameters): Use
13234 `if (tb->parent)' instead of `klass->parent'.
13236 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
13238 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
13239 with an empty ASSEMBLY table.
13241 * reflection.c (mono_image_build_metadata): Avoid using the same loop
13242 variable in the inner and outer loops.
13244 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
13246 * metadata.h (mono_metadata_make_token): Put parentheses around macro
13249 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
13251 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
13252 icalls. Instead, do everything in managed code. This is needed since
13253 it is hard to restore the original domain etc. in unmanaged code in the
13254 presence of undeniable exceptions.
13256 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
13257 New icalls to push and pop appdomain refs.
13259 2003-10-31 Martin Baulig <martin@ximian.com>
13261 * class.c (inflate_generic_type): Renamed to
13262 mono_class_inflate_generic_type() and made it public.
13264 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
13267 * loader.c (mono_field_from_memberref): Also set the retklass for
13270 * fielder.c (mono_image_get_inflated_field_token): New static
13271 method; creates a metadata token for an inflated field.
13272 (mono_image_create_token, fixup_method): Added support for
13273 "MonoInflatedField".
13274 (fieldbuilder_to_mono_class_field): New static function.
13275 (mono_reflection_inflate_field): New public function.
13278 (MonoReflectionGenericInst): Added `MonoArray *fields'.
13279 (MonoReflectionInflatedField): New typedef.
13281 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
13283 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
13284 for Solaris and other platforms without s6_addr16
13286 2003-10-30 Martin Baulig <martin@ximian.com>
13288 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
13289 argument instead of two.
13290 (mono_class_inflate_generic_signature): Likewise.
13291 (inflate_generic_header): Likewise.
13292 (mono_class_inflate_generic_method): Likewise. In addition, if
13293 `ginst->klass' is set, it becomes the new `method->klass'.
13295 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
13298 * reflection.c (encode_generic_method_sig): Write a 0xa as the
13299 first byte. [FIXME]
13300 (method_encode_methodspec): If we have generic parameters, create
13301 a MethodSpec instead of a MethodRef.
13302 (fixup_method): Added support for "MonoInflatedMethod" and
13303 "MonoInflatedCtor".
13304 (mono_image_create_token): Added support for "MonoInflatedMethod"
13305 and "MonoInflatedCtor".
13306 (inflated_method_get_object): New static function; returns a
13307 managed "System.Reflection.MonoInflatedMethod" object.
13308 (mono_reflection_bind_generic_method_parameters): Return a
13309 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
13310 (mono_reflection_inflate_method_or_ctor): Likewise.
13311 (mono_image_get_generic_method_param_info): Initialize unused
13313 (mono_image_get_generic_param_info): Likewise.
13315 * reflection.h (MonoReflectionInflatedMethod): New public
13316 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
13317 "S.R.MonoInflatedCtor" classes.
13319 * loader.c (method_from_memberref): If we're a TypeSpec and it
13320 resolves to a generic instance, inflate the method.
13322 2003-10-28 Dick Porter <dick@ximian.com>
13324 * object.c (mono_runtime_run_main): Convert command-line arguments
13325 into utf8, falling back to the user's locale encoding to do so.
13327 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
13329 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
13332 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
13334 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
13335 up icalls at method definition time. Partially fixes #33569.
13337 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
13339 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
13340 marshalling of arrays. Fixes #50116.
13342 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
13344 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
13345 points to a vtable in the dying appdomain.
13347 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
13348 listeners into unmanaged code inside the lock.
13350 * object.c (mono_class_vtable): Turn off typed allocation in non-root
13351 domains and add some comments.
13353 2003-10-25 Martin Baulig <martin@ximian.com>
13355 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
13357 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
13359 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
13360 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
13361 currently parsing. Create the generic class and store it in
13362 `generic_inst->klass' before parsing the type arguments. This is
13363 required to support "recursive" definitions; see mcs/tests/gen-23.cs
13365 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
13366 to support recursive typespec entries.
13368 * class.c (mono_class_setup_parent): If our parent is a generic
13369 instance, we may get called before it has its name set.
13370 (mono_class_from_generic): Splitted into
13371 mono_class_create_from_generic() and mono_class_initialize_generic().
13373 2003-10-25 Martin Baulig <martin@ximian.com>
13375 * icall.c (ves_icall_Type_BindGenericParameters): Return a
13376 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
13377 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
13378 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
13380 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
13381 (create_typespec): Likewise.
13382 (mono_reflection_bind_generic_parameters): Return a
13383 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
13384 (mono_reflection_inflate_method_or_ctor): New public function.
13386 * reflection.h (MonoReflectionGenericInst): New typedef.
13388 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
13390 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
13391 inside the domain lock. Fixes #49993.
13393 * object.c (mono_class_vtable): When typed allocation is used,
13394 allocate vtables in the GC heap instead of in the mempool, since the
13395 vtables contain GC descriptors which are used by the collector even
13396 after the domain owning the mempool is unloaded.
13398 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
13400 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
13401 reflect what it does. Also invalidate mempools instead of freeing
13402 them if a define is set.
13404 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
13407 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
13408 hold the finalizable objects in this domain.
13410 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
13413 * appdomain.c (mono_domain_set): New function to set the current
13414 appdomain, but only if it is not being unloaded.
13416 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
13417 appdomain which is being unloaded.
13419 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
13420 unloading of the root appdomain.
13422 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
13423 icall to execute a method in another appdomain. Intended as a
13424 replacement for InternalSetDomain, which can confuse the code
13425 generation in the JIT.
13427 * appdomain.c (mono_domain_is_unloading): New function to determine
13428 whenever an appdomain is unloading.
13430 * appdomain.c (mono_domain_unload): New function to correctly unload
13433 * assembly.c (mono_assembly_load_references): Check that an assembly
13434 does not references itself.
13436 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
13437 domain manually, it asks the finalizer thread to do it, then waits for
13438 the result. Also added a timeout.
13440 * icall.c: Register the new icalls.
13442 * threads.h threads.c: Export the mono_gc_stop_world and
13443 mono_gc_start_world functions.
13445 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
13446 function to fill out the mempool with 0x2a.
13448 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
13450 * reflection.h (MonoReflectionMethodAux): New structure to store
13451 information which is rarely used, thus is not in the MonoMethod
13454 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
13455 store the aux info.
13457 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
13458 and marshalling info into the aux structure.
13460 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
13461 from the aux structure.
13463 * loader.c (mono_method_get_param_names): Retrieve the param names from
13466 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
13468 * exception.h exception.c: Add AppDomainUnloadedException && fix
13471 2003-10-21 Dick Porter <dick@ximian.com>
13474 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
13475 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
13477 2003-10-21 Martin Baulig <martin@ximian.com>
13479 * reflection.c (mono_reflection_bind_generic_parameters):
13480 `klass->parent' is NULL for interfaces.
13482 2003-10-21 Martin Baulig <martin@ximian.com>
13484 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13486 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
13488 * exception.c (mono_exception_from_name_msg): New helper function for
13489 creating exceptions and initializing their message field.
13491 * exception.c: Simplify functions using the new helper.
13493 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
13496 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
13497 mono_raise_exception, since otherwise gcc doesn't generate the function
13498 epilog for raise_exception, confusing the stack unwinding in the JIT.
13501 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
13502 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
13505 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13507 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
13510 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
13512 * icall.c: Removed GetUninitializedObject method because
13513 AllocateUninitializedClassInstance does the same.
13515 2003-10-18 Martin Baulig <martin@ximian.com>
13517 * class.c (inflate_generic_signature): Renamed to
13518 mono_class_inflate_generic_signature() and made it public.
13519 (my_mono_class_from_generic_parameter): New static function; if we
13520 don't already have the generic parameter's MonoClass, create a
13521 very simple one which is just used internally in the runtime and
13522 not passed back to managed code.
13524 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
13526 * metadata.h (MonoMethodSignature): Moved the
13527 `MonoGenericParam *gen_params' to the MonoMethodHeader.
13528 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
13530 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
13531 ves_icall_MonoMethod_GetGenericArguments(); this is now an
13532 interncall on the MonoMethod class, not on MethodInfo.
13533 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
13534 calling mono_reflection_bind_generic_method_parameters() directly.
13536 * loader.c (mono_method_get_signature): If this is a MethodSpec;
13537 return the already computed `method->signature'.
13538 (method_from_methodspec): New static function to load a method
13539 from a MethodSpec entry.
13540 (mono_get_method_from_token): Call the new method_from_methodspec()
13541 for MethodSpec tokens.
13542 (mono_get_method_from_token): If we're a generic method, load the
13545 * reflection.c (mono_image_get_memberref_token): Allow
13546 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
13548 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
13549 (mono_image_create_token): First check whether it's a generic
13550 method (so we'd need to create a MethodSpec), then do the other
13552 (mono_reflection_bind_generic_method_parameters): Return a
13553 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
13554 called directly from the interncall.
13556 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
13558 * reflection.c (load_public_key): Move loading of the public key
13561 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
13563 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
13566 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
13567 culture, hash_alg and public_key. Fixes #49555.
13569 2003-10-17 Martin Baulig <martin@ximian.com>
13571 * class.h (MonoGenericInst): Moved this declaration here and added
13572 `MonoMethod *generic_method'.
13575 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
13576 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
13578 * metadata.c (mono_metadata_type_equal): Two types of
13579 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
13580 index; ie. don't compare the address of the `MonoGenericParam'
13582 (mono_metadata_load_generic_params): Removed the `MonoMethod
13585 * metadata.h (MonoGenericInst): Moved declaration to class.h.
13586 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
13588 * reflection.c (method_encode_signature): Encode the number of
13589 generic parameters.
13590 (encode_generic_method_sig): New static function.
13591 (method_encode_methodspec): New static function; creates an entry
13592 in the MethodSpec table for a generic method.
13593 (mono_image_get_methodspec_token): New static function.
13594 (mono_image_create_token): Call mono_image_get_methodspec_token()
13595 for generic methods.
13596 (mono_reflection_bind_generic_method_parameters): New public
13597 function. Instantiates a generic method.
13599 2003-10-16 Martin Baulig <martin@ximian.com>
13601 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
13602 *gen_params' here from MonoMethodHeader.
13604 * metadata.c (mono_metadata_parse_method_signature): If we have
13605 generic parameters, initialize `method->gen_params' and then set
13606 the correct `type->data.generic_param' in all the parameters.
13608 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
13610 * threads.c (mono_threads_get_default_stacksize): New function to
13611 return the default stacksize.
13613 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
13614 termination of the finalizer thread, since the previous method had
13615 race conditions. Fixes #49628.
13617 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
13618 as for the other managed threads.
13620 2003-10-16 Martin Baulig <martin@ximian.com>
13622 * class.c (inflate_generic_signature): Copy `generic_param_count'
13625 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
13628 * metadata.c (mono_metadata_parse_method_signature): Actually set
13629 the `method->generic_param_count' here.
13630 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
13632 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
13634 * object.h: Add a new field to TypedRef to simplify the implementation
13635 of the REFANY opcodes in the JIT.
13637 * icall.c: Make use of the new field.
13639 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
13642 2003-10-15 Martin Baulig <martin@ximian.com>
13644 * class.c (mono_class_from_gen_param): Renamed to
13645 mono_class_from_generic_parameter() and moved most of the
13646 functionality from mono_reflection_define_generic_parameter()
13647 here; ie. we create a "real" class here.
13648 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
13649 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
13650 previously been called.
13652 * class.h (MonoGenericParam): Moved the declaration of this struct
13653 here from metadata.h and added `MonoMethod *method'.
13655 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
13658 * loader.c (mono_get_method_from_token): If we have any generic
13659 parameters, call mono_metadata_load_generic_params() to read them
13660 from the MONO_TABLE_GENERICPAR.
13662 * metadata.c (mono_metadata_load_generic_params): Added
13663 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
13665 * metadata.h (MonoMethodSignature): Replaced
13666 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
13667 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
13669 * reflection.c (mono_reflection_define_generic_parameter): Moved
13670 most of the functionality into the new
13671 mono_class_from_generic_parameter(); set the `method' field if
13672 we're a method parameter.
13674 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
13676 * marshal.c (emit_struct_conv): if native size is 0
13679 2003-10-14 Martin Baulig <martin@ximian.com>
13681 * icall.c: The generics API has changed in the spec since it was
13682 added to System.Type; these modifications make it match the spec
13684 (ves_icall_Type_GetGenericParameters): Renamed to
13685 `ves_icall_Type_GetGenericArguments'.
13686 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
13687 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
13688 `ves_icall_MonoType_get_HasGenericArguments'.
13689 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
13690 `ves_icall_MonoType_get_IsGenericParameter'.
13691 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
13692 this is no interncall anymore.
13693 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
13694 `ves_icall_TypeBuilder_get_IsGenericParameter'.
13696 2003-10-14 Martin Baulig <martin@ximian.com>
13698 * reflection.c (mono_reflection_bind_generic_parameters): Also
13699 inflate generic methods if we're reading the class from IL.
13701 2003-10-13 Martin Baulig <martin@ximian.com>
13703 * reflection.c (mono_reflection_define_generic_parameter): This
13704 method isn't called directly from the icall anymore; take a
13705 `MonoReflectionAssemblyBuilder *' so we can use this for type and
13706 method generic parameters.
13707 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
13708 (method_builder_encode_signature): Encode generic parameters.
13709 (mono_image_get_method_info): Write generic params to the
13710 MONO_TABLE_GENERICPARAM table.
13712 * reflection.h (MonoReflectionMethodBuilder): Added
13713 `MonoArray *generic_params'.
13715 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
13717 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
13718 wrapper for mono_reflection_define_generic_parameter().
13719 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
13721 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
13723 * marshal.h: Add missing function to fix build.
13725 * marshal.c (mono_marshal_get_native_wrapper): Add support for
13726 the SetLastError pinvoke attribute.
13728 * marshal.c (mono_marshal_set_last_error): New helper function called
13729 by the generated code.
13731 * marshal.c (mono_mb_emit_branch): New helper function.
13733 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
13735 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13736 classes as parameters and return values of delegates. Fixes #29256.
13738 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
13740 * locales.c: use gint32 in non HAVE_ICU case
13742 2003-10-11 Martin Baulig <martin@ximian.com>
13744 * mono-debug.c (mono_debug_add_method): Added a workaround for
13747 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
13749 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
13750 delegates passed to native code must use the STDCALL calling
13751 convention. Fixes #35987.
13753 2003-10-10 Martin Baulig <martin@ximian.com>
13755 * class.c (inflate_generic_type): If we're inflating for a generic
13756 type instance (and not for a generic method), return
13757 MONO_TYPE_MVAR unchanged.
13759 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13761 * string-icalls.c: Join ignores null strings in the source array.
13762 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
13763 * threads.c: GetAvailableTheads is slightly more accurate.
13765 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
13767 * threads.h threads.c : add mono_threads_set_default_stacksize
13768 and pass default to CreateThread calls.
13770 2003-10-09 Dick Porter <dick@ximian.com>
13774 * locales.c: Internal calls for constructing CultureInfo and
13775 related objects from libicu (if its available.)
13777 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
13779 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
13781 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13783 * threadpool.c: added an argument to async_invoke_thread that is the
13784 item to process, pass the MonoAsyncResult to the thread start function
13785 when creating a new thread. This way we don't need to acquire any lock
13786 when we're creating a new thread. Readded a semaphore for faster
13787 response times (instead of that Sleep i added).
13789 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
13791 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13792 get daylight change dates better on Windows, fix handling
13793 of platforms without tm_gmtoff.
13795 2003-10-06 Martin Baulig <martin@ximian.com>
13797 * class.c (inflate_generic_method): Renamed to
13798 mono_class_inflate_generic_method() and made public.
13799 (mono_class_init): Don't inflate the generic methods here.
13800 (mono_class_from_generic): Added `gboolean inflate_methods'
13801 argument. Inflate the methods here.
13803 * loader.c (mono_method_get_param_names): Ignore instances of
13804 generic types for the moment.
13806 * reflection.c (fixup_method): Added support for inflated methods.
13807 (mono_image_create_token): Use mono_image_get_methodref_token()
13808 for inflated methods.
13809 (mono_custom_attrs_from_param): Ignore instances of generic types
13811 (mono_reflection_bind_generic_parameters): New public function.
13812 Moved all the functionality from
13813 ves_icall_Type_BindGenericParameters() here and added support for
13815 (mono_reflection_define_generic_parameter): Initialize
13816 `klass->methods' here.
13818 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
13819 functionality into mono_reflection_define_generic_parameter().
13820 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
13821 TypeBuilder, return that TypeBuilder.
13823 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13825 * appdomain.c: removed mono_delegate_semaphore.
13828 (mono_thread_pool_add): moved hash table creation inside and the thread
13829 creation outside of the critical region.
13830 (mono_thread_pool_finish): removed obsolete code.
13831 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
13832 continue or exit the thread depending on the queue.
13834 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
13836 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
13837 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
13838 handle more bool marshalling options
13840 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
13842 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
13843 arrays of structs. Also add a more descriptive error message when
13844 a structure member is marshalled as LPArray.
13846 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
13848 * marshal.c (mono_marshal_get_native_wrapper): Add support for
13849 marshalling arrays of complex types. Fixes #29098. Also remove an
13850 usused and incomplete function.
13852 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13854 * gc.c: report heap_size - free_bytes as total memory allocated
13857 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
13859 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
13860 fix timezone handling problems on Windows.
13862 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
13863 asserts when the year is outside the range handled by ms the functions.
13865 * class.c (setup_interface_offsets): If the class is an interface,
13866 fill out its interface_offsets slot.
13868 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13870 * threadpool.c: mark threadpool threads as background.
13872 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
13874 * decimal.c - define DECINLINE to nothing if not using GCC
13876 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
13878 * assembly.c: More refcount fixes.
13880 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13882 * string-icalls.c: if we're not trimming, return the same string.
13883 When not splitting, don't create a new string.
13885 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13888 (mono_image_open): increment the ref_count inside the critical section.
13890 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
13892 * image.c (mono_image_open): Fix reference counting bug.
13894 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
13896 * marshal.c (mono_marshal_type_size) struct alignment changed for
13897 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
13898 64bits. Avoid leak in mono_marshal_get_native_wrapper when
13899 mono_lookup_pinvoke_call throws.
13901 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
13903 * reflection.c (mono_reflection_parse_type): Fix #49114.
13905 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
13906 temporary workaround for cygwin header problem.
13908 * object.c (mono_object_isinst): Synchronize this with the code
13909 generated by the JIT for casts.
13911 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
13913 * reflection.c (encode_type): Fix #38332.
13915 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
13917 * marshal.c (mono_marshal_method_from_wrapper): New function to return
13918 the original method from the wrapper method.
13920 2003-09-25 Martin Baulig <martin@ximian.com>
13922 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
13923 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
13924 (ves_icall_Type_get_IsGenericInstance): New interncall.
13926 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
13928 * object.c: fix cast warning in big endian code.
13930 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
13932 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
13934 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13936 * assembly.c: don't call check_env from mono_assembly_load. It's
13937 already done once in mono_assemblies_init and may cause headaches when
13938 multiple threads are loading assemblies.
13940 2003-09-19 Martin Baulig <martin@ximian.com>
13942 * reflection.c (mono_reflection_define_generic_parameter): Don't
13943 allocate `klass->methods', set `klass->flags' to
13944 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13946 2003-09-18 Martin Baulig <martin@ximian.com>
13948 * class.c (mono_class_init): Don't create `class->methods' if it's
13949 already initialized.
13951 * metadata.c (mono_metadata_load_generic_params): Make this
13954 * reflection.c (mono_reflection_define_generic_parameter): Set
13955 parent class and interfaces from the constraints.
13957 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13958 to keep this struct in sync with the declaration in TypeBuilder.cs.
13960 2003-09-17 Martin Baulig <martin@ximian.com>
13962 * metadata.h (MonoType): Replaced the data's `int type_param'
13963 field with `MonoGenericParam *generic_param'.
13964 (MonoGenericParam): Added `MonoClass *klass'.
13966 * class.c (mono_class_from_gen_param): Removed the
13967 `MonoImage *image' and `int type_num' arguments.
13969 * metadata.c (mono_metadata_parse_generic_param): New static
13970 method; creates a MonoGenericParam which just contains the index.
13971 (do_mono_metadata_parse_type): Call
13972 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13975 * reflection.c (mono_image_typedef_or_ref): Generic type
13976 parameters may be in the same assembly, but never use a typedef
13978 (mono_reflection_define_generic_parameter): We're now creating a
13979 "real" class for the type parameter; it's now safe to call
13980 mono_class_from_mono_type() on the class'es type, it'll do the
13983 2003-09-16 Martin Baulig <martin@ximian.com>
13985 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13986 `symfile->range_entry_size' and `symfile->class_entry_size' here;
13987 the `symfile' data structure must be fully initialized before it
13988 gets added to the table.
13990 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
13992 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13994 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13995 class init trampolines.
13997 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
13999 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
14000 to the built-in profiler to turn off time and allocation profiling
14003 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
14005 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
14008 * debug-helpers.c (mono_method_full_name): Print the wrapper type
14009 in human readable form.
14011 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
14013 * reflection.c icall.c: Fixed warnings.
14015 * image.c (load_class_names): Use a temporary hash table to hold the
14016 namespaces in order to avoid doing many string comparisons.
14018 * image.h: Fix typo.
14020 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
14021 Pass NULL instead of g_direct_equal to the GHashTable constructor
14022 since the NULL case is short-circuited inside g_hash_table_lookup,
14023 leading to better performance.
14025 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
14026 obtain the first custom attribute for a given index. Depends on the
14027 CustomAttribute table being sorted by the parent field.
14029 * reflection.c (mono_custom_attrs_from_index): Use the new function
14030 for better performance.
14032 2003-09-07 Martin Baulig <martin@ximian.com>
14034 * class.c (mono_class_init): If we're a generic instance, inflate
14035 all our methods instead of loading them from the image.
14036 (mono_class_from_generic): Set `class->methods = gklass->methods'.
14038 2003-09-07 Martin Baulig <martin@ximian.com>
14040 * mono-debug-debugger.c: Added support for constructors.
14042 2003-09-06 Martin Baulig <martin@ximian.com>
14044 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
14047 * reflection.c (mono_reflection_setup_generic_class): Call
14048 ensure_runtime_vtable() to create the vtable.
14050 2003-09-05 Martin Baulig <martin@ximian.com>
14052 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
14055 2003-09-04 Martin Baulig <martin@ximian.com>
14057 * reflection.c (mono_reflection_define_generic_parameter): Generic
14058 parameters start with zero.
14060 2003-09-04 Martin Baulig <martin@ximian.com>
14062 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14064 * reflection.h (MonoReflectionGenericParam): New typedef.
14065 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
14066 the generic parameters from the managed TypeBuilder.
14068 * reflection.c (mono_reflection_define_generic_parameter): New function.
14069 (mono_reflection_create_runtime_class): Encode generic parameters.
14070 (mono_reflection_setup_generic_class): New function; this is
14071 called after adding adding all generic params to the TypeBuilder.
14072 (encode_type): Added MONO_TYPE_VAR.
14074 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
14076 * class.h class.c (mono_class_needs_cctor_run): Moved this method
14079 * assembly.h assembly.c: Moved the AOT loading code into an assembly
14082 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
14084 * reflection.h reflection.c class.h class.c: Delete duplicate
14085 definition of mono_type_get_name () from reflection.c and export the
14088 * class.c: Class loading fixes from Bernie Solomon
14089 (bernard@ugsolutions.com).
14091 * reflection.c: Endianness fixes from Bernie Solomon
14092 (bernard@ugsolutions.com).
14094 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
14096 * assembly.h assembly.c: Define a file format version for AOT
14099 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
14101 * appdomain.h (MonoJitInfo): New field to determine whenever the
14102 code is domain neutral.
14104 2003-08-31 Miguel de Icaza <miguel@ximian.com>
14106 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
14108 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
14110 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
14111 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
14112 Avoid caching the result since strings must be domain specific. Fixes
14115 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
14117 * marshal.c (mono_marshal_init): Make this callable multiple times
14118 since it is hard to find a correct place to call it.
14120 * object.c (mono_runtime_class_init): Execute static constructors in
14121 the correct appdomain.
14123 * image.c (build_guid_table): Handle the case when multiple images have
14126 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14128 * icall.c: added a couple of icalls for System.Web.
14130 2003-08-28 Martin Baulig <martin@ximian.com>
14132 * icall.c (ves_icall_Type_BindGenericParameters): Use
14133 `klass->generic_inst' instead of `&klass->byval_arg' in the
14134 mono_type_get_object() call. The returned type must be
14135 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
14137 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
14141 * object.c (mono_class_proxy_vtable): Make it thread safe.
14143 * pedump.c: Fix warning.
14145 * object.c appdomain.h: Get rid of metadata_section.
14146 It is no longer needed and it was causing deadlocks with domain->lock.
14148 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
14150 2003-08-26 Martin Baulig <martin@ximian.com>
14152 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
14154 2003-08-26 Martin Baulig <martin@ximian.com>
14156 * pedump.c (main): Call mono_metadata_init(),
14157 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
14158 and mono_loader_init().
14160 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
14162 * loader.h: Add missing include to fix build.
14164 * image.h: mono_image_load_references is no more.
14166 * assembly.c: Reworked assembly loading to make it really thread safe.
14167 After these changes, the assembly returned by mono_assembly_open is
14168 fully initialized, i.e. all its references assemblies are loaded.
14170 * assembly.c (mono_image_load_references): Renamed to
14171 mono_assembly_load_references, and made private, since clients no
14172 longer need to call it.
14174 * class.c: Removed calls to mono_assembly_load_references, since it was
14175 a source of deadlocks.
14177 * loader.h loader.c class.h class.c: Protect data structures using a
14178 new lock, the loader lock.
14180 * class.c (mono_class_setup_vtable): Create temporary hash tables and
14181 GPtrArrays only when needed.
14183 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
14184 into empty structures by mcs. Fixes pinvoke7.cs.
14186 * domain.c (mono_init): Call a new initialization function.
14188 * appdomain.c (mono_runtime_init): Call the new initializer function
14189 of the marshal module.
14191 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
14192 inserted into empty structures by mcs. Fixes pinvoke7.cs.
14194 * marshal.h marshal.c: Added locks around the wrapper caches to make
14195 this module thread safe.
14197 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
14198 this argument. Fixes pinvoke1.exe.
14200 2003-08-25 Lluis Sanchez <lluis@ximian.com>
14202 * object.h: Added call_type field to MonoMethodMessage and the corresponding
14203 enumeration of values. Removed fields to store remote call output values in
14204 MonoAsyncResult. Not needed any more.
14205 * object.c: Initialize call_type and async_result fields in mono_message_init.
14206 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
14207 dispatching the message.
14208 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
14209 async call to finish. To do it use a message with EndInvoke call type.
14211 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
14213 * loader.h loader.c (mono_method_hash_marhal_info): New function which
14214 determines whenever a method has marshalling info.
14216 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14218 * assembly.c: fix the build on windows.
14220 2003-08-22 Lluis Sanchez <lluis@ximian.com>
14222 * object.cs: Fixed bug #47785.
14224 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
14226 * string-icalls.c (StringReplace): If their are no occurances of
14227 the old string found return a reference to the supplied
14228 string. This saves some memory and matches MS behavoir.
14230 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14232 * socket-io.c: fixed compilation for systems that define AF_INET6
14233 and don't define SOL_IP/SOL_IPV6.
14235 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
14237 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
14238 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
14240 * rawbuffer.c rawbuffer.h: Make this module thread safe.
14242 * domain.c: Make this module thread safe.
14244 * domain.c (mono_init): Call new initialization function.
14246 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
14247 reference types too. Fixes #38812.
14249 * image.c (mono_image_init): Fixed warnings.
14251 * class.c (mono_class_from_typeref): Handle assembly load failure
14254 * appdomain.c (add_assemblies_to_domain): Handle the case when
14255 the references of an assembly are not yet loaded.
14257 * metadata.c image.c assembly.c: Moved initialization of global
14258 variables to a separate function called at startup since lazy
14259 initialization of these variables is not thread safe.
14261 * image.c assembly.c: Made this module thread safe by adding locks in
14262 the appropriate places.
14264 * domain.c (mono_init): Call the new initialization functions of the
14267 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
14269 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
14270 make a direct call. It is proxy's work to make the call asynchronous.
14271 mono_delegate_end_invoke(): If the targe is a proxy, just collect
14273 * object.cs: mono_method_call_message_new(): read AsyncResult and
14274 state object from parameters list, if this info is requested.
14275 * object.h: Added fields to store remote call output values in
14276 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
14278 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14280 * object.h: add needed fields to MonoThread.
14281 * threads.c, threads.h: allow registering a function to cleanup data
14282 allocated per thread by the JIT.
14284 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14286 * loader.h: portability fix by Bernie Solomon
14287 * <bernard@ugsolutions.com>.
14289 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
14291 * reflection.h reflection.c (mono_param_get_objects): Changed this to
14292 return a MonoArray. This simplifies the code and also ensures that
14293 the cache allways contains an object reference as a value.
14295 * icall.c (ves_icall_get_parameter_info): Simplified using the new
14298 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14300 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
14301 fixes a problem with byte ordering when getting the address family for
14304 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
14306 * .cvsignore: Added monosn.
14308 * reflection.h reflection.c loader.c: Added support for parameter
14309 marshalling to dynamically created types. Fixes #47295.
14311 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14313 * rand.c: remove useless warnings.
14315 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14317 * class.c: implemented ldtoken for methods and fieldrefs.
14319 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14321 * threadpool.c: when mono_async_invoke was called, no one took care of
14322 monitoring the queue. So if the method invoked took some time and we
14323 got new async invoke requests after 500 ms (the thread created waited
14324 that long in WaitForSingleObject), the new async invoke was not called
14325 until the previous one finished.
14327 This is fixed now. Thanks to Totte for helping with it.
14329 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14331 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
14333 2003-08-11 Martin Baulig <martin@ximian.com>
14335 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
14337 2003-08-06 Martin Baulig <martin@ximian.com>
14339 * mono-debug-debugger.c: Added support for static fields,
14340 properties and methods.
14342 2003-08-06 Martin Baulig <martin@ximian.com>
14344 * mono-debug-debugger.c: Don't store the MonoString's vtable to
14345 make this work for applications with multiple application domains.
14347 2003-08-04 Martin Baulig <martin@ximian.com>
14349 * mono-debug-debugger.c: Completely reworked the type support; the
14350 most important thing is that we're now just using one single
14351 `MonoType' instance per type.
14353 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
14355 * mono-endian.h, mono-endian.c, icall.c: Added icall
14356 ves_icall_System_Double_AssertEndianity to assert double word endianity
14357 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
14359 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14361 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
14362 support, icalls and fixes.
14364 2003-07-31 Miguel de Icaza <miguel@ximian.com>
14366 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
14367 classes that are a punctuation character in .NET is not the same a
14370 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14372 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
14374 2003-07-29 Miguel de Icaza <miguel@ximian.com>
14376 * icall.c: Add new MemCopy internalcall.
14377 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
14378 Simplified code; It is not necessary to handle all the cases here,
14379 as the C# code takes care of it. Only handle the case of the name
14380 resource embedded into the assembly.
14382 Changed signature to return the data pointer and the size of the
14385 2003-07-26 Miguel de Icaza <miguel@ximian.com>
14387 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
14388 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
14390 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
14392 * socket-io.c: ignore EINTR error in select.
14394 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14396 * class.h, class.c: removed unused subclasses field in MonoClass.
14398 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
14400 * icall.c: improve fix of get_base_definition(). If the parent class
14401 doesn't have the mehod, look at the parent of the parent.
14402 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
14403 to check if a parameter is an in or out parameter
14404 (PARAM_ATTRIBUTE_IN is not set by default).
14405 mono_method_return_message_restore(): Use mono_class_value_size to
14406 get the size of a value type. mono_type_stack_size (parameterType)
14407 does not return the correct value if parameterType is byRef.
14408 mono_load_remote_field(), mono_load_remote_field_new(),
14409 mono_store_remote_field(), mono_store_remote_field_new():
14410 raise exception if the remote call returns an exception.
14412 2003-07-28 Martin Baulig <martin@ximian.com>
14414 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
14415 method. This is a wrapper around mono_runtime_invoke() which
14416 boxes the instance object if neccessary.
14418 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14420 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
14421 metadata.h, row-indexes.h, verify.c: first cut of generics support.
14423 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14425 * icall.c: disable mcs bug workaround.
14427 2003-07-21 Miguel de Icaza <miguel@ximian.com>
14429 * object.c (mono_runtime_class_init): Take the metadata_section
14430 mutex before obtaining the domain mutex.
14432 * appdomain.h: Added definition of metadata_section mutex here.
14434 * object.c: define metadata_mutex here.
14436 2003-07-24 Ravi Pratap <ravi@ximian.com>
14438 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
14441 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
14443 * reflection.c: Fix bug #46669
14445 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14450 * object.h: fill in the type name for TypeLoadException.
14452 2003-07-23 Ravi Pratap <ravi@ximian.com>
14454 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
14455 relationship between TypeBuilders while compiling corlib) and bug
14456 45993 (Array types returned from the runtime while compiling
14457 corlib were from the loaded corlib).
14459 2003-07-22 Martin Baulig <martin@ximian.com>
14461 * mono-debug-debugger.c: Reworked the type support a bit more;
14462 distinguish between types and classes.
14464 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
14466 * icall.c: add IsArrayImpl icall.
14468 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
14470 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
14471 initializing real_size only once. Also fix bug #46602.
14473 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
14475 * object.c: Renamed mono_metadata_section to metadata_section.
14477 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
14479 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
14480 empty array if the type is an array. Fixed.
14481 ves_icall_MonoMethod_get_base_definition: if the base method
14482 is abstract, get the MethodInfo from the list of methods of
14484 * reflection.c: ParameterInfo.PositionImpl should be zero-based
14485 and it was 1-based. Fixed in mono_param_get_objects.
14487 2003-07-20 Martin Baulig <martin@ximian.com>
14489 * mono-debug.h: Set version number to 31.
14490 (mono_debug_init): Added `MonoDomain *' argument.
14492 * mono-debug-debugger.c: Reworked the type support; explicitly
14493 tell the debugger about builtin types; pass the `klass' address to
14496 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
14498 * image.c: Allow new metadata tables to be loaded without a
14499 warning. Also update the warning message to give the new constant value.
14501 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14503 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
14504 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
14505 array type representation changes.
14507 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14509 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
14510 on Environment.Exit () call.
14512 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14514 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
14515 requires a matching corlib.
14517 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
14519 * Changelog: My editor decided to add a CR to each line. Sorry about that.
14520 Committed again without the CRs.
14522 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
14524 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
14525 getting it from the "this" socket instance. Did not work
14526 if the socket is a subclass of Socket.
14527 Also fixed bug #35371.
14529 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14531 * metadata.c: fixed size for TypedByRef.
14532 * loader.c: when searching for a method, consider the vararg amrker.
14533 * unicode.c, decimal.c: constify some arrays.
14535 2003-07-15 Dick Porter <dick@ximian.com>
14537 * socket-io.c: Fixed compilation for gcc < 3.2.
14539 Fixed compilation for machines that don't have AF_INET6 (thanks to
14540 Bernie Solomon <bernard@ugsolutions.com> for that part.)
14542 Fixed compile warnings.
14544 Fixed formatting and line endings.
14546 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
14549 * socket-io.c: Added IPv6 support.
14551 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
14553 * class.c (mono_class_is_assignable_from): New function to implement
14554 the is_assignable_from logic. Used by mono_object_isinst,
14555 Type::IsAssignableFrom () and the interpreter.
14557 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
14558 Object, even interfaces.
14560 * object.c (mono_object_isinst): Implement in terms of
14561 is_assignable_from.
14563 * icall.c (ves_icall_type_is_assignable_from): New icall.
14565 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
14567 * domain.c (foreach_domain): fix compiler warning.
14569 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
14571 * image.c (load_metadata_ptrs): use g_strndup because strndup is
14572 not available on all plattforms
14574 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
14576 * image.h image.c: Store the metadata version string in MonoImage.
14577 * icall.c: New icall to retrieve the image version.
14578 * reflection.c (create_dynamic_image): Fill in the image version field
14579 * reflection.c (build_compressed_metadata): Use the image version
14580 from the image structure.
14582 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14584 * appdomain.c: modified comment.
14585 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
14586 That will be its last iteration when mono_gc_cleanup is called from
14587 mono_runtime_cleanup and before the domain is unloaded.
14591 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
14593 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
14596 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14598 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
14599 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
14600 Bernie Solomon <bernard@ugsolutions.com>.
14602 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14604 * object.c, object.h: provide mono_object_new_fast() for faster
14605 allocation in some special cases.
14607 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14609 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
14610 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
14612 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14614 * threadpool.c: fix leaks.
14616 2003-07-01 Dick Porter <dick@ximian.com>
14618 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
14619 using MonoGHashTables. Fixes threadpool bug posted to list.
14621 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14623 * image.h, image.c: added support to load an assembly from a byte array.
14624 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
14625 assembly bundle support.
14627 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
14629 * threadpool.c (mono_thread_pool_add): keep a reference to the
14630 AsyncResult to prevent GC
14632 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14634 * class.c: leak fix.
14636 2003-06-25 Dick Porter <dick@ximian.com>
14638 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
14639 for the async object, the WaitHandle object will close the handle.
14642 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14644 * class.c: in mono_array_class_get (), lookup from the hash with the
14645 same type we insert: this works around a bug in
14646 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
14647 lluis. The real fix will have to wait for after the release.
14649 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14651 * icall.c: fix memory leak when getting type members.
14653 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14655 * reflection.c: added more pubtoken special cases.
14657 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14659 * class.c: handle field offset correctly when class size
14660 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
14662 2003-06-20 Martin Baulig <martin@ximian.com>
14664 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
14667 2003-06-20 Martin Baulig <martin@ximian.com>
14669 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
14671 2003-06-20 Martin Baulig <martin@ximian.com>
14673 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
14674 just distinguish between variables in registers and variables at
14675 an offset relative to a register.
14677 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14679 * icall.c: #ifdef out latest changes until mcs is fixed.
14681 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14683 * icall.c: return members in metadata order.
14685 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14687 * icall.c: avoid infinite loop in GetTimeZoneData.
14689 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14691 * icall.c: added Marshal.Prelink/All icalls.
14693 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14695 * object.c, object.h: fix warnings and do some overflow checking
14696 when creating arrays.
14698 2003-06-17 Dick Porter <dick@ximian.com>
14701 * file-io.c: File attributes need to be tweaked slightly when
14702 passed from the managed to the w32 world.
14704 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
14705 * profiler.h profiler-private.h profiler.c: Rework last patch
14706 based on suggestion by Paolo.
14708 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
14710 * profiler.h profiler-private.h profiler.c: Added infrastructure for
14711 instruction level coverage data collection.
14712 * profiler.h profiler.c (: Added new callback function which can be
14713 used by the profiler to limit which functions should have coverage
14715 * profiler.c (mono_profiler_load): Call g_module_build_path to
14716 generate the file name of the profiler library.
14718 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14720 * profiler.c, profiler.h, profiler-private.h: added basic block
14721 coverage profiling API.
14723 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
14725 * reflection.c (mono_reflection_create_runtime_class): Add support
14726 for events in dynamically generated code.
14728 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
14731 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14733 * icall.c: when getting timezone info, return reasonable values if we
14734 can't get the actual data.
14736 2003-06-14 Dick Porter <dick@ximian.com>
14738 * threads.c (start_wrapper): Remove the reference to the thread
14739 object in the TLS data, so the thread object can be finalized.
14740 This won't be reached if the thread threw an uncaught exception,
14741 so those thread handles will stay referenced :-( (This is due to
14742 missing support for scanning thread-specific data in the Boehm GC
14743 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
14745 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
14747 * reflection.c: ensure streams and tables are first allocated with
14748 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
14750 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14752 * icall.c: fixed GetElementType for byrefs (bug# 44792).
14754 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
14756 * reflection.c (mono_reflection_create_runtime_class): Add support for
14757 properties to dynamically created classes.
14758 * reflection.c: Fix a few places where non-MonoObjects were inserted
14759 into the tokens hashtable.
14761 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14763 * object.c: some support to handle out of memory exceptions.
14765 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
14767 * marshal.c (mono_marshal_get_native_wrapper): support reference
14770 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14772 * object.h, object.c: more portability stuff from Bernie Solomon.
14773 Unexport mono_object_allocate(). Added mono_object_unbox ().
14774 Set exitcode when an unhandled exception is thrown.
14776 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
14778 * marshal.c (mono_marshal_get_native_wrapper): use custom
14779 marshaler for return types.
14781 2003-06-10 Dick Porter <dick@ximian.com>
14783 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
14784 ip_mreq is available
14786 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14788 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
14789 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
14790 by Bernie Solomon <bernard@ugsolutions.com>.
14792 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
14794 * gc.c (mono_gc_init): Avoid error message on shutdown when
14795 GC_DONT_GC=1 is used.
14797 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
14798 New icall to return the GUID of a module.
14800 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14802 * class.c: ensure instance size always includes the parent's size
14803 even whem class size is set explicitly (fixes bug#44294).
14805 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14807 * profiler.h, profiler.c: made the simple profiler thread-safe,
14808 get more accurate timing info. Allow the loading of an
14809 externally-developed profiler module.
14811 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
14813 * marshal.c (mono_marshal_get_native_wrapper): improved
14814 class/byref arguments.
14815 (mono_marshal_get_native_wrapper): better string marshaling support.
14817 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14819 * class.c: ensure .pack and .size are handled correctly and
14820 simplified layout of static fields.
14822 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
14825 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
14827 * loader.c (mono_lookup_pinvoke_call): look for modules in the
14828 current directory (fix bug 44008)
14830 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
14832 * marshal.c (mono_marshal_get_native_wrapper): started support for
14834 (mono_delegate_to_ftnptr): consider marshalling specifications
14836 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14838 * reflection.c, reflection.h: emit custom marshal info.
14840 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14842 * object.c: free the GError.
14843 * icall.c: added CloseEvent_internal.
14845 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
14848 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
14850 * loader.c (mono_method_get_signature): Add support for dynamic
14853 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14855 * reflection.c: fixed bug #43905.
14857 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14859 * class.c, domain.c, icall.c, metadata.h, object.h: support for
14860 handling TypedReference and ArgIterator.
14861 * loader.c, loader.h: added function to get signature at call site.
14863 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14865 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
14866 data readonly. Buglets and warning fixes. Some MethodSpec support.
14868 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14870 * class.h, class.c, object.c: remove relative numbering support.
14872 2003-05-26 Miguel de Icaza <miguel@ximian.com>
14874 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
14875 free the string, until we get a chance to fix Gtk#
14877 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14879 * marshal.c: revert last patch.
14881 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14883 * icall.c: updates for new mono_class_vtable() not calling
14884 the type constructor anymore.
14886 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14888 * object.h, object.c: separate vtable creation from type
14889 initialization. Make running the .cctor thread safe.
14891 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
14893 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
14895 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
14897 * loader.c (mono_get_method): consider calling convention
14899 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
14901 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
14902 to return the invisible global type for a module.
14904 * reflection.c (mono_image_build_metadata): Emit global fields too.
14906 2003-05-20 Peter Williams <peterw@ximian.com>
14908 * loader.c (mono_lookup_internal_call): Add a few newlines.
14910 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
14912 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
14915 * appdomain.c (set_domain_search_path): Recalculate search path when
14916 AppDomainSetup.PrivateBinPath changes.
14918 * object.c (mono_class_compute_gc_descriptor): It turns out some
14919 parts of the class libs (like System.Thread) holds pointers to
14920 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
14921 to treat native int a pointer type here.
14923 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
14925 * appdomain.h, domain.c: add hashtable for jump target resolution.
14927 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
14929 * reflection.h reflection.c icall.c: Added new icalls
14930 GetManifestResourceInfoInternal, GetModulesInternal and support
14933 2003-05-16 Dick Porter <dick@ximian.com>
14937 * file-io.c: Implement System.IO.MonoIO::GetTempPath
14939 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
14941 * object.c: mono_store_remote_field: little fix to previous patch.
14943 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14945 * class.c: add constructors to array classes.
14946 * icall.c: special case array construction for InternalInvoke (),
14948 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
14950 * class.h class.c reflection.c object.c: Added support for field
14951 defaults in dynamically generated classes.
14953 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14955 * reflection.c: properly encode charset for ddlimport.
14957 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14959 * threads.c: allow compiling without GC.
14961 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14963 * appdomain.h, object.c, object.h, threads.c, threads.h: added
14964 handling of thread static data.
14966 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14968 * reflection.h, reflection.c: added mono_custom_attrs_free ().
14970 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
14972 * class.c (mono_array_class_get): always set the serializable flags
14973 (mono_array_class_get): always set the SEALED attribute for array types
14975 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
14977 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14978 attributes (fix for bug 42021).
14980 2003-05-12 Dick Porter <dick@ximian.com>
14982 * gc.c: Don't run finalizers when the finalizer thread is
14983 finishing up, because the default domain has already been
14986 2003-05-11 Miguel de Icaza <miguel@ximian.com>
14988 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14989 value is null, we should throw an exception. This is slightly
14990 different than the other conventions used for the constructor.
14992 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14994 * socket-io.c: fixed windows build.
14996 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14998 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
15000 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
15002 * object.c (mono_string_new_wrapper): Compatibility fix for MS
15005 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
15007 * class.c (mono_class_layout_fields): Add experimental GC aware
15008 auto layout facility. Requires class library changes to work correctly.
15010 (mono_class_setup_vtable): Avoid overriding explicit interface
15011 method implementations. Fixes iface3.exe test.
15013 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
15015 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
15016 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
15018 * metadata.h: Add new type classification macro which determines
15019 whenever the type holds an object reference.
15021 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
15023 * marshal.c (mono_marshal_get_native_wrapper): cleanups
15025 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
15027 * gc.c (finalizer_thread): Work around a GC bug.
15029 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
15031 * marshal.c (emit_struct_conv): allow unions
15033 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
15035 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
15037 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
15039 2003-05-06 Martin Baulig <martin@ximian.com>
15041 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
15043 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15046 (Select_internal): allow NULLs, don't create arrays if not needed.
15047 Coupled with Socket.cs changes.
15050 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
15051 register a finalizer for it that will close the semaphore handle. This
15052 fixes the leak and make Lupus' test run with > 4080 loops.
15054 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
15056 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
15057 Jerome Laban (bug #42287)
15059 2003-05-02 Martin Baulig <martin@ximian.com>
15061 * debug-mono-symfile.h
15062 (MonoSymbolFile): Moved declaration into mono-debug.h.
15063 (MonoDebugMethodJitInfo): Likewise.
15064 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
15066 (_mono_debug_address_from_il_offset): Take a
15067 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
15070 (MonoDebugDomainData): New struct.
15071 (mono_debug_get_domain_data): New function.
15072 (mono_debug_add_method): Take an additional `MonoDomain *'
15074 (mono_debug_source_location_from_address): Likewise.
15075 (mono_debug_il_offset_from_address): Likewise.
15076 (mono_debug_address_from_il_offset): Likewise.
15078 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
15080 * reflection.c: one more check for null type in custom attrs.
15082 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15084 * reflection.c: avoid warning (comparison is always false due to limited
15085 range of data type).
15087 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15089 * icall.c: throw an exception in Type.GetField if the argument 'name'
15092 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
15094 * reflection.c: fixed handling of enums in named arguments to custom
15095 attributes (bug #42123).
15097 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15099 * reflection.c: use the right array element type and handle
15100 a null for a Type argument, too.
15102 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
15104 * reflection.c: handle arrays as arguments to custom attributes.
15106 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15108 * reflection.c: handle a string value in a custom attr
15109 ctor that takes an object.
15111 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
15113 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
15116 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
15118 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
15120 2003-04-27 Martin Baulig <martin@ximian.com>
15122 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
15123 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
15124 MONO_DEBUGGER_EVENT_BREAKPOINT.
15125 (mono_breakpoint_trampoline_code): Removed.
15126 (mono_debugger_event_handler): The last argument is now a
15128 (mono_debugger_insert_breakpoint_full): Removed the
15129 `use_trampoline' argument.
15130 (mono_debugger_method_has_breakpoint): Likewise.
15131 (mono_debugger_trampoline_breakpoint_callback): Renamed to
15132 mono_debugger_breakpoint_callback(); take the method and
15133 breakpoint number as arguments.
15135 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15137 * metadata.c: fix off by one when loading parameters attributes.
15139 2003-04-24 Martin Baulig <martin@ximian.com>
15141 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
15143 2003-04-24 Martin Baulig <martin@ximian.com>
15145 * mono-debug-debugger.c: Moved all code which interacts with the
15146 Mono Debugger here.
15148 * debug-mono-symfile.c: This code now just deals with the symbol
15149 file itself, the debugger code is now in mono-debug-debugger.c.
15151 2003-04-23 Martin Baulig <martin@ximian.com>
15153 * mono-debug.c (mono_debug_source_location_from_il_offset):
15154 New method; like mono_debug_source_location_from_address(), but
15155 takes an IL offset instead of a machine address.
15157 2003-04-23 Martin Baulig <martin@ximian.com>
15159 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
15160 `line' field; this is now computed by the debugger.
15162 2003-04-23 Martin Baulig <martin@ximian.com>
15164 * mono-debug.[ch]: New files. This is the new debugging interface.
15166 * mono-debug-debugger.[ch]: New files. Moved all code which
15167 interacts with the Mono Debugger here.
15169 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
15171 * domain.c (mono_init): initialize mono_defaults.monitor_class
15173 2003-04-21 Miguel de Icaza <miguel@ximian.com>
15175 * reflection.c (method_encode_code): Add a spicy exception to help
15176 future compiler authors.
15178 2003-04-21 Martin Baulig <martin@ximian.com>
15181 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15182 Make this work with relative pathnames; g_filename_to_uri() needs
15183 an absolute filename.
15185 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
15187 * icall.c: Track name changes in Object and ValueType.
15189 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
15191 * metadata.c (mono_type_stack_size): size should be a multiple of
15194 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15197 (internal_domain_finalize): moved into mono_domain_finalize. No need
15198 to create another thread because the finalizers will be run in the
15201 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
15202 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
15203 to be run (MS does this too).
15205 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
15207 * object.c (mono_class_compute_gc_descriptor): Update comment.
15209 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
15211 * image.h: Add synchronized wrapper cache.
15213 * image.c (do_mono_image_open): Initialize cache.
15215 * reflection.c (create_dynamic_mono_image): Initialize cache.
15217 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15219 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
15220 ves_icall_System_Buffer_ByteLengthInternal.
15222 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15224 * reflection.c: setup klass->nested_in earlier. Allow
15225 a dash in the assembly name.
15227 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
15229 * metadata.c (mono_type_to_unmanaged): dont access
15230 type->data.klass for MONO_TYPE_OBJECT
15231 (mono_type_to_unmanaged): consider System.Delegate class
15233 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
15235 * class.c: just setup supertypes in the proper place instead of
15236 initializing the full element class for arrays.
15238 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15240 * class.c: ensure the element class of arrays is initialized.
15241 Setup the supertype info for array classes, too.
15243 2003-04-14 Miguel de Icaza <miguel@ximian.com>
15245 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
15247 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15249 * Makefile.am: re-added -m option when running cygpath. This way,
15250 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
15252 * mono-config.c: same codepath for locating mono config file for WIN32
15254 * assembly.c: if mono_assembly_setrootdir is called, don't override
15257 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15259 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
15260 MONO_ASSEMBLIES variable.
15262 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15264 * icall.c: added Assembly::GetNamespaces() icall.
15266 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15268 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
15270 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
15272 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
15273 * object.c: fixed bug in the construction of vtable for proxies
15275 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
15277 * object.c (mono_array_new): Mark mono_array_new as an icall.
15279 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15281 * class.c: fixed test for public method when overriding interfaces.
15284 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15286 * appdomain.h, domain.c: added mono_domain_foreach() to
15287 be able to access the currently loaded appdomains.
15288 * object.c: make string interning work across sppdomains.
15289 Mark some functions for use as icalls.
15291 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
15293 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
15295 * reflection.h reflection.c: Allocate long living data using
15296 GC_MALLOC_ATOMIC so the collector does not need to scan it.
15298 * reflection.c: Double the allocation size in streams instead of
15299 increasing it, to prevent unneccesary copying on large assemblies.
15301 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
15302 creation if the assembly does not have the Run flag set.
15304 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15306 * class.h: avoid the C++ keywords in header files (Jerome Laban
15307 spotted and fixed this).
15309 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15312 (mono_unhandled_exception): fill in the arguments for the
15313 UnhandledException event. Only trigger that event for the default
15314 domain (as MS does).
15316 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
15318 * object.c: Improve typed allocation stuff based on suggestions from
15319 Paolo. Also turn it on if the GC library supports it.
15321 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
15323 * object.c object.h class.h: Added experimental typed allocation
15324 facility using the interfaces in gc_gcj.h.
15326 * os/gc_wrapper.h: Added new include files.
15328 2003-04-03 Martin Baulig <martin@ximian.com>
15330 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
15331 which is not yet enabled by default.
15333 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
15335 (mono_gc_lock, mono_gc_unlock): New static functions.
15337 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
15338 functions; stop/start the world for the garbage collector. This
15339 is using the windows API; we need to complete the SuspendThread()/
15340 ResumeThread() implementation in the io-layer to make this work on Unix.
15341 (mono_gc_push_all_stacks): New public function; tells the garbage
15342 collector about the stack pointers from all managed threads.
15344 2003-04-03 Martin Baulig <martin@ximian.com>
15346 * object.h (MonoThread): Added `gpointer stack_ptr'.
15348 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
15350 2003-04-03 Martin Baulig <martin@ximian.com>
15352 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
15354 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
15356 * reflection.c (typebuilder_setup_fields): Initialize field.first and
15359 2003-04-02 Miguel de Icaza <miguel@ximian.com>
15361 * loader.c (mono_lookup_internal_call): Report the corlib that is
15364 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
15366 * icall.c (ves_icall_type_GetTypeCode): fixed check for
15367 System.DBNull (it's class not valuetype).
15369 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15371 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
15372 if the array method was already assigned a token (fixes bug#40646).
15374 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
15376 * reflection.c (mono_reflection_get_type): Attempt type resolve even
15377 if no assembly is given.
15379 2003-04-01 Miguel de Icaza <miguel@ximian.com>
15381 * metadata.h: Added the new tables.
15383 * row-indexes.h: Added definitions for new tables.
15385 * metadata.c: Add schemas for new tables, and add support for
15386 computing the sizes of them.
15388 * class.c: Update for handling the new type cases.
15390 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
15392 * metadata.h (MONO_TYPE_IS_VOID): new macro
15394 2003-03-31 Martin Baulig <martin@ximian.com>
15396 * threads.h (MonoThreadCallbacks): Added `thread_created'.
15398 * threads.c (mono_thread_new_init): Call `thread_created' in the
15399 mono_thread_callbacks.
15401 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
15403 * loader.h: added marshalbyrefobject_class to mono_defaults
15404 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
15405 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
15406 generation of output parameters.
15407 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
15408 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
15409 contextbound and the target object belongs to the context of the caller.
15410 * object.h: added context and unwrapped_server variables in MonoRealProxy.
15411 * object.c: Implemented support for interfaces and abstract classes
15412 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
15413 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
15415 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
15417 * class.h class.c (mono_class_is_subclass_of): New function.
15419 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
15420 routines for most common case (calls from ArrayList::ToArray).
15422 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
15423 routine so programs which call Environment::Exit() can be profiled.
15425 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
15426 Added MONO_ARCH_SAVE_REGS.
15428 * icall.c (ves_icall_type_is_subtype_of): Use new function.
15430 2003-03-29 Miguel de Icaza <miguel@ximian.com>
15432 * blob.h: Add a couple of new MonoType types definitions.
15434 * tabledefs.h: Add a couple of new call convs.
15436 2003-03-27 Zoltan Varga <vargaz@freemail.h>
15438 * reflection.h (MonoReflectionDynamicAssembly): track changes in
15439 the layout of the class.
15441 * reflection.c (alloc_table): double the size on overflow to avoid
15442 unnecessary copying.
15444 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
15445 avoid filling out metadata tables and blobs. Also set mb->ilgen to
15446 null so it can be garbage collected.
15448 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
15450 * reflection.c (mono_reflection_get_type): Return the resolved type
15451 only if it is in the assembly we searched.
15453 * reflection.c (ensure_runtime_vtable): Initialize method slots.
15455 * class.c (mono_class_setup_vtable): Set the slot of the overriding
15458 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15461 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
15462 the right one is 'file:///blah', but MS allows it.
15464 (mono_assembly_open): allow 'file://blah'
15466 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
15468 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
15470 * socket-io.c: fixes bug #40310.
15472 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
15474 * reflection.c (mono_reflection_parse_type): handle deeply nested
15477 * reflection.c (mono_image_create_token): Use unique token values
15478 since they will be put into a hash table.
15480 * class.c (mono_class_setup_vtable): If a method occurs in more than
15481 one place in the vtable, and it gets overriden, then change the
15482 other occurances too.
15484 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
15485 object as return type.
15487 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
15489 * icall.c: Deleted "ToString" implementation for double and float
15490 because they are full implemented in managed code.
15492 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15494 * reflection.c, reflection.h: implemented and exported functions
15495 to retrieve info about custom attributes.
15497 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15499 * appdomain.c: moved Uri handling to assembly.c
15500 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
15501 work when using a file Uri in *nix and windows.
15503 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
15504 GetReferencedAssemblies.
15506 2003-03-18 Dick Porter <dick@ximian.com>
15508 * icall.c: Rename a couple of internal calls
15510 * threads.c: Set the thread state to Stopped when a thread exits.
15513 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
15515 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
15518 * object.c (mono_class_vtable): fix warning.
15520 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
15522 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
15524 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
15526 (method_encode_clauses): Create exception info structures in the right
15528 (mono_reflection_setup_internal_class): Initialize supertypes field.
15530 * class.c object.c: Handle interfaces which implement other interfaces
15533 * class.h class.c: Move the supertypes array initialization code into
15534 a separate function so it can be used for dynamic types too. Also call
15535 it earlier, in mono_class_init(), since it can be used before the
15536 type is initialized.
15538 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15542 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
15547 * object.c: remove warnings.
15549 2003-03-13 Martin Baulig <martin@ximian.com>
15551 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
15552 (MonoDebugLexicalBlockEntry): New types.
15554 * debug-mono-symfile.c
15555 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
15557 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15559 * process.c: ret can be any non-zero value accroding to MS doc.
15561 2003-03-07 Miguel de Icaza <miguel@ximian.com>
15563 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
15564 fixing a warning for a miss-used prototype, would have cause
15565 random memory corruption.
15567 2003-03-07 Martin Baulig <martin@ximian.com>
15569 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
15570 getting really annoying ....
15572 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
15574 * reflection.c (fixup_method): added support for array methods.
15576 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15578 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
15579 (pointed out by Michael Adams).
15581 2003-03-04 Dick Porter <dick@ximian.com>
15583 * icall.c: Temporarily reverted the Double and Single ToString()
15584 change, because it broke nunit.
15586 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
15588 * object.h, threads.h: make include files compatible with C++
15589 (patch by Jerome Laban <jlaban@wanadoo.fr>).
15591 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
15593 * icall.c: Erased ToString helper functions for Double and Single.
15594 Now, that implementations ar all in managed code (Double and Single
15597 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
15599 * appdomain.c: Added method for initializing the default context of
15600 a domain. Added internal call for getting the default context.
15601 * appdomain.h: Added context variable in MonoDomain struct.
15602 * domain.c: mono_domain_set also sets the default context of the domain
15603 * icall.c: Mapped internal method InternalGetDefaultContext.
15604 * object.c: mono_object_get_virtual_method returns always a remoting
15605 wrapper if the object is a transparent proxy.
15606 mono_runtime_invoke_array: when creating an object by calling the
15607 constructor, if the created object is a proxy, then the constructor should
15608 be called using the a remoting wrapper.
15610 2003-03-03 Dick Porter <dick@ximian.com>
15612 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
15613 variable so it compiles on solaris. Problem spotted by
15614 Christopher Taylor <ct@cs.clemson.edu>
15616 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15619 (get_info_from_assembly_name): don't leak value.
15622 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
15625 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15627 * assembly.c: export mono_image_load_references ().
15628 * class.c: handle function pointers. mono_class_from_name() now
15629 supports nested type names directly.
15631 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
15633 * reflection.h reflection.c: Encode already created dynamic methods
15634 and fields correctly as a DEF instead of a REF.
15636 * reflection.c: Get rid of the force_ref argument to
15637 mono_image_typedef_or_ref since it was wrong in the first place.
15639 * string-icalls.c: add error checking to string constructors according
15642 * reflection.c: Emit types in the order their TypeBuilders were
15643 created. Previously, a new table index was assigned to each type before
15644 the tables were emitted. This was wrong because the signature blob
15645 might already refer to a type by its original table index.
15647 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
15649 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
15652 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15654 * Makefile.am: make assemblies dir have \ instead of / on windows.
15656 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
15658 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
15659 iterate over the NESTEDCLASS table using a linear search since the
15660 table is not guaranteed to be sorted by the secondary key.
15662 * class.c (mono_class_create_from_typedef): fixed up call to
15663 mono_metadata_nesting_typedef.
15665 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
15667 * marshal.c (mono_string_to_byvalstr): clear the memory as
15668 suggested by Jerome Laban <jlaban@wanadoo.fr>
15670 2003-02-26 Dick Porter <dick@ximian.com>
15672 * process.c: Cope with padding in .rsrc blocks
15674 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
15676 * metadata.h: reverted the filter_len change, it breaks reflection
15678 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
15680 * metadata.h: added a new field to store the filter_len
15683 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15685 * reflection.c: handle custom attributes for types and members
15686 created with Reflection.Emit (bug#38422).
15688 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
15690 * reflection.c: define RTSpecialName automatically for constructors for
15691 compatibility with MS.NET.
15693 * reflection.c (mono_reflection_create_runtime_class): initialize
15694 nested_in field of dynamically created classes.
15696 2003-02-22 Martin Baulig <martin@ximian.com>
15698 * debug-mono-symfile.h: Incremented version number.
15700 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
15702 * object.h icall.c process.c: fix warnings.
15704 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
15706 * appdomain.h appdomain.c:
15707 (mono_domain_try_type_resolve): split the
15708 name_or_tb argument into a name and a tb argument.
15709 (mono_domain_has_type_resolve): new function to check whenever the
15710 application has registered a TypeResolve event handler.
15712 * icall.c reflection.h reflection.c: move the type resolve logic into
15713 mono_reflection_get_type () so it will be invoked when
15714 Assembly::GetType () is called.
15717 (mono_reflection_get_type): renamed to get_type_internal.
15718 (mono_reflection_get_type): fixed type name generation so it works
15719 for nested types too.
15720 (mono_reflection_get_type): call has_type_resolve () to avoid the
15721 costly type name generation if there is no resolve event handler.
15723 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15725 * class.c, image.c: load exported types from file references.
15727 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
15729 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
15730 used to cache the managed methods used to create proxies and make
15731 remote invocation of methods.
15732 * class.h: Added in MonoVTable a flag to indicate that a class needs
15733 to be remotely created.
15734 * object.c: Modified the method mono_class_vtable(). It now initializes
15735 the remote flag of the vtable. Modified mono_object_new_specific(),
15736 so now it checks the remote flag.
15737 * icall.c: Added a couple of internal methods, one for enabling instance
15738 creation interception for a type, and one for creating objects bypassing
15741 2003-02-18 Martin Baulig <martin@ximian.com>
15743 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
15744 New interncall to get a method's metadata token.
15746 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
15747 New interncall for the debugger.
15749 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
15751 * class.c (mono_class_setup_vtable): allocate supertype array
15753 2003-02-18 Martin Baulig <martin@ximian.com>
15755 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
15757 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15760 (assembly_name_to_aname): jump over unknown properties (i've found
15761 something like: 'type, assembly, version=xxx, custom=null, public...',
15762 so now will ignore custom=null and still get the rest of the values).
15764 2003-02-17 Dick Porter <dick@ximian.com>
15766 * threads.c: Have Thread.Start() wait for a semaphore to signal
15767 that the thread has set up all its local data. This fixes bug
15768 34323, where Abort() raced the new thread's TLS data.
15770 Also removes the handle_store() call from start_wrapper, because
15771 threads are now always created suspended and there is no longer a
15772 race between the parent and child threads to store the info.
15774 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
15776 * image.c: explain the #- heap issue in a message, hopefully
15777 avoiding FAQs on mono-list.
15779 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15782 (GetEntryAssembly): if the domain has not invoked
15783 AppDomain.ExecuteAssembly yet, return the assembly of the default
15786 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
15788 * class.c (mono_ldtoken): make it work in dynamic assemblies.
15790 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15792 * metadata.c, reflection.c: simple speedup to type hash
15795 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
15797 * image.c, image.h, class.c, assembly.c: move module loading
15798 to MonoImage. When loading metadata, consider alignemnet from
15799 the start of metadata, not from the metadata address in memory.
15801 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
15803 * reflection.c (mono_reflection_get_custom_attrs): Added support for
15804 AssemblyBuilder objects. Factored out custom attribute creation into
15805 a separate function.
15806 (create_custom_attr): new function to create custom attributes.
15808 2003-02-12 Miguel de Icaza <miguel@ximian.com>
15810 * Makefile.am: Got tired of typing the full pathname to pedump.
15811 Until there is another option, am installing this.
15813 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
15815 * class.c (class_compute_field_layout): always set field->parent
15816 (mono_ldtoken): use mono_defaults.fieldhandle_class;
15818 2003-02-11 Dick Porter <dick@ximian.com>
15821 * monitor.c: Rewrote Monitor, making lock much faster and
15822 Pulse/Wait work as specified. Also uses much fewer handles, and only
15823 creates them as needed.
15825 * exception.c: Added SynchronizationLockException
15827 * threads.c: Deleted old Monitor implementation. The new one is
15830 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15832 * class.c: handled TypedReference type code. Set the correct size for
15833 class data. Setup interface_offsets for interface classes, too.
15835 2003-02-09 Martin Baulig <martin@ximian.com>
15837 * debug-mono-symfile.h: Reflect latest symbol writer changes.
15839 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
15841 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
15842 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
15843 * object.c: fixed mono_object_get_virtual_method () for interfaces.
15844 * verify.c: check for code that runs after the end of the method.
15846 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
15848 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
15849 "System.Math::Round2".
15850 * sysmath.h: Added Floor, Round and Round2 definitions.
15851 * sysmath.c: Modified certain functions that were not 100% compliant
15852 with MS.NET (math precision) and added the implementation of Floor,
15855 2003-02-07 Martin Baulig <martin@ximian.com>
15857 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
15859 2003-02-07 Martin Baulig <martin@ximian.com>
15861 * debug-mono-symfile.c: Reflected latest symwriter changes.
15862 (mono_debug_create_mono_symbol_file): Removed.
15863 (mono_debug_open_mono_symbol_file): Take an argument which
15864 specifies whether to create a dynamic symbol file.
15866 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
15868 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
15870 2003-02-05 Martin Baulig <martin@ximian.com>
15872 * reflection.c (mono_image_build_metadata): Make this public,
15873 protect it against being called multiple times, don't create
15874 resources and don't build the compressed metadata here.
15875 (mono_image_create_pefile): Do this here.
15878 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
15880 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15882 * socket-io.c: fixed bug #36322.
15884 2003-02-06 Piers Haken <piersh@friskit.com>
15888 * debug-mono-symfile.c:
15894 * socket-io.c: warning cleanups
15896 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
15898 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
15899 function. works like remoting invoke, but does a check for the Proxy first.
15901 2003-02-05 Miguel de Icaza <miguel@ximian.com>
15903 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
15905 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
15907 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
15909 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
15910 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
15912 * object.c (mono_store_remote_field_new): used by the new jit
15913 instead of mono_store_remote_field
15914 (mono_load_remote_field_new): used by the new jit
15915 instead of mono_load_remote_field
15917 2003-02-05 Patrik Torstensson
15919 * appdomain.c: changed unload to take the domain id instead
15922 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
15925 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15927 * appdomain.c: don't look for assemblies in ApplicationBase if
15928 PrivateBinPathProbe is set.
15930 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15932 * object.c: make the first argument in main_args contain the absolute
15933 path to the assembly. Fixes bug #37511.
15935 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15937 * icall.c: get correct UTC offset for countries not using daylight
15938 time saving. Fixes bug #30030.
15940 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15942 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15943 and 1 are the family).
15945 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
15947 * icall.c (ves_icall_InternalExecute): removed wrong assertion
15949 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15951 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
15953 * reflection.c: added support for SignatureHelper tokens, which is
15954 needed by the Calli opcode.
15956 * reflection.h: track changes to SignatureHelper class.
15958 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15960 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15962 * appdomain.c: fixed loading assemblies from PrivateBinPath.
15964 2003-02-03 Patrik Torstensson
15965 * appdomain.[c|h], domain.c :
15966 - Added support for getting a domain via domain id
15967 - Support for setting and getting domain from System.AppDomain
15968 (used in cross appdomain channel)
15969 - Added support for get/set for a MonoAppContext on a thread
15970 (Context class in System.Runtime.Remoting.Contexts),
15971 - Removed hack in Get/SetData and ExecuteAssembly.
15973 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15974 the managed world to get control when a proxy is created.
15976 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15978 2003-02-03 Miguel de Icaza <miguel@ximian.com>
15981 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15982 Populate the codebase field as well.
15984 2003-02-02 Martin Baulig <martin@ximian.com>
15986 * debug-mono-symfile.c
15987 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15988 (mono_debug_symfile_add_method): Allow interncalls.
15990 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15992 * icall.c: throw parse exception if strtod fails or the string is empty.
15994 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15996 * marshal.c: handle object type separately from defined
15999 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
16001 * marshal.c: handle NATIVE_LPSTR for strings when it's
16002 explicitly specified.
16004 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
16006 * reflection.c, reflection.h, icall.c: setup the reflection
16007 handle cache for ModuleBuilders and AssemblyBuilders.
16009 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
16011 * reflection.c (reflection_methodbuilder_to_mono_method): set
16014 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16016 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
16018 2003-01-29 Dick Porter <dick@ximian.com>
16020 * threads.c: No need for the fake_thread kludge now that Thread
16021 doesn't run a class constructor
16023 2003-01-29 Dick Porter <dick@ximian.com>
16025 * threads.c: Use g_direct_hash instead of the rather bogus
16028 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
16030 * marshal.c (mono_marshal_get_native_wrapper): add check for null
16031 (fix pinvoke12.exe)
16032 (mono_marshal_get_struct_to_ptr): generate valid IL code
16033 (mono_marshal_get_ptr_to_struct): generate valid IL code
16034 (*): correctly set sig->pinvoke, we need to memdup the signature
16037 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16039 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
16040 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
16042 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16044 * profiler.c: provide more callers information.
16046 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
16048 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
16050 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
16052 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
16054 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16056 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
16057 exception instead of going into an infinite loop on dates which it
16060 * string-icalls.c (ves_icall_System_String_get_Chars): raise
16061 out-of-range exception if needed.
16063 * class.c (mono_class_setup_vtable): allow a virtual method to provide
16064 an implementation for an interface method and to override an inherited
16065 method at the same time.
16066 Imagine a scenario when a virtual method is used to override a
16067 virtual abstract method in a parent class, and this same method
16068 provides an implementation for an method inherited from an interface.
16069 In this case, the interface resolution code will set im->slot, which
16070 means that the virtual method override pass will skip this method
16071 which means a pointer to the abstract method inherited from the parent
16072 will remain in the vtable of this non-abstract class.
16074 * class.c: (mono_class_setup_vtable): continue search for a real
16075 method if only an abstract method is found.
16077 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16079 * reflection.c: add size to encoding for ByValStr and ByValArray
16080 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
16082 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16084 * class.c (mono_class_setup_vtable): pass the override info as an
16087 * class.c (mono_class_setup_vtable): set the slot of overriding methods
16090 * reflection.c (ensure_runtime_vtable); add support for method
16093 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16095 * reflection.c (resolution_scope_from_image): Hack to work to work with
16096 dynamic assemblies.
16098 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
16099 added a 'force_ref' argument to force this function to allways return
16100 a TypeRef. This is needed by mono_image_get_memberref_token ().
16102 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16104 * reflection.c (mono_image_get_type_info): interfaces really don't have
16107 * reflection.c (mono_image_basic_init): fill out missing fields of
16110 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
16111 dynamic assemblies. This is required so dynamic assemblies show up in
16112 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
16113 Type::GetType() etc. This is consistent with MS behaviour.
16115 * image.c image.h reflection.c: add newly created classes to the name
16116 cache so mono_class_get () will find them.
16118 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
16120 First part of changes to get IKVM.NET running under mono.
16122 * appdomain.h, appdomain.c: added new function
16123 mono_domain_try_type_resolve() which will emit TypeResolve events.
16124 This function will call AppDomain::DoTypeResolve to do the actual work.
16126 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
16127 moved existing code dealing with dynamic tokens to a new function
16128 called mono_reflection_lookup_dynamic_token (). This function will
16129 raise TypeResolve events when appropriate. Since reflection.c is not
16130 part of libmetadata, a new hook function called
16131 mono_lookup_dynamic_token() is added to class.c which will call this.
16133 * assembly.h assembly.c: make the invoke_load_hook function public,
16134 so it can be called for dynamic assemblies.
16136 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
16138 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
16141 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
16142 MonoGHashTable, since it contains pointers to objects which the GC
16145 * assembly.c (search_loaded): remove unused variable.
16147 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
16149 * object.c: fixed issue exposed by gcc-generated IL programs
16150 that use RVA data for pointers.
16152 2003-01-25 Martin Baulig <martin@ximian.com>
16154 * threads.c (start_wrapper): Moved the initialization of
16155 `start_func' above the mono_new_thread_init() call to which we
16156 pass it as argument.
16158 2003-01-24 Martin Baulig <martin@ximian.com>
16160 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
16161 the MonoThread pointer.
16163 2003-01-21 Miguel de Icaza <miguel@ximian.com>
16165 * icall.c: Rename `PowImpl' to Pow.
16167 2003-01-23 Dick Porter <dick@ximian.com>
16169 * threads.c (start_wrapper): Create a Thread object if needed, so
16170 the Main() thread can do the class initialisation in a subthread
16171 that has been set up to allow managed code execution.
16173 Pass the thread ID instead of the MonoThread pointer to the thread
16174 start and attach callbacks. This change is required, because the
16175 jit thread start callback must be called _before_ the Thread
16176 object can be created.
16178 (mono_thread_init): Removed much object creation code that is no
16179 longer needed. No managed code is called from here now.
16181 * object.c (mono_runtime_exec_managed_code): Create a subthread
16182 for Main, and call back to the runtime to use it.
16183 Set the exit code when Main exits.
16185 * gc.c: Make sure domain finalisation happens in a subthread.
16186 Re-enable threaded GC, fixing bug 31333 (again).
16188 * environment.c: System.Environment internall calls (so far just
16189 ExitCode is here, the others are still in icall.c)
16191 * appdomain.c (mono_runtime_cleanup): All threads running managed
16192 code should have finished before mono_runtime_cleanup() is
16193 reached, so no need to clean up threads.
16195 2003-01-22 Martin Baulig <martin@ximian.com>
16197 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
16198 `gpointer func' arguments.
16199 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
16200 but added `MonoThread *thread' argument.
16201 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
16203 * threads.c (mono_new_thread_init): Added `gpointer func' argument
16204 and pass it to the mono_thread_start_cb callback.
16205 (mono_install_thread_callbacks): New public function to install a
16206 set of callbacks which are set by the debugger.
16207 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
16209 2003-01-22 Martin Baulig <martin@ximian.com>
16211 * Makefile.am: Install debug-mono-symfile.h.
16213 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
16215 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
16217 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
16219 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
16220 * class.c (mono_ptr_class_get): correctly set access levels of pointers
16221 (mono_array_class_get): correctly set access levels of arrays
16223 2003-01-20 Patrik Torstensson
16224 * image.h (MonoAssemblyName): changed major, minor, build, revision
16225 from signed to unsigned.
16227 2003-01-20 sean kasun <skasun@azstarnet.com>
16229 * reflection.c (load_cattr_value): Now this handles
16230 MONO_TYPE_SZARRAY. Fixes bug #35629
16232 2003-01-20 Miguel de Icaza <miguel@ximian.com>
16234 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
16237 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16239 * decimal.c: fixed bug #26056.
16241 2003-01-17 Martin Baulig <martin@ximian.com>
16243 * gc.c: Raise an ExecutionEngineException instead of using g_error().
16245 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16248 (mono_get_exception_type_initialization): new function.
16250 * object.c: throw a TypeInitializationException when an exception is
16251 thrown invoking the class constructor.
16253 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16255 * reflection.c: fixed attribute reading.
16257 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16260 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
16261 provided, look for the type in the calling assembly and then in
16262 mscorlib; if the assembly name is provided, only try that one.
16264 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
16266 * object.c: register the vtable before there is a chance it's
16267 queried again recursively.
16269 2003-01-13 Duncan Mak <duncan@ximian.com>
16271 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
16274 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
16276 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
16278 2003-01-11 Martin Baulig <martin@ximian.com>
16280 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
16281 this to 20 for the release.
16283 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
16285 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
16287 * loader.c (mono_method_get_marshal_info): bug fix
16289 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
16290 structures with explicit layout
16292 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16294 * profiler.c: made the output more readable (and sorted).
16295 Added caller information for the allocation profiler.
16297 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
16299 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
16301 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16303 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
16304 to get value types.
16306 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
16308 * object.c, profiler.h, profiler.c, profiler-private.h:
16309 Added object allocation profiler.
16311 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
16313 * reflection.h, reflection.c: handle global methods.
16314 Compress blob entries.
16316 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
16318 * marshal.c: fix compilation.
16320 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
16322 * loader.c (mono_method_get_marshal_info): impl.
16324 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
16326 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16328 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
16329 for reference types.
16331 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
16333 * loader.c: fixed off by one error in loaded parameter names.
16335 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
16337 * marshal.c (mono_marshal_get_icall_wrapper): like
16338 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
16339 instead of a MonoMethod.
16341 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16343 * decimal.c: fixed bug #36537.
16345 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
16347 * marshal.c: throw a missing method exception if a
16348 P/Invoke method is not found.
16350 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16352 * icall.c: allow a null this for constructors.
16354 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
16356 * icall.c: raise the proper exceptions if the arguments to the
16357 internal Invoke are incorrect.
16359 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
16361 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
16363 2003-01-03 Martin Baulig <martin@ximian.com>
16365 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
16367 2002-12-31 Martin Baulig <martin@ximian.com>
16369 * debug-mono-symfile.c: Completely rewrote the type section.
16370 Instead of using individual malloc()ed fields, we use one big
16371 continuous memory area and offsets into this area.
16372 See the comments in the source code for details.
16374 2002-12-30 Martin Baulig <martin@ximian.com>
16376 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
16378 2002-12-30 Martin Baulig <martin@ximian.com>
16380 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
16381 line number table in this data blob instead of using an external
16384 2002-12-28 Martin Baulig <martin@ximian.com>
16386 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
16388 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
16390 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
16391 as a boxed return type.
16393 2002-12-21 Miguel de Icaza <miguel@ximian.com>
16396 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
16397 g_build_filename to properly get separators on the filename created.
16399 * object.h: Small change, introduce MonoMarshalByRefObject to
16400 track the layout of that structure in the C# universe as we make
16403 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
16405 * object.c: removed assert to allow static fields on interfaces.
16406 * loader.c: a TypeSpec may be used for any type, not just arrays.
16408 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16410 * class.c, class.h: added mono_class_array_element_size ().
16411 Ignore static methods in interfaces.
16413 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16415 * threads.c: fixed the build under cygwin.
16417 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
16419 * reflection.c: handle nullref constants. Allocate keys for
16420 reflection handles with the GC.
16422 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16424 * threads.c, threads.h: added mono_thread_get_abort_signal()
16425 to get a suitable signal for thread abort.
16427 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16429 * metadata.c: fix handling of ExportedType table.
16431 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16433 * icall.c: added WriteWindowsDebugString internal call.
16435 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16437 * reflection.h: added fields to match C# implementation.
16439 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16441 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
16443 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
16445 * gc.h, gc-internal.h: Rename header for GC internal calls to
16446 gc-internal.h from gc.h as to not clash with Boehm GC having its
16447 header installed as <gc.h> in outside include paths.
16448 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
16449 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
16451 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16453 * icall.c: assign minor, build and revision in FillName.
16455 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
16457 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
16458 Added support for running code generated by Reflection.Emit.
16460 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16462 * appdomain.c: check for NULL argument in LoadFrom.
16464 2002-12-10 Dick Porter <dick@ximian.com>
16466 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
16468 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16470 * appdomain.c: fix buglet when building exe file name. Handle full
16471 assembly name (needed after latest changes to AssemblyName).
16473 (mono_image_close): free some hashtables.
16475 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
16477 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
16478 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
16479 on some systems (redhat 7.3)
16481 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
16483 * threads.c: delete the critical section of a sync block,
16484 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
16486 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
16488 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
16490 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16492 * appdomain.[ch]: handle the assembly preload event to try loading the
16493 assemblies using the paths we have in the current domain.
16495 * assembly.[ch]: created an assembly preload hook that is called to try
16496 loading the assembly by other means that the ones provided here.
16498 * domain.c: initialize the domain search path.
16500 From now on, assemblies (TODO: except corlib and System) are loaded
16501 according to these rules when using mono_assembly_load ():
16503 1. It tries to load the assembly from the ApplicationBase
16504 of the current domain appending .dll and .exe (TODO: have to
16505 try loading from name/name.dll and name/name.exe).
16507 2. It tries the search path specified in PrivateBinPath for the
16508 current domain (if any).
16510 3. Previous behavior.
16512 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
16514 * icall.c: implemented GetInterfaceMap() related icall.
16515 * domain.c, loader.h: load MethodInfo in mono_defaults.
16517 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16519 * gc.c: disable the finalizer thread for now, untill all the issues
16520 with it are resolved.
16522 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16524 * string-icalls.c: handle embedded nulls in string ctor when the
16525 length is specified.
16527 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16529 * class.c: look for explicit interface implementation in parent
16532 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
16534 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
16536 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16538 * gc.c: protect handles with a critical section.
16540 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16543 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
16544 parameters. If no assembly specified, try getting the type from all
16545 the assemblies in the current domain, else, load the assembly and get
16548 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16550 * marshal.c: applied patch from Aleksey Demakov that fixes
16551 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
16553 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16555 * icall.c: fixed get_location.
16557 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
16559 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
16560 declarations to make it work with older gcc.
16562 * loader.c (mono_get_method): set signature->pinvoke for native calls
16564 2002-11-20 Dick Porter <dick@ximian.com>
16566 * threads.c (mono_thread_init): Set the main thread's handle
16568 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16570 * gc.c: allow compilation without GC support. Changed to match the
16573 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16575 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
16577 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
16579 * reflection.c: set a public key token on the core assemblies.
16581 2002-11-18 Dick Porter <dick@ximian.com>
16583 * threads.c: Split out some thread initialisation so that other
16584 files can set the start callback function.
16586 * gc.c: Run finalisers in a separate thread, to avoid stack
16587 overflow. Fixes bug 31333.
16589 * appdomain.c: Set up GC finalisation thread.
16593 * domain.c: Use gc.h macros for GC_malloc
16595 2002-11-15 Dick Porter <dick@ximian.com>
16599 * appdomain.c: Removed mono_runtime_init_with_attach(),
16600 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
16601 merging the extra parameter with the existing function. Removed
16602 unneeded code in mono_thread_attach().
16604 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
16606 * image.c (mono_image_loaded_by_guid): a method to get loaded
16608 (load_metadata_ptrs): we store the guid as string.
16610 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
16612 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
16614 * metadata.c (mono_guid_to_string): imported method form Zoltan
16615 Varga (slightly modified)
16617 * assembly.c (mono_assembly_open): load precompiled code
16619 * loader.h (MonoMethod): we store the method token for use in the
16622 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16624 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
16625 the hook function called when an assembly is loaded.
16627 * domain.c: Modified file.
16628 (mono_domain_assembly_load): removed hash table insertion of assemblies.
16632 2002-11-07 Miguel de Icaza <miguel@ximian.com>
16634 * reflection.c: Map PEFileKind to the value expected by the WinNT
16637 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16639 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
16640 Read until the buffer is filled completely.
16642 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16644 * icall.c: implemented MonoType.InternalGetEvent ().
16646 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16648 * appdomain.c: implemented InitAppDomainSetup. Delayed
16649 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
16650 the entry_assembly.
16652 * assembly.c: base_dir is now an absolute path ending with
16655 * icall.c: modified get_location according to the above changes.
16657 * object.c: init AppDomain.SetupInformation for the default domain after
16658 we have the entry assembly.
16660 * domain.c: when unloading a domain, setup = NULL.
16662 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
16664 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
16666 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
16668 * object.h, object.c: introduced mono_object_get_virtual_method ()
16669 to lookup the method invoked on an object when a callvirt is done on
16671 * icall.c: make MethodInfo::Invoke() always do a virtual call.
16673 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16675 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
16676 current domain when loaded an assembly and failed to load it.
16678 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
16680 2002-10-31 Dick Porter <dick@ximian.com>
16684 * file-io.c: Return the error status in a parameter, as the
16685 GetLastError() value has long since been blown away if we try and
16686 look it up in a subsequent internal call invocation. Delete the
16687 GetLastError() internal call, because it's useless.
16689 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
16691 * class.[ch]: added cast_class to fix bug 29517
16693 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
16695 * marshal.c: create valid IL code in the filter clause:
16696 the new JIT is less forgiving:-)
16698 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16700 * icall.c: removed get_property internal call.
16702 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
16704 * appdomain.h domain.c: Added an ID to appdomains.
16706 * threads.c threads.h icall.c: Implement icall
16707 Thread:GetDomainID(), and remove unused icall
16708 CurrentThreadDomain_internal.
16710 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16712 * icall.c: Don't recurse through the base types in GetConstructor.
16715 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16717 * mempool.h, mempool.c: added mono_mempool_empty() and
16718 mono_mempool_stats().
16720 2002-10-23 Dick Porter <dick@ximian.com>
16724 * icall.c: Added MonoIO.GetFileType internal call
16726 2002-10-17 Dick Porter <dick@ximian.com>
16728 * appdomain.c (mono_runtime_cleanup): Don't signal the async
16729 delegate semaphore before waiting for all threads to finish,
16730 because new threads can also call async delegates. Fixes bug
16733 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
16734 of 3 seconds, in case another async job is queued. (This part is
16735 needed because the bug fix reintroduced the 3s exit lag.) This
16736 makes the mono_runtime_shutdown flag superfluous.
16738 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16740 * reflection.c: include ehader size in method section headers.
16741 Really check for suplicated modules entries.
16743 2002-10-17 Martin Baulig <martin@gnome.org>
16745 * debug-mono-symfile.c: Added back support for locals.
16747 2002-10-14 Martin Baulig <martin@gnome.org>
16749 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
16752 2002-10-14 Martin Baulig <martin@gnome.org>
16754 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
16755 mono_class_get() instead of looking in the class cache.
16757 2002-10-13 Martin Baulig <martin@gnome.org>
16759 * debug-mono-symfile.c: Set version number to 28, include the
16760 signature in method names.
16762 2002-10-13 Martin Baulig <martin@gnome.org>
16764 * debug-mono-symfile.h: Set version number to 27.
16766 2002-10-11 Martin Baulig <martin@gnome.org>
16768 * gc.c: Don't register/unregister NULL pointers as disappearing links.
16770 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16772 * metadata.c, metadata.h: added helper function to allocate signatures.
16774 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16776 * icall.c: added internal call to get the location of machine.config.
16778 2002-10-08 Martin Baulig <martin@gnome.org>
16780 * debug-mono-symfile.c: Ignore classes with a pending init for the
16783 2002-10-03 Dick Porter <dick@ximian.com>
16785 * threads.c: Freebsd pthread_t is a pointer
16787 2002-10-03 Dick Porter <dick@ximian.com>
16789 * socket-io.c: Implemented GetHostName_internal
16791 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16794 (mono_config_parse_file): don't leak the text.
16796 2002-10-02 Martin Baulig <martin@gnome.org>
16798 * debug-mono-symfile.c: Added support for methods.
16800 2002-10-01 Martin Baulig <martin@gnome.org>
16802 * debug-mono-symfile.c: Don't emit methods and line numbers for
16803 the dynamic symbol file, just write the type table. We can easily
16804 have an external helper program which creates a symbol file for an
16807 2002-10-01 Dick Porter <dick@ximian.com>
16809 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
16810 Only add the handle to the cleanup array when we're about to
16811 launch the thread. Bug 31425 deadlocked when the test was run on
16814 2002-10-01 Martin Baulig <martin@gnome.org>
16816 * debug-mono-symfile.c: Added support for properties.
16818 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16820 * reflection.c: unaligned store fix from Mark Crichton
16821 <crichton@gimp.org>.
16823 2002-09-27 Martin Baulig <martin@gnome.org>
16825 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
16828 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16830 * assembly.h, assembly.c: use a sane API to hook into the assembly
16831 loading process instead of a useless special-purpouse hack
16832 (ngen needs a hook, too, for example).
16834 2002-09-27 Dick Porter <dick@ximian.com>
16836 * threads.c (mono_thread_init): Call GetCurrentProcess() so
16837 io-layer can set up some process handle info. Not needed on w32,
16838 but doesn't hurt either.
16840 * process.c: Pass the program name in the second parameter to
16841 CreateProcess, so the path is searched. Include the working
16842 directory. Implemented process name, process enumeration, and some
16843 process detail internal calls.
16845 * icall.c: Added internal calls for process lookup, and some
16848 2002-09-26 Martin Baulig <martin@gnome.org>
16850 * assembly.c (mono_install_open_assembly_hook): New global
16851 function to install a function to be invoked each time a new
16852 assembly is loaded.
16853 (mono_assembly_open): Run this callback function if set.
16855 * debug-mono-symfile.c: Put back line numbers for the dynamic
16856 symbol file and also record the .il file as source file. This
16857 allows us to install the temporary symbol file as `file.dbg' just
16858 like a compiler-generated one.
16860 2002-09-26 Nick Zigarovich <nick@chemlab.org>
16862 * Corrected typo in gc.c (BOHEM vs BOEHM).
16864 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16866 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
16867 GetProperties. Also avoid calling g_slist_length in GetProperties and
16870 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16872 * reflection.c: avoid unaligned stores (bug spotted by
16873 Mark Crichton <crichton@gimp.org>).
16875 2002-09-25 Martin Baulig <martin@gnome.org>
16877 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
16878 instead of guint64 for addresses and added prologue/epilogue info.
16880 2002-09-25 Martin Baulig <martin@gnome.org>
16882 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
16883 store line number info. For the dynamic symbol file, we only need
16884 to provide the JIT generated dynamic line number info for the dynamic
16887 2002-09-25 Martin Baulig <martin@gnome.org>
16889 * debug-mono-symfile.h: Incremented version number.
16891 2002-09-24 Martin Baulig <martin@gnome.org>
16893 * class.c (mono_debugger_class_init_func): New global function
16895 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
16898 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
16899 function. This is called via the mono_debugger_class_init_func
16900 hook to add all types to the dynamic type table.
16901 (ves_icall_MonoDebugger_GetType): New interncall to get a class
16902 from its metadata token.
16904 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
16905 New interncall for the debugger.
16907 2002-09-24 Nick Drochak <ndrochak@gol.com>
16909 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
16910 before using it in case it is null.
16912 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16914 * metadata.c: allow custom modifiers in local var signatures
16915 (bug spotted by Zoltan Varga).
16917 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16919 * class.c: deal with the <Module> class that may have a NULL vtable.
16920 Eliminate warnings.
16922 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16924 * image.c, image.h: more strong name helpers.
16925 * monosn.c: more work: convert pem keys to cryptoapi format.
16927 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16929 * string-icalls.c: speedup IndexOf.
16931 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16933 * icall.c: updates from Zoltan.2.Varga@nokia.com.
16935 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16937 * icall.c: cleanup: use mono_object_domain ().
16939 2002-09-23 Martin Baulig <martin@gnome.org>
16941 * debug-mono-symfile.c: Improved type support.
16943 2002-09-22 Martin Baulig <martin@gnome.org>
16945 * debug-mono-symfile.c: Added support for reference types and strings.
16947 2002-09-22 Martin Baulig <martin@gnome.org>
16949 * debug-mono-symfile.c: Started to work on the type table.
16951 2002-09-21 Martin Baulig <martin@gnome.org>
16953 * debug-mono-symfile.c: Largely reworked the symbol table format.
16954 The symbol table is now incrementally updated each time a new
16955 method is added. We're now also using our own magic and version
16956 so that you don't need to recompile all your classes if the
16957 dynamic table changes.
16958 (mono_debug_update_mono_symbol_file): Removed.
16959 (mono_debug_symfile_add_method): New function to add a method.
16961 2002-09-21 Martin Baulig <martin@gnome.org>
16964 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16967 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16968 New interncall to get a method from its metadata token.
16970 2002-09-21 Martin Baulig <martin@gnome.org>
16972 * debug-mono-symfile.c: Create type table.
16974 2002-09-20 Martin Baulig <martin@gnome.org>
16976 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16978 2002-09-20 Martin Baulig <martin@gnome.org>
16980 * debug-mono-symfile.c: Provide information about params and locals.
16982 2002-09-20 Martin Baulig <martin@gnome.org>
16984 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16987 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16988 interncall to get a method from its metadata token.
16990 2002-09-20 Martin Baulig <martin@gnome.org>
16992 * debug-mono-symfile.c: Added a few checks for method->header
16993 being non-NULL. This should never happen, but for the moment
16994 let's use a g_warning() rather than a g_assert().
16996 2002-09-19 Mark Crichton <crichton@gimp.org>
16998 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16999 even if support for it isn't present. Added an #ifdef to fix this.
17001 * socket-io.c: Added checks back for Solaris support.
17003 2002-09-19 Martin Baulig <martin@gnome.org>
17005 * debug-mono-symfile.c (read_string, write_string): Reflect latest
17006 changes in the symbol file format.
17008 2002-09-18 Martin Baulig <martin@gnome.org>
17010 * debug-mono-symfile.c: Set version number to 21.
17012 2002-09-18 Dick Porter <dick@ximian.com>
17014 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
17015 on netbsd. Fixes bug 30051.
17017 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17020 (set_version_from_string): little fix.
17022 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17024 * monosn.c, Makefile.am: added strong name utility.
17025 * reflection.h, reflection.c: implemented delayed signing,
17026 locale, version and hash id assembly attributes.
17028 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17030 * loader.c, metadata.c: load param attributes in signatures.
17032 2002-09-16 Martin Baulig <martin@gnome.org>
17034 * debug-mono-symfile.c: Added string table with all method names.
17036 2002-09-14 Martin Baulig <martin@gnome.org>
17038 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
17039 fast method lookup.
17041 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17043 * reflection.c: record the public key token of referenced assemblies.
17045 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17047 * image.c, image.h: added functions to get the strong name and the
17048 public key of an assembly.
17049 * pedump.c: use them.
17051 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
17053 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
17055 2002-09-12 Miguel de Icaza <miguel@ximian.com>
17057 * marshal.c (mono_marshal_get_managed_wrapper): Added
17060 2002-09-11 Martin Baulig <martin@gnome.org>
17062 * gc.c: Call GC_unregister_disappearing_link() on all links when
17063 finalizing them, this is necessary to aviod a crash in boehm's
17066 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17068 * gc.c: handle GetTarget for finalized objects spotted and fixed by
17071 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17073 * icall.c: implemented MonoType::Module.
17074 * reflection.c, reflection.h: mono_module_get_object () from
17075 Tomi Pakarinen <tomi.pakarinen@welho.com>.
17077 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17079 * icall.c: ignore overridden methods in GetMethods ().
17080 Fix for FieldInfo::SetValue().
17081 * object.c: handle float/double in runtime invoke.
17083 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17085 * object.c: allow a constructor to be called again on an object.
17087 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17089 * class.h, class.c: move field layout code to it's own function and
17090 export it. Get an interface id earlier. Move fields in MonoClass
17091 so they are more cache friendly and align the bitfields.
17092 * loader.c: temporary handle get_param_names() for a runtime method.
17093 * reflection.c, reflection.h: more code to handle runtime creation of
17096 2002-09-09 Martin Baulig <martin@gnome.org>
17098 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
17099 signature with the pinvoke field being set for the actual call.
17101 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17103 * icall.c: removed some unused icalls. Start of map of glib charsets
17104 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
17106 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17108 * debug-helpers.c: break infinite loop (found and fixed by
17109 Holger Arnold <harnold@gmx.de>).
17111 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17113 * icall.c: target may be null in create_delegate.
17115 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17117 * marshal.c: handle a boolean return type.
17119 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17121 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
17123 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17125 * gc.c: fix weakreferences.
17127 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17129 * icall.c: added icall to get default codepage.
17131 2002-09-03 Dick Porter <dick@ximian.com>
17134 * threads.c: Use MonoThread instead of MonoObject where
17137 Store running thread objects in a hash table, so that we have all
17138 the info to hand when waiting for them to finish
17139 (means we don't need OpenThread() any more, so mingw builds should
17140 be fully functional again.)
17143 * object.h: Added thread ID to MonoThread
17145 2002-09-03 Martin Baulig <martin@gnome.org>
17147 * icall.c (System.Reflection.Assembly::get_location): New interncall.
17149 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17151 * icall.c: fixed leak in get_temp_path. Thanks lupus.
17153 2002-09-03 Martin Baulig <martin@gnome.org>
17155 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
17156 argument to store the end address of the disassembled instruction.
17158 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
17159 here from debug-symfile.h.
17160 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
17161 JIT into this struct.
17162 (MonoSymbolFile): Added `char *image_file' field.
17163 (MonoDebugGetMethodFunc): Removed.
17164 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
17165 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
17166 (mono_debug_find_method): New method.
17168 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
17169 create a full symbol file.
17170 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
17171 and static symbol files.
17172 (mono_debug_find_method): The symbol file keeps an internal method hash,
17173 call this to get a MonoDebugMethodInfo from a MonoMethod.
17175 * debug-symfile.[ch]: Removed.
17177 2002-08-29 Miguel de Icaza <miguel@ximian.com>
17179 * image.c (do_mono_image_open): Remove linker version check.
17181 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
17183 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
17184 wrappers for instance methods.
17186 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17188 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
17190 2002-08-28 Dick Porter <dick@ximian.com>
17192 * Makefile.am: Export HOST_CC for w32 builds
17194 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17196 * file-io.c process.c: MonoString are null terminated, no
17197 need for mono_string_to_utf16() anymore.
17199 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17201 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
17203 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
17205 * icall.c, reflection.h: speedup System.MonoType.
17207 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17209 * reflection.c: allow null as the value of a string argument in
17210 custom attributes constructors.
17212 2002-08-27 Martin Baulig <martin@gnome.org>
17214 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
17215 `trampoline_address' field.
17217 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
17219 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
17220 check (fixes bug #29486)
17222 2002-08-27 Martin Baulig <martin@gnome.org>
17224 * debug-mono-symfile.c: Changed the file format in a way that allows us
17225 open it read-only and to use a specially malloced area for all the
17226 dynamic data. We can now also generate a symbol file on-the-fly if we're
17227 debugging IL code and there is no MCS generated symbol file for it.
17229 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17231 * object.c: added a define for a good string and array
17232 creation speedup (not enabled by default because we need to deal with
17235 2002-08-26 Martin Baulig <martin@gnome.org>
17237 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
17238 function to create a dynamic symbol file. This is used by the
17239 debugger to create a symbol file for IL code on-the-fly.
17241 2002-08-26 Martin Baulig <martin@gnome.org>
17243 * loader.c (mono_lookup_pinvoke_call): Include the error message
17244 from g_module_error() in the error message.
17246 2002-08-24 Martin Baulig <martin@gnome.org>
17248 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
17249 function to update the symbol file. The symbol file is mmap()ed
17250 writable, but private. This allows us to install the symbol file
17251 together with the assembly.
17253 2002-08-24 Martin Baulig <martin@gnome.org>
17255 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
17256 but they can read the new symbol file format which mcs is now creating.
17258 * debug-symfile.c (mono_debug_find_source_location): Moved to
17259 debug-mono-symfile.c; this is now operating on the new symbol file.
17261 2002-08-23 Martin Baulig <martin@gnome.org>
17263 * debug-helpers.c (mono_method_desc_from_method): New function to get
17264 a MonoMethodDesc from a MonoMethod.
17266 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17268 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
17269 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
17271 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17273 * string-icalls.[ch]: make helper methods static.
17275 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17277 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
17278 types to it and to SetValueInternal.
17280 * object.c: Moved handle_enum label to its proper place. This was the
17283 This time i compiled mcs and gtk-sharp and they both work.
17285 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17287 * icall.c: reverted partially my previous patch until
17288 object.c:set_value handles enums correcly.
17290 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17293 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
17294 (ves_icall_System_Environment_get_MachineName): removed warning when
17295 compiling under cygwin.
17297 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17299 * object.c: fixed field_get_value() for reference types.
17301 2002-08-22 Dick Porter <dick@ximian.com>
17303 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
17304 Don't free a buffer while it's still needed. Patch from Jonathan
17305 Liger <Jonathan.liger@wanadoo.fr>
17307 2002-08-21 Miguel de Icaza <miguel@ximian.com>
17309 * icall.c (ves_icall_System_Environment_get_Platform): Add new
17312 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
17314 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
17315 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
17317 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
17318 we call unmanaged code which throws exceptions.
17320 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17322 * appdomain.h: added per-domain entry_assembly.
17323 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
17325 * icall.c: Assembly::GetEntryAssembly icall.
17326 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
17327 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
17329 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
17331 * appdomain.h, gc.c: added mono_domain_finalize ().
17333 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17336 (mono_print_unhandled_exception): changed g_warning by g_printerr
17337 because g_log has a 1024 characters limit (yeah, i got a big stack
17338 trace). Don't print exception name, that should be in ToString
17341 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17343 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
17344 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
17346 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17349 (mono_print_unhandled_exception): after previous commit, i realized
17350 that MS calls ToString on the exception. I changed this function to
17351 do that. This way we get stack_trace for free.
17353 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17356 (mono_print_unhandled_exception): invoke Message property instead of
17357 getting 'message' field from Exception. Don't allocate memory for
17358 'trace' and 'message' if not needed.
17360 2002-08-18 Dick Porter <dick@ximian.com>
17362 * unicode.c: Fix asserts to match Encoder.cs checks
17364 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17366 * marshal.c: fix unaligned store issue and a few wrong
17367 opcode argument types.
17369 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17371 * icall.c: added GetUninitializedObjectInternal internal call.
17373 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
17375 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
17376 to the right domain.
17378 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
17380 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
17382 * class.c (class_compute_field_layout): set blittable to false for Strings
17384 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
17386 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17388 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
17389 first chunk of code to create types at runtime. Code to
17390 handle ReflectedType/DeclaringType. Make reflection handles
17393 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17395 * class.c: set correct name in arrays.
17397 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
17399 * appdomain.c (mono_domain_transfer_object): make it work with
17400 valuetypes. bug fixes.
17402 2002-08-12 Dick Porter <dick@ximian.com>
17404 * object.h: Rename some parameters to avoid c++ keywords (Patch
17405 from Joseph Wenninger <kde@jowenn.at>)
17407 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
17409 * icall.c: added icall to implement Assembly.GetFile*.
17411 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
17413 * reflection.h, reflection.c: code to embed managed resources.
17415 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17417 * class.c: move all the type size stuff into
17418 class_compute_field_layout().
17420 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17422 * class.c: ensure enums have always the correct instance size.
17423 * unicode.c: remove wrong assert.
17425 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17427 * assembly.c: fix mem corruption issue.
17428 * image.h, image.c: added mono_image_get_resource () to access
17430 * icall.c: implemented Assembly.EntryPoint property and some
17431 Managed Resources related internalcalls.
17434 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17436 * image.c, image.h: impemented mono_image_get_entry_point ().
17437 * appdomain.c: use mono_image_get_entry_point.
17439 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
17441 * reflection.c: support the object type argument when loading
17444 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
17446 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
17447 String as return type.
17449 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
17451 * reflection.c: fix encoding of named args for custom attrs to match
17452 the ms implementation. Read them back when instantiating custom
17455 2002-08-02 Radek Doulik <rodo@ximian.com>
17457 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
17458 by Dietmar as quick fix
17459 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
17460 16 as stack size, used on more places as quick fix before Dietmar
17461 will fix it properly
17463 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
17465 * object.h, object.c: added accessors for fields and properties.
17467 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
17469 * class.c, class.h: made mono_class_get_field_from_name ()
17470 loop on parent types.
17471 Added mono_class_get_property_from_name ().
17473 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17475 * class.c, class.h: move the code to setup the type vtable in its own
17476 function so that it can be reused also for types created at runtime.
17477 Eliminate the "class" identifier from the header file.
17478 * reflection.c: setup the vtable for enums so that we can create
17479 objects for use in SetConstant ().
17481 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
17483 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
17484 instead of the delegate itself as this pointer (bug #28383)
17486 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
17488 * marshal.c (mono_marshal_get_managed_wrapper): added return type
17491 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17493 * loader.c: don't set the pinvoke bit on icalls.
17495 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
17497 * debug-helpers.c (mono_method_full_name): only print a number to
17498 indicate wrapper type (so that the output is more readable in traces).
17500 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
17502 * class.c (mono_class_init): include method override patch from Paolo
17504 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
17506 * icall.c: fixed GetTypeCode().
17508 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
17510 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
17511 use real delegate invoke function to make it work with multicast
17512 delegates (fix bug# 28291).
17514 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17516 * object.c: load constant strings.
17518 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17520 * reflection.c: no magic numbers.
17521 * tabledefs.h: security action enum.
17523 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17525 * assembly.c: fix possible memory corruption.
17527 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17529 * reflection.h, reflection.c: added support for linking resources.
17530 * verify.c: check we have an updated corlib.
17532 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
17534 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
17536 (mono_marshal_string_array): null terminate unmanaged string arrays.
17537 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
17539 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17541 * icall.c: Type.GetType () can now return also types from the
17544 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17546 * loader.h, loader.c: stack walking support.
17547 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
17548 GetCallingAssembly.
17550 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
17552 * marshal.c: added optimisations for blittable types
17554 * class.c (mono_array_class_get): do not set blittable attribute on arrays
17555 (mono_class_setup_mono_type): set blittable attribute for single
17558 * marshal.c (mono_string_utf8_to_builder): impl.
17559 (mono_string_builder_to_utf8): impl.
17560 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
17562 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
17564 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
17565 (mono_marshal_get_managed_wrapper): impl. byref types
17567 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17570 (search_method): don't display debug message.
17572 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
17574 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
17576 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17578 * appdomain.c: set the missing filename when throwing exception.
17580 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
17582 * metadata.c (mono_type_size): code cleanup
17583 (mono_type_stack_size): removed some test code
17585 2002-07-21 Miguel de Icaza <miguel@ximian.com>
17587 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
17588 mono_get_exception_file_not_found now.
17590 * exception.c (mono_exception_from_name_two_strings): New version
17591 that will call a constructor with two string arguments.
17592 (mono_get_exception_file_not_found): New helper routine, used to
17593 report file-not-found errors.
17595 2002-07-20 Dick Porter <dick@ximian.com>
17598 * process.c: Pass file handles to CreateProcess
17602 * file-io.c: Implemented CreatePipe
17604 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
17606 * metadata.c (mono_get_param_info): set alignment for value types
17608 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17610 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
17611 Constify mono_domain_assembly_open().
17612 * loader.c: handle null namespace in icalls.
17614 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
17616 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
17617 (emit_str_to_ptr_conv): marshal object as structs
17619 * metadata.c (mono_type_to_unmanaged): marshal object as structs
17621 * marshal.c (mono_marshal_get_runtime_invoke): support value types
17623 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
17625 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
17626 (mono_marshal_get_native_wrapper): we an now return value types
17628 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17630 * verify.c: more checks implemented.
17632 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
17634 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
17636 (mono_marshal_get_native_wrapper): allow byref arguments
17637 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
17638 impl. PtrToStringXXX methods
17639 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
17640 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
17641 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
17642 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
17643 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
17645 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17647 * reflection.c: fix buglet in parsing an assembly name.
17649 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
17651 * marshal.c (emit_ptr_to_str_conv): first impl.
17653 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17655 * object.c, class.h: cache the vtable in the class as suggested by
17656 vargaz@freemail.hu (Zoltan Varga).
17658 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17660 * class.h, loader.c: added mono_field_from_token().
17661 * verify.c: first cut of type checking code.
17663 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
17665 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
17667 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
17669 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
17671 (mono_marshal_get_remoting_invoke): impl.
17672 (mono_delegate_begin_invoke): impl.
17673 (mono_mb_emit_save_args): impl.
17674 (mono_delegate_end_invoke): impl.
17675 (mono_marshal_get_delegate_begin_invoke):
17676 (mono_marshal_get_delegate_end_invoke):
17677 (mono_marshal_get_delegate_invoke): generate a special name for
17678 those methods (including the signature) and associate them whith
17679 the delegate class.
17681 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
17684 (mono_reflection_type_from_name): now it has a MonoImage parameter
17685 which is used as the default image to search the type in. If the image
17686 is NULL or getting the type from it fails, it defaults to corlib.
17688 * icall.c: changed 1 call to mono_reflection_type_from_name to match
17691 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17693 * reflection.c: update the parameter table index.
17695 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17697 * domain.c: don't include the mark byte in the string hash.
17699 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17701 * icall.cs: icall for Type.GetTypeCode ().
17702 * verify: a couple of fixes and disabled local initialization checks.
17704 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
17706 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
17708 * debug-helpers.c (mono_method_full_name): print the type of the
17711 * metadata.c (mono_signature_hash): a hash function for signatures
17712 (mono_signature_hash): better hash algorithm
17714 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
17716 * debug-helpers.c (mono_method_full_name): this can now generate
17717 method names with signatures
17719 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
17720 method dont have this pointers.
17722 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17724 * reflection.c: fixup typebuilder tokens.
17725 * image.c: fix buglet.
17726 * marshal.h: remove whitespace.
17727 * metadata.h, metadata.c: reinstate code that was removed.
17728 * verify.c: handle catch directives and fix another couple of bugs.
17730 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
17732 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
17733 (mono_marshal_get_native_wrapper): make it comp. with the old code
17734 (mono_marshal_get_native_wrapper): support boolean
17735 (mono_marshal_get_managed_wrapper): support more types
17737 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
17739 * class.c (class_compute_field_layout): compute class->blittable attribute.
17741 2002-07-09 Dick Porter <dick@ximian.com>
17743 * threads.c: Make the thread cleaning up cope with threads that
17746 2002-07-08 Radek Doulik <rodo@ximian.com>
17748 * reflection.c (method_encode_code): use non-translated values to
17749 compute finally_start, this fixes exception handling on ppc, yay!
17751 * decimal.h (struct signscale): fix endianess
17753 2002-07-07 Radek Doulik <rodo@ximian.com>
17755 * reflection.c: swap box_val and not val
17757 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17759 * reflection.c, reflection.h: handle full assembly info in type name.
17760 Handle Type arguments when loading custom attributes.
17761 * icall.c: updated to use new mono_reflection_type_from_name () method.
17763 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17766 (method_from_memberref): also print assembly name when method not found.
17768 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17771 (ves_icall_TypeGetProperties): fixed bug #27473.
17773 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17775 * reflection.c: display image name and token when cannot find the
17776 .ctor for an attribute.
17778 2002-07-05 Martin Baulig <martin@gnome.org>
17780 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17782 2002-07-04 Dick Porter <dick@ximian.com>
17784 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
17785 compile on mingw. This will cause mingw builds to not wait for
17786 subthreads to terminate after the main thread does. I've lodged a
17787 bug with the mingw developers for them to wrap OpenThread().
17789 2002-07-03 Dick Porter <dick@ximian.com>
17791 * threads.c: Store thread IDs instead of handles, because
17792 GetCurrentThread() returns a pseudohandle and therefore stores
17793 useless values. mono_thread_cleanup() continues checking the
17794 array of threads until it is empty, to cope with subthreads
17795 spawning new threads after the main thread has finished.
17799 * profiler-private.h: Pass the thread ID to thread profiler
17800 functions, instead of a handle
17802 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17804 * verify.c: fixes to make it more usable.
17805 * pedump.c: added --verify code to verify IL code in an assembly.
17807 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17809 * reflection.c: turn errors into warnings to allow compiling corlib.
17811 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17813 * reflection.c: add special cases to compile corlib.
17815 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17817 * reflection.c: handle properties with only a set method.
17819 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17821 * opcodes.h: add enum with opcodes in opval order.
17823 2002-07-01 Dick Porter <dick@ximian.com>
17826 * object.c (mono_runtime_run_main): Removed unneeded argument
17828 2002-06-28 Martin Baulig <martin@gnome.org>
17830 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17832 2002-06-27 Dick Porter <dick@ximian.com>
17834 * threads.c: Store the handle in both the parent thread and in the
17835 subthread, to minimise the time between starting a new thread and
17838 2002-06-26 Dick Porter <dick@ximian.com>
17840 * appdomain.c (mono_runtime_cleanup): Close the socket library
17841 after all the threads have finished, not before
17843 2002-06-26 Martin Baulig <martin@gnome.org>
17845 * debug-symfile.c (mono_debug_find_source_location): Added
17846 `guint32 *line_number' argument. If it's not NULL, store the line number
17847 there and return the file name without the line number.
17849 2002-06-25 Dick Porter <dick@ximian.com>
17853 * process.c: Process forking and other support functions
17855 2002-06-25 Dick Porter <dick@ximian.com>
17857 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
17858 things dont happen when the image is closed.
17859 (mono_image_lookup_resource): Walk the resource section looking
17860 for a particular entry
17862 * cil-coff.h: PE resource section decoding
17864 2002-06-25 Dick Porter <dick@ximian.com>
17868 (mono_assembly_foreach): Accessor functions to walk the list of
17870 (mono_assembly_set_main):
17871 (mono_assembly_get_main): Process methods need to know which
17872 assembly is the "main" one
17874 * object.c (mono_runtime_run_main): Record the main assembly
17876 * debug-helpers.c: Fix typo
17878 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
17880 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
17881 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
17883 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17885 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
17887 2002-06-21 Miguel de Icaza <miguel@ximian.com>
17889 * image.c (do_mono_image_open): Initialize reference count,
17890 otherwise we leak the MonoImage.
17892 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17894 * reflection.c: small tweak to handle self-hosting.
17896 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17898 * reflection.c: fix type name parse code.
17900 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17902 * reflection.c: break out of the loop.
17903 * image.c: special case corlib.
17905 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17907 * reflection.c: add all the custom attrs at the end to ensure the
17908 ctors have been properly initialized when the attributes are defined
17909 in the current assembly.
17911 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17913 * reflection.c: handle correctly multiple-nested types.
17915 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17917 * row-indexes.h: fix typos.
17918 * reflection.c: adjust for typos and fix method_def_or_ref
17919 encoding in MethodImpl table.
17921 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17923 * reflection.c: fix entry point patching (thanks Serge!).
17925 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
17927 * verify.c: add check for System.Exception
17929 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17931 * image.c, class.c: minifix for code just c&p'ed.
17932 * reflection.c: warning fix.
17933 * object.h, loader.h, domain.c: load also StringBuilder.
17935 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17937 * marshal.h, marshal.c: some support code to handle complex marshaling.
17939 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17941 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
17942 Better signatures with vtable error dump.
17944 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17946 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17948 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
17950 * icall.c (ves_icall_Type_GetField): impl.
17952 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17954 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17955 to retrieve a marshal description blob for a field or param.
17957 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17959 * reflection.h, reflection.c: change order of nested type emission
17960 to avoid table corruption. The NestedTypes table is sorted.
17961 * icall.c: change order of GetConstructor results to workaround mcs bug.
17963 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17965 * reflection.h, reflection.c: handle field and param marshal
17968 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17970 * icall.c, marshal.c marshal.h: more Marshal class implementation.
17972 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17974 * reflection.c: fix call convention.
17976 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17978 * reflection.h, reflection.c: mono_image_get_memberref_token()
17979 takes a type instead of a class, now. Added
17980 mono_image_get_array_token() to create tokens for the special
17981 multi-dim array methods.
17983 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17985 * assembly.c: handle modules (no assembly table). Split
17986 loading references in its own function.
17987 * class.c: handle moduleref resolution scope.
17988 * image.c, image.h: cache module name in image.
17990 2002-06-07 Martin Baulig <martin@gnome.org>
17992 * reflection.c (mono_image_get_type_info): Only add a class layout entry
17993 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17995 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17997 * icall.c: more signature fixes that used uint instead of int.
17999 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18001 * reflection.c: fixed signature of field refs.
18003 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18005 * class.c, reflection.c: handle typerefs of nested types
18006 (both on read and when writing files).
18008 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18010 * icall.c: fix method signatures that tried to workaround the previous
18013 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18015 * debug-helpers.c: fix typo.
18017 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18019 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
18020 rewrote the PE/COFF writing code (our programs are understood by the
18023 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18025 * gc.c, gc.h, icall.c: weakreference support.
18027 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18029 * Makefile.am, mono-config.c: use $(sysconfdir).
18031 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18033 * icall.c: changed default precision of Double.ToString() to 15.
18034 Fixed memory leak. Unified with Single.ToString.
18036 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18038 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
18040 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18042 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
18043 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
18044 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
18047 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18049 * debug-symfile.c, sysmath.c: yet more compilation fixes.
18051 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18053 * reflection.c, socket-io.c: more compilation fixes.
18055 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18057 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
18058 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
18059 unicode.c: warning and compiler compatibility fixes.
18061 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18063 * class.h, metadata.c: fixed warnings/compilation errors.
18065 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18067 * Makefile.am, mono-config.c, mono-config.h: configuration file
18069 * loader.c, loader.h: make Dll mapping configurable at runtime in the
18070 config file. Export methods to insert and lookup mappings.
18072 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18074 * reflection.c: handle types and boxed objects in custom attr
18077 2002-05-30 Martin Baulig <martin@gnome.org>
18080 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
18082 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
18084 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
18085 to lookup the implmap row for a P/Invoke method.
18086 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
18087 P/Invoke method from the runtime on an as needed basis.
18089 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
18091 * metadata.c (mono_metadata_parse_signature): impl.
18093 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18095 * class.c: handle .pack directive.
18097 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18099 * object.c: initialize static fields with RVA data.
18101 2002-05-25 Martin Baulig <martin@gnome.org>
18104 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
18106 2002-05-24 Martin Baulig <martin@gnome.org>
18109 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
18110 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
18111 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
18113 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18115 * object.c: special case string ctros in invoke.
18116 * gc.c: silly whitespace changes.
18118 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
18120 * threadpool.[ch]: impl. a threadpool that can
18121 be used by mint and mono.
18123 2002-05-22 Martin Baulig <martin@gnome.org>
18125 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
18126 The first argument is now a `MonoReflectionModuleBuilder *', the return
18127 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
18128 `methods' field to get the method builder. The `token' argument is the
18131 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
18132 invalid characters instead of g_assert_not_reached()ing. This seems
18133 to be the behaviour of mscorlib.
18135 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
18137 * object.c (mono_runtime_invoke_array): applied patch from Rachel
18138 Hestilow to fix bug #25104
18140 2002-05-21 Martin Baulig <martin@gnome.org>
18142 * debug-symfile.c (mono_debug_find_source_location): New function.
18143 Looks up an IL offset in the line number table and returns the source
18144 location as a string.
18146 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18149 (mono_double_ToStringImpl): changed %f by %g until we have something
18152 2002-05-21 Nick Drochak <ndrochak@gol.com>
18154 * icall.c : Use different name for Math.Pow's icall. Needed to check
18155 parameters first in C#.
18157 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18159 * icall.c, reflection.h: added icall to get info about an event.
18161 2002-05-20 Radek Doulik <rodo@ximian.com>
18163 * object.c (mono_value_box): don't use memcpy for boxing on BIG
18165 (mono_value_box): don't use memcpy for small sizes on
18166 architectures with unaligned access
18168 2002-05-20 Martin Baulig <martin@gnome.org>
18170 * reflection.c (mono_reflection_setup_internal_class): Don't crash
18171 if `tb->parent == NULL'.
18172 (mono_reflection_create_internal_class): New function. This is
18173 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
18176 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
18179 2002-05-19 Martin Baulig <martin@gnome.org>
18181 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
18182 argument to get the length, don't default to the array length.
18184 2002-05-18 Miguel de Icaza <miguel@ximian.com>
18186 * assembly.c (mono_assembly_setrootdir): New function used to
18187 override the MONO_ASSEMBLIES directory.
18189 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18191 * icall.c: ValueType_GetHashCode() initialize local var.
18193 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18195 * reflection.c: sort custom attributes table.
18197 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18199 * reflection.c: support named args in custom attributes (write support).
18201 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
18203 * reflection.c: fix finally position calculation.
18205 2002-05-15 Radek Doulik <rodo@ximian.com>
18207 * reflection.c: fixed endianess at many places
18209 * icall.c (ves_icall_InitializeArray): comment out debug msg
18211 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
18213 * object.c (mono_unhandled_exception): new function to handle
18214 unhandled exceptions.
18215 (mono_unhandled_exception): call the UnhandledException event.
18216 (mono_runtime_delegate_invoke): impl.
18218 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
18220 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
18221 returns the RVA, not the direct pointer to the data. Handle the case
18222 when the class size is fixed.
18224 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18226 * reflection.c: fix some endianess issues.
18228 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
18230 * object.c (mono_runtime_invoke): is now able to catch exceptions.
18232 * threads.c (mono_thread_init): added a callback which is invoked
18235 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
18237 * icall.c: make GetHashCode return non-negative values.
18239 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
18241 * object.c, icall.c, gc.c: revert to address-based hashcode.
18243 2002-05-13 Miguel de Icaza <miguel@ximian.com>
18245 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
18247 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18249 * icall.c, class.c: special case <Module>.
18251 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
18253 * icall.c: fix bug in GetNow().
18255 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
18257 * object.c (mono_runtime_class_init): make sure that we call all
18258 static class constructors.
18260 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18262 * reflection.c: sort methodsemantics table.
18264 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18266 * reflection.h, reflection.c: honour init locals setting.
18268 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
18270 * icall.c: copied Double ToStringImpl for Single ToStringImpl
18272 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18274 * reflection.c: support ContructorBuilders in attribute blob creation.
18276 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18278 * reflection.c: some changes to build a binary that can be run
18279 directly in windows.
18281 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
18283 * loader.c: print a big message when an icall can't be found.
18285 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18287 * string-icalls.c: fix bug 24248.
18289 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
18291 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
18292 icall.c, reflection.h: separate assembly loading by pathname and by
18293 assembly name. Use the MONO_PATH env var to search for assemblies.
18295 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18297 * assembly.c, image.h: add some support for assemblies
18298 with multiple modules.
18299 * class.c, class.h: export mono_class_from_typeref().
18300 * loader.c: remove duplicated code and use mono_class_from_typeref(),
18303 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18305 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
18306 documentation says (the ECMA one is correct).
18308 2002-05-02 Dick Porter <dick@ximian.com>
18310 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
18311 Don't name the synchronisation mutex.
18313 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
18316 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
18317 Make the prototypes match.
18318 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
18322 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
18323 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
18324 all systems have tm.tm_zone, so use strftime() with %Z to print
18325 the timezone abreviation into a temp string.
18327 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
18328 rather than mono_array_addr() on a MonoString on Big Endian
18331 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
18333 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
18336 2002-04-30 Dick Porter <dick@ximian.com>
18338 * socket-io.c: Cope with SOCKET being an integer rather than a
18341 * threads.c: Added Thread_free_internal, to deal with thread
18342 handle cleanup. Moved calls to handle_store() and handle_remove()
18343 to start_wrapper(), so each can only be called once. Allocate
18344 synchronisation blocks with GC_malloc(), and use GC finalisation
18345 to close the handles.
18347 * icall.c: added System.Threading.Thread::Thread_free_internal
18349 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18351 * icall.c: support Environment.Exit, CommandLineArgs().
18353 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18355 * object.c, object.h: added mono_runtime_run_main () and
18356 mono_runtime_get_main_args () for use in System.Environment.
18358 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18360 * gc.c: fix thinko, enable actual finalization since the jit is now
18363 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18365 * gc.c, object.c: take into account that an object may be offset wrt the address
18366 returned by GC_malloc().
18368 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
18370 * image.c: handle files without entries in the assembly table (modules).
18372 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
18374 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
18375 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
18376 allowed to be null when it's System.Object class setup.
18378 2002-04-27 Martin Baulig <martin@gnome.org>
18380 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
18381 if `tb->parent == NULL' rather than crashing.
18383 2002-04-28 Nick Drochak <ndrochak@gol.com>
18385 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
18386 calling acos() where asin() should have been called.
18388 2002-04-26 Martin Baulig <martin@gnome.org>
18390 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
18391 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
18392 there's a subdirectory called `System', but we don't want to read that
18393 subdirectory as an assembly.
18395 2002-04-25 Martin Baulig <martin@gnome.org>
18397 * debug-symfile.c: Reflect latest MonoString changes.
18399 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18401 * rand.c, rand.h: instance method icalls need to have an explicit
18402 this pointer as first argument in the C implementation.
18404 2002-04-25 Nick Drochak <ndrochak@gol.com>
18406 * icall.c: Fix typo in map for GetNonZeroBytes
18408 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
18410 * string-icalls.c : String does now passes unit tests without any
18411 errors, the following changes has been made:
18413 Implemented replace methods.
18414 Renaming of methods to (try) follow the standard.
18415 Fixed compare ordinal
18416 Made all memory allocated directly to function instead of via icall function.
18417 Small performance fix in is_in_array function
18419 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
18421 c (mono_string_Internal_ctor_charp_int_int):
18422 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
18423 sindex < 0, throw ArgumentOutOfRangeException instead of
18424 ArgumentNullException.
18426 Added new check for length == 0, however
18427 I need to make it return String.Empty from the C code.
18429 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
18430 that calculate the length for us here.
18432 (mono_string_Internal_ctor_sbytep_int_int): Replaced
18433 mono_string_new_utf16 with mono_string_new, since value is utf8.
18435 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18437 * object.c: register the object for finalization if needed.
18438 Allocate one more char in the string for the terminating 0 char.
18440 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18442 * class.c, class.h, image.c: check if a type implemenst a destructor.
18443 Use the proper key for array class lookups.
18444 * icall.c: register the icalls in the System.GC class.
18445 * gc.c, gc.h: GC-related functions and icalls.
18447 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18451 * unicode.c: free some strings gotten from mono_string_to_utf8 and
18452 changed a couple of free () by g_free ().
18454 * decimal.c: one-liner in the comments for decimal2string ().
18456 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
18458 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
18460 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
18462 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
18463 * object.c (mono_runtime_invoke_array) : handle null in params
18465 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
18467 * string-icalls.c: fixed bug in split (one off bug)
18469 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
18471 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
18472 * icalls.c: added String::Equals as internal method
18474 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
18476 * threads.c: fixed bug in the double interlocked functions
18478 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
18480 * threads.c: implemented all of the new interlocked icalls.
18481 * string-icalls.c: fix a bug in insert.
18482 * icalls.c: added the icalls for interlocked, removed old string functions.
18484 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18486 * loader.c: fix off-by-one error when reading argument names.
18488 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18490 * profiler.c: win32 counter implementation (untested).
18491 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
18492 (the latter needs testing and more complete impl. from win32 folks).
18494 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
18496 * object.c: mono_array_new_full workaround mono_array_class_get
18499 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18501 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
18502 * object.h (mono_string_chars): Changed casting type.
18504 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18506 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
18507 method signatures to use gunichar2 instead of gint16.
18509 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
18511 * object.h, object.c: domain-specific versions of mono_object_new and
18514 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
18516 * object.c: changed String layout
18518 * string-icalls.c (mono_string_Internal_ctor_chara): added
18519 internal string constructors.
18521 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
18523 * threads.c: pass 'this' to the thread start routine.
18525 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18527 * string-icalls.c: fix IndexOf and LastIndexOf. Now
18528 InternalCompareStr don't call twice mono_string_cmp_char for the last
18529 character. Improved performance in mono_string_cmp_char.
18531 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18533 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
18534 code into its own library: libmonoruntime.
18536 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
18538 * object.h, object.c: changed array format so that szarrays do not
18539 require a bounds structure.
18540 * icall.c, appdomain.c: support for new szarray format.
18542 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
18544 * metadata.c: compare also the retuns type when comparing signatures:
18545 we didn't do this as an optimization since really overloaded methods
18546 must differ also in the arguments, but this doesn't work with
18547 low-level IL code (or when using explicit conversion operators: see
18548 bug#23498 for an example).
18550 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18552 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
18554 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18556 * icall.c: make MonoType::GetElementType its own icall.
18558 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18560 * icall.c: remove MonoMethod_get_Name().
18561 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
18564 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18566 * string-icalls.c: optimized a few methods.
18568 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
18570 * icall.c: added all new string internal calls
18571 * string-icalls.c: added, new string internal call implementation.
18572 * object.c: added mono_string_new_size for allocating a string a size
18574 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
18576 * object.c (mono_object_isinst): use the same code as in the
18577 optimized x86 version.
18579 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18581 * profiler.c: TSC-based timer code (faster and more accurate).
18582 Not hooked up in configure, yet (set USE_X86TSC to 1).
18584 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
18586 * profiler.c, profiler.h: track time spent compiling methods.
18587 * threads.c: track thread creation/destruction.
18589 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
18591 * profiler.c, profiler.h, profiler-private.h: profiling interface
18592 and sample implementation. Moved here so that it can be used also by
18595 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
18597 * reflection.c, reflection.h: keep types and other handles separate in
18598 the hash tables for referred tokens. Add guid for modules.
18600 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18602 * assembly.c: fix bugs found with valgrind.
18603 * metadata.h, metadata.c: added mono_metadata_guid_heap().
18605 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
18607 * threads: added icall support for getting current domain for
18610 2002-04-13 Martin Baulig <martin@gnome.org>
18612 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
18613 (MonoDebugVarInfo): Added `index' field for register based addresses.
18614 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
18615 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
18616 `MonoDebugVarInfo *params' and `guint32 this_offset' with
18617 `MonoDebugVarInfo *this_var'.
18619 * debug-symfile.c (relocate_variable): New static function to write
18620 a location description for a local variable or method parameter.
18622 2002-04-12 Martin Baulig <martin@gnome.org>
18624 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
18625 stack offset and begin/end scope address of a local variable.
18626 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
18627 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
18628 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
18630 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
18631 Added new relocation types for start/end scope of a local variable.
18633 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18635 * object.h: add mono_object_domain() macro.
18636 * reflection.c: handle typespecs.
18637 * icall.c: MonoMethod::get_Name() implementation.
18639 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18641 * icall.c: String::GetHashCode() icall implementation.
18643 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18645 * icall.c: String::IndexOfAny icall.
18646 * object.c, object.h: make array->max_length more useful.
18647 Intrduced mono_object_class() and mono_string_length() macros.
18649 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18651 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
18652 instead of g_unichar_isdigit.
18654 2002-04-11 Nick Drochak <ndrochak@gol.com>
18656 * icall.c: Implement a simple Double.ToString().
18658 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18660 * appdomain.h: only io-layer.h is supposed to be included.
18661 * icall.c: explicitly import environ. Fix warning.
18663 2002-04-10 Nick Drochak <ndrochak@gol.com>
18665 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
18666 return true even if it's not Daylight Savings time.
18667 Only return false for the case where the function isn't
18668 implemented for a plaform (read Windows).
18670 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18672 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
18675 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
18677 * mempool.c (mono_mempool_alloc): only use g_malloc when
18678 absolutely necessary.
18680 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
18682 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
18684 * class.c (mono_class_vtable): use domain mempool to allocate vtable
18685 (mono_class_proxy_vtable): use domain mempool
18687 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18689 * appdomain.h, appdomain.c: split initialization that requires the
18690 execution engine support into mono_runtime_init().
18692 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
18694 * class.c (mono_class_init): don't include vtable inside MonoClass
18695 to save some memory, gather some statistics.
18696 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
18698 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18700 * icall.c: internalcall implementation for ValueType.Equals().
18702 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
18704 * object.c (mono_message_init): moved
18705 (mono_runtime_exec_main): new arch. independent impl.
18706 (mono_runtime_invoke_array): new method - like
18707 mono_runtime_invoke, but you can pass an array of objects.
18708 (mono_remoting_invoke): new arch. independent impl.
18709 (mono_message_invoke): new arch. independent impl.
18710 (mono_runtime_class_init): new arch. independent impl.
18711 (mono_runtime_object_init): new arch. independent impl.
18713 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18715 * metadata.c, object.c, reflection.c: documented the exported
18718 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
18720 * icall.c: simpler code to pass the assembly builder data to corlib.
18721 Implement GetNestedTypes() internalcall.
18723 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18725 * class.c: warn if a type can't be loaded.
18727 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
18729 * image.h: typedef MonoImageOpenStatus
18730 * types.h: removed unused file
18732 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
18734 * icall.c: Enum_ToObject accepts enum value arguments.
18736 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18738 * class.c: move initialization of properties, events and nested
18739 classes, so that they happen for interfaces, too.
18741 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18743 * icall.c: cleanup some ugly casts in Array_SetValue*.
18745 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18747 * icall.c: the values array fro enums is of the correct type, now.
18748 Implement (correctly) getFullName instead of assQualifiedName for
18750 * reflection.h, reflection.c: added mono_type_get_name ().
18752 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18754 * assembly.c, image.h: for each MonoImage, record from wich assembly
18756 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
18757 Make Type.Assembly work.
18759 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
18761 * debug-symfile.h: use char* instead of gpointer to avoid
18764 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
18766 * icall.c (ves_icall_InternalExecute): impl. FielSetter
18767 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
18769 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
18771 * icall.c (mono_message_init): impl. (code cleanup)
18772 (ves_icall_InternalExecute): impl. FieldGetter
18774 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
18775 defined we call all (non-static)methods through the vtable.
18777 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
18779 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
18780 finalizer even though the memory is still referenced (and the chunk of
18781 memory is not freed).
18783 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18785 * assembly.c: fix brokeness.
18787 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
18789 * class.c: kill some warnings. Check explicit interface method
18790 implementation also without considering the namespace.
18791 Load also literal strings in static class data.
18793 2002-03-29 Miguel de Icaza <miguel@ximian.com>
18795 * assembly.c (default_assembly_name_resolver): Kill memory leak.
18796 (default_assembly_name_resolver): Make the resolver take the
18797 "base" directory where the assembly was originally defined, so we
18798 can load DLLs that are in the same directory as the assembly that
18799 is being referenced.
18801 2002-03-28 Dick Porter <dick@ximian.com>
18807 * unicode.c: Warning cleanups
18809 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
18811 * object.h, reflection.h: use the correct type instead of MonoObject.
18813 2002-03-28 Martin Baulig <martin@gnome.org>
18815 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
18816 (mono_debug_update_symbol_file): Initialize classes if necessary.
18818 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18820 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
18821 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
18823 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
18825 * assembly.h: fix function prototype.
18826 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
18827 * mono-endian.h: use const cast.
18829 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
18831 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
18833 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18835 * loader.c: don't assert when a typeref can't be loaded, give
18836 a chance to the runtime to trow an exception instead.
18837 * loader.h: fix warning.
18839 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
18841 * class.c (mono_class_proxy_vtable): added proxy support
18843 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
18845 * icall.c: removed last of PAL calls, added System.Environment
18846 * file-io.h, file-io.c: MonoIO implementation
18847 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
18849 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18851 * appdomain.c: do not use the byte marker in ldstr table lookup.
18852 * debug-helpers.c: allow two ':' to separate class and method name.
18853 * object.c: allocate arrays bounds with the GC, too.
18854 * verify: add a few more checks.
18856 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
18858 * reflection.c: output also literal strings. Allocate parameter data
18859 with GC_malloc() (thanks, Martin, for catching this!).
18861 2002-03-26 Martin Baulig <martin@gnome.org>
18863 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
18864 include the `this' offset in the `param_offsets'.
18866 2002-03-25 Martin Baulig <martin@gnome.org>
18868 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
18869 mono_debug_get_class() function to get the classes. Added new
18870 relocation types for arrays and strings.
18871 (mono_debug_get_class): New static function to search in all
18872 referenced assemblies for a metadata token.
18874 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
18876 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18878 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
18879 hold gc-allocated objects. Make the string heap a stream like the
18880 others. Removed duplicated code when writing stream info.
18881 Added asserts to catch possible buffer overflows. Set the sorted map
18882 for tables that need sorting. Added some documentation.
18884 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
18886 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
18887 for interned strings and vtables.
18889 2002-03-24 Martin Baulig <martin@gnome.org>
18891 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
18892 it in the array since it was created with g_slist_prepend().
18894 2002-03-24 Martin Baulig <martin@gnome.org>
18896 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
18897 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
18898 (mono_debug_method_from_token): Renamed to
18899 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
18900 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
18902 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
18905 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
18907 2002-03-24 Martin Baulig <martin@gnome.org>
18909 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
18910 (mono_debug_method_from_token): New func.
18912 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
18913 New interncall, calls mono_debug_local_type_from_signature().
18914 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
18915 calls mono_debug_method_from_token().
18917 2002-03-23 Martin Baulig <martin@gnome.org>
18919 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
18920 specifies the number of bytes to be converted, not the array size.
18921 Return the number of chars, not the number of bytes.
18922 (ves_icall_iconv_get_chars): The `byteCount' argument
18923 specifies the number of bytes to be converted, not the array size.
18925 2002-03-23 Martin Baulig <martin@gnome.org>
18927 * reflection.h (MonoReflectionSigHelper): New type.
18929 * reflection.c (mono_reflection_sighelper_get_signature_local),
18930 (mono_reflection_sighelper_get_signature_local): New functions.
18932 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
18933 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
18936 2002-03-23 Martin Baulig <martin@gnome.org>
18938 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
18939 is_writeable is set.
18940 (mono_raw_buffer_update): New function to write the modified map
18943 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18945 * debug-symfile.c (mono_debug_update_symbol_file): Call
18946 mono_raw_buffer_update() when done writing.
18948 2002-03-23 Martin Baulig <martin@gnome.org>
18950 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18952 * debug-symfile.c: Added support for arguments and local variables.
18954 2002-03-23 Dick Porter <dick@ximian.com>
18956 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18957 protected by ifdefs, hence breaking the w32 build.
18959 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18961 * object.c: implement is_interned() the right way.
18963 2002-03-21 Martin Baulig <martin@gnome.org>
18965 * debug-symfile.[ch]: New files to handle debugging information
18966 files. There's also support to dynamically update these symbol
18967 files to include machine dependent information.
18969 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
18971 * threads.c (mono_thread_create): new function to create thread
18974 2002-03-20 Martin Baulig <martin@gnome.org>
18976 * icall.c (ves_icall_InternalInvoke): Create a new object if the
18977 method is a constructor.
18978 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18979 points to ves_icall_InternalInvoke().
18981 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
18983 * file-io.c: Flush shouldn't throw exceptions.
18985 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
18987 * file-io.c: FileStream flush support; FileSetLength now
18988 restores file pointer.
18990 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18992 * class.c: set image for pointer classes.
18994 2002/03/19 Nick Drochak <ndrochak@gol.com>
18996 * sysmath.c: Forgot one.
18998 2002-03-18 Miguel de Icaza <miguel@ximian.com>
19000 * sysmath.c: Avoid redefining existing names.
19002 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
19004 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
19005 handled by runtime as icall rather than dllimport from libm.so
19006 * file-io.c, file-io.h: fixed handle argument type.
19008 2002-03-18 Dick Porter <dick@ximian.com>
19010 * reflection.c (mono_image_get_type_info): rename interface to
19011 iface, because of "#define interface struct" on windows.
19013 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
19015 * class.c, class.h: rename and export mono_ptr_class_get().
19016 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
19017 * reflection.c, reflection.h, icall.c: better/saner type name
19018 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
19021 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
19023 * class.c (mono_class_init): removed hardcoded GHC_SLOT
19025 * icall.c (ves_icall_InternalInvoke): impl.
19027 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
19029 * reflection.c: output the interface map table, too.
19031 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
19033 * class.c (class_compute_field_layout): separate computation of
19034 static field layout
19036 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
19038 * icall.c: added System.Buffer support.
19039 * file-io.c: moved file icalls from PAL to FileStream.
19041 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
19043 * icall.c (ves_icall_System_Object_GetHashCode): impl.
19045 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
19047 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
19049 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19051 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
19053 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19055 * debug-helpers.{c,h}: moved here from monograph some useful functions
19056 to locate a method by name/signature in a class or image. Included
19057 also a small and flexible IL disassembler.
19059 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19061 * reflection.c: fixup tokens in methods with small header size, too.
19063 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
19065 * object.c (mono_string_to_utf8): remove assert(!error), instead
19068 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
19070 * icall.c: update to the new mono_Array_class_get interface.
19072 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
19074 * appdomain.c, object.c: Boehm-GC enable.
19075 * icall.c: make get_data_chunk() support split data requests.
19076 Ensure a class is initialized in more cases. Return only the first
19077 property found in GetProperties() or the compiler gets confused.
19078 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
19079 * reflection.h, reflection.c: add fixup mechanism for field and method
19080 tokens. Initialize assembly->typeref in a single place. Output
19081 properties after events. Support custom attributes for events, too.
19082 Typo fix for paramter custom attrs.
19084 2002-03-07 Martin Baulig <martin@gnome.org>
19086 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
19088 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
19090 * class.c (mono_array_class_get): fix. for multi. dim. arrays
19092 2002-03-06 Martin Baulig <martin@gnome.org>
19094 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
19095 non-zero lower bounds. See testcases #F10-#F13.
19097 2002-03-05 Martin Baulig <martin@gnome.org>
19099 * exception.c (mono_get_exception_argument_out_of_range): New exception.
19101 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
19102 ves_icall_System_Array_GetValue(), only calculate the absolute array position
19104 (ves_icall_System_Array_SetValue): Likewise.
19105 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
19106 as argument and does the actual work. This function is used when copying a
19107 multi-dimensional array.
19108 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
19109 now do all the widening conversions of value types.
19110 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
19112 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19114 * class.c: remove some magic numbers and use the smbolic names,
19115 instead. Added init_events() to load event info at class init time.
19116 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
19117 and mono_metadata_methods_from_event().
19118 * reflection.h, reflection.c: added support for writing out the evnets
19119 related information.
19121 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19123 * reflection.h, icall.c: use a different method (GetInterfaces)
19124 to gather interface info and add isbyref, isprimitive and
19125 ispointer to the ves_icall_get_type_info() return value.
19127 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
19129 * class.h: stared adding support for events.
19130 * icall.c: split find_members implementation. Added debug icall to get
19131 the address of an object.
19132 * reflection.c: handle TypeBuilders in mono_type_get_object().
19134 2002-03-01 Martin Baulig <martin@gnome.org>
19136 * icall.c (ves_icall_System_Array_GetLength): This must throw an
19137 ArgumentOutOfRangeException(), not an ArgumentException().
19138 (ves_icall_System_Array_GetLowerBound): Likewise.
19139 (ves_icall_System_Array_GetValue): Improved argument checking.
19140 (ves_icall_System_Array_SetValue): Improved argument checking.
19142 2002-03-01 Martin Baulig <martin@gnome.org>
19144 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
19145 called with invalid arguments rather than just dying with g_assert().
19146 (ves_icall_System_Array_SetValue): Likewise.
19147 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
19148 raise a NotImplementedException instead.
19149 (ves_icall_System_Array_GetLength): Added argument checking.
19150 (ves_icall_System_Array_GetLowerBound): Added argument checking.
19152 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
19154 * object.h (mono_assert): new macros mono_assert and
19155 mono_assert_not_reached
19157 2002-02-28 Martin Baulig <martin@gnome.org>
19159 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
19160 and "System::String::IsInterned" to "System::String::_IsInterned".
19162 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
19164 * icall.c: remove hacks for typebuilder. Added icall to create a
19165 modified type from a tybebuilder.
19166 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
19167 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
19168 to create a backing MonoClass for a TypeBuilder.
19170 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
19172 * class.c, class.h: more refactoring of class init.
19173 Export mono_class_setup_mono_type() and mono_class_setup_parent().
19175 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
19177 * marshal.c, marshal.h: start of marshaling interface.
19179 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
19181 * icall.c: fix order in assembly qualified name icall.
19183 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
19185 * class.c: do not free str, since we store it in the hash table.
19186 * reflection.h: add label field to MonoILExceptionInfo.
19187 * reflection.c: handle references to more than one assembly. Handle
19188 case when there isn't a module created in the assembly.
19190 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
19192 * class.c: Fix typo. Start refactoring of class init code.
19194 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
19196 * appdomain.c: exit with 1 on error.
19197 * class.c: we already have the name in MonoClassField.
19198 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
19199 MonoStreamHeader instead of an offset of image->raw_metadata.
19201 2002-02-26 Miguel de Icaza <miguel@ximian.com>
19203 * appdomain.c (mono_init): Be even more descriptive about the error.
19205 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
19207 * appdomain.c: give the user an informative message when corlib can't
19210 2002-02-26 Martin Baulig <martin@gnome.org>
19212 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
19213 New icall to get the time zone data.
19215 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
19217 * reflection.c: set virtual and raw size of section correctly.
19218 * threads.c: transfer domain information to newly created threads.
19220 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
19222 * class.c: when instancing a class in a domain, load the default
19223 vaules for static fields from the constant table. Fix System.Enum to
19225 * icall.c: implement Object::GetType() internalcall. Implemented
19226 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
19227 Fixed checking of binding flags in find_members().
19228 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
19229 * reflection.c: handle enumerations when writing to the constant
19230 table. Use a different object cache for types.
19233 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
19235 * object.c (mono_object_isinst): fix for arrays
19237 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
19239 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
19241 * object.c: don't use mprotect () and fix intern pool hash table
19242 lookup for big endian systems.
19244 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19246 * icall.c: change type_is_subtype_of () signature.
19248 2002-02-21 Mark Crichton <crichton@gimp.org>
19250 * rand.c, rand.h: Added random number generator for
19251 System.Security.Cryptography classes.
19253 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
19255 * icall.c: Added System.Security.Cryptography calls.
19257 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
19259 * class.c, icall.c, metadata.c: better support for pointer types.
19260 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
19261 * reflection.c: Add support for getting custom attrs for properties
19262 and simplify some code.
19264 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19266 * icall.c: change getToken () and add custom attribute GetBlob()helper
19268 * reflection.h: add custom attrs array to the reflection builder structures.
19269 * reflection.c: encode and emit custom attributes for all the relevant
19270 reflection objects. Cache fieldref and methodref tokens. Change
19271 mono_image_create_token() interface to take a MonoDynamicAssembly.
19272 More complete custom attributes decoder. Load custom attributes for
19273 Assembly, Field, Method and Constructor objects, too. Make the
19274 returned array an Attribute[] one, not object[]. Added
19275 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
19276 custom attribute constructor.
19278 2002-02-20 Dick Porter <dick@ximian.com>
19282 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
19283 problem code out for now).
19285 2002-02-19 Radek Doulik <rodo@ximian.com>
19287 * object.c (mono_ldstr): use hash table to avoid multiple swapping
19289 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
19291 * icall.c: register the GetCustomAttributes method.
19292 * object.c, object.h: add mono_string_new_len ().
19293 * reflection.h, reflection.c: added mono_runtime_invoke(),
19294 mono_install_runtime_invoke(). Added
19295 mono_reflection_get_custom_attrs () to load custom attributes and
19296 create the attribute objects.
19298 2002-02-19 Dick Porter <dick@ximian.com>
19299 * threads-dummy-types.c:
19300 * threads-dummy-types.h:
19303 * threads-pthread-types.c:
19304 * threads-pthread-types.h:
19305 * threads-pthread.c:
19306 * threads-pthread.h: Deleted obsolete files
19308 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
19310 * class.c (mono_class_vtable): runtime init the class when we
19311 allocate static class data.
19313 * icall.c (ves_icall_System_Array_SetValue): check for null values.
19315 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
19316 and String - but we will need generic marshalling support in the
19318 (mono_init): set the domain name in a ms compatible way
19320 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
19323 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
19325 * object.c (mono_array_clone): use alloca() instead of g_malloc
19328 * appdomain.c (mono_domain_unload): impl.
19330 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
19332 * appdomain.c, object.c: fix intern pool implementation.
19333 * class.c: fix alignment code.
19335 2002-02-16 Radek Doulik <rodo@ximian.com>
19337 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
19338 and s2 > s1, just copy lower bytes to be compatible with little
19339 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
19340 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
19342 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
19343 force big_endian to be 1 for big endian machines
19344 (ves_icall_iconv_new_decoder): ditto
19346 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
19348 * socket-io.c (convert_sockopt_level_and_name): If the system
19349 doesn't define SOL_IP or SOL_TCP, get them by hand using
19350 getprotobyname() and caching the values (because this could be a
19352 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
19353 Use the appropriate struct when the system does support it. Ie,
19354 not all systems have struct ip_mreqn so use struct ip_mreq when
19357 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
19359 * reflection.c: handle finally clauses.
19361 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
19363 * socket-io.c: use g_snprintf() instead of snprintf.
19365 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
19367 * reflection.c (mono_param_get_objects): Cast second argument to
19368 mono_method_get_param_names to a const char** to silence the
19371 * appdomain.c (mono_domain_assembly_open): Put parens around the
19372 truth statement in the for-loop.
19374 * unicode.c (iconv_convert): Got rid of a compiler warning about
19375 int i being unused when the system has a new iconv.
19376 (iconv_get_length): Same.
19378 * image.c (load_class_names): Cast the second argument to
19379 g_hash_table_insert() to char* to hush compiler warnings about the
19381 (mono_image_open): Same here.
19383 * socket-io.c: Don't conditionally include sys/filio.h or
19384 sys/sockio.h here anymore since we now get them from
19385 io-layer/io-layer.h
19386 (inet_pton): If the system doesn't support inet_aton, implement
19387 using inet_addr and also #define INADDR_NONE if it isn't defined
19390 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
19392 * metadata.c, metadata.h: added function to get packing and size info
19394 * reflection.h, reflection.c: handle field RVA data. Save info about
19395 the table layout if needed. Assign typedef indexes to all the types
19396 before dumping the info about them to avoid forward reference problems.
19398 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
19400 * socket-io.c (convert_sockopt_level_and_name): ifdef
19401 SO_ACCEPTCONN because it is not defined on my system (old debian)
19403 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
19405 * opcode.c: use stddef.h to get NULL.
19407 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
19409 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
19410 for FIONBIO, FIONREAD and SIOCATMARK.
19411 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
19412 define INADDR_NONE and besides, inet_addr() is deprecated and
19413 should not be used. Use inet_pton() instead - it also has the
19414 added bonus that it can easily handle IPv6 addresses as well.
19415 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
19417 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
19419 * decimal.c: remove _MSC_VER conditional.
19421 2002-02-13 Dick Porter <dick@ximian.com>
19424 * icall.c: Internal calls for Blocking, Select, Shutdown,
19425 GetSocketOption and SetSocketOption
19427 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19429 * assembly.cs: better resolver: use it instead of some kludgy
19432 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
19434 * reflection.c: the best way to speed-up the compiler is to avoid
19437 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
19439 * class.c (mono_class_vtable): changed the object layout
19440 (obj->vtable->class).
19441 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
19443 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19445 * assembly.c: look for assemblies in the assembly dir, too.
19447 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19449 * class.c: fix thinko in mono_class_from_type().
19451 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
19453 * exception.h, exception.c: added TypeLoadException.
19454 * object.h, object.c: added mono_array_clone ().
19455 * icall.c: handle throwOnError in AssemblyGetType().
19456 Added Array.Clone().
19457 * opcode.h, opcode.c: use a single value for the opcode val.
19458 Compile fix for non-gcc compilers.
19460 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
19462 * opcodes.c, opcodes.h: export interesting info about opcodes.
19464 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
19466 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
19469 * class.c (class_compute_field_layout): set element_class for enums
19470 (mono_class_create_from_typedef): set element_class for normal classes
19472 * icall.c (ves_icall_System_Enum_get_value): impl.
19474 * class.c (mono_class_create_from_typedef): do not set valuetype
19475 flag for System.ValueType and System.Enum
19477 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
19479 * unicode.c (iconv_convert): fix big endian problem.
19481 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
19483 * class.c: add asserts if we are ever going to scribble over memory.
19484 * socket-io.c: not all systems have AF_IRDA defined.
19486 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
19488 * class.c (class_compute_field_layout): do not consider static
19489 fields to compute alignment
19491 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
19493 * appdomain.c (mono_appdomain_get): impl.
19494 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
19496 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19498 * icall.c: ignore "file://" prefix when loading an assembly.
19500 2002-01-23 Dick Porter <dick@ximian.com>
19504 * Makefile.am: Added socket support
19506 2002-01-23 Miguel de Icaza <miguel@ximian.com>
19508 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
19509 code back. This should return the assemblies that are loaded by
19510 the runtime on behalf of an application domain.
19512 The current implementation is still broken, it just returns every
19513 assembly loaded, but until we get real applications domain this
19516 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
19518 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
19521 2002-01-23 Miguel de Icaza <miguel@ximian.com>
19523 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
19524 the mono_class_from_name lookup.
19525 (ves_icall_get_parameter_info): ditto.
19526 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
19528 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
19530 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
19532 * class.c: load also nested classes on class init.
19533 System.ValueType instance methods gets passed boxed
19534 values, unless methods in derived classed that get a pointer to the
19536 * icall.c: use better name parsing code in GetType().
19537 * image.c, image.h: add mono_image_loaded ().
19538 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
19539 * reflection.c, reflection.h: added mono_reflection_parse_type().
19541 2002-01-22 Veronica De Santis <veron78@interfree.it>
19543 * icall.c : Added mapping of internal calls for Manual and Auto reset events
19544 * threads.c : Added the implementation of internal calls for events
19545 * threads.h : Added prototypes of internal calls for events
19547 2002-01-21 Radek Doulik <rodo@ximian.com>
19549 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
19551 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
19553 * class.c (mono_class_init): set min_align to 1 (instead of 0)
19554 (mono_class_value_size): use min_align
19556 2002-01-20 Dick Porter <dick@ximian.com>
19559 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
19560 so it compiles on w32.
19562 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
19564 * metadata.c (mono_type_stack_size): impl.
19566 * class.c (mono_class_get_field): impl. memberref token
19568 2002-01-16 Veronica De Santis <veron78@@interfree.it>
19570 * icall.h : Added the internal calls mapping for CreateMutex_internal
19571 and ReleaseMutex_internal.
19572 * threads.h : Added the prototype of mutexes internal calls.
19573 * threads.c : Added the implementations of mutexes internal calls.
19575 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
19577 * metaparse.h: removed unused file.
19578 * reflection.c, reflection.h: added stream_data_align () function
19579 to align data in streams and keep stream aligned. Add support for
19580 exception support in method headers.
19582 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
19584 * unicode.c: make iconv_convert () return the number of bytess written
19585 in the output buffer.
19587 2002-01-15 Dick Porter <dick@ximian.com>
19588 * threads.c: Make the runtime's idea of infinite timeouts coincide
19589 with the class library's
19591 Fix a particularly egregious bug in mono_thread_cleanup(). That
19592 code was so utterly bogus it must have been written on a Monday.
19594 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
19596 * reflection.h: add subtypes field to TypeBuilder.
19597 * reflection.c: encode constants for literal fields.
19598 Handle subtypes. Fix user string token (and add a zero byte)
19601 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
19603 * class.c (mono_class_init): bug fix: assign slot numbers for
19606 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19608 * reflection.c: don't try to output a code RVA for abstract methods.
19609 Small fixes for method header format. Output parameter info to the
19610 ParamDef table. Save method overriding info to MethodImpl table.
19611 Fix property support. Allow typedef.extends to be a type in the
19613 * verify.c: fix off-by-one error.
19615 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
19617 * class.c: fix mono_class_from_mono_type () for szarray types.
19618 Remove unused cache check in mono_class_from_type_spec().
19619 * icall.c: *type_from_name () functions handle simple arrays and byref.
19620 * reflection.c: handle byref and szarray types. Handle methods without
19621 body (gets P/Invoke compilation working). Handle types and fields in
19623 * reflection.h: add rank to MonoTypeInfo.
19625 2002-01-10 Dick Porter <dick@ximian.com>
19627 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
19630 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
19632 * icall.c: initialize class in type_from_handle ().
19633 Loop also in parent classes for get_method ().
19634 * reflection.c: properly encode class and valuetype types.
19635 Start on encoding TypeBuilder types. Handle fieldrefs.
19636 Use correct length when registering a user string.
19637 Handle ConstructorBuilder and MonoMethod in get_token ().
19638 Make mono_type_get_object () aware of cached types.
19639 * object.c: back out change to mono_string_new ().
19641 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
19642 * object.c: mono_string_new should return a NULL when the string
19643 passed in is NULL -- not try to deference it.
19645 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19647 * icall.c: hack to make IsSubType work for TypeBuilders.
19648 * reflection.c: emit constructors before methods.
19649 Retrieve param names in mono_param_get_objects().
19651 2002/01/05 Nick Drochak <ndrochak@gol.com>
19653 * Makefile.am: fix list of headers and sources so automake 1.5
19654 doesn't complain. Removed \# at end of list.
19656 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
19658 * reflection.c: get token for a method ref. Set return type of
19659 constructor to void.
19660 * loader.c: debug message.
19661 * class.c: typo fix.
19663 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
19665 * icall.c: fix array init with rank > 1. FindMembers
19666 loops in parent class as well.
19667 * image.c: do not insert nested types in name cache.
19668 * reflection.c: warning fix.
19669 * reflection.h: add override method (for interface impl).
19671 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
19673 * metadata.c: fix customattr decoding.
19675 2001-12-21 Miguel de Icaza <miguel@ximian.com>
19677 * rawbuffer.cs: Added native Win32 implementation, avoids using
19678 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
19680 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
19682 * class.c: make the low-level routines handle the cache.
19684 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
19686 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
19688 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
19690 * class.c: fix mono_array_element_size() for objects.
19691 * class.h, class.c: add properties to MonoClass and load them
19693 * icall.c: check with isinst() when assigning a value to an array
19694 instead of requiring the classes to match exactly.
19695 Implemented icall for System.Type::GetType().
19696 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
19697 enums. Handle bindingflags when looking for methods and fields.
19698 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
19699 and mono_metadata_methods_from_property().
19700 * reflection.h, reflection.c: added structures for propreties,
19701 parameters and enums. Implemented mono_property_get_object() and
19702 mono_param_get_objects().
19704 2001-12-18 Dick Porter <dick@ximian.com>
19706 * file-io.c: Use mono_string_to_utf16() instead of
19707 mono_string_chars()
19709 * object.c: Added mono_string_to_utf16(), which copies the non
19710 NULL-terminated MonoString into a new double-null-terminated
19713 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
19715 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
19717 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
19719 * file-io.c: raise exceptions if handle is invalid.
19721 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
19723 * assembly.c: yet another check for mscorlib.
19724 * class.c, class.h: load nesting info for classes.
19725 * icall.c: many new functions to support the Reflection classes.
19726 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
19727 * reflection.h, reflection.c: mono_image_create_token(),
19728 mono_assembly_get_object(), mono_type_get_object(),
19729 mono_method_get_object(), mono_field_get_object(): methods to return
19730 objects that parallel the C representation of assemblies, types,
19733 2001-12-11 Dick Porter <dick@ximian.com>
19736 * file-io.c: Internal calls for file IO.
19738 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
19740 * tabledefs.h: missing FileAttributes.
19741 * verify.h, verify.c: use is_valid_string () to simplify and check for
19742 valid strings more correctly. Fix warnings and speeling.
19743 Check more tables: Filed, File, ModuleRef, StandAloneSig.
19744 Check code: branches, maxstack, method calls.
19746 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
19748 * object.c (mono_object_allocate): removed static, so that the jit
19749 can allocate value types.
19751 * icall.c (ves_icall_System_DateTime_GetNow): impl.
19753 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19755 * class.c: init enum types right away and register the
19756 token->MonoClass map in mono_class_create_from_typedef ().
19757 * verify.h, verify.c: first cut of the verifier.
19758 * pedump.c: add --verify switch to verify metadata tables.
19759 * tabledefs.h: add some missing enums.
19761 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
19763 * class.c (mono_install_runtime_class_init): impl.
19764 (mono_class_init): renamed mono_class_metadata_init to
19765 mono_class_init, also removed the metadata_inited flag
19767 * object.c (mono_object_isinst): use faster algorithm
19769 2001-11-30 Radek Doulik <rodo@ximian.com>
19771 * mono-endian.h: reverted last change
19772 added function prototypes
19774 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
19775 add mono-endian.c back
19777 * mono-endian.c: returned back, as Paolo pointed out, it's needed
19778 for unaligned access, I've mistaked it with endianess. I am
19780 (mono_read16): fix reverted endianess
19781 (mono_read64): ditto
19782 (mono_read32): ditto
19784 2001-11-30 Dick Porter <dick@ximian.com>
19786 * exception.c: Implement mono_exception_from_name()
19788 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19790 * metadata.h, metadata.c: remove params_size and locals_size and their
19791 calculation from the metadata code: they are only usefult to the
19794 2001-11-29 Radek Doulik <rodo@ximian.com>
19796 * object.c (mono_ldstr): swap bytes here, it's probably not the
19797 best place, but works for me now, I'll redo it once I know mono
19798 better, also note that I add PROT_WRITE and don't reset back, also
19799 note that it's only affects big endians, so x86 should be OK
19801 * mono-endian.h (read16): use just glib macros for both endians
19803 * mono-endian.c: removed as glib macros are used in in
19804 mono-endian.h so we don't need to care about endianess for read
19805 macros as glib does that for us already
19807 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
19809 * class.h, class.h: take minimum alignment into consideration so
19810 that the fields of a class remain aligned also when in an array.
19812 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19814 * loader.h, loader.c: add mono_method_get_param_names().
19815 * class.c: 0-init class fields.
19817 2001-11-26 Dick Porter <dick@ximian.com>
19821 * threads.c: New file that handles System.Threading on all platforms
19824 * object.h: Remove the synchronisation struct from MonoObject,
19825 replace it with a pointer that gets initialised on demand
19827 * Makefile.am: Replace all the system-specific threading code with
19828 a single file that uses the new wrapper library
19830 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
19832 * class.c, class.h: add mono_install_trampoline() so that the runtime
19833 can register a function to create a trampoline: removes the ugly
19834 requirement that a runtime needed to export arch_create_jit_trampoline.
19835 * object.h, object.c: added mono_install_handler() so that the runtime
19836 can install an handler for exceptions generated in C code (with
19837 mono_raise_exception()). Added C struct for System.Delegate.
19838 * pedump.c: removed arch_create_jit_trampoline.
19839 * reflection.c: some cleanups to allow registering user strings and
19840 later getting a token for methodrefs and fieldrefs before the assembly
19842 * row-indexes.h: updates and fixes from the new ECMA specs.
19844 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
19846 * class.h, class.c: add enum_basetype field to MonoClass.
19847 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
19848 to get index in the constant table reated to a field, param or
19850 * reflection.h, reflection.c: handle constructors. Set public-key and
19851 version number of the built assembly to 0.
19852 * row-indexes.h: update from new ECMA spec.
19854 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19856 * class.h, class.c: add a max_interface_id to MonoClass.
19857 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
19858 since it's used to do that. Added mono_type_type_from_obj().
19859 Make GetType() return NULL instead of segfaulting if the type was not
19860 found. Handle simple arrays in assQualifiedName.
19861 * object.h: add a struct to represent an Exception.
19862 * reflection.c: output call convention in method signature.
19863 Add code to support P/Invoke methods and fixed offsets for fields.
19865 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
19867 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
19869 * icall.c: use mono_array_addr instead of array->vector: fixes the
19870 reflection image writing.
19871 * reflection.c: init call convention byte to 0 in method signature.
19872 Encode the property signature. Don't output property-related methods
19873 twice. Really process the properties for a type (don't cast a field to
19874 a property, my mom always told me that).
19875 Fix 64 bit issues in pointer alignment in a different and more
19878 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
19880 * loader.h: Removed type class from MonoDefaults, added monotype
19882 * loader.c: Loaded MonoType, removed loading of Type
19884 * icall.c (my_mono_new_object): Now returns a System.MonoType,
19885 and fills in System.Type._impl with a RuntimeTypeHandle rather
19886 than the actual MonoClass *
19888 (ves_icall_type_from_handle): change from type_class to
19891 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
19894 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
19897 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
19899 (ves_icall_System_Reflection_Assembly_GetType): implemented
19901 (ves_icall_System_MonoType_assQualifiedName): implemented
19903 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
19905 2001-11-09 Miguel de Icaza <miguel@ximian.com>
19907 * assembly.c (mono_assembly_open): Implement a cache for the
19910 (mono_assembly_close): only destroy the assembly when the last
19913 2001-11-09 Dick Porter <dick@ximian.com>
19915 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
19917 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
19919 * class.c (mono_class_metadata_init): bug fix: compute the right slot
19921 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19923 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
19924 from Martin Weindel.
19925 * object.h: add mono_string_chars ().
19927 2001-11-07 Miguel de Icaza <miguel@ximian.com>
19929 * reflection.c (build_compressed_metadata): Eliminates warnings
19930 and uses 64-bit clean code.
19932 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
19933 (mono_type_equal): Change signature to eliminate warnings.
19935 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19937 * icall.c, loader.c: remove the internalcall array constructors.
19938 Changes to match the new MonoArray structure.
19939 * object.h, object.c: an array object doesn't allocate an extra
19940 vector. Add mono_array_new_full () to create jagged arrays easily.
19942 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19944 * metadata.h, metadata.c: add mono_metadata_field_info () to
19945 retreive all the info about a field from vairous tables.
19946 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19947 * class.h, class.c: augment MonoClassField with more info.
19948 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19949 policy and load a field's RVA if needed.
19951 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
19953 * class.c (mono_class_metadata_init): create a trampoline for all
19954 virtual functions instead of actually compiling them.
19956 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19958 * class.h, class.c: include name in MonoClassField.
19959 * class.c: fix fundamental type of System.Object and System.String.
19960 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19962 * icall.c: remove internalcalls for the Reflection stuff that is now
19964 * loader.c: mono_field_from_memberref () implementation.
19965 * mono-endian.c: thinko (s/struct/union/g).
19966 * object.c, object.h: make the mono_string_* prototypes actually use
19967 MonoString instead of MonoObject.
19968 * reflection.c, reflection.h: updates for changes in the reflection
19969 code in corlib: we use C structures that map to the actual C# classes.
19970 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19971 fat method header if needed and use the info from the ILGenerator for
19972 methods. Handle fields in types. Misc fixes.
19974 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
19976 * class.c (mono_class_metadata_init): bug fix: always allocate
19977 space for static class data
19979 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
19981 * class.c (mono_compute_relative_numbering): use relative
19982 numbering to support fast runtime type checks.
19984 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
19986 * class.c (mono_class_create_from_typeref): added debugging output
19987 to print class name when MonoDummy is returned instead of real class
19989 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
19991 * class.c (mono_class_metadata_init): interface offset table now
19992 contains pointers into the vtable - this is more efficient for the jit
19994 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
19996 * class.c (mono_class_metadata_init): use a temporary vtable (the
19997 old algorithm only worked for the interpreter, but not for the jit)
19999 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
20001 * loader.c (method_from_memberref): use mono_class_get to get the
20002 class of an array instead of using System.Array directly.
20003 (mono_get_method): also add MEMBERREF methods to the method cache
20004 which usefull for arrays.
20006 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
20008 * pedump.c (arch_compile_method): added to compute vtable entry
20010 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
20011 number of interfaces.
20013 * class.h: merged MonoArrayClass into MonoClass
20015 * class.c (mono_class_create_from_typedef): compute the vtable size and
20016 allocate space to include the vtable inside MonoClass
20017 (mono_class_metadata_init): initialize the vtable
20019 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
20021 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
20022 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
20023 * image.c: endian fixes by Laurent Rioux.
20024 * object.h, object.c: rename MonoStringObject to MonoString and
20025 MonoArrayObject to MonoArray. Change some function names to conform to
20026 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
20027 guint16* as first argument, so don't use char*.
20028 Provide macros to do the interesting things on arrays in a portable way.
20029 * threads-pthread.c: updates for the API changes and #include <sched.h>
20030 (required for sched_yield()).
20031 * icall.c: updates for the API changes above.
20032 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
20033 platforms that need them.
20035 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
20037 * class.c: set the correct type for all the fundamental
20038 type when loading the class.
20040 2001-10-05 Dick Porter <dick@ximian.com>
20042 * threads-pthread.c (pthread_mutex_timedlock): Simple
20043 compatibility version for C libraries that lack this call.
20045 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20047 * class.c: MonoTypes stored in MonoClass are stored as
20048 fundamental MonoTypes when the class represents a
20049 fundamental type (System.Int32, ...).
20050 The TypeHandle return by ldtoken is a MonoType*.
20051 * icall.c: ves_icall_get_data_chunk () write out all the
20052 PE/COFF stuff. Implement ves_icall_define_method (),
20053 ves_icall_set_method_body (), ves_icall_type_from_handle ().
20054 * image.c: properly skip unknown streams.
20055 * loader.h, loader.c: add type_class to mono_defaults.
20056 * metadata.c, metadata.h: export compute_size () as
20057 mono_metadata_compute_size () with a better interface.
20058 Typo and C&P fixes.
20059 * pedump.c: don't try to print the entry point RVA if there is no entry point.
20060 * reflection.c, reflection.h: many cleanups, fixes, output method
20061 signatures and headers, typedef and typeref info, compress the metadata
20062 tables, output all the heap streams, cli header etc.
20063 * row-indexes.h: typo fixes.
20065 2001-10-04 Dick Porter <dick@ximian.com>
20067 * object.h: Add a synchronisation mutex struct to MonoObject
20069 * object.c (mono_new_object): Initialise the object
20070 synchronisation mutexes
20072 * icall.c: System.Threading.Monitor internal calls
20074 * threads-pthread.h:
20075 * threads-pthread.c: System.Threading.Monitor internal calls
20077 * threads-types.h: New file, includes the system-specific thread
20080 * threads-pthread-types.h:
20081 * threads-pthread-types.c: New files, handle pthread-specific
20082 synchronisation types
20084 * threads-dummy-types.h:
20085 * threads-dummy-types.c: New files of dummy support for
20086 thread-specific types
20090 * pedump.c: include mono-endian.h not endian.h
20092 * Makefile.am: More threads files.
20093 Name mono-endian.h not endian.h
20095 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
20097 * Makefile.am, reflection.h, reflection.c: move here the reflection related
20098 stuff and implement a few more bits.
20099 * icall.c: a field needs to be dereferenced twice. Do not use the same
20100 name for two variables in the same scope.
20101 * image.c, image.h: cleanups.
20103 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
20105 * class.c (mono_class_metadata_init): bug fix: compute the right size
20107 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
20109 * icall.c: implemented some of the Reflection internalcalls.
20110 * image.c, image.h: start writing out the PE/COFF image.
20111 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
20112 that does the reverse than decode_blob_size ().
20113 * object.c: use mono_metadata_encode_value (). Move here
20114 temporary implementation of mono_string_to_utf8 ().
20115 * rawbuffer.c: make malloc_map static.
20117 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20119 * metadata.c: fix type comparison for arrays.
20120 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
20121 Added a couple of new classes to monodefaults.
20122 * icall.c: added a couple of Reflection-related internalcalls.
20123 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
20124 Added a byval_arg MonoType to MonoClass.
20126 2001-09-28 Dick Porter <dick@ximian.com>
20129 * threads-pthread.h:
20130 * threads-pthread.c: Implemented internal calls for
20131 LocalDataStoreSlot operations. Applied mutexes around all shared
20132 data. Reworked the thread creation and Start() operations to
20133 avoid a race condition.
20136 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
20138 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
20140 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
20142 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
20144 * class.c, loader.c: warn and return NULL instead of erroring out.
20145 * icall.c: added System.AppDomain::getCurDomain().
20146 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
20148 2001-09-25 Dick Porter <dick@ximian.com>
20150 * threads-pthread.h:
20151 * threads-pthread.c: Implemented timed thread joining and added
20152 System.Threading.Thread::Join_internal internal call
20154 * icall.c: Added System.Threading.Thread::Join_internal internal call
20157 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
20159 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
20161 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
20162 mono_string_intern () to implement the semantics of the ldstr opcode
20163 and the interning of System.Strings.
20164 * icall.c: provide hooks to make String::IsIntern and String::Intern
20167 2001-09-23 Dick Porter <dick@ximian.com>
20170 * threads-dummy.h: New files of dummy threading routines
20172 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
20173 support code based on system specifics
20175 Rename PTHREAD_LIBS to THREAD_LIBS
20177 2001-09-23 Dick Porter <dick@ximian.com>
20179 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
20180 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
20182 (mono_thread_init): Set up a Thread object instance to return when
20183 the main thread calls Thread.CurrentThread
20184 (mono_thread_cleanup): Wait for all subthreads to exit
20186 * icall.c: New internal calls for System.Threading.Thread::Sleep
20187 (including Schedule) and CurrentThread
20189 * threads.h: New file, to insulate thread-specific stuff from the
20192 2001-09-21 Dick Porter <dick@ximian.com>
20194 * threads-pthread.h:
20195 * threads-pthread.c: New file, for handling pthreads-style
20196 threading support. Start() now starts a new thread and executes
20197 the ThreadStart delegate instance.
20199 * icall.c: Added the internalcall for
20200 System.Threading.Thread::Start_internal
20202 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
20204 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
20206 * loader.c: work around the different signatures for delegates
20207 constructors csc generates in compiled code vs the ones compiled in mscorlib.
20209 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
20211 * class.h, class.c: add mono_class_get_field_from_name ().
20212 * *: Fix C comments and other ANSI C issues.
20214 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
20216 * endian.h, assembly.c: fix some endianness issues.
20218 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
20220 * loader.h, load.c: add delegate_class to mono_defaults.
20221 Handle runtime provided methods in mono_get_method ().
20223 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
20225 * loader.c (mono_get_method): use pinvoke for internal call
20227 * icall.c: use pinvoke for internal call
20229 * loader.c (method_from_memberref): set the method name
20231 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
20233 * metadata.c: help the compiler generate better code for
20234 mono_class_from_mono_type ().
20236 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
20238 * class.c (mono_class_metadata_init): delayed computing of the
20239 class size to mono_class_metadata_init ()
20241 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
20243 * class.c, class.h: add an interfaces member to MonoClass.
20244 * image.c, image.h: add assembly_name field to MonoImage
20245 from the assembly table.
20246 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
20248 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
20250 * class.c: Handle Array in mono_class_from_mono_type ().
20251 * metadata.c, pedump.c: some endian fixes.
20253 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
20255 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
20256 * metadata.c: fix small problem introduced with the latest commit.
20258 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
20260 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
20261 We don't need a MonoMetadata pointer anymore to compare signatures in
20262 mono_metadata_signature_equal (), update callers.
20263 Reduced memory usage an number of allocations for MonoMethodHeader and
20264 MonoMethodSignature.
20266 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
20268 * metadata.c: added compare for szarray.
20270 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
20272 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
20273 and add a couple more types to it and mono_defaults. Give an hint on
20274 classes that need implementing in our corlib and are referenced
20277 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
20279 * class.h, class.c: keep track if a class is also an Enum.
20280 * loader.c: Implement a couple more types for use in libffi
20281 marshalling. Gives better diagnostics when failing to dlopen
20282 a library. Set method->klass for P/Invoke methods, too.
20284 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
20286 * class.c, class.h: add a MonoType this_arg to MonoClass that
20287 represents a pointer to an object of the class' type that
20288 can be used by the interpreter and later the type cache.
20289 Add best guess alignment info for valuetype objects.
20291 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
20293 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
20294 into MonoType: one less level of indirection and allocation and
20295 simplifies quite a bit of code. Added cache for MonoTypes that are
20296 used frequently, so that we don't need to allocate them all the time.
20298 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
20300 * class.c (mono_class_create_from_typedef): System.Enum is also a
20301 value type, although it does not derive from System.ValueType
20302 (maybe a bug in the ms compiler?)
20304 * metadata.c (mono_type_size): return the right size for value types
20306 * loader.c (mono_get_method): only initialize method header if not abstract
20308 * class.c (mono_class_from_mono_type): use mono_default values.
20310 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
20312 * *: use MonoClass pointers instead of <type_tokens>
20314 * class.h: new flag: metadata_inited.
20316 * class.c (mono_class_metadata_init): impl.
20317 (mono_class_instance_size): impl.
20318 (mono_class_data_size): impl.
20320 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20322 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
20323 MonoClass now has the name and name_space fields.
20324 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
20325 mono_get_method () takes and optional MonoClass as argument.
20326 Removed mono_typedef_from_name() and added mono_class_token_from_name()
20327 instead that takes advantage of a map from class names to typedef
20328 tokens in MonoImage.
20330 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
20332 * metadata.c: zero is not a valid alignment boundary.
20333 Merge MONO_TYPE_VOID in default decoding code.
20335 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
20337 * image.h: merged MonoMetadata into MonoImage
20339 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
20340 identify the type of elements.
20342 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
20344 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
20345 * cil-coff.h: split MonoMSDOSHeader and add size info.
20346 * image.c: add some consistency checks.
20347 * metadata.c: fix row size computation: one programmer
20348 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
20349 add explanation for the locator routine.
20350 Fix decoding of size in method header.
20352 2001-08-20 Miguel de Icaza <miguel@ximian.com>
20354 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
20355 (g_concat_dir_and_file): Bring g_concat_dir_and_file
20356 function from gnome-libs. This uses the right path separator
20357 based on the OS, and also works around a bug in some systems where
20358 a double slash is not allowed.
20359 (default_assembly_name_resolver): Use g_concat_dir_and_file
20360 (mono_assembly_open): ditto.
20362 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
20364 * metadata.c (mono_metadata_signature_equal): impl.
20366 * *: void is now a realy MonoType (instead of using NULL)
20368 * metadata.c (do_mono_metadata_parse_type): use
20369 mono_metadata_parse_type to parse void value.
20371 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
20373 * metadata.c, metadata.h: in the signature and method header store
20374 only the space required for holding the loca vars and incoming arguments.
20376 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
20378 * metadata.c (do_mono_metadata_parse_type): treat void like any
20379 other type (instead of assigning NULL);
20381 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
20383 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
20385 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
20387 * image.c (do_mono_image_open): added a cache for arrays.
20389 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
20391 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
20392 decode a single column from a row in a metadata table and changes
20393 to take advantage of it in the typedef locator (gives a nice speed up).
20394 Store offset info for function params.
20396 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
20398 * image.h (MONO_IMAGE_IS_CORLIB): removed
20400 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
20402 * assembly.c: how could mono_assembly_close () had ever worked?
20403 * metadata.c, metadata.h: provide offset info for local vars.
20404 Implement mono_type_size () to take care of alignment as well
20405 as size (it was mono_field_type_size in cli/class.c before).
20407 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
20409 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
20411 * assembly.h (CORLIB_NAME): set to corlib.dll
20413 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
20415 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
20417 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
20418 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
20419 tokentype.h: massive namespace cleanup.
20421 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
20423 * metadata.h, metadata.c: decode exception clauses when parsing method header.
20425 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
20427 * metadata.c (mono_metadata_free_type): added check for type !=
20428 NULL (void) before calling mono_metadata_free_type()
20430 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
20432 * metadata.h, row_indexes.h: added header with enumerations to use
20433 to index in the columns from tables in metadata and to decode coded
20434 tokens: we should start using this instead of embedding magic numbers
20437 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
20439 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
20440 Move metadata_t info from cli_image_info_t to MonoImage, where
20441 it's easily accessible. Changed all the uses accordingly.
20442 Added the method and class caches to MonoImage.
20443 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
20444 and mono_metadata_decode_value () signature to be more consistent
20445 with the other parse functions (and simplify code). Taken advantage
20446 of zero-length array allocation with GCC. Removed reduntant (and
20447 wrong) MonoFieldType struct and use MonoParam instead. Changed
20448 mono_metadata_parse_field_type () to use common code for parsing.
20449 Added mono_metadata_typedef_from_field () and
20450 mono_metadata_typedef_from_method () to lookup a typedef index from a
20451 field or method token.
20452 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
20454 2001-07-23 Miguel de Icaza <miguel@ximian.com>
20456 * metadata.c (mono_metadata_parse_field_type): Implement.
20457 (do_mono_metadata_parse_type): Split engine from
20458 mono_metadata_parse_type, so that we can create smaller structures
20459 for things that just have one pointer to the MonoType (look at
20462 2001-07-20 Miguel de Icaza <miguel@ximian.com>
20464 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
20465 as Jan Gray found out, it is incorrect.
20467 2001-07-18 Miguel de Icaza <miguel@ximian.com>
20469 * assembly.c: Implement asssembly loading. This loads an image
20470 and loads all the referenced assemblies. Come to think of it, we
20471 could always do lazy loading of the assemblies.
20473 * image.c (mono_image_open): Keep loaded images in a hashtable.
20475 * image.h (MonoImage): Add reference count.
20477 2001-07-17 Miguel de Icaza <miguel@ximian.com>
20479 * assembly.c (mono_assembly_open): Keep track of the file name in
20480 case the assembly has no ASSEMBLY table.
20482 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
20485 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
20487 * metadata.c, metadata.h: decode local vars in method header
20488 parse function. Change callers accordingly.
20490 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
20492 * metadata.h, cil-coff.h: protect against multiple inclusion.
20493 Added some new structures to hold information decoded from metadata:
20494 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
20495 and relevant decoding/free functions.
20496 * metadata.c: implement decoding functions. Add warning for out of bounds
20497 index in mono_metadata_locate(). Implement mono_get_method () to retreive
20498 all the info about a method signature and invocation. Remove check on
20499 uninitialized local var in parse_mh() and fix memory leak.
20501 2001-07-12 Miguel de Icaza <miguel@ximian.com>
20503 * metadata.h: More macros.
20505 * tokentype.h: New file.
20507 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
20509 * assembly.c: added a consistency check and initialize
20510 some structures with g_new0().
20511 * metadata.c: fixed a couple more bugs in table size computation
20512 and add other checks for out-of bound access to metadata.
20514 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
20516 * metatada.c: fix bugs computing table sizes. Spew a
20517 warning when index in string heap is out of bounds.
20519 2001-07-04 Miguel de Icaza <miguel@ximian.com>
20521 * metadata.h: Add a couple of macros to manipulate tokens.
20523 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
20525 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
20526 cli_section_tables).
20528 2001-07-01 Miguel de Icaza <miguel@ximian.com>
20530 * metadata.c (mono_metadata_user_string): New function, provides
20531 access to the UserString heap.
20533 2001-06-27 Miguel de Icaza <miguel@ximian.com>
20535 * metadata.c: Add inline documentation.
20537 2001-06-26 Miguel de Icaza <miguel@ximian.com>
20539 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
20542 2001-06-22 Miguel de Icaza <miguel@ximian.com>
20544 * typeattr.h: New file, TypeAttribute flags.
20546 2001-06-21 Miguel de Icaza <miguel@ximian.com>
20548 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
20549 mono_assembly_ensure_section): Section loading code.
20550 (load_section_tables): Load the sections.
20552 * mono/metadata/metadata.c (mono_metadata_locate_token,
20553 mono_metadata_locate): Functions to locate the information
20554 definition given a token or a table and an index.
20555 (mono_metadata_compute_table_bases): New.
20556 (compute_size): New function to compute the sizes of the various
20559 * mono/metadata/metadata.h: Finish listing the different index
20562 * mono/metadata/pedump.c: Improve to dump new information.
20564 2001-06-19 Miguel de Icaza <miguel@ximian.com>
20566 * mono/metadata/metadata.c: Entered all the tables matching
20569 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2